Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Two computers controlling same instruments

Is there anyway to initialize two GPIB's at the same time which communicate with the same instruments?  Only independent subsections of the instruments are going to be used on each GPIB, and so during data acquisition they should not interfere with each other.  However, it would be easier to just initialize all instruments together on both computers than to intialize different instruments on each computer.
 
Thanks for your help.
Sameera Dharia
 
0 Kudos
Message 1 of 7
(4,345 Views)

I don't think this will work.
Not that it is tecnically impossible but your programs need to be synchronised not to read each others data or override each others commands.
A lot of instruments also have problems being busy to execute one command and then asked for something else while working on the first result.

A better idea could be to connect the two computers via ethernet and let one control the instruments via ethernet to visa on the other computer.

The best idea in this case is to set up an instrument driver on a computer that handles one instrument, and let this driver be controlled via high level commands from both systems. To make it more clear:
system A has connected a DMM and has a DMM driver with on top a layer that supports INIT, Read VOLTAGE and EXIT.
system A and B's application programs call this driver. (via datasocket or another communication protocol)
If both ask the same at almost the same time they both get the same answer, otherwise only one gets that answer!

This higher level driver hides the bad world for each machine and only adds some latency but can solve all synchronisation problems.

Simply connecting two gpib busses to each other generates a dual master and that is forbidden in GPIB (at least at the same time)

 

greetings from the Netherlands
0 Kudos
Message 2 of 7
(4,339 Views)
GPIB does provide a means for more than one GPIB controller to exist on the same physical bus although there may only be one System Controller. The System Controller always drives IFC and REN while the Controller-in-Charge (cic) drives ATN. The System Controller is typically the Controller-in-Charge but doesn't need to be. A Controller-in-Charge can pass control to an Idle Controller through the TCT (take control) GPIB command.

Let me give an example of how this can work. I use PCI-GPIBs only for this example, any GPIB controller should work.

First, PCI-GPIB #1 is configured to be a System Controller (default configuration) and PCI-GPIB #2 is configured to be not a System controller. PCI-GPIB #1 becomes Controller-in-Charge and drives ATN, IFC, and REN. PCI-GPIB #1 and PCI-GPIB #2 must also have different GPIB addresses. PCI-GPIB #1 communicates with an instrument. PCI-GPIB #1 then passes control to PCI-GPIB #2 using the GPIB TCT command. PCI-GPIB #1 still drives IFC and REN because it is still System Controller. However, PCI-GPIB #2 is now Controller-in-Charge and it drives ATN. PCI-GPIB #2 can now communicate with the instrument and send command bytes. PCI-GPIB #2 then passes control back to PCI-GPIB #1 using the TCT command, and now PCI-GPIB #1 communicates with the instrument.

This may be complicated because there needs to be some synchronization between the two PCI-GPIBs. Perhaps this could be done through serial polling. An important point to remember is that exactly one PCI-GPIB should always be configured as System Controller, and either PCI-GPIB can be Controller-in-Charge at any given time.
0 Kudos
Message 3 of 7
(4,331 Views)
Hi Colin

I respect your explanation and agree that it is tecnically doable but it is not wise to even try it.
It generates more problems than it solves.
It could also be done via ethernet visa and exporting those instruments. But also this is not wise in this case.

The easiest way to get this done is either to connect all gpib instruments to one card and use vis to access them from the other pc or
put a software layer on both machines that controls the sharing and locking of the instruments.

I have the feeling that the first case is easier to implement.
greetings from the Netherlands
0 Kudos
Message 4 of 7
(4,329 Views)
Albert, I cannot disagree that this may be complicated to do as I described. Sameera asked a specific question to which I wanted to provide an answer.
0 Kudos
Message 5 of 7
(4,322 Views)
Thanks for all of your help!  After reading your comments,   I will probably just order GPIB switch boxes and control different instruments with either computer.
0 Kudos
Message 6 of 7
(4,286 Views)
This is a good and pragmatic approach.
So you limit the problems to one computer at a time and no one can ruin your measurements from the other computer
as long as you are in control of that switch.
 
success 
greetings from the Netherlands
0 Kudos
Message 7 of 7
(4,260 Views)