ni.com is currently experiencing unexpected issues.

Some services may be unavailable at this time.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

time out in event structure.

Recently, I study the design pattern.
 
I used all events in one event structure.
Usually, "Go button value change event" and "Time-out" need to acquire some data for a long time via RS-232.
To have responsible UI event, therefore, I would like to put "Time-out" outside event structure using another while loop in parallel loop scheme.
 
My question is how to deactivate "Time-out" when some UI event is fired and activate Time-out in case of completing UI event without any confliction of RS-232 communication.
In addtion, some variable such as VISA port should be updated in outside event structure.
 
0 Kudos
Message 1 of 2
(2,647 Views)
You are on the right track. Move the operations that will take a long time to a second parallel loop and pass the data back to the GUI event loop using a queue, functional global, or even a user event. In terms of how to implement this functionality look at the producer/consumer and master/slave design pattern templates.

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 2 of 2
(2,627 Views)