CFD812

Name

CFD812 package -- low level control of the CAEN V812 CFD

Synopsis

package require CFD812

::CFD812::Map base name crate=0

::CFD812::Unmap name

::CFD812::SetThreshold name channel value

::CFD812::SetWidth name bank value

::CFD812::SetDeadtime name bank value

::CFD812::SetMask name mval

::CFD812::SetMultiplicityThreshold name value

::CFD812::GetSerialNumber name

::CFD812::GetBase name

DESCRIPTION

This Tcl package provides support for the CAEN V812 VME 16 channel constant fraction discriminator to Tcl scripts. The package is built on top of and depends on the Vme package. Usually you will use this package in conjunction with the CFDState package in order to retain information about the state of the device as the CAEN V812 is a write only device.

The CFD812::Map command allows you to establish a connection between a physical module and a unique name. The unique name is then used to identify the module when invoking all other commands in the pack- age. If you are done with a module, you can invoke ::CFD812::Unmap to remove the association between the name and the module.

Commands

The package commands become available as soon as your script issues the package require CFD812 command. In the description below we will be using several parameter names that have a common meaning from command to command:

Parameter: name

Usage: Name of a map to the device associated with a module in the CFD812::Map

Parameter: channel

Usage: Number of a channel within the module (0-15).

Parameter: bank

Usage: Number of a bank of channels. The module is divided into two banks. Bank 0 which has channels 0-7 and bank 1 which has channels 8-15.

Parameter: value

Usage: In settings commands this is the value set

::CFD812::Map base name crate=0

Creates a connection between a module at the specified base address and VME crate number (defaults to zero). The name parameter is associated with that connection and should be used to refer to the module in future calls to the library.

::CFD812::Unmap name

Breaks the connection with the module name and releases all resources associated with that connection. Once this command is executed, you should not use name in subsequent calls to the package.

::CFD812::SetThreshold name channel value

Sets the threshold for a channel of the CFD specified by name to value. The value must be in the range of -1 through -255. The channel must be in the range 0 through 15.

::CFD812::SetWidth name bank value

Sets the width of a bank of channels o the module name to value. See the documentation of the CAENV812 for information about how the width correlates to physical units (the correlation is nonlinear). The bank parameter selects the set of 8 channels whose width is set. The CAEN V812 width controls 8 channel banks. Bank 0 controls channels 0 through 7, while bank 1 controls channels 8 through 15.

::CFD812::SetDeadtime name bank value

Sets the deadtime of a bank of channels for the module named name to value. Banks of channels for deadtime are defined in the same way as for widths see ::CFD812::SetWidth above). The value is related to physical units in some not well documented non-linear way, for more information about that see the CAEN V812 manual.

::CFD812::SetMask name mval

Sets the enable mask of the module name to mval. mval is a 16 bit mask of bits, one per channel. The least significant bit represents the enable for channel 0, the next channel 1 and so on until the most significant bit of the mask, which represents channel 15. If a bit is set, the corresponding channel is enabled, otherwise, disabled.

::CFD812::SetMultiplicityThreshold name value

Sets the majority logic threshold of name to value

::CFD812::GetSerialNumber name

Returns the serial number of the module name.

::CFD812::GetBase name

Returns the base address of the module name

SEE ALSO

caenv812control(1tcl), caenv812gui(3tcl), loadcfd(1tcl)