NOT function not working
02 Jun 2023 10:00 - 02 Jun 2023 10:05 #272688
by Greshr
NOT function not working was created 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
screenshot while CNC was running
Any help will be appreciated. Thanks in advance
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
###### 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
Any help will be appreciated. Thanks in advance
Attachments:
Last edit: 02 Jun 2023 10:05 by Greshr. Reason: formatting problems
Please Log in or Create an account to join the conversation.
- tommylight
- Away
- Moderator
Less
More
- Posts: 19202
- Thank you received: 6436
02 Jun 2023 10:56 - 02 Jun 2023 10:57 #272695
by tommylight
Replied by tommylight on topic NOT function not working
Missing
addf not.0 servo-thread
addf not.0 servo-thread
Last edit: 02 Jun 2023 10:57 by tommylight.
Please Log in or Create an account to join the conversation.
02 Jun 2023 11:04 - 02 Jun 2023 11:05 #272696
by JPL
Replied by JPL on topic NOT function not working
...And I believe missing too:
addf constant.0 servo-thread
addf constant.0 servo-thread
Last edit: 02 Jun 2023 11:05 by JPL.
The following user(s) said Thank You: tommylight
Please Log in or Create an account to join the conversation.
02 Jun 2023 11:08 #272697
by Greshr
Replied by Greshr on topic NOT function not working
Thanks, I thought it would be something straightforward.
Please Log in or Create an account to join the conversation.
02 Jun 2023 11:09 #272699
by MaHa
Replied by MaHa on topic NOT function not working
I think, you don't even need constant.
should do it also
setp comp.0.in1 0
should do it also
Please Log in or Create an account to join the conversation.
- tommylight
- Away
- Moderator
Less
More
- Posts: 19202
- Thank you received: 6436
02 Jun 2023 11:16 #272704
by tommylight
Replied by tommylight on topic NOT function not working
Missed that, need bigger glasses!...And I believe missing too:
addf constant.0 servo-thread
Please Log in or Create an account to join the conversation.
Time to create page: 0.217 seconds