Greetings,
In the app I'm building, I have an event structure in a while loop monitoring user-interface
interaction. In parallel with the event structure's while loop are many VI's running in parallel,
waiting for notification to be sent from the event structure. There are acquisition and output
loops that always run, and others that are triggered by the acquisition loop when it acquires
new data. Before acquisition starts, all these loops must use the Wait on Notification from Multiple.vi
to see if the start button or the exit button is pressed. I create notifiers and write them to a
functional global prior to the spawn of the event structure and other loops. The other loops
read from the functional global and build arrays for the notifiers that they need to monitor.
Now to the problem: Everybody is waiting for the start or exit button to be pressed. If I
press the exit button, sending a boolean TRUE with the exit notifier, all the loops wake up
and proceed, but read a value of FALSE when they pull that notifier's value out from the array of
notifications. Thus, they execute code for the case of the start button being pressed
instead of the exit button, and since no DAQmx tasks have been created, the program
terminates. This is not the graceful termination I had intended for the exit button.
I can guess that it's either the use of the functional global of notifiers, or that each loop
builds an array of notifiers from the globals that's causing the problem. However, I need
the loops to be outside of the event structure so that the acquisition and analog output
can run in parallel and continuously while the front panel is monitored. I can't do what
I could do in LabWindows which is launch the data acquisition thread when the start
button is pressed. To do this within the event structure would lock the user interface
since the acq thread requires the user to press the stop button to terminate and the
event structure wouldn't be able to check the UI until the thread terminated.
Any suggestions? I'm relatively new to LabView (we're using v7.1), so every little bit
helps.
Thanks,
Kevin