03-28-2014 01:23 AM
Hi guys,
This is more of a question out of curiosity. I am using a boolean trigger (LED) to execute some code inside of an event structure. I also have to pass this boolean value into the event structure in order to send it to another script I connect with using ActiveX.
Whenever I use the Bool to (0,1) conversion it inverts the signal (when the LED is 'ON' a zero is output and vice versa). Does anyone know why this happens? It is essentially a direct connection from the LED trigger to the converter with the only obstruction being that it has to cross into the event structure on the way.
03-28-2014 01:31 AM
It would be helpfull if you can show the code (Please down convert to LV2011 version).
Open the property of the LED and check how the color of the LED is configured.
03-28-2014 01:41 AM
You probably have a race condition.
If the terminal is before the event structure, the current boolean value gets read first, then the value propagates to the input tunnel of the event structure where it is read once the event fires. At this point, the value is still the old one read earlier. LabVIEW will not backtrack and read the terminal again until the next iteration of the loop.
If you need to know the value right after the event has fired, you need to place the terminal inside the event case. This way the terminal will only get read once the event has triggered.
For more detailed help, please attach your VI.