package require wienercamac
wienercamac::cdreg b c n ?vme?
wienercamac::cfsa reg f a ?d?
wienercamac::cssa reg f a ?d?
wienercamac::qstop reg f a ?maxn?
wienercamac::qscan reg f a ?maxn?
wienercamac::cblock reg f a num
wienercamac::isOnline b c ?vme?
wienercamac::getGl b ?vme?
wienercamac::C b c ?vme?
wienercamac::Z b c ?vme?
wienercamac::isInhibited b c ?vme?
wienercamac::Inhibit b c bool ?vme?
wienercamac::ReadLams b c ?vme?
The commands below share many of the same parameters:
Is a branch number. For the CES CBD 8210 this is the number set in the front panel branch number switch.
A CAMAC crate number on some branch. This is set in the front panel rotary switch of the A1 or A2 crate controller installed in the right-most pair of slots of the crate.
The slot number of a module in a CAMAC crate. Slots in a CAMAC crate are numbered from 1 starting at the left.
The subaddress within a module. A CAMAC modules is defined to have 16 subaddresses numbered 0-15. Each module uses this set of subaddresses differently.\
A VME crate number in which at least one CES CBD 8210 module has been installed.
A CAMAC module handle. These are produced using the camac::cdreg command below. This is used to select the CAMAC module operated on by several of the commands.
package require wienercamac
Loads the commands in the wienercamac package into the interpreter provided that the NSCLDAQ Tcl package repository is in the interpreter search path. See The wienercamac Tcl Package chapter for information about how to add the NSCLDAQ Tcl package repository to the interpreter search path.
wienercamac::cdreg b c n ?vme?
Creates a handle to a module in the CAMAC system. If the optional
vme
parameter is not supplied, VME crate number
0 is used. The command returns a handle which is the reg
parameter in subsequent commands that operate on a module.
wienercamac::cfsa reg f a ?d?
Performs a CAMAC operation on the module reg
.
reg
is a module handle created by a call to
cdreg. If the function transfers data the least
significant 24 bits of data are transferred. If the function is a write
operation, the d
parameter is required and is the
data to write.
The return value is a 3 element Tcl list. The second element of the list
is the Q response. The third element of the list is the X response. The
meaning of the first element of the list depends on the f
parameter. If f
is the read operation, this
will be the value read from the module. If f
is
a write operation, this will be the d
parameter.
If f
is a control operation (non data transfer),
this will be zero.
wienercamac::cssa reg f a ?d? - perform a 16 bit camac operation
Identical to wienercamac::cfsa however all data transfers only transfer the least significant 16 bits. Since the data path to the controller is only 16 bits, this is significantly faster than 24 bit transfers when the top bits are not required.
wienercamac::qstop reg f a ?maxn?
Performs the same read operation until the operation no longer returns
a Q. If the optional maxn
parameter is present
this also sets an upper limit in the number of transferrs. The return
value from this is a list of the data read from the module. Only read functions
are suportedby this and all block functions.
wienercamac::qscan reg f a ?maxn?
Performs a Qscan block transfer. After each read operation,
the subaddress is incremented. Once a module no longer responds
with a Q, the subaddress is reset to zero and the slot is incremented.
This continues until no X response is returned. If the optional
parameter maxn
is provided, it limits the
maximum transfer count to maxn
.
The return value is a list of data that was returned from the module. These are textual ascii values, not a binary block.
wienercamac::cblock reg f a num
Peforms num
read operations on the module
specified by reg
. Data read are returned as the
module's result in a Tcl list.
wienercamac::isOnline b c ?vme?
Returns true if the specified VME create is online (attached to the controller and powered up).
wienercamac::getGl b ?vme?
Reads the graded lam register for the controller.
wienercamac::C b c ?vme?
Peforms a C cycle on the selected crate
wienercamac::Z b c ?vme?
Performs a Z cycle on the selected crate.
wienercamac::isInhibited b c ?vme?
Returns non zero if te specified crate is inhibited
wienercamac::Inhibit b c bool ?vme?
Sets or clears the inhibits for the selected crate.
If bool
is on zero the crate is
inhibited otherwise it's uninhibited.
wienercamac::ReadLams b c ?vme?
Reads the crate LAM register.