LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Run multiple instruments in parallel

I am trying to run a number of identical instruments in parallel through a USB-to-GPIB cable and encountered some problem.

The sub vi developed for individual instrument control is set to be reentrant and its multiple copies are wired in parallel pattern in main vi. But the the instruments still run one after another in sequence.

 

Since the sub VI call a good number of other secondary subvis, do I need to set all the secondary subVI to be reentrant?

If so, it would take forever for me to do that. Are there any other simpler solutions?

 

Please help!

0 Kudos
Message 1 of 18
(5,058 Views)
They all need to be reentrant. If there are subvis that execute very quickly then you would not notice. But any VI that communicates with your instrument does need to be. If you know scripting you can get a list of your VIs subVIs and set them to be reentrant but it might be quicker to just identify the ones that are blocking and manually set them.
=====================
LabVIEW 2012


0 Kudos
Message 2 of 18
(5,049 Views)

Hi Steve: What do you mean by scripting?

0 Kudos
Message 3 of 18
(5,045 Views)
Do you have a GPIB controller for each instrument? Otherwise, you are wasting your time. GPIB is sequential - not parallel. Search for a GPIB tutorial.
0 Kudos
Message 4 of 18
(5,039 Views)
Scripting lets you write or manipulate LabVIEW code with LabVIEW. If you are not familiar with it then it is not worth learning for this one problem. But Dennis brings up a good point - unless you have a controller for each device, which I assumed you did, you are wasting your time.
=====================
LabVIEW 2012


0 Kudos
Message 5 of 18
(5,036 Views)

Thank you guys for all your comments! I had the same concern at the beginning about the GPIB bus limiations, but it works!

After setting all my subvis to be reentrant, I am able to make my four instruments running almost simutaneously and read back data from all the instruments. So fast !!!

 

P.S.

I have been using LabVIEW for several years on and off, always complain about the drawing part and want to shift to other text based programming languages. But this is the first time, I feel that LabVIEW is super!

 

 

0 Kudos
Message 6 of 18
(5,031 Views)

I'm glad you got it working the way you want it to. As for GPIB, only one instrument can be communicating at a time. If it is a quick transaction it would look like the instruments are communicating simultaniously. But if you have a subVI that has a loop doing a lot of transactions then that subVI will block if it is not reentrant and you will see only one instrument active at a time. Making that reentrant will let your devices take turns on the bus.

 

I know where you are coming from. I didn't always like LabVIEW either Smiley Happy

=====================
LabVIEW 2012


0 Kudos
Message 7 of 18
(5,009 Views)

Can I read from the instruments parallely? For example I have two DVMs measuring voltages from two different pins of an IC. Can I take readings parallely? I was told for us to take readings one after the other. Is that true? If so why?

One more thing is do we need to close VISA sessions of instruments one after the other?

Thanks in advance.....

 

0 Kudos
Message 8 of 18
(4,943 Views)

If you have one GPIB Controller then too it is practically possible because measuring a voltage from DVM is less than a milisecond job. Put two indipendent while loops (keep few milisecond delay in each while loop) for measuring voltage from two different DVM (DVMs must have different GPIB address). It will look like parallel measurement of two different voltages. After coming out of loop you may close the session.

 

Ideally not two measurement will be done at same instent of time.

 

0 Kudos
Message 9 of 18
(4,931 Views)

If you need simultaneous measurements, use instruments which have a triggering capability.  Set up the triggering on all instruments to use the same trigger signal. Then when the trigger is issued all the instruments will make their measurements at the same time. You can read the measurements sequentially from the instruments so long as all the readings are done before you need to make the next measurement.

 

This eliminates any need to try to be "parallel" with the GPIB.

 

Lynn 

Message 10 of 18
(4,922 Views)