ARP Data Acquisition Systems Software Development Guide
Contents
- 1.0: Summary
- 2.0: Writing Instrument Startup Scripts
- 3.0: What Programs will you Need to Generate?
- 4.0: TMC Source Files
- 5.0: Future Topics
1.0: Summary
This manual includes discussion of arcane issues which I hope are
of interest only to fulltime programmers. If subjects listed here
become of interest to experimenters, they should probably be
reworked for general disemination.
2.0: Writing Instrument Startup Scripts
Instrument startup scripts (e.g. interact, runfile) are one of the
last areas of arcane knowledge to be automated. I will jot down
some of the issues involved in writing these scripts. Generally
a startup script includes some of the following:
memo
cmdctrl
dccc
scdc
timerbd
<collection>
soldrv
nav
lgr
bfr
indexer
<command server>
<display programs>
<algorithms>
<command client (keyboard interface)>
Each of these programs requires a number of command-line options.
The order of operations is significant,
since certain programs expect other programs to be already present
when they are initialized. If program A talks to a program B,
program B must be run first, and there must be an intervening
namewait
call to verify that program B has completed its initialization.
The following rules will attempt to define the interrelations.
Every program talks to memo, hence it should come first.
dccc, scdc, soldrv and nav register with
cmdctrl, hence it should come before they do.
Collection and indexer will register with
cmdctrl if it is present, so they should come
later also.
Collection will use timerbd if it is present,
so collection should come after timerbd.
soldrv, nav, lgr, bfr, indexer,
the command server, display programs and algorithms all talk to
collection during initialization, so they must start later.
If a .slp format is used, the command server will need
to talk to soldrv during initialization also, so the
command server must start later.
Display programs and algorithms are generally placed on the
bfr rather than directly on the ring to avoid
interference with collection, hence bfr
should be present and preceed these programs.
Algorithms which start telemetry should be as close to the end
of the script as possible to allow any other programs to finish
their initialization before the system gets into full swing.
Programs which display data (and any TMC-generated program can,
even collection!) may require special handling, particularly if
more than one screen is involved.
If the command client is present, it is usually the first of
these programs to run in the foreground. When it terminates,
it is assumed the entire script should terminate.
3.0: What Programs will you Need to Generate?
In general, you will need to provide programs for Data Acquisition
(collection and display), Data Analysis (extraction) and
instrument control (command client/server, algorithms). You have
considerable latitude as to how these are combined or divided.
I will use as an example an experiment known as the Extra Proton
detector, for which the acronym "abc" will be used. Throughout
this document, wherever the letters
abc
are used in a filename, you would substitute the acronym for your
own experiment. The following is a likely list of executable files
required to run abc:
- abccol
- Collection
- abcdisp
- Full-screen Display
- abcext
- Spreadsheet Extraction
- abcsrvr
- Command Server
- abcclt
- Command Client
- abcalgo
- Command Algorithm
- abc.dccc
- DCCC pin definition file
- abc.sft
- Compiled Solenoid Cycle definition
Of course your experiment may require more than one display,
extraction, algorithm or solenoid definition, but these are the
basic pieces we use to run experiments.
4.0: TMC Source Files
Your best bet when defining a new instrument (and the approach I always
use) is to refer to the definition of another instrument. The "usual
sources" required by TMC consist of the following:
- types.tmc
- Defines data types and conversions.
- abc.tmc
- Defines type and rate for each telemetry datum.
- abcgrp.tmc
- Group definitions if required
- abccol.tmc
- Definitions specific to collection
- abc.fld
- .Ref scrdes
- screen definition
- abc.edf
- Spreadsheet extraction definition
- abc.tma
- .Ref tmcalgo
- algorithm
- abc.cyc
- Solenoid cycle calculation definition
Not all of these files will be required by every experiment. Furthermore,
some experiments use other source files, particularly if sources
are generated automatically by agenda.
5.0: Future Topics
Collection Considerations
CMDGEN Sources
DCCC Sources
SOLDRV Sources
APPGEN
Maintainance Issues
(c)1995 Norton T. Allen