From: Milos Popovic on
Hello,

I'm trying to use a Prologix USB GPIB controller to control GPIB
instruments, and I would like to have a virtual serial (VISA) port for
*each instrument*, as is the case with a normal GPIB controller with a
standard NI driver. However this is not what the Prologix driver
provides -- it provides a single VISA virtual serial port for the
entire controller. To address the instrument with GPIB address 11,
you first send "++addr 11" to the serial port, and then you're talking
to instrument 11. However, this means I have to change all old
Labview programs.

Is it possible to create a "wrapper" function of some kind that will
define a virtual serial (VISA) port for each *instrument* on the
controller? For example, to talk to GPIB instrument 11, call it
ASRL3::11::INSTR, each time it is written to it would have to write to
the virtual serial port of the controller, say ASRL3::INSTR, first "+
+addr 11" and then the command that is sent to it.

A clearer explanation of the difference (i.e. incompatibility), and of
my objective:
1) A normal GPIB controller with NI driver: I go to the NI
Measurement & Instrumentation Panel, under GPIB, and Scan for
Instruments; all the live instruments show up; subsequently when I
want to use Labview programs that use VISA ports, the VISA drop boxes
allow me to choose a different port for each instrument, e.g.
"GPIB0::11::INSTR", "GPIB0::12::INSTR" would be instruments at
addresses GPIB 11 and GPIB 12.

2) The Prologix GPIB controller that plugs into a USB port: In
Labview you get a *single* VISA virtual serial port, ASRL3::INSTR, for
the entire GPIB0 controller. Therefore to address GPIB instrument 11,
you write "++addr 11" to the virtual serial port ASRL3::INSTR, and
then you are communicating with device 11, so you can write and read
ASRL3::INSTR to talk to that device. Then to talk to device GPIB 12,
you write "++addr 12" to the same VISA port, and then you are talking
to that device. The problem is that this requires recoding all
Labview code, whereas I would like to be able to use the same program
either with a normal or with a Prologix GPIB controller. Therefore, I
would like to create code that scans the controller for all GPIB
attached devices and creates VISA ports for all. Such ports, when
written to, would have to first write "++addr DEVICENUM" to
ASRL3::INSTR (i.e. the port of the GPIB-USB controller) where
DEVICENUM is the GPIB address of the instrument corresponding to that
port, and then would have to do a write or read or whatever function
is being done on that instrument VISA port.

I haven't figured out if it is possible to do this easily. Help and
pointers on where to look for hints would be much appreciated. Many
thanks!

Milos
 | 
Pages: 1
Prev: Programmierproblem PWM
Next: signal express