Tcl command "calb"


The tcl command "calb" is a general purpose tcl command. It is the interface to the CALB library. Everything but the zero supression is implemented here.


Index


CALB id

The access to the CALB boards is implemented via channels. Each channel have its own CALB id. In this way one application can access many different boards simply using different ids.

All the routines present in calb have a parameter of this type.


Query CALB presence

Sometimes it is usefull to check if a CALB board is present, and if present, the type of this board. Use
calb ispresent for this task.


Initialization

As stated before, the access to the Calb boards is implemented via a CALB id. To obtain such an id you have to open a channel to the CALB board using
calb open. This id will than be used for all the accesses to the CALB board.
Each id should identify a different CALB board.

When you finish using the CALB board, please call calb close to close the channel associated to the id.


Get a filed

To get a field simply call
calb get, followed by the field name and the CALB id.


Set a filed

To set a field simply call
calb set, followed by the field name, the CALB id and the new value.

If the value is out of range, an and will be applied.


Read a register

There are two different ways to read a register:


Write a register

There are three different ways to write a register:


Read a page

A page can only be read as a record of fields.

Use calb readpage csreg, calb readpage pedestal


An example

#open the CALB
set cid [calb open 5 10 1]
...
#get zsen bit
set azsen [calb get zsen $cid]
...
# set creg to 0
calb raw write creg $cid 0
...
# read a FIFO
set aval [calb read dfifo $cid]
...
#close the CALB
calb close $cid


Top of the page. CALB documention.
Send comments to: Igor Sfiligoi

Created:20.5.1997
Last modified:20.5.1997