Creates and configures CC-USB stacks. Stacks are lists of CAMAC operations that are loaded into the CC-USB for autonomous execution. There are two types of stacks; an event stack that is executed when a front panel trigger or a specified LAM is detected, and a scaler stack that can be periodically triggered.
Stacks contain lists of modules. The modules themselves determine the set of readout instructions that make up each stack.
The create subcommand creates a new stack. The name of the new stack is name. This name will be used to refer to this stack in future configuration commands.
The config subcommand configures the stack name. The configuration is specified as a set of option value pairs. The options are described in the section OPTIONS below.
The cget subcommand returns the configuration of the stack name as its command value. This subcommand is intended for advanced applications that may analyze the configuration of the stack. The configuration is returned as a properly formatted Tcl list. Each element of the list is itself a two element sublist (pair). The first element of each pair is the name of a configuration parameter the second, that configuration parameter's value. Note that the value may itself be a list.
Options are used to configure the stack. Each option has associated with it a keyword that selects it and a value. The option s supported by the stack command are subdivided into three groups:
Options used for both event and scaler stacks.
Options that are only used for event stacks and are ignored for scaler stacks
Options that are only used for scaler stacks, and are ignored for event stacks.
Options for all stack types.
Defines the type of stack that is being used. This can be one of the keywords event for event stacks or scaler for scaler stacks. The CC-USB only supports one scaler and one event stack. The current version of the configuration engine allows you to create more than one of each stack. In that case, it is not well defined which stacks are actually loaded.
-type is event.
If true (the default), scaler ring items are marked as incremental. If not they are marked as non-incremental.
This option defines the set of modules that are added to the stack. module-list is a properly formatted Tcl list of names of modules (ph7xxx's in this implementation) that will be read by this stack. See the EXAMPLES section below for more information.
The list defaults to empty which is not legal, making this a mandatory configuration parameter.
Event stack options.
Specifies the mask of LAMs that can trigger the list. I suggest leaving this value at zero (the default), and deriving a trigger signal for the NIM IN1 input as the readout trigger.
The ph7xxx command delays the read of the module until it is signalling a LAM. microseconds specifies the total number of microseconds the stack should wait for this LAM. The value should be on the order of the conversion time of the module. Defaults to zero.
Delays the execution of the stack for microseconds microseconds after the trigger condition is detected. This can be used to ensure the digitization hardware has sufficient time to complete its digitization prior to stack execution. Defaults to zero.
Note that in general this value is not suitable as CAMAC digitizers often require a significant amount of time to convert after their triggers.
Options only available for scalers stacks.
The options below are only legal for stacks of
Number of seconds between execution of the scaler stack. This defaults to 2.
The example below extends the example in the ph7xxx(3ccusb) command reference reading the defined modules in an event stack:
Example 1. Example of the stack command.
-lamsoption is left to default to zero, CAMAC lams will not be able to trigger the list.