LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Transfer queue ref and notifiers to parallel subvis

Hello everyone,

 

I have several queued state machines some which drive hardware and others that are driven by events occuring at the GUI etc.. and i would like to make them in subVis + enable parallel processing between all of them. Also i would like to disable some of GUIs controls which have events

 

I have 3 questions:

 

How do i enable parallel processing? if you could point to some material i could study etc would be nice.

 

How do i pass notifieers and queues to subvis?

 

How do i disable controls that respond to events?

 

 

Cheers

0 Kudos
Message 1 of 5
(3,709 Views)

if you want to pass the queue/notifier reference to a subVI you need a connector. Just create an indicator from your reference then change it to a control that you copy then paste into your subVI.

 

What do you mean by "parallel processing"? Is it reentrant execution?

Rodéric L
Certified LabVIEW Architect
0 Kudos
Message 2 of 5
(3,707 Views)

Hi Roderic,

 

The Hardware queued state machines will be controlled by the main loop and they would need to run in parallel with the main loop and never exit until the main loop has being instructed to exit.

 

I have posted a part of my code basicly the main loop will have 4 stages, idle where it just get data from the user, ok where the normal process will start and all queued state machines will be called from there in a specific sequence according to the type of measurement etc.

 

Cancel where the code will stop close resources based on where the execution of OK was halted

 

Exit where all the queues are discarded etc to shut down the program properly.

 

I just want to remove all those hardware loops and make them into neat looking Subvis so the code is more readable later on

0 Kudos
Message 3 of 5
(3,703 Views)

You can do that, as long as they don't use any local variables or property nodes of a control or indicator in the loops. For most of the sub vi's the only inputs will be the error cluster and a queue reference.

 

I would also combind all GUI operations in one loop.

 

0 Kudos
Message 4 of 5
(3,685 Views)

In some loops i read local variables / write to some locals of the GUI , should i make those globals so that they can be transfered?

 

And also how do i make these subVis run parallel to the Main loop and GUI?

 

If i created the subvis and pass the queue references etc would it work in parallel or should i call the Vis using call reference Vi or some other method?

 

i just noticed  i sent an old version of my program here is the normal one

0 Kudos
Message 5 of 5
(3,676 Views)