Chapter 53. The CES CBD 8210 Tcl CAMAC Package

This chapter describes a Tcl package (camac) that allows Tcl scripts to perform CAMAC operations via CES CBD 8210 VME CAMAC branch highway controllers. This can be used to write control applications for CAMAC based modules. Note that as the CBD 8201 is no longer in production we strongly recommend that you not build any new applications around this module.

The functions in this library are loosely based on the ESONE CAMAC function library specification (IEEE 758). The remainder of this chapter describes:

Reference information is available as well. See camac(3tcl)

53.1. Incorporating camac into your scripts

Incorporating this package requires that you first make the NSCLDAQ Tcl package respository visible to the Tcl package load subsystem. Having done that, you must then explicitly load the package via the package require command.

The Tcl package load subsystem search paths are a combination of an environment variable (TCLLIBPATH), and a set of global script variables (auto_path). You can extend either of these mechanisms to include the NSCLDAQ Tcl package repository in the set of directories searched by the package load subsystem.

In the remainder of this section we are going to assume that you have defined the environment variable DAQROOT to be the base of the directory tree into which NSCLDAQ has been installed.

The bash shell script fragment below shows how to add the NSCLDAQ package repository to the TCLLIBPATH environment variable. This script extends any existing TCLLIBPATH definition rather than overwriting it


export TCLLIBPATH="$TCLLIBPATH $DAQROOT/TclLibs"
                    

The Tcl script example below shows how to append the NSCLDAQ package repository path to the list of paths in the auto_path global variable.


global auto_path
global env
lappend auto_path [file join $env(DAQROOT) TclLibs]