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.
-type
stack-typeDefines 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.
The default -type
is event.
-incremental
boolIf true (the default), scaler ring items are marked as incremental. If not they are marked as non-incremental.
-modules
module-listThis 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.
Event stack options.
-lams
maskSpecifies the mask of LAMs that can trigger the list. I suggest leaving this value at zero, and deriving a trigger signal for the NIM IN1 input as the readout trigger.
-lamtimeout
microsecondsThe 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.
-delay
microsecondsDelays 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.
Options only available for scalers stacks.
The options below are only legal for stacks of
-type
scaler
-period
secondsNumber 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.
ph7xxx create adc1 -slot 6 ph7xxx create adc2 -slot 7 stack create events stack config events -type event -modules [list adc1 adc2] stack config events -delay 10 -lamtimeout 8
-lams
option is left to default to zero,
CAMAC lams will not be able to trigger the list.