09-17-2019 03:19 AM
I'm using cRIO-9045 with NI-9853, I tried to transmit the data through the Event Structure to detect the button status in the Host vi. I used Network-Published Shared Variables to communicate between cRIO and Host PC. I set the mechanical action of Boolean "switch until released" for transmitting the data once. I used the USB-8502 to monitor the data I received, I have to click twice to transmit the right data, the first will send the last value.
Thanks in advance.
Best Regards
Tony
09-17-2019 07:34 AM
Set a break point in your Event, i think Switch _until_ released creates 2 events, one for off and one for on, which'll make it easy for the Target to get the wrong value. Changing it to Switch when pressed (or released) should solve it.
/Y
09-17-2019 10:10 PM
Hi Yamaeda
Thanks for replying
I used Switch _until_ released to be a trigger to transmit one message each time when press the button. I used the new value of event structure to control the trigger. If u use the Switch when pressed it will keep the trigger's value is true, and that's why I didn't use that.
Best Regards,
Tony