01-30-2006 05:20 PM
I am running Labview 6.1 and am new to event structures. I have set one up that looks for a change in value from one of 4 Boolean buttons. Each button is set mechanically to “latch when released”. Eventually these buttons will be used to increase or decrease gain on a 2 channel DAQ process. But because I am new to event structures, I have not implemented the DAQ yet. I wanted to first make sure I was getting the event structure to function properly.
In the main program I have a sequence structure that first turns on an indicator on the front panel. The next sequence panel is a for loop that executes 1000 times with a 500 msec wait loop and then an output of the i value to an indicator. This is just to make sure that the program is executing and hasn’t hung up. The event structure is in this sequence frame.
In my event structure I have a sequence structure that first turns off the indicator mentioned in the above paragraph. The next sequence frame reads all four Boolean buttons and puts the results into an array. I index the array and send each value to an indicator on the front panel so I could be sure that only one button was pushed and that the array had the correct button active. I then use the array to figure out which channel should be changed and whether it should go up or down. There is logic to prevent increasing past the maximum gain or decreasing past the minimum gain. I then update the front panel values of the voltage limits (based on the new gain). The third panel of the sequence structure is a 750 msec wait loop. The fourth panel of the sequence structure turns back on the indicator that was turned off in the first panel of the sequence structure.
When I start the program, the indicator turns on and the counter starts counting. I press the decrease button for channel one and the following happens. The indicator goes off (indicating that the event structure is executing). The 4 indicator lights indicate that the correct button has been pushed and only that one is active. The limits for channel one change from plus and minus 10 volts to plus and minus 5 volts. There is a short delay and then the indicator comes back on. The counter continues to count upward toward 1000. Everything worked perfectly!
Now, if I push any of the four buttons, the button greys, the indicator light does not go out, and nothing happens with my voltage limits. The counter continues to count upward, but the event structure does not seem to execute the second time. Help!
01-30-2006 05:38 PM - edited 01-30-2006 05:38 PM
Message Edited by altenbach on 01-30-2006 03:38 PM
02-03-2006 01:02 PM
02-03-2006 01:09 PM