Using SRS_PS300 instrument support in an application
This module provides support for the Stanford Research
Systems PS300 series of high-voltage power supplies, including the
PS310, PS325, PS350, PS355, PS365, PS370 and PS375.
Several files need minor modifications to use SRS_PS300
instrument support in an application.
- Add the full path to the SRS_PS300 support directory to the
application configure/RELEASE file:
SRS_PS300=xxxx/modules/instrument/SRS_PS300/<release>
Where <release> is the release number of of the
SRS_PS300 support.
- Add stream and asyn support to application database definition
file
The application database definition file must include the
database definition files for the stream package 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 "stream.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 += stream.dbd
xxx_DBD += drvAsynIPPort.dbd
- Add the stream and asyn support libraries to the application
You must link the stream support library and the ASYN support
library with the application. Add the following lines:
xxx_LIBS += stream
xxx_LIBS += asyn
before the
xxx_LIBS += $(EPICS_BASE_IOC_LIBS)
in the application Makefile.
- Create an ASYN port in the application startup script.
For example, the commands to set up a connection to a PS300
power supply through a LAN/Serial adapter are:
drvAsynIPPortConfigure("L0","serialps300:4003 COM",0,0,0)
asynSetOption("L0", -1, "baud", "9600")
asynSetOption("L0", -1, "bits", "8")
asynSetOption("L0", -1, "parity", "none")
asynSetOption("L0", -1, "stop", "1")
asynSetOption("L0", -1, "crtscts", "N")
- Load the SRS_PS300 support database records in the application
startup script:
cd "$(SRS_PS300)" (cd
SRS_PS300 if using the vxWorks shell)
dbLoadRecords("db/devSRS_PSxxx.db,"P=<P>,R=<R>,PORT=<PORT>,A=<A>")
where xxx
specifies the type of supply (310_pos, 310_neg, 325_pos, 325_neg, 350_pos, 350_neg, 355, 365,
370 or 375). You'll have
to provide appropriate values for the PV name prefixes (<P>
and <R>), the port name (<PORT>)
and the device address (<A>). The port name must
match the value specified in the ASYN drvyyyyConfigure
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/SRS_PS300.
- Place the distribution file into this directory.
- Execute the following commands:
cd modules/instrument/SRS_PS300
gunzip SRS_PS300<release>.tar.gz
tar xvf SRS_PS300<release>.tar
cd <release>
Where <release> is the release number of of the
SRS_PS300 support.
- Edit the configure/RELEASE file and set the paths to
your installation of EPICS base, stream and ASYN support
modules.
- Execute make in the top level directory.