NOT function not working

More
3 years 4 months ago #272688 by Greshr
The NOT function is not behaving as expected. Despite any changes in the input signal, the output is always false. I am trying to set up an LED to remain lit while the X-axis is moving

The hardware that I am using is a 5i25 card with a 7i25 daughter board and a 7i25 protected breakout. I am using the protected breakout to control some LEDs and a few button inputs and the daughterboard for controlling the CNC.

Code
Code:
###### LED axis Loadrts ###### loadrt comp  loadrt constant loadrt hal_parport cfg="0" loadrt not  ###### LED X Axis ###### setp constant.0.value 0 addf comp.0 servo-thread net  x-vel-cmd joint.0.vel-cmd => comp.0.in0 net sig-comp-0-input constant.0.out => comp.0.in1 net sig-comp-0-output <= comp.0.equal net sig-comp-0-output => not.0.in net sig-not-0-output <= not.0.out net sig-not-0-output => hm2_5i25.0.gpio.021.out


screenshot while CNC was running
 

Attachment not found



Any help will be appreciated. Thanks in advance 

Please Log in to join the conversation.

More
3 years 4 months ago #272695 by tommylight
Replied by tommylight on topic NOT function not working
Missing
addf not.0 servo-thread

Please Log in to join the conversation.

More
3 years 4 months ago #272696 by JPL
Replied by JPL on topic NOT function not working
...And I believe missing too:

addf constant.0 servo-thread

Please Log in to join the conversation.

More
3 years 4 months ago #272697 by Greshr
Replied by Greshr on topic NOT function not working
Thanks, I thought it would be something straightforward.

Please Log in to join the conversation.

More
3 years 4 months ago #272699 by MaHa
Replied by MaHa on topic NOT function not working
I think, you don't even need constant.
Code:
setp  comp.0.in1   0

should do it also

Please Log in to join the conversation.

More
3 years 4 months ago #272704 by tommylight
Replied by tommylight on topic NOT function not working

...And I believe missing too:

addf constant.0 servo-thread
Missed that, need bigger glasses! :)

Please Log in to join the conversation.

Time to create page: 0.093 seconds
Powered by Kunena Forum