LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

NI 9853 write the last message not the current message

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

Download All
0 Kudos
Message 1 of 3
(1,868 Views)

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

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 2 of 3
(1,817 Views)

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

0 Kudos
Message 3 of 3
(1,803 Views)