Hooks

The symbols bem_command and aem_command are executed before and after enery changes. They have been implemented e.g. to disable/enable the MOSTAB during the movements. bem_command may use the symbol energy_setpoint_bem.

Here is an example for a command file that is executed after each enery move. The file /online_dir/exp_ini.exp should contain the line:

aem_command = "run <~.prog>aem_command.pl"

The file <~.prog>aem_command.pl contains:

#/usr/bin/perl -w
use Spectra;

my $ret = Spectra::energy(); 
Util::log( "aem_command: the energy is now $ret"); 
sleep(1);
return 1;