04-17-2024 02:28 AM - edited 04-17-2024 02:36 AM
Hello,
I am using a DAQ mx counter to count front edges. I have a sensor that sends 0 to 5 V connected to an NI 9411. What I want to do is, when I detect a rising edge, I want to set the variable "Trigger" to true. This variable will be used in another loop to set another variable to true. What I have noticed is that when the counter is incremented, my "Trigger" variable does not switch to true.
Thank you,
04-17-2024 02:40 AM
Hi KS200,
@KS200 wrote:
Hello,
I am using a DAQ mx counter to count front edges. I have a sensor that sends 0 to 5 V connected to an NI 9411. What I want to do is, when I detect a rising edge, I want to set the variable "Trigger" to true. This variable will be used in another loop to set another variable to true. What I have noticed is that when the counter is incremented, my "Trigger" variable does not switch to true.
Do you mind to cleanup block diagrams before posting such images? Thank you…
On topic:
04-17-2024 02:44 AM
Hello,
Thank you for the response. I apologize for the images; I will keep that in mind for next time.
Yes, the counter task loop sets my variable to true. Yes, I did debug, and I can see that the wire values change. For example, when the counter increments, I can see that the condition x > y becomes true, but my shared variable doesn't.
Thank you,
04-17-2024 02:56 AM
Hi KS200,
@KS200 wrote:
For example, when the counter increments, I can see that the condition x > y becomes true, but my shared variable doesn't.
We cannot tell you why the SharedVariables don't work as expected from looking at images of code…