LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to run multiple programs simultaneously on the same block diagram

Solved!
Go to solution

hello all,

 

I want to run three instruments simultaneously on the same block diagram. One is a position control for linear drives, other is an  optical micrometer and the third is a digitizer card. When using tabbed controls, the linear drive Vi is the only thing that seems to run (confirmation on the front panel) but the optical micrometer does not show any indication on the front panel but is running in the background. I used a tabbed control to consume less space on the front panel. Can someone help me to solve this issue where I can run multiple VIs on a single block diagram and could see the same on the front panel. I am attaching my VI.

 

Thanks for the help!!!

 

 

0 Kudos
Message 1 of 6
(3,213 Views)
Solution
Accepted by topic author ss25

I can't open your VI, but in general; Either you use one loop with all instruments in the same loop, or separate loops for each with no wires between them that forces order of execution. Do you have any of that?

Tab control is purely visual and has nothing to do with execution.

Parallell Loops.png

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
Message 2 of 6
(3,206 Views)

Thanks for the response I will try your suggestions. By the way, I want the digitizer card measurements to be synced with the linear drive programs. The linear drives will carry a wire on which I ll send signals and use electrodes to detect back signals. the digitizer card works on continuous streaming but i want the measurement to be saved only when the wire is static. the wire will be moved across the electrode to multiple positions. In that case can I use timed loop structures and time delays to sync them or is there a better suggestion.

 

 

Thanks in advance!!!!

 

0 Kudos
Message 3 of 6
(3,201 Views)

Depending on your speed, time delays can work well. Windows isn't very accurate at 1-3ms waits, but if it's 10ms+ (maybe even 5+) it's close enough. Else you'll need some other timing source, e.g. if you know or can set up the digitizer card to give one sample every X amount of time, you can wait for 1 sample and use it as a clock.

As for saving when static, you need to keep some memory so you can determine if it's static, and use a case structure to save if that's the case.

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 4 of 6
(3,196 Views)

Thanks for the clarification. My time delays are at 12 seconds as I have to wait for the wire to stop its vibrations. Then from your suggestion, it sounds that it should work.

 

 

 

0 Kudos
Message 5 of 6
(3,192 Views)
Solution
Accepted by topic author ss25

Ah yes, but you don't want to lock your program with a 12 sec wait if there's no way of stopping the program. An Event structure (without front panel locking) or 12 1sec waits that checks for a stop button is a solid start. 🙂

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
Message 6 of 6
(3,187 Views)