LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

can i read GPIB instruments in paralel?

Hello,

I would like to know if i can read/write data to two instrument conected to my computer via GPIB bus at the same time. I know that i can use data flux (error in/out) to sequentiate the readings.

How can i garante that both measurements start at the same time (even if the measurements have diferent time span)

Thank for the help!

 

Thiago Bach

0 Kudos
Message 1 of 15
(2,226 Views)

Thiago Bach wrote:

Hello,

I would like to know if i can read/write data to two instrument conected to my computer via GPIB bus at the same time. I know that i can use data flux (error in/out) to sequentiate the readings.


You can't. GPIB is not designed to do that.

 


How can i garante that both measurements start at the same time (even if the measurements have diferent time span)

This is actually a different question. If they support it (i.e. you need to look in the manuals for the instruments), you can configure the instruments to wait for a trigger and then send the TriggerList command to trigger both instruments. 

 

0 Kudos
Message 2 of 15
(2,216 Views)

To expand a little on what smercurio said, you can write parallel code in Labview to send GPIB commands to two instruments at the same time.  However, the GPIB bus cannot do this, and will use some sort of arbitration scheme to select one command over the other.  It will then send the first command followed by the second.  This is where the parallel execution turns serial.

 

Smercurio is correct about triggering.  Use Trigger List, or use one common trigger to both instruments.  You can use the instruments external trigger input, connect both instruments trigger inputs to some signal output from your system (like a DIO or a line from the parallel port).  Send the trigger and both instruments will execute at the same time.  The instruments, of course, must be set up properly beforehand.

 

- tbob

Inventor of the WORM Global
0 Kudos
Message 3 of 15
(2,198 Views)

Hello,

 

I am not sure if I understand the information in this thread because, I have a VI that has two sub-VIs. One sub-VI talks to a DAQ to acquire data and the other sub-VI talk to two GPIB devices in the same interval. I am getting the right number of data points and at the right intervals.

 

Could some explain how this appears to work even though LabVIEW cannot talk to multiple GPIB devices in parallel.

 

Thanks.

0 Kudos
Message 4 of 15
(1,845 Views)

@ararajan wrote:

Hello,

 

I am not sure if I understand the information in this thread because, I have a VI that has two sub-VIs. One sub-VI talks to a DAQ to acquire data and the other sub-VI talk to two GPIB devices in the same interval. I am getting the right number of data points and at the right intervals.

 

Could some explain how this appears to work even though LabVIEW cannot talk to multiple GPIB devices in parallel.

 

Thanks.


First: this is a 5 year old thread.  consider posting your own question

 

DAQ devices usually do not use a GBIP bus.

 

GPIB IS capable of issuing broadcast messages that many devices can use to synchronize functions.   Can you explain more or show the troublesome code?

Scientists STAND on the shoulders of giants! They don't ride "piggyback" to keep their heads down.

"Should be" isn't "Is" -Jay
0 Kudos
Message 5 of 15
(1,834 Views)
It is not a LabVIEW restriction about reading GPIB devices in parallel. It is how the bus is designed.

Without seeing your code, it's impossible to say what is going on. Probably just reading each sequentially very fast so that it appears to be parallel access.

There is, of course no issue with reading a DAQ device and GPIB in parallel.
Message 6 of 15
(1,833 Views)

@JÞB wrote:

First: this is a 5 year old thread.  consider posting your own question

 

DAQ devices usually do not use a GBIP bus.

 

GPIB IS capable of issuing broadcast messages that many devices can use to synchronize functions.   Can you explain more or show the troublesome code?


Sorry, I was unaware that I shouldn't revive old thread. What would be the issue with that?

 

I'm attaching the parent VI and the sub-VI that "simultaneously" talks to the GPIB devices.

 

Thank you.

 

 

Download All
0 Kudos
Message 7 of 15
(1,823 Views)

Also, there isn't any trouble with the code, nothing that I can think of atleast.

 

I just wanted to know why my VI seemingly can talk in parallel to two GPIB devices when bus does not allow that. Dennis mentioned that the points are read so fast that they appear to be in parallel. And the whole of my code is in one while loop, so that sort of forces it to be simultaneous. What I wanted to know was how does this fit into what is said on the thread - the GPIB does not allow parallel communication.

0 Kudos
Message 8 of 15
(1,789 Views)

ararajan wrote:

Could some explain how this appears to work even though LabVIEW cannot talk to multiple GPIB devices in parallel.


As Dennis stated, it just runs fast enough that it appears to run in parallel.  But the GPIB bus can only allow 1 communication at a time.  Since it looks like you are doing a request for data and then read, I would recommend serializing these transactions.  It won't make much of a difference for GPIB, but if you decide to use a different bus (like Ethernet), it could make a major difference.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 9 of 15
(1,783 Views)
Being in the same loop does not force simultaneous anything. The VISA or GPIB functions block parallel operations unless you specifically use the multi-listener functions. This is usually only used when you have multiple instruments of the same type or when you do a GET. If you read a tutorial or the IEEE-488.2 document, you will understand the restriction of s single Talker at a time.
0 Kudos
Message 10 of 15
(1,772 Views)