adc -- Create/configure CAEN V775, V785, V792, V862 modules.


adc create name base

caenv965 create name base

adc config name option value ...

caenv956 config name option value ...

adc cget name

caenv956 cget name


This command creates, configures and retrieves the configuration of CAEN V775, V785, V792, and V862, V965 digitizer modules.

Use the create subcommand to create a new adc providing it with a unique name that will be used to identify it in future commands. The base parameter is the base address of the module as set in the module rotary switches.

Use the config subcommand to configure a module named name the option options and legal values are described in the section OPTIONS below.

The cget subcommand returns as its value the configuration of the module name. The configuration is returned as a list of two element sublists where each sublist contains, in order, an option from OPTIONS below, and its value. Note that some values may themselves be lists.

When used with the CAEN V965 or other dual range digitizers via the caenv956 command, each parameter specified in the adcChannels array will result in two SpecTcl channels and corresponding raw spectra. The first will have .h appended to the name and will be the high range conversion while the second will have .l appended to the name and will be the low range value.


-base value

Allows you to reconfigure the base address of a module. This defaults to 0. The required base parameter of the create command for this device overrides the default value.

-commonstop value

This is only usable with a V775. value is a boolean value which, if true runs the module in common stop mode. If false (the default), the module is run in common start mode.

-thresholds values

The value is a list of 32 values that are the module thresholds. Unless -smallthresholds has been configured to be true, these values are multiplied by 16 before being applied as the channel threshold values.

The value defaults to a list of 32 zeros.

-smallthresholds bool

The value is a boolean (e.g. on or off). A true boolean means that the threshold is applied as is a false boolean means the threshold value is multiplied by 16 and then applied.

This parameter defaults to false.

-ipl 0-7

The interrupt priority level the module should use to request a VME bus interrupt. This defaults to 6 and should be set to zero to disable interrupts. Normally interrupts will be used to trigger an interrupt triggered stack. The default of 6 is historical in nature, in most cases for, the default should be overridden to zero.

-vector 0-255

The interrupt vector the module should use. This is an integer and defaults to 0x80. The vector value is ignored if the module interrupts are disabled.

Note that the VMUSB processes 16 bit vectors, but the vector produced by this series of modules is 8 bits wide. The VME standard is ambiguous about how such modules produce the top eight bits of the vector under these circumstances. These modules set those top bits to zero. E.g. -vector 0x80 produces a vector, as see by the VMUSB of 0x0080

-highwater 0-31

Defines how many events the module should accumulate before it interrutps. A value of zero also disables interrupts. The default value is 24 events (75% full). This is best suited for singles applications where allowing the module to accumulate a few events before being read is a good thing. This value will be ignored if the -ipl option has been configured to zero as that also disables module interrupts.

If you want to use interrupts but in single event mode, you should set this to 1. If you don't want to use interrupts you should set at least set one of -highwater, -vector or -ipl to zero as any of those actions disables interrupts.

-geo 0-31

Defines the geographical address that will be set in the module. If the module has a PAUX connector, this must be set to be the module's physical location in the crate. This option must be correctly programmed in order to help SpecTcl form a mapping between data values and parameter names.

The default for this value is an empty string which is not legal. Therefore it is mandatory that you configure this option.

-fastclear value

Defines the fast clear window for the module. This defaults to 0 and therefore must be configured if you will use the fast clear capability of the module.

-supressrange bool

If true the module will supress overflows and under threshold conversions. If not all channels will supply data for an event. In most cases, this should be set to false. This defaults to true

Often when setting up the module it is a good idea to take data with -supressrange set to false to get an idea of where the thresholds are.

-timescale ns

Sets the full scale range of the module if it is a V775. If the module is not a V775 TDC, this configuration parameter is silently ignored (the hardware allows the software to determine the module type). ns is the range of the TDC in nanoseconds and must be between 140 and 1200.

This value defaults to 600

-iped value

Sets the Iped register. See section 4.34 of e.g. the CAEN V965 manual. This register controls the amount of charge initially injected into the conversion circuit and is used to compensate for leakage current that may lower the conversion of a signal during the gate. The default value is 180. Valid values are 0 - 255, however see the description of the Iped register and pedestal injections in the manual.

-requiredata yes | no

This boolean parameter (actually any value Tcl accepts as a boolean is valid) defaults to false. When true, the module is required to provide at least a header and a trailer when read as long as there was a pulse in the gate input. Headers and trailers will be output even if none of the channels satisfied the over and under range values with -suppressrange true.


Example 1. Sample ADC commands

adc create adc1    0x04000000
adc config adc1    -geo 12 -supressrange off  -ipl 0 -vector 0

Defines a module with base address 0x04000000 to be in geographical address 12. Range supression and interrupts are disabled.


This command can actually initialize/configure V775 TDCs and V792, V862 QDCs in addition to the V785 ADC.