Filippo Posted December 13, 2023 Report Share Posted December 13, 2023 (edited) Hello everyone, I'd like to start saying that I'm a beginner with LabVIEW. I was trying out a very simple code to get acquainted with shared variables. In this code, I want that, by pressing 'OK' on scada.vi, the LED in rt.vi turns on. To do this, I created a 'start_S' variable in 'My Computer' as shown with there features: -Type boolean; - Network-Published - Initial value equal to "False" I can't understand why this very simple programm can't work, when i run scada.vi and rt.vi, i press the ok button and the led in rt.vi doesn't turn on! Canyou please help me? Thanks. Edited December 13, 2023 by Filippo Quote Link to comment
JCAndersen Posted December 20, 2023 Report Share Posted December 20, 2023 Hi Filippo. My guess is that your "OK Button" has its mechanical action set to "Latched when released". Since you update the shared variable with the value from "OK Button" every 100 ms you will not even see the "Boolean" blink. I would use an Event structure in your "scada.vi" and create a "Value Changed" event for the "OK Button". In that event case I would update the shared variable from the "New Value" terminal. I would also create a "Value Changed" case for the "stop" button and wire the value from the "New Value" terminal to the loop termination terminal. Then you can remove the 100 ms delay. I hope this helps. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.