The CBI Scheduling Language.

Click here to reach the control system home page.

If this is your first encounter with the language, please read:

A Tutorial Introduction to the Language

The rest of this page contains links to reference information.


Miscellaneous information

The list of CBI registers.
The cbiviewer program.

Control program configuration commands.

archive [combine=number, dir=/whatever, filter=true|false]
Configure the data archiver.
close archive|log
Close the current archive or log file.
catalog filename
Load sources from a source catalog file.
flush archive|log
Flush buffered data to the current archive or log file.
horizon elevation
Specify the horizon that is to be assumed by the show command.
logdir directory
Tell the control program where to put subsequent log files.
open archive|log, [dir=?]
Open a new archive or log file.
add_signals {signal_names}
Define the list of signal names.
site longitude, latitude, altitude
Set the location of the CBI.
ut1utc filename
Load an ephemeris of UT1-UTC.
update_year
Send the current year number to the control system.

Hardware configuration commands.

channel receivers, bands, on|off
Switch the IF amplifiers of selected correlator channels on or off.
attenuate receivers, bands, attenuation
Insert a given attenuation into the signal path of one or more channels.
camera number
Select an active optical pointing camera.
channelizer on|off
Temporarily disable or re-enable all of the IF amplifiers.
collimate radio|optical, size, direction, [camera=?]
Specify the radio or optical collimation tilts.
encodersaz_per_turn, el_per_turn, dk_per_turn
Specify the sizes of the azimuth, elevation and deck encoders.
encoder_zero_points az_zero, el_zero, dk_zero, [camera=?]
Specify the encoder angles of zero topocentric azimuth, elevation and deck angle.
flexure flexure, [camera=?]
Enter the measured gravitational flexure of the telescope.
heater receivers, heaters, voltage
Switch or set the target temperature of one or more receiver heaters.
inhibit true|false
Start or stop the data strobe.
integrate exponent
Change the hardware integration period to (8.192e-4 x 2^exponent) seconds.
limits az_min, az_max, el_min, el_max, dk_min, dk_max
Specify the azimuth, elevation and deck encoder limits.
lo receivers, stages, on|off
Switch one or more local oscillator stages on or off.
monitor [interval=time]
Configure the serial-I/O monitor task.
pshifter receivers, half|full, position
Switch off or reposition one or more phase-shifter motors.
power_meter reset|zero|read
Send a command to the noise-cal power meter.
noise_readout_interval dt
Set the power measurement interval of the noise cal system.
noise_cal on|off
Turn the noise-calibration signal on or off.
tilts ha, lat, el, [camera=?]
Specify the tilts in the telescope axes.
quad receivers, phase
Configure the quadrature phase shift networks of specified receivers.
rotcor [state=on|off, limit=?, encoder_zero=?, shaft_zero=?]
Specify how and if the elevation rotation meters should be used.
tilt_meter [state=on|off, limit=?]
Specify how and if the azimuth tilt meters should be used.
tp receivers, bands, power
Specify the target total-power output of one or more correlator channels.
tpzero receivers, bands
Tell the channelizer to measure new total-power zero-offsets.
tv_angle angle, [camera=?]
Record the orientation angle of the optical telescope.
walsh mod|demod|both, receivers, function
Change the phase-switch modulation and/or demodulation functions.
zero_rotcor
Zero the rotcor correction applied by the tracker.

Engineering Commands

gpib_read device
Read a reply string from a device on the GPIB bus and display it.
gpib_send device, command
Send a command string to a device on the GPIB bus.
reboot cpu|rtc|cbicontrol
Restart the control system.
rxsim [noise=rx.., signal=on|off, quad=rx..]
Control the receiver simulation box.
load_reboot_script filename
Load a schedule script to be run whenever the real-time cpu reboots.
setdio board, set|clear|assign, mask
Change the value of the output register of a given digital I/O board.
setreg register, value
Change the value of a CBI register.
shutdown cpu|rtc|cbicontrol
Halt the control system.
strobe
Generate an artificial data-strobe pulse.
unflag board
Unflag a previously unreachable VME board.

Scheduling inquiry functions.

Boolean after(time, utc|lst)
Return true if the current time is after a given time-of-day.
Boolean acquired(operations)
Return true if a specified set of operations has completed.
Boolean between(start, end, utc|lst)
Return true if the current time is within a given window of time.
Interval elapsed()
Return the time spent within the enclosing loop or until statement.
Count iteration()
Return the number of completed iterations of an enclosing loop.

Parameter query functions.

Boolean archive_filtering()
Return true if archive filtering is currently enabled.
Count archiving_interval()
Return the current archiving interval.

Schedule Control Commands.

advance_schedule index number
Move a schedule one or more entries towards the front of the schedule queue.
abort_schedule
Abort the schedule that is currently running.
catch condition {statements} {remedial_commands}
Abort the specified block of commands if the given condition becomes true.
check_schedule filename(arguments)
Check wether the specified schedule would be accepted by the schedule command.
remove_schedule index
Remove a given schedule from the schedule queue.
resume_schedule
Resume execution of a paused scheduling script.
retard_schedule index number
Move a schedule one or more entries towards the back of the schedule queue.
schedule filename(arguments)
Add a schedule to the list of pending schedules.
signal/send|init|clear name
Send a signal to a running schedule.
Signal signaled(signal)
Check whether a given signal has been sent by the user.
suspend_schedule
Temporarily suspend execution of the schedule that is currently running.

Telescope Control Commands.

deck_mode track|zero
Tell the tracker how to position the deck axis when tracking a source.
halt
Stop the telescope drives and put on the brakes.
model radio|optical
Select between the radio and optical pointing models.
offset/add [az=?, el=?, dk=?]
Change the tracking offsets of one or more telescope axes.
radec_offset/add [x=?, y=?]
Change the equatorial tracking offsets.
sky_offset/add [x=?, y=?]
Change the sky-based tracking offsets.
slew [az=?, el=?, dk=?]
Slew one or more axes of the telescope to given positions.
slew_rate [az=?, el=?, dk=?]
Reduce the slew rate of one or more telescope axes.
track source
Start tracking a given source .
tv_offset right, up
Adjust the tracking offsets to move the image on the TV monitor.

Miscellaneous Inquiry Functions.

Azimuth azimuth(source)
Return the current azimuth of a given source.
Date date()
Return the current date and time (UTC).
Elevation elevation(source)
Return the current elevation of a given source.
Date rise_date(source,utc,horizon)
Return the nearest date and time at which a given source rises.
Date set_date(source,utc,horizon)
Return the nearest date and time at which a given source sets.
Time time(utc|lst)
Return the current time of day on a given time-scale.
Date today()
Return today's date (0h UTC).
Date tomorrow()
Return tomorrow's date (0h UTC).

Miscellaneous Inquiry Commands.

show source, [utc=?, horizon=?]
Display contemporary information about a source.

Miscellaneous Commands.

alarm message
Trigger the cbiviewer alarm.
mark one|add|remove, features
Change the set of feature markers to be recorded in the archive.

General Scripting Commands.

break
Prematurely exit the innermost enclosing foreach or while loop.
cleanup {statements}
Register a list of statements to be run when the script terminates.
exit
Terminate execution of the containing script.
<datatype> name = value
Create a new scalar variable and give it a value.
command name(type name, ...) {commands}
Create a new command.
do datatype variable=start,stop,increment {commands}
Repeatedly run a set of commands while stepping the value of a local variable.
foreach(type name) list {commands}
Loop through a set of commands once for each member of a list.
function type name(type name, ...) {expression}
Create a new function.
if(clause) {commands} else if(clause) {commands} else {commands}
Conditionally execute one of a number of blocks of commands.
ifhost(clause) hostname1 {commands} hostname2 {commands} {commands}
Conditionally execute commands that are specific to given cbicontrol hosts.
import filename
Import the contents of another script.
listof type name = {value, ...}
Declare a new variable and initialize it with a list of a given type.
log "string" | $datatype(expr) | $function(args) | $variable
Record a message in the log file and send it to control clients.
next
Prematurely start the next iteration of the innermost loop.
print "string" | $datatype(expr) | $function(args) | $variable
Print one or more arguments according to their types.
return
Finish executing the enclosing command without executing any of its remaining statements.
group name {type name, ...}
Create a new aggregate datatype.
until clause
Halt script execution until the given boolean clause becomes true.
while(clause) {commands}
Repeatedly run a set of commands while the given boolean clause is true.

Environment variables.

hostname
The name of the computer that is running cbicontrol.

CBI Datatypes.

AcquireTargets
A selection of ongoing transactions.
Altitude
A geodetic altitude (m).
Angle
A generic signed angle (sexagesimal degrees).
AngleLimit
A datatype used to set limits on the magnitude of angles.
ArcFile
An archive file type (archive or log).
Attenuation
A channelizer attenuation (0-31db).
Azimuth
A telescope azimuth (North=0, East=90, South=180, West=270).
Bands
A set of zero or more CBI frequency bands (band0-band9).
BitMask
A 32-bit number specified as an unsigned number or as a set of bits.
BitMaskOper
The operator to use when applying a BitMask template to a BitMask.
Board
A CBI register-board name.
Boolean
A truth or false value.
Count
A positive integral count.
Date
A Gregorian date and time (UTC).
DeckAngle
A telescope deck-drive angle (-360..360).
DioBoard
The name of a digital I/O board.
DeckMode
The behavior of the deck-axis while tracking a source.
Double
A generic signed floating-point datatype.
Elevation
A telescope elevation (0..90).
EncoderCount
An encoder count.
Features
A set of markers that indicate features of interest in an archive frame.
Flexure
Gravitational flexure (degrees per cosine of elevation).
GpibCmd
A command-string destined for a device on the GPIB bus.
GpibDev
The address of an instrument on the GPIB bus.
Heaters
A set of antenna-based heaters.
HeaterVoltage
The target voltage of a heater feedback sensor.
InputFile
The pathname of a readable file.
Integer
A generic signed integer.
Interval
A time interval.
IntTime
The CBI hardware integration time as a power-of-two exponent.
Keyword
An unquoted case-insensitive keyword string.
Latitude
A geodetic latitude (-90..90).
Longitude
A geodetic longitude (-180..180).
LoStages
One or more stages of the local oscillator chain.
Model
A pointing model (radio or optical).
OffsetMode
Is used to specify how new pointing offsets modify existing ones.
PhaseShift
The target encoder reading of a phase-shift motor.
PhaseStep
A phase-shift motor step size (full or half).
PointingOffset
A temporary ra,dec or az,el,dk pointing offset (-180..180).
PowerMeterCommand
The type of command to send to the noise-cal power meter.
QuadPhase
One of the 4 quadrature phases 0, 90, 180 or 270.
QueueEntry
The index of a script within the schedule queue.
Receivers
A set of zero or more CBI receivers.
Register
A CBI register name.
RegValue
A 32-bit unsigned integer register value.
Script
The pathname and arguments of a scheduling script.
Sexagesimal
A generic signed floating-point datatype expressed in sexagesimal.
Signal
A signal name.
SlewRate
A slew rate expressed as a percentage of the maximum.
Source
A source from the source catalog.
String
A literal string.
SwitchState
The on or off state of a switch.
SysType
The target subsystem of a reboot or shutdown.
Tilt
An telescope axis tilt angle.
Time
A time of day or time interval.
TimeScale
A timescale specifier (UTC or LST).
TotalPower
The target output voltage of a correlator total-power detector.
WalshFunction
A walsh function, specified by number.
WalshStages
One or more walsh-function stages: mod, demod or both.
Wdir
The pathname of a writable directory.

Martin Shepherd (Last change: 3-Mar-1999)