07-21-2010 12:19 PM
Is there an equilavent LabView command to LabWindows' ProcessSystemEvents command?
Solved! Go to Solution.
07-22-2010 02:10 PM
Hello Paul,
The closest equilavent to the ProcessSystemEvents is the Event Structure. The Event structure can process events for the user interface and here is the help file for more information. The Event structure also has Dynamic Event Registration which can be used along with the Register for Events Function to record and process events from other programs, drivers, etc.
Here are some examples where they are used for you to look at:
Generate Event for External Signal
07-27-2010 08:38 AM
Can you put a loop within an Event Structure? I have an Event Structure that takes 5 events from the user. One event is to start taking measurements, up to 1000 measurments in a while loop. If there is some setup error, I want the user to be able to stop the loop and return to the Event structure to wait for the next event. The "Stop" button of the while loop does not appear to get updated until after the while loop gets to its condition end.
07-27-2010 09:14 AM - edited 07-27-2010 09:15 AM
You should take a look into the producer/consumer (event based) design pattern installed with LV. You can find it in the template browser (File >> New).
You should avoid putting code into an event structure which takes an unknown amount of or a long time (blocking code!). Also never stack events in such a way that the event structure will lock up.
Please note that if the default producer/consumer (event based) is not sufficient for your needs, you can always extend it to fit your needs (adding additional consumers with new, dedicated queues/extend the consumer to be a queued state machine which feeds itself if necessary/...)
hope this helps,
Norbert