10-16-2012 03:38 AM
Hi everybody
I want when "LED1" was "True" , "LED2" be "True", but "LED2" wasn't "True" .
Could you please tell me why my program doesn't work , I attached it.
Sorry my English not very good!
Thanks.
10-16-2012 04:09 AM
Changing a control with a local variable will not trigger an event. To do this you need to change your Local Variable to a Value (Signaling) property Node
Ken
10-16-2012 04:12 AM
Hi Mayayi
A change in value of local variable will not generate an event.
"Events can originate from the user interface, external I/O, or other parts of the program." (From LabVIEW Help)
To generate events programatically you can use the Value Signalling property of the Object.
10-16-2012 04:18 AM
LED 2 will blink only when you click LED1 from the GUI provided you disable the code in the timeout case.
Since you have given timeout as 500 msec, the GUI will be polled once every half second
However if you are just looking for making LED1 and LED2 ON/OFF once every predefined time ( secs), this is not the good way
10-16-2012 07:41 AM
You should also add a way to stop the loop. Using the Abort button is not good.
10-21-2012 10:24 AM
10-21-2012 12:07 PM
Mayayi wrote:Could you please tell me why my program doesn't work , I attached it.
The program works just fine, just not the way you want ot to. 😄 It is not broken per se.
Mayayi wrote:I want when "LED1" was "True" , "LED2" be "True", but "LED2" wasn't "True" .
Sorry, I have no idea what that means. LED2 cannot be TRUE and FALSE at the same time, so somethings must have gotten lost in translation. Can you give us a full truth table? How should the LEDs depends on time and on each other?
LED1 seems to be a control, so it can be operated. However the timeout case directly interferes with its state, potentially fighting the operator. Please describe in detail how the program should behave.
What should happen over time if nothing is pressed. What should change if LED1 is pressed?