ph7xxx

Name

ph7xxx -- Define Phillips ADC/TDC/QDC modules

Synopsis

ph7xxx create name [?option value ...?]

ph7xxx config name option value...

ph7xxx cget name

DESCRIPTION

Creates, configures and interrogates the configuration of Philips CAMAC digitizers.

The create command creates a new digitizer name configuration. The name parameter must be unique. The optional [option value] pairs that follow specify the configuration for that module. This configuration can be supplemented or overridden by subsequent config operations on the module.

The config subcommand configures the existing module name. The remainder of the command line are option value pairs described in the section OPTIONS below. The module name must have already been created via the create subcommand. Note that configuration options are processed from left to right, if a configuration option appears more than once, the last instance takes effect.

The cget subcommand returns the configuration of the module. This can be used in more advanced scripts to analyze the configuration of the system. The configuration of a module name is returned as a properly formatted Tcl list. Each element of the list is itself a pair (a two element sublist). The first element of each pair is the configuration parameter name, the second element the value, which may itself be a list (e.g. for the -llt option.

OPTIONS

-slot slotnumber

This option configures the slot in which the module will be installed. All modules must be in unique slots, although that is not verified by the configuration manager. The slot must be an integer number from one through 23 (slot 24/25 holds the CAMAC crate controller).

The default value for this parameter is illegal (0), so you must specify this parameter.

-id vsn

Each module has an identifier which, for historical reasons is called a virtual slot number, or vsn. To maximize the decode error detection the virtual slot numbers for each module should be unique. This option allows you to set the virtual slot number for the module.

If the -id is not supplied, it defaults to zero.

-sparse bool

If the value of this configuration is true, the module is read in sparse readout mode (A Q-Stop of F4@A0). SpecTcl expects this to be true and that is also the default value.

The values true, yes, 1, on and enabled are all recognized as true values while the values false, no, 0, off, and disabled are all recognized as false values.

-readhits bool

If the value of this configuration is true,the module's hit register is read prior to the channels (F6@A1). SpecTcl requires this parameter to be true, and that's the default value.

SpecTcl will use this value to determine the number of digitizer data words that follow for this module.

The values true, yes, 1, on and enabled are all recognized as true values while the values false, no, 0, off, and disabled are all recognized as false values.

-pedestals int[16]

Supplies the pedestals for each channel. This must be a 16 element list of integers. These values are initialized to zero. Note that the pedestals are ignored unless -usepdestals is true.

The best way to construct this list of pedestals is to use the Tcl list command for example:

Example 1. Using the list command to construct pedestals


                           
ph7xxx config someadc -pedestals [list 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20]
                           
                           

Note that pedestals can be specified as decimal values (as shown in the example above), hexadecimal value by preceding a number with the text 0x or octal by preceding the number with a leading 0.

-llt int[16]

Supplies the low level thresholds for each channel. This must be a 16 element list of integers. These values are initialized to zero. Note that the low level thresholds are ignored unless -usellt is true.

See the description of -pedestals above for more information about how to construct this list.

-hlt int[16]

Supplies the high level thresholds for each channel. This must be a 16 element list of integers. These values are initialized to full scale (4095). The high level thresholds are ignored unless the parameter -usehlt is true.

See the description of -pedestals above for more information about how to construct this list.

-usellt boolean

Enables or disables the low level threshold (sets or clears the LT Enable bit in the control register). This is useful if -llt has been used to program low level thresholds and -sparse has been set to true.

The values true, yes, 1, on and enabled are all recognized as true values while the values false, no, 0, off, and disabled are all recognized as false values.

-usehlt bool

Enables or disables the high level threshold (sets or clears the UT Enable bit in the module control register). This is useful if -hlt has been used to set the high level thresholds and -sparse has been set to true.

The values true, yes, 1, on and enabled are all recognized as true values while the values false, no, 0, off, and disabled are all recognized as false values.

-usepedestals bool

Enables or disables per chanel pedestal subtraction. This is most useful when -pedestals has been used to program a set of pedestals into the module.

The values true, yes, 1, on and enabled are all recognized as true values while the values false, no, 0, off, and disabled are all recognized as false values.

EXAMPLES

The example below creates a Phillips module named adc1 and programs all of the configuration options. Note that in many cases you won't need to do this (e.g. for ADC's the high level thresholds usually can be left up at 4095

Example 2. Sample ph7xxx commands


ph7xxx create adc1 -slot 5
ph7xxx config adc1 -sparse enabled -readhits true -usellt true -usehlt false
ph7xxx config adc1 -usepedestals enabled
ph7xxx config adc1 -pedestals [list 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ]
ph7xxx config adc1 -llt [list 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10]
ph7xxx config adc1 -hlt [list 3000 3000 3000 3000 3000 3000 3000 \
                              3000 3000 3000 3000 3000 3000 3000 3000 3000 ]