LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I get my application to continue processing instead of waiting for a menu selection when the user clicks on a drop-down menu?

I'm developing a process-control application,using serial communication for data acquisition. My problem - I need this serial read of data to be continuous. But, when I click on a drop-down menu, the rest of the processing halts until I click on one of the menu items in the drop-down list and I lose data in that interval. What can I do?
0 Kudos
Message 1 of 4
(2,969 Views)
Instead of having 1 main loop, try two independant loops: one for user-interfacing and the other for fysical I/O and processing.
0 Kudos
Message 2 of 4
(2,969 Views)
The Get Menu Selection.vi has boolean output "timed out" which returns true whether a user selection was made within the time specified by input "ms timeout".
You can use case structure. In box "true" you can serve menu selection, and in box "false" execute main program.
"ms timeout" is the maximal time, which you can intend to select menu item without loosing data from RS232.
Romek.
0 Kudos
Message 3 of 4
(2,969 Views)
In most process-control applications it is not about just avoiding lost measurement data. The most important is having a robust control-algoritm that reacts to a change of input-situation in a given time.
A non-responsive system is not a very reliable process-control solution.

The vi you mentioned are only around since the latest versions and the old method of polling controls still suits many applications (but that's another discussion).

As about RS-232 input time-outs, I have never used that.
In the time before VISA was created I (as other LabVIEW users I discovered) used a method of storing every incoming string in a buffer (memory-vi with USR) and that still works (classic serial VI's versus VISA is also another never-ending discussio
n).
0 Kudos
Message 4 of 4
(2,969 Views)