Introduction

This support module provides ASYN Int32 support to control and acquire data from Caen V965 charge-to-digital converer modules.

Using Caen V965 support in an application

Several files need minor modifications to use this support in an application.

  1. Add the full path to the CAENV965 support directory to the application configure/RELEASE file:
    CAENV965=xxxx/modules/analog/CAENV965/<release>
    Where <release> is the release number of of the CAENV965 support.
  2. Add support to application database definition file
    The application database definition file must include the database definition files for the CAENV965.  There are two ways that this can be done:
  3. Add the CAENV965 support libraries to the application
    You must link the CAENV965 support library and the ASYN support library with the application. Add the following lines:
    xxx_LIBS += devCAENV965
    xxx_LIBS += asyn
    before the
    xxx_LIBS += $(EPICS_BASE_IOC_LIBS)
    to the application Makefile.
  4. Specify the Caen V965 configuration in the application startup script file with a line like
    CaenV965Configure("<PORT>", <A24 address>, <vector number>, <VME interrupt level>), <priority>)
    The VME interrupt level argument can be omitted in which case level 5 will be used.
    The priority argument can be omitted in which case a priority just above epicsThreadPriortyMedium will be used.
  5. The Caen V965 support module provides an example database.  To use this add
    DB_INSTALLS += $(CAENV965)/db/devCAENV965.db
    to the application xxx/Db/Makefile and add
    dbLoadRecords("db/devCAENV965.db,"P=<P>,R=<R>,PORT=<PORT>")
    to the application startup script.  You'll have to provide appropriate values for the PV name prefixes (<P> and <R>) and the port name(<PORT>). The port name must match the value specified in the CAENV965Configure command.

Database Development

Output Records

Set DTYP=asynInt32 and OUT="@asyn($(PORT) xxx)", where $(PORT) expands to the port name in the CAENV965Configure command and xxx is a numeric value as described in the following table. 

ASYN
Subaddress
Record
Type

Description
1008
ao
Pedestal current
1009
bo
Generate software trigger when processed.


Input Records

Set DTYP=asynInt32 and INP="@asyn($(PORT) xxx)", where $(PORT) expands to the port name in the CAENV965Configure command and xxx is a numeric value as described in the following table. 

ASYN
Subaddress
Record
Type
Description
0–15
ai
The converted values from each of the input channels (SCAN=I/O Intr)
16
longin
The event counter (SCAN=I/O Intr)
1000
longin
Firmware revision number
1001
longin
Serial number
1002
longin
Version number
1003
longin
Motherboard revision number
1004
longin
Piggyback board revision number

Diagnostic Messages

  The CAEN V965 support includes a worker thread which handles messages passed from an interrupt service routine.  To control diagnostic messages from this thread use an ASYN record with subaddress 2000 and the traceIODriver bit in the trace mask.

Example Database

This support module comes with an example database (db/devCAENV965.db) containing an instance of all the records mentioned above.

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/CAENV965.
  2. Place the distribution file into this directory.
  3. Execute the following commands:
    cd modules/instrument/CAENV965
    tar xfz CAENV965<release>.tar.gz
    cd <release>
    Where <release> is the release number of of the CAENV965 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.