Instrument Control (GPIB, Serial, VISA, IVI)

Showing results for 
Search instead for 
Did you mean: 

How to control two devices with two GPIB-USB-HS+ simultaneously in LabVIEW?



I'm learning how to use LabVIEW to control my GPIB devices. I can find my device in NI MAX and run the examples provided by LabVIEW, "Simple" and "GPIB with VISA". But in these VIs, I can only input ONE GPIB address or VISA GPIB Resource, I tried syntax like "0:1,1:2" to bundle two GPIB devices, but it doesn't work.

I wonder if there are some syntax or functions that could solve my problem, or I have to run two same codes in parallel in order to send message almost simultaneously.


Thank you in advance.

0 Kudos
Message 1 of 7


You cannot send messages simultaneously, only fast after each other.

You can with most instruments arm them and trigger them by bus orr other trigger at the same time.

greetings from the Netherlands
0 Kudos
Message 2 of 7

Hi Albert,

Thanks for your reply. It helps me a lot but I don't get the point of "trigger at the same time". Do you mean that I can read messages at the same time?

I found functions like "GPIB Trigger", is that what I need or others in the VISA,488.2 panels?

Could you please show me a simple example since I don't know how to use them from Help. 


Thanks in advance.



0 Kudos
Message 3 of 7

Please fully explain what you are trying to accomplish, what instruments and what measurements.  Fully explain your physical setup. One you've done that, we might be able to offer you good advice.

0 Kudos
Message 4 of 7

Hi cstorey,

I have two GPIB-USB-HS+ connected to Keithley 2010 and I'm learning how to use LabVIEW to control 2 devices. I want to write and read almost at the same time.

I have tested the example shown below, it works for one device and according to the suggestion by Albert, I think I should run two same codes for two and so I can't synchronize them. But Albert mentioned trigger them at the same time, I don't understand what it really means and by which function I can configure it.1.png


0 Kudos
Message 5 of 7

You can control 2 instruments with a single GPIB-USB-HS+.  You just need a plain GPIB-GPIB cable between instruments and the GPIB-USB-HS+ connected between one instrument and PC.


Now, what sort of "simultaneous" measurement are you expecting?  Should both devices fire within same 1s, 100ms, 10ms, <1ms?


For quasi simultaneous, or closely synchronous (1s - 100ms) the glib bus trigger is fine.  To get to <1ms you need to use the instruments trigger models and a trigger cable or trigger source.

0 Kudos
Message 6 of 7

Th Keithley 2010 has trigger commands. 

You can program the DMM to do a special job, scan R and or other stuff and trigger this via a command on the GPIB bus e.g. for all instruments on the bus or specific.

Tek has very old software foor the 2010, it does not yet use VISA, maybe you continue where you are now.

Just for the cmd's it could give some help, although I see that you also use the old gib cmdset instead of VISA.

So give it a try. It has also a trigger vi.

greetings from the Netherlands
Message 7 of 7