This command creates, configures and queries the configuration of CAEN V830 scaler modules. This is a latching scaler module. At present, not all functionality has been enabled. Specifically, the module code is now tailored to the typical use case of a run-time scaler module in the scaler stack.
The create subcommand creates a new module.
The base
address should be the VME base
address of the module, as configured in the module's
rotary switches. The name
parameter is
a name that you assign to the module, and will be used to
refer to the module in future config or
cget commands.
The config subcommand configures the module
name
. The configuration is supplied as a
set of option value
pairs. More than one
pair can appear on the same line, any number of config
commands can be used and those that execute later can override
those that execute earlier.
The cget subcommand returns the configuration
of the module name
as a list of
option value
pairs. You should not
rely on the list being in any specific order. While the list
order is determinstic within a version of the program it is possible
that later versions will return the list in a different order.
-base
address
Allows you to override the base address of the module set at
creation time with a new base address
.
-channels
maskProvides a mask of enabled channels. The low order bit represents channel zero the high order bit, channel 31. Each channel for which a bit is present is enabled to count. The default value for this mask is 0xffffffff which enables all channels.
-dwelltime
value
This is used only if the -trigger
is set
to periodic and is the time between
triggers in 400ns units. Each trigger will latch the
current counter values into the MEB and, if
-autoreset
is true, clear them.
If the -ipl
and -vector
are set, this can produce a backplane interrupt which, in turn,
can trigger execution of a stack. The default value is zero
which disables the periodic trigger.
-header
boolEnables or disables the inclusion of a header on data read from the MEB. For the format of the header, see figure 3.1 of the CAEN V820/V830 manual. Note that this header will only be present if the MEB is read out. A value of true enables the header while a value of false disables it. The default value is false which is appropriate for the case where this module will be used in a scaler stack.
-incremental
boolIf true (the default) scaler ring items are labeled as incremental. If false scaler ring items are labeled as not being incremental.
-trigger
random | periodic | vmeDetermines the source the latch trigger. The values are as follows:
The external trigger input is used to trigger the latch.
The module will have a periodic trigger that
is governed by the value of the -dwelltime
option.
Triggers will be supplied by the stack that' reads the module out.
-wide
boolDetermines if, when the MEB is read, the scalers will be wide (32 bit counters) or narrow (24 bit counters tagged with the channel number). See figures 3.2 and 3.3 in the CAEN V820/830 manual for the data forma in both cases.
A value of true enables wide (32 bit) mode. A value of false requests narrow (24 bit) mode. This only affects data read from the MEB. The counter data are always wide. The default value is true.
-autoreset
boolConfigures the scaler to reset its counters after storing the data in the MEB or not. If true the counters are cleared after latching the data. If false not. The defeault value is true.
-geo
slot
Programs the module geographical address. This value is only
relevant if -header
is true
or -wide
is false.
The value can only be programmed for modules that do not have
the PAUX connector. Modules with the PAUX connector read their
geographical address from the backplane, and this value,
if used in other places, must be set to the physical slot number
the scaler is using (not a bad idea in any event).
-setgeo
bool
If true the configuration code attempts
to set the module's GEO value from the -geo
parameter. If not, the -geo
value is
simply assumed to document the position of the module to other
software, and is ignored. The default value is false
which is suitable for modules without a PAUX connector and
for the normal use case of a module in the scaler stack where
the GEO address is not relevant.
-ipl
priority
Provides the interrupt priority level for the module's
VME interrupt. The V830 can interrupt when it has at least
-highwatermark
events in its MEB.
This interrupt can be used to trigger a VM-USB stack.
VME bus interrupts are prioritized with the priority value ranging from 1 through 7. This priority determines the service order of simultaneous interrupts. Larger numbers are higher priorities. A value of 0 disables module interrupts. The default value is 0
-vector
statusidVME interrupts are identified via a status-id value presented by the interrupting device when the interrupt is acknowledged by the interrupt responder (VM-USB). In the case of the CAEN V830, this is a value from 0 through 255.
For historical reasons, this status-id value is also called the
interrupt vector. The -vector
option sets the value of the interrupt vector presented by the
CAEN V830 when it interrupts. To interrupt, the module must also
be configured with a nonzero -ipl
and
nonzero -highwatermark
value.
Module interrupts can be used to triggers VM-USB stack execution.
-highwatermakr
value
Configures the value of the V830 Almost Full Level
register. When non zero, if -ipl
is also non-zero,
and -vector
is also non zero, when there is at least
value
events in the MEB, the module
will initiate a VME bus interrupt. VME interrupts can be
used to trigger VM-USB stacks. The default value is 1.