From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
05-06-2015 04:21 AM
Hi all ,
I like to use two independent process works inside event structure . but both have different time delay.
so if my both events in same loops . its waits for the another event to finish.
but i need a event that should work independently.
SO tired with two seperate loops ,working fine .
My question is if i have more than 20 events do i need to create seperate loop for each . to work independently
05-06-2015 04:32 AM
You should use two loops, first one with event structrure. In the events you can send command to the second loop, which process to launch. In second loop you should have separate subVIs (processes) which should be launch, depending on the message from event structure.
Process should be launched using start Asynchronous Call.
05-06-2015 04:37 AM
Hi thanks for a response ,
if you dont mind ,
do you have any example file?
05-06-2015 06:46 AM - edited 05-06-2015 06:46 AM
Attachment
05-06-2015 07:22 AM
Open LabVIEW, go to File, New, From Template, and choose Producer/Consumer (Events). [Note I might have the name wrong, it might be Consumer/Producer].
This is a very common pattern for coordinating parallel loops. One loop "produces" things to do, in this case, Events that signal "do this task". The other loop "consumes" the tasks that the first loop creates. The notion, when using Events, is that the Event loop patiently "waits" for an Event, taking no CPU time, then when an Event occurs, it is handed off to another routine that executes it. Note that Queues are usually used to convey signals from Producer to Consumer.
If you have two (or more) processes that need to "consume" Events in parallel, you have several possible choices. One is to have multiple Consumers (which sometimes requires multiple Queues, one for each Consumer). The other is to "spawn" an asynchronous sub-VI to do the work. I'm not sure where to point for an example, but a look at the examples for Start Asynchronous Call would be a place to start.
Bob Schor
05-06-2015 07:32 AM
Hi,
If you search example finder with key word "Asynchronous" you will get more information regarding you question.
Thanks,
Badri