package require caennet
caennet::create baseaddr ?vmecrate?
caennet::delete controller
caennet::reset controller
caennet::send controller slave code ?data?
The caennet package provides Tcl scripted access to modules that are controlled by CAEN's proprietary device control network. The package requires a CAEN V288 Caennet controller be installed in at least one of the VME crates attached to the host.
All package commands are defined in the caennet namespace. This can be imported into the current or global namespace via the namespace import command.
package require caennet
Loads the caennet package. This is required to make the package commands known to the Tcl interpreter.
caennet::create baseaddr ?vmecrate?
Connects to the CAEN V288 controller at baseaddr
in the VME create specified by vmecrate
. If
vmecrate
is not provided, it defaults to zero.
The command returns a string that identifies the controller in subsequent
operations.
caennet::delete controller
Deletes the connection to a CAEN V288 controller for which
caennet::create returned the string
controller
.
caennet::reset controller
Resets a CAENnet controller. controller
is a string that was returned from a previous invocation of
caennet::create.
caennet::send controller slave code ?data?
Peforms a CAENnet transaction. Each transaction consists of a message
sent to a node on the network, and a response either from the node or
from the controller, if the node does not exist.
controller
is the controller handle that was returned
by the call to caennet::create.
slave
is the slave address on the network. This is
usually encoded in thumbwheels or rotary switches on the slaves front panel.
code
is the operation code of the message. The
operation code uasually selects the operation and meaning/presence of any
subsequent data.
code
is the function code to perform. This will
be slave specific and will determine the amount and meaning of the
data
parameter, which can be thought of as parameters
to the function code.
The operation returns the data sent back by the slave as a list of decimal integers. Each integer is a byte of data.