esrf

Beamline Instrument Software Support
SPEC Macro documentation: [ Macro Index | BCU Home ]

TAB3.MAC
See other macros in category: All
Description:
    Macros to control three leg table(s) with logical motors xtilt, ytilt and height DOC : http://wikiserv.esrf.fr/bliss/index.php/Tab you must have : 3 real motors configured. 3 macro-motors 1 is considered as "master" ALL motors (real and macro) must have a 'master' field in their custom parameters to know which is the master. the master macmot has 9 or 10 supplementary custom parameters: lb1mne : real motor mnemonic for leg back 1 lb2mne : real motor mnemonic for leg back 2 lfmne : real motor mnemonic for leg front height : macro motor mnemonic for Z/Height xtilt : macro motor mnemonic for first tilt ytilt : macro motor mnemonic for second tilt d1 : custom distance 1 d2 : custom distance 2 (d3) : custom distance 3 geometry : number 0..7
Documentation:
    DESCRIPTION
    A table with three legs in triangle. One in the front and two in the equilateral triangle ??? back is a common positioning element in ESRF beamlines. This macros implement tilts and height for this kind of table as pseudomotors. This macros can use different geometries. More than one table can be defined in this way in the same spec application.
    For geometry 0 (standard):
    Xtilt is the angle defined by the two back legs. Fixed a middle point B between the two back legs. The height in the middle point between B and the front leg gives the value for the motor height. The motor Ytilt is defined as the angle existing between B and front leg. Two parameters must be input to the system: the distance between the two back legs and the distance between B and the front leg. In this geometry distances are given in mm. Angles in mrad.
    For geometry 1 (side front leg):
    The front leg is on the same side and aligned with the first motor. same side than what ??? first motor ??? The fixed point is in the middle of the mirror. For positive x tilt position of mirror ?? is motor 1 higher up then motor 2. For positive y tilt is the front motor higher up then the two back motors.
    For geometry 2 (ID22 mirror):
    Xtilt is the angle defined by the two back legs, but only leg2 moves when a xtilt is requested. Ytilt and Height are defined in the line defined by leg1 and front. For the two movements leg2 follows leg1.
    For geometry 3 (ID21 mirror):
    Xtilt is the angle defined by the two back legs. Fixed a middle point B between the two back legs. The value of this diff with geo: position of Height point gives the value for the motor Height. The motor Ytilt is defined as the angle existing between B and front leg. Two parameters must be input to the system: the distance between the two back legs and the distance between B and the front leg. In this geometry distances are given in mm. Angles in mrad.
    For geometry 4 (ID20):
    For geometry 5 (ID29 mirror):
    Xtilt is the angle defined by the two back legs. B is the middle distance point between the two back legs. C is at fixed distance between B and the front leg, used to calculate the height. The Ytilt is defined as the angle between B and the front leg. Three parameters needed: the distance between the two back legs, between B and the front leg and between C and the front leg (all given in mm). Calculated angles in mrad.
    For geometry 6 (ID30):
    For geometry 7 (ID24 polychromator crystal tripod):
    2 back legs (in front of mirror). let B the middle of b1 b2. 1 front leg (back of mirror). (front / back are counter-intuitive to reflect the symetrie of the tripod : 1 single leg in back and 2 legs in front of the mirror) 3 legs are placed as an equilateral triangle. let C the center of the triangle. [B;C] = 1/3 [B;leg2]. Height is considered at the triangle center. Xtilt (PSI) is rotation along axis [B;leg2]. Ytilt (CHI) is rotation along axis perpanducular to [Xtilt] passing by C. Height (Z) is considered in C. See pictur on bliss wiki. For geometry 8 (ID15A tripod lenses): t2 (front) (*) | -----------|---------> X | (*) | (*) t3 (leg2) | t1 (leg1) lens t1/t2/3 corresponds to motor labels d1= length(t1:t2) = length(t2:t3) = length(t3:t1) d2= length(middle(t1:t3):t2) d3= height of lens aperture from tripod base

    DEPENDENCIES


Macros:
    tab3_debug
    Usage: tab3_debug
    Toggles the debug mode. if (!(whatis("__tab3_debug") & 2)) rdef __tab3_debug \'#$*\'

    tab3_u
    Usage: tab3_u (calcidx, t3_bl1, t3_bl2, t3_fro, t3_xti, t3_yti, t3_hgt, geometry, d1, d2, d3)
    Calculates [t3_bl1, t3_bl2, t3_fro] as function of [t3_xti, t3_yti, t3_hgt] if calcidx is <=2, and the inverse if calcidx >2
    - geometry: only geometry 7 is calculated (ID24)
    - d1 dimension: 233.83 for ID24
    - d2 dimension: 202.5 for ID24
    - d3 dimension: unused for ID24

Internal Macros:
    tab3_config
    Usage: tab3_config [parma]


    tab3_calc
    Usage: tab3_calc (<motnum>, <mode>, <unit>)


    tab3_motconfig
    Usage: tab3_motconfig (<motnum>)
    -<motnum> : -<unit> : -<chan> :

    tab3_tf
    Usage: tab3_tf (calcidx , tbl1, tbl2, front, xti, yti, z, geometry , d1, d2,d3)
    calcidx gives the index of the value to be calculated. Indexes are starting from 0 (tbl1) and go to 5 (z). The 3 leg motors and the 3 pseudo motors are all the time given. Depending on calcidx only 3 of them are used in the calculation. The geometry allows for different geometries. d1 and d2 are the distances between the legs. d3 is the distance between the front leg and the center of the rotation.

Filename: t3mh.mac
Author: Vicente Rey. June 1995 $Revision: 1.5 $, $Date: 2018/03/22 10:23:58 $
Last mod.: 22/03/2018 11:24 by papillon