Slits are defined by symbols that appear in /online_dir/exp_ini.exp. The symbol names consist of a generic part, the prefix, and the specification of the jaw:
! ! exp_ini.exp ! ! the following definitions introduce two slits: sl1 and sl2 ! sl1_top = mot1 sl1_bottom = mot2 sl1_left = mot3 sl1_right = mot4 sl2_top = mot5 sl2_bottom = mot6 sl2_left = mot7 sl2_right = mot8 slit_names = (sl1, sl2)
The symbol slit_names is needed for the ONLINE TkI.
The slit degrees of freedom (d.o.f.) are referenced by a function-like syntax: slit( PREFIX, JAW). The available keywords are: cx, cy, dx, dy, top, bottom, left, right. c stands for center and d for the opening.
The coordinate frame is oriented in this way: z is in the direction of the photons, y upwards and x completes the right handed system. The slit( PREFIX, right) motor moves into the negative x-direction.
Here is an example slit code:
use Spectra; use Motor; my ($pos, $uli, $ula, $ubl, $acc, $base, $slew, $st); my $cx = Motor->locate( name => "slit( sl1, cx)"); my $top = Motor->locate( name => "slit( sl1, top)"); # # the following calls are available for all slit d.o.f. # $pos = $cx->get( "position"); $uli = $cx->get( "unit_limit_min"); # read-only $ula = $cx->get( "unit_limit_max"); # read-only $ubl = $cx->get( "unit_backlash"); # read-only # # since $top, since it refers to a single motor, # it can be treated like a normal motor. # $uli = $top->get( "unit_limit_min"); $ula = $top->get( "unit_limit_max"); $ubl = $top->get( "unit_backlash"); $acc = $top->get( "acceleration"); $base = $top->get( "base"); $slew = $top->get( "slew"); $st = $top->get( "settle_time"); $top->set( slew => "...", acceleration => "..."); # # slit move # my $pos_new = $pos + 0.1; my $ret = $cx->set( position => "$pos_new"); # # single step slit moves # my $ret = $cx->set( step_down => 'yes'); my $ret = $cx->set( step_left => 'yes'); my $ret = $cx->set( step_right => 'yes'); my $ret = $cx->set( step_up => 'yes');
Mind that the meaning of the unit_backlash of the
center (cx, cy) and the opening (dx, dy) is not
non-ambiguous, since two motors are involved. In order not
to move the motors too close to the limits,
the function $cx->get( "unit_backlash")
returns twice the absolute
value of the larger backlash.