Hexapod (Beamline L)

The hash %HEXAPOD provides an interface to the hexapod.


Table 6.2: The %HEXAPOD Hash
key Explanation Example
x, y, z    
u, v, w the coordinates $x= $HEXAPOD x;
    $HEXAPOD x = $x;
r, s, t the pivot point $r = $HEXAPOD r;
    $HEXAPOD s = $s;
sx, sy, sz,    
su, sv, sw, the step sizes $sx = $HEXAPOD sx;
    $HEXAPOD sx = $sx;
vel the velocity $vel = $HEXAPOD vel;
    $HEXAPOD vel = 2;
rdy the status, moving (1) $rdy = $HEXAPOD rdy;
status 0 device is offline, 1 device is online $stat = $HEXAPOD status;
xyz   see below
uvw   see below
rst   see below
pivot alias for rst  
sxsysz   see below
susvsw   see below


Note that there is an example of using the $HEXAPOD status in the Online manual.

The following example demonstrates how the hexapod is controlled from a Perl script.

#!/usr/bin/perl
#
use Spectra; 

#
# get the parameters
#
($x, $y, $z) = split ' ', $HEXAPOD{ xyz}; 
($u, $v, $w) = split ' ', $HEXAPOD{ uvw}; 
($r, $s, $t) = split ' ', $HEXAPOD{ rst}; 
($r, $s, $t) = split ' ', $HEXAPOD{ pivot}; 
$vel = $HEXAPOD{ vel}; 
$rdy = $HEXAPOD{ rdy};  # moving ?  

#
# set the parameters
#
$HEXAPOD{ xyz} = "$x $y $z "; 
$HEXAPOD{ uvw} = "$u $v $w "; 
$HEXAPOD{ rst} = "$r $s $t ";       # the pivot point
$HEXAPOD{ pivot} = "$r $s $t "; 
$HEXAPOD{ sxsysz} = "$sx $sy $sz "; # the step sizes
$HEXAPOD{ susvsw} = "$sx $sy $sz "; 
$HEXAPOD{ vel} = 2;

It is alos possible to access the Hexapod via a function:

#
# hexapod movements
#
$ret = hexapod( "x", $xpos); 
$ret = hexapod( "y", $ypos); 
...
#
# reading the hexapod position
#
$ret = hexapod( "x"); 
$ret = hexapod( "y"); 
...