LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Process System Events

Solved!
Go to solution

Is there an equilavent LabView command to LabWindows' ProcessSystemEvents command?

0 Kudos
Message 1 of 4
(2,734 Views)

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:

Event Structure (Basics)

Generate Event for External Signal


Jim St
National Instruments
RF Product Support Engineer
0 Kudos
Message 2 of 4
(2,709 Views)

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.

0 Kudos
Message 3 of 4
(2,678 Views)
Solution
Accepted by topic author Paul_Knight_Lockheed_Mart

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

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 4 of 4
(2,670 Views)