Using Generic A16 VME (a16Vme) support in an application
Brief Description of device support:
This device support allows access to any register of a VME module found in
the A16/D16 VME space. The bit field of interest
is described in the PARM field of the INP or OUT link. This allows a generic
driver to be used without hard-coding register numbers within the
software.
| Record Type |
Signal # |
Parm Field |
|
reg_offset |
lsb, width |
|
|
|
| ai |
reg_offset |
lsb, width |
| ao |
reg_offset |
lsb, width |
| bi |
reg_offset |
bit # |
| bo |
reg_offset |
bit # |
| longin |
reg_offset |
lsb, width |
| longout |
reg_offset |
lsb, width |
| mbbi |
reg_offset |
lsb |
| mbbo |
reg_offset |
lsb |
reg_offset is specified by the register number (0,1,2,3, etc).
The Parm field must be provided, no defaults are assumed.
The card number in the INP or OUT field refers to a value set up be a
devA16VmeConfig command. The arguments to this command are:
devA16VmeConfig (card, a16base, nreg, iVector, iLevel,iReg)
The iVector, iLevel and iReg values can be omitted if the card will not be
used to generate interrupts.
Several files need minor modifications to use a16Vme support in an
application.
- Add the full path to the a16Vme support directory to the application
configure/RELEASE file:
a16Vme=xxxx/modules/bus/a16Vme/<release>
Where <release> is the release number of the a16Vme
support.
- Add bus support to application database definition file
The application database definition file must include the database
definition files for the a16Vme bus 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 "devA16Vme.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 += devA16Vme.dbd
- Add the a16Vme support libraries to the application
You must link the a16Vme support library with the application. Add the
following line:
xxx_LIBS += a16Vme
before the
xxx_LIBS += $(EPICS_BASE_IOC_LIBS)
in the application Makefile.
- Load the simple example a16Vme support database records in the
application startup script:
cd $(a16Vme) (cd a16Vme if using the vxWorks
shell)
dbLoadRecords("db/a16VmeTest.vdb","dev=<a16Vme>")
You'll have to provide appropriate values for the PV name prefixes
(<a16Vme>).
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/a16Vme.
- Place the distribution file into this directory.
- Execute the following commands:
cd modules/bus/a16Vme
gunzip a16Vme<release>.tar.gz
tar xvf a16Vme<release>.tar
cd <release>
Where <release> is the release number of of the a16Vme
support.
- Edit the configure/RELEASE file and set the paths to your
installation of EPICS base.
- Execute make in the top level directory.