Add the driver to the IOC's RELEASE file | CAEN_V965=$(SHARE_RELEASE)/caen_v965/Initial |
Link or Load the driver. |
Build time linking case: Add to
src/Makefile in your iocApp directory.timingLabAll_LIBS_vxWorks += caen_v965 Run time linking case: Add to st.cmd cd caen_v965bin ld <caen_v965Lib.munch |
Load the dbd file |
Build time linking case: (in
myApp/src/myAppInclude.dbd)include "caen_V965.dbd" Run time linking case: (in st.cmd) cd caen_v965 dbLoadDatabase("dbd/caen_v965.dbd",0,0) caen_v965_registerRecordDeviceDriver |
Initialize the driver |
caenV965Config 0, 0xca0000, 24, 0x99, 1, 0Where argument 1 is the board instance number, argument 2 is the base address of the board in A24 or A32 space, argument 3 is the address space (24 or 32), argument 4 is the interrupt vector, argument 5 is the interrupt level, and argument 6 is the number of samples per cycle, 1 trigger per sample |
Load the database |
See the database section. |
driver(drvCaenV965) # ai device support device(ai,VME_IO,devCaenV965AI,"CAEN V965") # longin device support device(longin,VME_IO,devCaenV965Longin,"CAEN V965") # longout device support device(longout,VME_IO,devCaenV965Longout,"CAEN V965") |
Device support is provided for record types ai, longin, and longout. All record types share a common device support layer requiring an INP or OUT field in the record to provide VME_IO parameters.
The card field in the record's link is the same card number used in the initialize call. The signal number field refers to the QDC channel number. The parameter field can have the following values and meanings.
param |
Meaning |
---|---|
'I' |
Read and set the IPED Register |
'N' |
Read the board serial number |
'H' |
Read the raw high range ADC
value for the channel (I/O intr scan supported) |
'L' |
Read the raw low range ADC value for the channel (I/O intr scan supported) |
'S' |
Read the status bits for the
channel. (I/O intr scan supported) Bits <3..0> are: HIGH Over range, HIGH under range, LOW over range, LOW under range. |
'TH' |
Read and set the high channel
threshold or zero offset. |
'TL' |
Read and set the low channel
threshold. |
Anything else or nothing |
Read the value. (I/O intr
scan supported) If the low range ADC value is not over range then
subtract the 'TL' value and return the result. Otherwise, subtract the
'TH' value from the high range ADC value and return 8* the
result. Ai record scaling constants should be supplied based on a
15 bit raw ADC value. If the parameter is a number then it sets the multiple sample mode. In that case the sample is taken on the Nth trigger on this channel. The last chanel to initialize on this channel sets this. |
Class |
Declared in: |
Implemented in: | Purpose |
---|---|---|---|
drvCaenV965DSet |
drvV965.cc |
drvV965.cc |
Required for all EPICS Device Drivers |
aidset,longindset,longoutdset | devV965.cc | devV965.cc | Required for all EPICS Device
Support. These classes implement InitRecord(),GetIOIntInfo(), and
read()/write() methods as static members. |
CaenD16, CaenD32 |
drvV965p.h |
drvV965p.h |
Wrapper classes for device
registers. Overloaded operator int() and operator=()
enforce the use of sysInXXX() and sysOutXXX() calls to do actual board
IO. |
drvCaenV965Registers |
drvV965p.h |
drvV965p.h |
Wrapper class for the
board. All methods must be static and the constructor must be
private. Access to the board's registers are by name ant through
this class. The boards physical address in memory space is cast
as this type. |
drvCaenV965Device |
drvV965.h |
drvV965.cc |
Driver support data for the
driver. Keeps stored state, the board address, and data recorded
during the ISR. Methods required to support the device
support layer are implemented here. A static member array of up
to 20 pointers to drvCaenV965Device objects is used to store
information about all configured boards. |