IR Instrument Control System

Wildfire


System Commands

?time - This command gives the current settings of the integration time, read out time and fdelay time. In addition it will read back these times from the sequencer to insure the value has been set properly.

>det paramsIndex - convert a params() variable into several params variables based on the channel names. For example:

>det pics

will convert the params(pics) variable into params(pics$detNames) for each element in detNames.

buftrace - This command turns on trace information concerning the picture buffers in the dspws. This is used as a diagnostic technique.

autoexecok - This command checks to see if a name can be executed. autoexecok returns a 1 if the name is executable.

autoload [cmd] -

automkindex dir pattern - automkindex will update the autoload index for the given directory. This should be done any time that a new command is created. To create an index for the main tcl directory, you would type (assuming you are in the tcl directory): automkindex. *.tcl

To create an index for a specific instrument (same dir assumptions): automkindex CryoBench *.tcl

autoreset - resets the auto load information.

checkmem - this command checks the TCL memory. This will cause bad things to happen if used incorrectly. (DO NOT USE! AUTHORIZED MAINTENENCE PERSONNEL ONLY.)

checkpicture - checks the parameters for a picture to insure the parameter combination is valid.

canonizefiles - change all files in a directory into canonical form, i.e. lowercase no special characters.

checkFileName new old - check whether the picture file name has been changed. Check if the designated basename exists. Warns against writting over files.

docode [speed] - this command downloads the default code of the desired speed and executes the commands associated with that code speed. The allowed speeds are fast, med or slow

For IRIM and SQIID all speeds load the same microcode.

getheader - This command queries the TCP computer and attempts to get the tcp data. If the TCP computer does not respond a TCP off command should be issued to avoid the long delays caused by the time-out values used in waiting for the TCP data.

hdwtrace level node - This command sets the trace flag in the low level nodes to the value level. The higher the value the more information will be printed. (DO NOT use a value greater than 45 without executing a freeze 1 command.)

i?spmode - This is the low level command which queries the instrument about the state of the spad cards.

initInst - This command is called upon start-up to initialize the instrument. The commands should execute in an uplevel statement. The following should be defined:

This command should also execute a puse on the default parameter file. Here is a sample initInst:

proc initInst {} {

uplevel {

# put these in detSetup

# the names of all the channels

set detNames {only}

# the names of all the dsps

set dspNames {dspl0}

# the a mapping from the channel names to dsp names

set map(only) {dspl0}

# a count of the picture queues (== channels)

set startCount 1

set queueCount 0

# paths for finding various files

set paramDir /source/wfire/tcl

set ucodeDir /source/wfire/ucode

set scriptDir /source/wfire/tcl/scripts

# all the parameter names that are saved/prompted for/listed

set paramList {coadds lnrs pics delaysec filename headerdir

pixeldir mode picnum ucode display}

 

# setup various temp variables for further use

foreach x $paramList {

set tmp($x) ""

}

set temp ""

# load the initial parameters/questions

puse params.par

}

}

 

ld [ucodename] - This downloads the given microcode. The current ucode (if any) is not killed, and the downloaded code is not started.

(see startucode.)

logtemps [seconds] - This command starts the saving of a continuous log of the instrument temperatures. The seconds parameter tells how often the temperatures should be read. The default value is 300 seconds (5 minutes). NOTE: The instrument system will be unusable as long as this process is running.

noinc channelnames [on|off] - noinc will disable (default) or enable the incrementing of picture numbers for the given channels.

parray arrayname - parray will display all of the entries in the given array.

ping [node] - ping will send a readvar message to the given transputer node (b011 by default) and wait for a reply.

pupdate <files> - This command updates parameter files. This will add any new questions/parameters to a parameter file.

q questionListName [startindex] - q will ask a list of questions and return the index of the current question when the user goes off the top or bottom. qed can be used to create a single question. The questionListName should be the name of a list of question(s).

(see qed.)

qed - qed can be used to edit an existing question or create a new one. The following fields must be specified:

Flags (0 = disp, 1 = ask): 3

Variable name: name

Description:

Prompt:

Default value:

pre question Proc:

post question Proc:

 

qed would return {3 name {}: {} {} {}} given the above fields.

r eadHeader name - readHeader will read the header variable with the given name from the b016 and display it's value.

NOTE: this will create the variable if it does not exist!

receive [-p] [-r varname] [-q] [-a] [-ctype] - receive a message from the transputers system.

/******************************************************************************

* Routine: receive

* Purpose: receive a message from the transputers (using the protocol as

* described in protocol.h)

* Inputs: receive [ -p ] [ -r varname ] [ -q ] [ -a ] [ -ctype ]

* -p -- poll (i.e. return right away if there is no data)

* -r varname -- wait for a variable with the given name

* -q -- quiet mode

* -a -- wait for an akk message

* -c{type} -- conversion on data (to int is the default)

* d -- int

* s -- string

* x -- hex

* f -- float

* Returns: data from the message in some usable format

*

******************************************************************************/

rehash - rehash will reset the completion data to contain the current procedures, commands, and global variables.

save procName [fileName] - save will list the given procedure to stdout or a specific file name.

saveinst {filename] - saveinst saves the current instrument configuration (as defined by the configuration, see below). It generates a script that will set the state back to the current one.

# stuff for saving instrument state

# 0 == no save, 1 == save

set save(ucode) "0"

# a list of spad cards

set save(spads) { 0 }

set save(spadmode) "0"

# a list of dacs to save

# { anum gnum inum index }

set save(dac) { }

# a list of servo vars to save

set save(servo) { }

# a list of lcd vars to save

set save(lcd) { }

send command [data ..] <list of node names> - send a message to the transputer(s). The available commands are listed below. The data should be of the form:

variableName [(subscript)] or -i <integer> or -s <string> or -f <float>

The available commands are: imagedone, beginxmit, setvar, readvar, debugmsg, abortmsg, stopmsg, startmsg, pause, resume, varread, readhk, setvarak, akk, akkfail, killproc, executeproc, checkhk, error,

NOTE: not all of these make sense for every transputer in the system, anyone who uses this command better know what they are doing.

All transputers have these variables: traceflag

The variables for the dspw are: frames, received, prog, imagesize, lnr, coadds, mode.

The b016 variables are: pfilename, ppath, pnum, ppixeldir, hname, hform, hdata, hcomm, hkdata, hkscreen, pmode, phk, hksave, curdisp, imlist, ppos.

The inst variables are: numarrays, echome, statusreport, deactivate, hkbuf, protection, scbregval, camerapower, arrayd2a, servo, filters, a2dfreeze, spadmode, wheelpos.

The seq variables are: cntrlreg, inttime, finttime, spadfilter,

The available node names are (some are synonyms): b011, b016, seq, inst, dspl0, dspr0, dspl1, dspr1, dspl2, dspr2, dspl3, dspr3,

setHeader name format data [comment] - setHeader will set the given header information on the b011. The available formats are: -f -- float, -i -- integer, -s -- string

(see readHeader.)

setdac arraynumber grpnum indexnumber value - This command access the dac's in the instrument directly. Detailed knowledge of the structure of the instrument is needed to use this command. Each instrument has a different set of dac's. In general these should be accessed using the USER level commands in the previous sections.

setoffset - This command turns the current offset into a string.

startucode - startucode sends an executeproc message to the sequencer.

takePicture - takePicture takes the number of pictures specified by params(pics) and waits for it to finish. All of the parameters are assumed to have been send using sendParams.

waitForDone - waitForDone waits until all of the pictures that should be taken have been uploaded to the b011.

 


[Return to main page ] [ Go to previous page ] [ Go to next page ]

National Optical Astronomy Observatories, 950 N. Cherry, PO Box 26732, Tucson, AZ 85726, Phone: 520-318-8000, FAX: 520-318-8360

Posted: 23Mar98