Trouble-Shooting GPIB Communication Problems

Instrument communication in Utmost is performed in one of two ways: either through the serial port, connected to an external serial-to-GPIB interface or, on certain HP workstations, through an internal HP-IB interface. The purpose of this note is to describe the most frequently occuring problems with both of these interfaces, along with how to cure them.

 

Communicating Via the Serial Port

Serial port commuincation is carried out through the National Instruments GPIB-232CT or GPIB-232CT-A serial-to-GPIB interface, whose configuration is described in detail in Appendix B of the UTMOST User's Manual. The "CPU side" button in the UTMOST Device Configuration screen should be set to either "Serial Port 1" or Serial Port 2", and the "Port Name" field in the Serial Port Setup screen should be set to the appropriate name, ie. "ttya" or "ttyb" for Sun, "tty00" or "tty01" for HPUX 9 and Dec Alpha, "tty0p0" or "tty1p0" for HPUX 10, "tty0" or "tty1" for IBM and "ttyd1" or "ttyd2" for SGI (these, and other setup options are described in Appendix B). These values map directly to the UNIX files /dev/ttya, /dev/tty00, etc., depending on the machine in use.

An inability to poll selected instruments is frequently due to a mismatch between the configuration in the Serial Port Setup window and the switch settings on the GPIB-232CT, a failure in the GPIB-232CT itself, or a simple break in the serial cable connecting the GPIB-232CT to the workstation. If these failures have been eliminated and polling is still not successful, then it is quite likely that insufficient permissions have been set on the device files. To verify whether or not this is the case, the underlying device file must be located for the serial port in question. This may not be the file in the /dev directory, as some machines use symbolic links to locate their device files elsewhere (for instance, on Solaris 2 machines, the file /dev/ttya is actually a symbolic link to /dev/term/a, which is itself a link to an obscurely named file beneath the /devices directory). The command:

ls -l <device file>

can be used to follow symbolic links as necessary, where <device file> takes the value of the current file under investigation. Once the underlying device file has been located in this manner, a sufficient set of permissions can be set, by the superuser, with the command:

chmod a+rw <device file>

If polling is still unsuccessful at this point, then it may be necessary to reconfigure the serial port drivers, although in practice this is fairly uncommon. The mechanics of this process vary between machines and operating systems, so the appropriate manual pages should be consulted for detailed operating instructions.

 

Communicating via the HP-IB Interface

Direct GPIB communication is provided on some HP 9000 Series 700 workstations in the form of the optional, internal HP E2070 HP-IB Interface or HP E2071 High Speed HP-IB Interface; on the 745i, 747i or V743 workstations the Built-in HP-IB Port serves the same purpose. The "CPU side" button in the UTMOST Device Configuration screen should be set to either "GPIB Port 1" or "GPIB Port 2" in this case, and the "GPIB symbolic name" in the GPIB Port Setup screen is typically set to "hpib", although this name may be changed in the manner described below.

If polling does not succeed with this configuration, then the first thing to check is whether or not the necessary HP SICL (Standard Instrument Control Library) has been installed. This will result in the existence of the directory /usr/pil on HPUX 9 machines, and of the directory /opt/sicl on HPUX 10 machines. If one or the other of these directories does not exist, then the missing libaries can be obtained from the HP E2091D software update, entitled "HP I/O Libraries for Instrument Control". This software should be installed using either the /etc/update command on HPUX 9, or the /usr/sbin/swinstall command on HPUX 10. The filesets which are required are: PIL-HPIB and PIL-RUN on HPUX 9, and SICL-HPIB and SICL-RUN on HPUX 10. The user should be aware that this procedure will rebuild the UNIX kernel and reboot the system.

Associated with each HP-IB Interface is a logical unit number and a symbolic name. These may be quickly determined by examing the last few lines of the file /usr/pil/etc/hwconfig.cf, on HPUX 9, or /opt/sicl/etc/hwconfig.cf, on HPUX 10. A typical such file might end with:

# E2071 High Speed HP-IB

7 hpib e2071 1 21 0b0000 1 3

which describes a single interface with logical unit number 7 and symbolic name "hpib". These values can be altered with the command /usr/pil/bin/iosetup on HPUX 9, or /opt/sicl/bin/iosetup on HPUX 10, run as superuser. In any event, this command must be executed after the initial installation of the SICL filesets, in order to create the necessary instances of HP-IB or High Speed HP-IB Interface setups.

One further step is also necessary after the initial installation: either the HP-IB Interface Device Driver or the High Speed HP-IB Device Driver must be added to the UNIX kernel. This is easily done with the system administration tool /usr/bin/sam on HPUX 9, or /usr/sbin/sam on HPUX 10, under the "Kernel Configuration->Drivers" area. This action will also cause the system to reboot.