Hooks

The function start_all_moves() checks whether a symbol mot1_bmc exists (mot1 is just an example). If so, it is translated and the result is executed.

The function complete_all_moves() checks whether a symbol mot1_amc exists. If so, it is translated and the result is executed.

Both symbols are intended to invoke scripts:

mot1_bmc = "run [online_dir]bmc.pl mot1"
mot1_amc = "run [online_dir]amc.pl mot1"

If these scripts return 0, an error is generated. Here is an example of such a script:

#!/usr/bin/perl -w
# file /online_dir/bmc.pl
use strict; 
use Spectra; 
my  $status = 1;
print "BMC: $ARGV[0] is at " . gmup( $ARGV[0]) . "\n"; 
sleep 1;
$status;