Please, send your comments and suggestions concerning this document to Roland May.
Normally, MAD is activated on the monitor of the acquisition work station d22 by the user "d22". Only a privileged user may bypass this rule.
Inside the ILL, an up-to-date version of this help file is available on the instrument computer.
Information about D22 can be found on the D22 page in ILL's WWW server.
usage:
MAD: ACQ [Preset value] [Preset type] [Ntimes] [Save/Nosave] [cr]
MAD starts by typing the date, the time, and a list of control messages and shows that it is ready for input with the prompt "MAD: ".
MAD commands can also be used remotely, see MAD subtopic "remote_use".
MAD: ADC [cr] default, reads channel 1 MAD: ADC1 [cr] reads channel 1 MAD: ADC2 [cr] reads channel 2
usage:
MAD: ADJUST 11 [cr]
usage:
MAD: ATT IN [cr] puts the attenuator in the beam MAD: ATT OUT [cr] removes the attenuator from the beam MAD: ATT [cr] reads the attenuator number in use MAD: ATT C n [cr] sets attenuator nBack to index
Help file by Michel Roure and Roland May, September 1994. Last update: see end of this file
usage:
MAD: BATH 25.3[cr] sets bath temperature to 25.3 deg. C
usage:
MAD: BEAM [cr] reads current beamstop number MAD: beamstop 4 [cr] change to beamstop 4For manually changing the beamstop, see here. The beamstop can be moved in absolute values with respect to the detector centre with the commands BX and BY.
usage:
MAD: BY -10 [cr] moves beam stop vertically to -10 mm
usage:
MAD: CHANGER [cr] reads current position MAD: cha 5 [cr] move to position 5
usage:
MAD: CHECK toto.cmd [cr]This command reads the file toto.cmd and checks whether all commands contained in it respect the syntax of MAD, without executing them.
Allowed values for D22 are: 1.4; 2; 2.8; 4; 5.6; 8; 11.2; 14.4; 17.6 m.
These values are listed in a MAD error message in case of an erraneous entry (e.g. COLL 99). Note: 5, 11, 14 and 17 are sufficient for 5.6, 11.2, 14.4 and 17.6.
usage:
MAD: COLL [cr] reads the current collimation setting (in m). MAD: COLL n [cr] sets the collimation length to n meters.DET can be used (as first command) together with COLL.
MAD: det 3 coll 5.6 [cr]
Be careful with characters that mean conditional_commands, i.e. < and >.
Example:
PARAMETER OUTPUT 1 PARAMETER TITLE WHY NOT ? TEMPERATURE 100 WAIT 600 RUN 30 TEMPERATURE 125 WAIT 600 RUN 30
See commands STOP, PAUSE, RESUME instead.
The data is regularly transferred to the central data base. Data files 000001 to 000099 are temporary data files that are not transferred. The frequency of updating data files and measurement states on the instrument computer hard disk is controlled via the TIMER parameter values.
The Haake bath that has a conversion of 10 mV for 1 deg can therefore be regulated with a precision of about 0.1 deg. Example: An input tension of 0.4 V corresponds to 40 deg.
usage:
MAD: DAC 4.7 [cr] default, channel 1 MAD: DAC1 3 [cr] channel 1 MAD: DAC2 -4.9 [cr] channel 2Back to index
usage:
MAD: DAT [cr]
usage:
MAD: DET [cr] MAD: det 15 [cr]DET can be used (as first command) together with COLL.
MAD: det 3 coll 5.6 [cr]
usage:
MAD: EUDEV SL 12345 [cr]Note: requires communication set-up (line-speed etc.) different from DTI.
usage:
MAD: EXI [cr]
usage:
MAD: HEL [cr]Back to index
After the end of the run, all frames are automatically stored in standard format. In the case of a "STOP", only those frames that have been measured at the time of the STOP are stored.
The presets (max 450) for the different frames in a run are
stored in a text file
The files can be produced either by the program time.exe on the data
acquisition computer or by the Appleworks spreadsheet "slices_generator".
The maximal preset is 390.4 sec (2^32 = 4.29 10^9 ticks)
Example of a file:
usage:
usage:
The program will generally prompt for the next input;
there are messages in the case of insufficient/incorrect input.
MAD often defaults to predefined parameter values, example:
RUN 60 [cr] is interpreted as RUN 60 m(onitor), if m was the
previous selection.
Normally, there is one line per command, yet the DET command
can be combined with the COLL command in one line.
1) the interactive mode, the user enters each command from the terminal,
2) the use of command files.
They contain lists of commands which are
obtained by using an editor (e.g. nedit)
and are executed by the command
START (or XBU).
Mnemonic names:
usage:
The nswd daemon takes output from mad, dti and various other programs
and dispatches it to log files found in the $HOME/logfiles directory.
nswd can also copy to up to 5 terminal devices and to a hardcopy device
connected to a serial port of the computer.
New log files are created every day (assuming something is written to them).
Their filename is madyymmdd.log - ex: mad000411.log
to enable the directory command (ls) to sort them easily according to date.
Various nswd messages (error/information) are written to console
and to file $HOME/nswitch.log.
usage:
usage:
Certain parameter values may be linked (e.g. detector angle and offset).
The parameter COMPUTE (options : ON or OFF) controls whether MAD calculates
these links between values or not.
usage:
usage:
usage:
usage:
usage:
usage:
lower and upper end switch, offset to be a d d e d to read "zero"
and the "precision" value defining a range within which there is no
warning upon termination of a command for moving a motor.
usage:
usage:
usage:
ATTENTION! Users are not allowed to change NUMOR (a special procedure is
required for modification).
usage:
usage:
usage:
ATTENTION : the first letter must not be a number!
usage:
usage:
usage:
usage:
usage:
NB: The first word must not be a number. Use spaces for erasing
residual characters, if there are any.
usage:
usage:
ATTENTION : the first word must not be a number.
usage:
The longest available time (channel number times channel width) in TOF mode
is 98 ms.
ATTENTION: the first word must not be a number.
usage:
Usage:
usage:
usage:
usage:
usage:
Procedure:
1) Get the terminal name for the process REQMAD, by the command:
3) If the terminal name defined in OUTPUT is different from the control
terminal name, it should be modified so that the instrument user is
informed about the remote process.
usage:
RUN takes 0-4 parameters [defaults]
examples:
When used with the option ALIGN, the runs are not stored, and a line printer
plot is created.
When used without the option A, the runs are stored, and there is no line printer
plot.
usage:
usage:
The CIS command is identical to START, except that it does not nest,
i.e. a new CIS command aborts the previous buffer file.
MAD echoes the command line, thus in
Note that you can restart at a different line number after an interrupt.
usage:
If a command is preceded by the character '>', it will not
be executed if the previous command was unsuccessful.
If a command is preceded by the character '<', it will be executed
only if the previous command was unsuccessful.
"No success" is defined as angles outside limits, bad selector speed, etc.
or any 'VME' error, including 'KILL' in PCP.
example:
usage:
usage:
usage:
usage:
usage:
11001100
11584158
12198119
12844619
13525384
14242229
14997067
15791912
16628883
17510214
'
'
'
1735467532
1827447311
The numbers represent the time in ticks, 1 tick = 90.9 ns
1st run time = 11001100 * 90.9 ns = 1 sec
(max. = 390.4 sec) MAD: KINETIC [filename] [cr]
MAD: KIN [filename] [cr]
ex. MAD: KIN slices.txt [cr]
Back to index
IEEE
Reads Keithley voltmeters. They have to be parametrized with a
MAD PAR IEEE
command or by using the PARAME program. MAD: IEEE [cr] reads device address=7
MAD: IEEE1 [cr] reads device address=7
MAD: IEEE2 [cr] reads device address=8
important_commands
input_formats
All MAD input is in free format, with parameters separated by spaces or
commas. Small and capital letters are accepted. Three letters are
usually sufficient for the commands (exception: STATE; 4 letters).interrupt
To interrupt a run before the preset is reached, type STOP on the
instrument control terminal, eventually with the option SAVE or NOSAVE.modes
MAD works in two different modes:movements
The positions of all encoded movements are set and read via mnemonic names.
MAD: Mall read all motor positions
MAD: Bx By read beam stop positions X and Y
MAD: Bx 55 set beam stop horizontally to 55 mm
MAD: Bx 55 By 72.5 set beam stop horizontally and vertically
MAD: Det 5.5 Dan 12.50 set the detector distance and angle
Back to index
other_tasks
Besides MAD, other tasks are used on D22 which can be activated in all
windows of the data acquisition computer but the one that is running MAD.DTI
DTI is a package to drive and control the 'illptc' temperature controller.LIS
LIS gives the state of the transfer of data files to the central data base.MSP
msp displays the status of the measurement. It requires a video terminal.NSW
NSW controls the output of the MAD log file to a printer and the way log files
are started using the nswitch daemon nswd.
nsw commands:
nsw status
shows when nswd was started
shows any hardcopy device (status/name/speed)
shows active terminal copy devices
nsw start
start copying mad and dti output to current window
nsw stop
stop copying mad and dti output to current window
nsw start hard
(re) enable hardcopy device
nsw stop hard
turn off hardcopy device
nsw hard
Back to index
TRANSFERT
transfert is a task that sends data files "manually" to the ILL data server
(serdon).PARAMETER
PARAMETER subcommands define instrument and control parameters.
Only the first three characters of parameter names are necessary.BATH
BATH sets offset and slope values for setting the circulating bath temperature
via DAC.
usage:
MAD: PAR BATH [cr] List bath offset and slope
MAD: PAR BATH 0.2 100. [cr] sets values for BATH:
offset 0.2 deg. C,
slope 100 (1 deg. =10 mV)
BEAM
The number of the beamstop in use is defined as parameter beam.
If the command BEAM indicates a wrong number PAR BEAM n n allows one to set it to
the correct value (note the repetition of value n!).
usage:
MAD: PAR BEAM [cr] List beamstop number in use
MAD: PAR BEAM 4 4 [cr] sets value for beamstop in use to 4
BUTEES
see LIMITSCHANGER
CHANGER checks and sets parameters for the different sample
changers/ rack plates and selects one changer/rack with the SET command. MAD: PAR CHANGER [cr] List all caracteristics
MAD: PAR CHANGER 3 12.5 10. [cr] sets values for changer 3:
first position 12.50,
increment 10.0
MAD: PAR CHA SET 2 [cr] Use changer/rack 2
CENTRE
CENTRE checks and sets values for the beam centre. MAD: PAR CENTRE [cr] List X0, Y0 values (in pixels from 0:127)
MAD: PAR CENTRE 12.5 63.2 [cr] sets values for X0 and Y0
COMPUTE
(not yet used on D22). MAD: PAR COMPUTE ON [cr] values are calculated.
MAD: PAR COMPUTE OFF [cr] no parameter locked; no calculation.
Back to index
CRYOGENICS
options: ON or OFF. If ON, and a cryostat is present, temperatures
are read. MAD: PAR CRYO ON [cr]
DATE
DATE defines/checks the experiment starting date. MAD: PAR DATE 14-Jul-1994 [cr]
MAD: PAR dat [cr]
DETECTOR
Checks/defines the multidetector resolution in pixels. You can give
the size values for X and Y separately. (Normal values on D22 are 128,
128). MAD: PAR DET 64 64 [cr]
MAD: PAR DET 32 32 [cr]
MAD: PAR DET X 64 Y 32 [cr]
DISTANCE
Checks/defines the default sample-to-detector distance (SD) in meters. MAD: PAR DIS 11.250 [cr]
FLUX
Checks/defines the minimum and maximum detector counting rates for
verifying if the beam is open or if a reasonable count rate is exceeded.
If a value is zero, there is no verification for it. MAD: PAR FLU 5 0 [cr]
Back to index
LIMITS
Checks/defines the (MAD internal) software limits, offset and precision for encoded
movements. See also MAD PARAMETER topics "movements",
ZERO and PRECISION. The values entered are: MAD: PAR LIMITS Bx -20 180.0 [cr] sets limit values for Bx
MAD: PAR LIM [cr] types all values
LIST
Lists all parameters (not yet implemented). MAD: PAR LIST [cr]
LOGBOOK
LOGBOOK checks/defines the number of the current logbook in which
details of the experiment are to be found. MAD: PAR LOGBOOK 54 [cr]
MAD: PAR log [cr]
MCO
see TITLE.MOT
MOT checks defines the names, output coefficients (divider for integer scaler values),
VME unit, timeout (s), physical unit of movement, and VME control type (0: QCL,
1:VPAP control) of the motor units.
usage:
MAD: PAR MOT [cr]
MAD: PAR MOT 1 DET 1000 1 120 m 0[cr]
NUMOR
NUMOR (numero d'ordre) is the current data-set identification number
(run number). MAD: PAR NUM [cr]
PARDES
(parameter decription) Switches on/off the optional description header
in the data parameter block. MAD: PAR pardes on [cr]
MAD: PAR pardes off [cr]
PRECISION
Checks/defines the "soft" (MAD internal) motor precision. Same syntax as LIMITS. MAD: PAR precision By 550 [cr]
MAD: PAR precision Bx [cr]
MAD: PAR precision [cr]
Back to index
PROPOSAL
Checks/defines the proposal number (10 characters) to be stored in the
data file header. MAD: PAR PROPOSAL n01-08-127 [cr]
MAD: PAR PRO [cr]
RS232
Checks/defines the parameters for the RS232 line MAD: PAR RS232 [cr]
MAD: PAR RS232 4800 [cr]
RESOLUTION
Checks/defines the relative wavelength resolution (also stored as parameter 54
in the raw data file if parameter PARDES is set). MAD: PAR RESOLUTION [cr]
MAD: PAR RES 0.1 [cr]
SCANAREA
Checks/defines the area (X1, X2, Y1, Y2, 0:127) used for calculating
the detector sum in a SCAN MAD: PAR SCANAREA 45 51 32 110 [cr]
MAD: PAR SCANAREA [cr]
SELECTOR
Checks/defines the selector constants. MAD: PAR sel ANATOLE 142950 0.1339 0 set constants
MAD: PAR SEL
SUBTITLE
Checks/defines a 20-character string serving as a description of the
sample; it is stored in the data-file header. MAD: PAR SUB Sample 12 [cr]
Back to index
TIMERS
Checks/defines the interval times for intermediate storage (in minutes)
of the raw data file (parameter UPDATE) and for alarms (in seconds)
(parameter ALARM). MAD: PAR TIM A 3 [cr]
MAD: PAR TIM U 20 A 2 [cr]
MAD: PAR TIM 30 4 [cr] (update=30 min, alarm=4 sec)
TITLE
Checks/defines a 60-character string serving as a description of the
experiment; it is stored in the data-file header. (Equivalence MCO). MAD: PAR TITLE Metallopolymers and other materials [cr]
Back to index
TOF
Checks/defines parameters for time of flight (or kinetic) values:
Usage:
MAD: PAR TOF 0 1 16384 [cr] normal D22 mode (no TOF)
MAD: PAR TOF nomask [cr] mask off
MAD: PAR TOF 1 1 256 100 1 [cr] TOF mode (256 channels of 100 microsec, delay 1 us)
MAD: PAR TOF mask 0 127 0 127 sum [cr] sum all intensities on the whole detector
MAD: PAR TOF 1 16384 128 200 1 [cr] TOF mode (one TOF spectrum for every detector cell)
Runs are started with the normal RUN/COUNT commands.
In the case of the last example, detector images (as many as there are time channels,
here 128)
can be read using the MAD command TOFIMAGE after the end of acquisition.
Parameter 96 then contains the number of the frame
corresponding to each image.
USERNAME
Checks/defines the user's name (10 characters) to be stored in the
data file header. MAD: PAR USERNAME Max Frisch [cr]
MAD: PAR use [cr]
VOLTMETER
IEEE, IEEE1, IEEE2 check/define parameters for voltmeter
reading (IEEE). MAD: PAR IEEE 1 2 2 reads unit 1, ohm, range 10ohms
MAD: PAR IEEE1 1 2 2 " " " "
MAD: PAR IEEE2 1 0 1 reads unit 2, DC , range 1V
MAD: PAR IEEE2 0 IEEE2 off
MAD: PAR IEEE1 CMDS FOR0X sends command FOR0X to IEEE1
MAD: PAR IEEE1 CMDS eliminates previous command line
NB: IEEE1 is address 7, IEEE2 is address 8
Back to index
WAVELENGTH
Checks/defines the wavelength tolerance. MAD: PAR WAVE 0.10
MAD: PAR WAVE types current values
ZERO
Checks/defines the "soft" (MAD internal) motor offsets. Same syntax as LIMITS. MAD: PAR ZERO Changer 12.5 [cr]
MAD: PAR zer [cr]
PAUSE
PAUSE interrupts a run, eg. for sample inspection. The run can be resumed
with a RESUME command. MAD: PAUSE [cr]
PCcontrol
The MAD command for getting rid of "Vax control" in "InTouch" is PCCONTROL.PTE
Equivalent to TEMPERATURE. (Only for input: see MAD topic
TEMPERATURE).QUIT
QUIT (equivalence EXIT, FIN) exits from MAD.RS232
RS232 sends a string to the communication line. The line parameters are defined by a
PAR RS232 command. MAD: RS232 [string] [cr]
Back to index
remote_use
The privileged user (instrument responsible) can start MAD from any
terminal and make it write to a terminal defined by the parameter
OUTPUT. D22 > SH USER D22/FU
2) Before starting a remote run, cancel MAD by the command "PCP 4" or
"PCP K", verify that MAD is not active and then execute a new command
file or single command.example
D22 > SH USER D22/FU
' (get terminal for REQMAD)
'
D22 > PCP K (kills MAD on control terminal)
D22 > MAD
MAD: PAR OUTPUT (verify terminal name)
MAD: PAR OUTPUT control__terminal (if different)
MAD: EXIT
D22 > MAD START filename (start in remote mode)
D22 >
RESUME
RESUME resumes a run after a PAUSE command. MAD: RESUME [cr]
RTE
Equivalent to command TEMPERATURE, but read only (see MAD topic
TEMPERATURE).RUN
RUN (= ACQ, COUNT) starts counting with the current instrument setting.
usage:
MAD: RU[N] [Preset value] [Preset type] [Ntimes] [S[ave]/N[osave]] [cr]
MAD: RUN 1200 m 2 N [cr]
MAD: RUN [cr] repeat the same run
SCAN
Performs simple scan on motor or attenuators (0 to 7). Used, for example,
to search a peak in the detector intensity as function of sample position. MAD> SCAN motor_name start_value end_value step COUNT parameters... [align]
examples:
MAD: SCAN SAN 75.25 77 0.1 COUNT 1000 M NOSAVE
scan on san from 75.25 to 77.00, increment of 0.1 for 1000/Monitor & no save
MAD: SCAN att 0 7 1 co 150 t nos align
attenuators 0 to 7
Back to index
SELECTOR
Checks/defines the selector speed value. MAD: SELECTOR SETPAR [cr] set speed to default parameter values
MAD: SEL 2700 [cr] set speed to 2700 rpm
MAD: SEL 2700 2 [cr] " with tolerance 2 rpm
set-up
Before starting an acquisition (with RUN) the instrument is set up by
entering parameters with the PARAMETER command or by the PARAME task
(see corresponding MAD topics).START
The START command (equivalence XBU) allows one to run a sequence of MAD
commands in the form of an ASCII command file
(see topic).
The START command nests, i.e. it accepts START commands up to a depth
of 9 levels. MAD [ XBU1 ] (5) > COMMAND
"1" indicates the repetition level, and "5" indicates the line number
in the command file. START [file.ext (default command.cmd)] [number_of_repetitions (1)]
Conditional commands
Some simple conditional functions exist under START. commands: det 15.50
> det 15.50 no success, 2nd tentative
< quit no success, exit of the command file
co 3000 m s success, continue
........ etc.
Back to index
STATE
Displays the instrument state: attenuators, collimation, selector, etc. MAD: STATE [cr] - four letters (STAT) are required
STOP
Cancels MAD commands (motor movements, acquisition, etc.). In the case of an acquisition,
the data is stored if the acquisition was started with the "SAVE" option.
A "NOSAVE" run can be saved with the SAVE option.
usage:
MAD: STOP [cr]
MAD: STOP S[AVE] [cr]
MAD: STOP N[OSAVE] [cr]
TEMPERATURE
Checks/defines the temperature value and tolerance (unit: Kelvin), via
the ILLPTc controller. (equivalence: RTE, PTE). MAD: TEMP [cr]
MAD: RTE [cr]
MAD: PTE 100.25 [cr] set temperature to 100.25 K
MAD: PTE 100.25 600 [cr] set temperature to 100.25 K;
wait for addidional 600 s.
Note: requires communication set-up (line-speed etc.) different from Eurotherm.
TIME
see DATEWAIT
The WAIT command instructs the routines to pause a certain time (in sec). MAD: WAIT 5 pauses 5 seconds
Note: Any PCP command interrupts a pause started with the WAIT command.UNIX
Allows one to execute commands at the system level MAD: UNIX DTI [cr] reads the temperature settings
MAD: unix ls *.cmd [cr] directory of all command files
Back to index.WAVELEN
Checks/defines the wavelength value and tolerance.
Choose the selector type and constants with the option SELECTOR of
PARAMETER. MAD: WAVE SETPAR [cr] takes wavelength and tolerance as
defined by PARAMETER (option WAVELENGTH).
MAD: WAVE 6.32 0.001 [cr] wavelength = 6.32 A, tolerance = 0.001
MAD: WAVE 6.32 [cr] wavelength = 6.32 A, tolerance as defined
by PARAMETER (option WAVELENGTH).
XBU
equivalence: START
Web document produced by
Roland May,
ILL Grenoble
(last update: 03-Oct-2003)