Using E364xA instrument support in an application
Note that this device has rather unusual requirements for RS-232
communication:
- An E364xA device requires two stop bits.It receives on
pin 2 and transmits on pin 3.
- An E364xA device monitors DSR (pin 6) for for handshaking.
A serial port to which an E364xA device is connected must assert (drive
with a positive voltage) this line to enable the E364xA to transmit.
- An E364xA device drives DTR (pin 4) for for handshaking.
The device to which an E364xA is connected must monitor this
pin and inhibit transmission until it has been asserted. The
E364xA will experience communication errors after every command
which sets and then reads back a value if this is not done.
Several files need minor modifications to use e364xa instrument support in
an application.
- Add the full path to the e364xa support directory to the application
configure/RELEASE file:
e364xa=xxxx/modules/instrument/e364xa/<release>
Where <release> is the release number of of the e364xa
support.
- Add instrument support to application database definition file
The application database definition file must include the database
definition files for the e364xa instrument and for any needed ASYN
drivers. 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 "deve364xa.dbd"
include "drvAsynIPPort.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 += deve364xa.dbd
xxx_DBD += drvAsynIPPort.dbd
- Add the e364xa support libraries to the application
You must link the e364xa support library and the ASYN support library
with the application. Add the following lines:
xxx_LIBS += deve364xa
xxx_LIBS += asyn
before the
xxx_LIBS += $(EPICS_BASE_IOC_LIBS)
in the application Makefile.
- Load the e364xa support database records in the application startup
script:
cd $(e364xa) (cd e364xa if using the vxWorks
shell)
dbLoadRecords("db/deve364xa.db,"P=<P>,R=<R>,L=<L>,A=<A>")
You'll have to provide appropriate values for the PV name prefixes
(<P> and <R>), the link number
(<L>) and the device address (<A>). The
link number must match the value specified in an ASYN
drvxxxxxConfigure command.
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/instrument/e364xa.
- Place the distribution file into this directory.
- Execute the following commands:
cd modules/instrument/e364xa
gunzip e364xa<release>.tar.gz
tar xvf e364xa<release>.tar
cd <release>
Where <release> is the release number of of the e364xa
support.
- Edit the configure/RELEASE file and set the paths to your
installation of EPICS base and ASYN.
- Execute make in the top level directory.