Using iSeries instrument support in an application

Several files need minor modifications to add iSeries instrument support to an application.

  1. Add the full path to the iSeries support directory to the application configure/RELEASE file:
    ISERIES=xxxx/modules/instrument/iseries/<release>
    Where <release> is the release number of of the iSeries support.
  2. Add instrument support to application database definition file
    The application database definition file must include the database definition files for the iSeries instrument and for any needed ASYN drivers. There are two ways that this can be done:

    If you are using a local serial port rather than an Ethernet serial port adapter to communicate with the iSeries device you would specify thedrvAsynSerialPort.dbd file instead.

  3. Add the iSeries support libraries to the application
    You must link the iSeries support library and the ASYN support library with the application. Add the following lines:
    xxx_LIBS += deviSeries
    xxx_LIBS += asyn
    before the
    xxx_LIBS += $(EPICS_BASE_IOC_LIBS)
    in the application Makefile.
  4. Add the commands to load the iSeries support database records to the application startup script:
    cd $(ISERIES)      (cd ISERIES if using the vxWorks shell)
    dbLoadRecords("db/deviSeries.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 the serial port drvxxxxxConfigure command.
  5. Add the commands to configure the serial port to the application startup script:
    For a local serial port these commands might look like:

    drvAsynSerialPortConfigure("L0", "/dev/ttyS0", 0, 0, 0)
    asynSetOption("L0", 0, "baud", "9600")
    asynSetOption("L0", 0, "bits", "7")
    asynSetOption("L0", 0, "parity", "odd")
    asynSetOption("L0", 0, "stop", "1")
    asynSetOption("L0", 0, "clocal", "N")
    asynSetOption("L0", 0, "crtscts", "N")
    asynOctetSetInputEos("L0", 0, "\r")
    asynOctetSetOutputEos("L0", 0, "\r")
    For a serial port connected through and Ethernet serial port adapter the commands might look like:

    drvAsynIPPortConfigure("L0", "192.168.9.90:4003", 0, 0, 0)
    asynOctetSetInputEos("L0", 0, "\r")
    asynOctetSetOutputEos("L0", 0, "\r")

Installation and Building

After obtaining a copy of the distribution, it must be installed and built for use at your site.
  1. Create an installation directory for the module. The path name of this directory should end with modules/instrument/iseries.
  2. Place the distribution file into this directory.
  3. Execute the following commands:
    cd modules/instrument/iseries
    gunzip iseries<release>.tar.gz
    tar xvf iseries<release>.tar
    cd <release>
    Where <release> is the release number of of the iSeries support.
  4. Edit the configure/RELEASE file and set the paths to your installation of EPICS base and ASYN.
  5. Execute make in the top level directory.