Introduction
The Prologix GPIB-Ethernet Controller is a low cost (and low
performance) alternative to devices such as the Agilent E5810A.
This driver provides basic ASYN read/write operations. Serial
polls, parallel polls and SRQs are not supported.
The most up-to-date versions of the controller manual and
firmware at the time this module was released are included in the
documentation directory. Visit the Prologix web site
at http://prologix.biz/ to
check if more recent versions are available.
If the controller is configured to use DHCP to obtain a network
address its host name will likely be its ethernet address, with no
leading zeros and with dashes separating the individual bytes. For
example, a controller with ethernet address 00:21:69:01:02:E1 will be
given host name 0-21-69-1-2-e1.<domain>.
Using the Prologix GPIB driver in an application
Several files need minor modifications to use the Prologix GPIB
driver in an application.
- Add the full path to the PrologixGPIB directory to the
application configure/RELEASE file:
PrologixGPIB=xxxx/modules/bus/PrologixGPIB/<release>
Where <release> is the release number of of the
Prologix GPIB driver.
- Add instrument support to application database definition file
The application database definition file must include the
database definition files for the Prologix GPIB driver and for
other support modules such as stream device. There are two ways
that this can be done:
- If you are building your application database definition
file from an xxxInclude.dbd file you
include the additional database definitions in that file:
include "base.dbd"
include "drvPrologixGPIB.dbd"
include "stream.dbd"
- If you are building your application database definition
file from the application Makefile you specify the aditional
database definitions there:
xxx_DBD += base.dbd
xxx_DBD += drvPrologixGPIB.dbd
- Add the Prologix GPIB support library to the application
You must link the Prologix GPIB support library and the ASYN
support library with the application. Add the following lines:
xxx_LIBS += drvPrologixGPIB
xxx_LIBS += stream asyn
before the
xxx_LIBS += $(EPICS_BASE_IOC_LIBS)
to the application Makefile.
- Configure the Prologix GPIB driver in the application startup
script:
prologixGPIBConfigure("L0", "192.168.3.10:1234")
The prologixGPIBConfigure command takes four arguments:
prologixGPIBConfigure <asynPortName> <host:port> <priority> <flags>
TCP port 1234 is used if the ":port" in the <host:port>
argument is missing. The <priority> argument sets the priority of
the ASYN worker thread. A zero or missing value sets the priority
to its default value of epicsThreadPriorityMedium. A missing
<flags> argument is taken to be 0. The least significant
bit of the <flags> argument disables auto-connection of the ASYN
port. The next-to-least significant bit enables diagnostic
messages on the underlying ASYN port created to communicate with the
controller. This is useful when diagnosing issues with the initial
configuration and setup commands sent to the controller. The ASYN
port name of the underlying ASYN port is the <asynPortName>
argument with the four characters "_TCP" appended.
Installation and Building
After obtaining a copy of the distribution, it must be installed and
built for use at your site.
- Create an installation directory for the module. The path name
of this directory should end with modules/bus/prologixgpib.
- Place the distribution file into this directory.
- Execute the following commands:
cd modules/instrument/prologixgpib
gunzip prologixgpib<release>.tar.gz
tar xvf prologixgpib<release>.tar
cd <release>
Where <release> is the release number of of the
Prologix GPIB driver.
- Edit the configure/RELEASE file and set the paths to
your installation of EPICS base and ASYN.
- Execute make in the top level directory.