01-24-2012 05:54 PM
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!
01-24-2012 06:55 PM
01-24-2012 07:22 PM - edited 01-24-2012 07:22 PM
Hi Steve: What do you mean by scripting?
01-24-2012 07:48 PM
01-24-2012 07:59 PM
01-24-2012 08:44 PM
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!
01-25-2012 09:43 AM - edited 01-25-2012 09:46 AM
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 ![]()
08-24-2012 01:30 AM
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.....
08-24-2012 08:29 AM
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.
08-24-2012 08:46 AM
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