General commands
Parser
You could change parser type without restarting nomad by using this command:
parser <type>
For getting the list of parsers, you could just type parser<enter>.
After each Nomad reboot, the local default parser is setting.
Examples:
> parser
Actual parser : tas
Available parsers : generic, tas, d20d4
> parser generic
New parser : generic
Xbu or Do
Runs a xbufile without testing the syntax. The xbufile system enables a series of commands to be executed in sequence without the operator being present.
xbu filename
do filename
The directory of xbu files in located at $HOME/nomadXBUs directory. But using "../" option it possible to use an another directory.
The "xbu" extension is optional.
Examples:
> do test
> xbu toto.xbu
> do ../directory/alltest
Wait
This command is just a time wait command.
waittimetype
Examples:
> wait 10 s
> wait 1 h
Comment
Set a comment in the output and in the the log file. The character using for the comment is "!"
Examples:
! this is a comment
Stop
Stop actual running commands.
stop
Pause
Pause actual running commands.
paus(e)
Continue
Continue actual pausing commands.
cont(inue)
For loop
The for loop is only accessible in a xbu file.
for$variable startvaluetoendvaluestepstepvalue <; $variable startvalue toendvaluestepstepvalue ....>
.....
endfor
for$variable startvaluetoendvaluenpnumberofpoints <; $variable startvaluetoendvaluenpnumberofpoints....>
.....
endfor
for$variable listofvalues <; $variable listofvalues....>
.....
endfor
All mathematical operations are possible when using variables in the command.
For loop could contains another for loop, but be careful with the name of variables of course.
Examples:
for $i 0 to 12 step 1.8
dr a1 $i-40
pr a1
endfor
for $i 1 to 10 np 10
co ti $i
endfor
for $a -20 -25 -26 -27 -28;$t 1 2 3 4 5
dr a1 $a
co ti $t
endfor
for $i 10 30 50 55
dr a1 $i
for $j 1 to 10 np 10
co ti $j
endfor
endfor
Break
The break command is only used in a forloop. It's allow to break (exit) a for loop for a specific condition. For property name of controller see command show.
break condition
The condition is test as do in a C or C++ condition operation.
There are some examples:
for $i 0 to 1000 step 1
co ti 60
break OrangeCryostat.sample_temperature_kelvin <= 1.5
endfor
for $i 0 to 1000 step 1
co ti 60
break $i == 10
endfor
for $i 0 to 1000 step 1
dr a1 $i
break a1.commandStatus == error
endfor
the are dome constantes defined for the commandstatus property (report of the result of a command):
- idle: command success
- warning
- error
- unknown
- running
If
The if command is only used in a xbu file. It's allow to execute a par of commands only if the result of a specific condition is true.
The condition is like break command. For property name of controller see command show.
ifcondition
....
endif
for $i 1 to 50 step 1
hklfile test $i
if hklfile.commandStatus == idle
bpb
endif
endfor
Show
Show the list of properties. It is help you to find property name of a controller for using if and break commands
showcontroller_name
Example:
Command> show a1
isCommand 1
nickname
progression 0
commandStatus 4
unit deg
actual_position (Position) -0.715
wanted_position 20
offset_position -0.715
actual_position_1000 -715
use_relative_position 0
relative_position 0
max_position (Max) 67.065
min_position (Min) 19.285
reference_position 63.1
backlash 0
timeout 20
maxretry 4
manual_direction 1
manual_speed 69
fixed 0
encoder_set_value 0
nb_decimal_places 3
datafile_index 0
status 0