esrf

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

NTAB3.MAC
See other macros in category: All
Description:
    Macros to control three leg table(s) with logical motors xtilt, ytilt and height
Documentation:
    DESCRIPTION
    A table with three legs in triangle. One in the front and two in the 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. The fixed point is in the middle of the mirror. For positive x tilt 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 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 (????????):
    For geometry 8 (ID21 KB):
    l1 and l2 are the 2 back leg. lf is the front leg the angle between (l1-l2) and (l1-lf) is orthogonal B is the mildle of (l1-l2). C is the middle of (l1-lf). YTilt rotation axis pass by B and is parallel to (l1-lf) XTilt rotation axis paas by C and is parallel to (l1-l2) Height is defined by the intersection of the 2 rotation axis All motors must be defined in config.

    EXAMPLE
    tab3setup table1 0 122 422 tab1 tab2 tabf xti yti hgt Defines a table named "table1", geometry 0, distances 122 and 422 and motor names. To define other tables call tab3setup again changing the table name
    mvr hgt 3 Moves relative height 3 mm. this will move all tab motors up 3 mm.
    ascan xti 0 3 10 1 Will scan on angles xti between 0 and 3 stopping in 10 intermediate points and counting for one second at each point


    DEPENDENCIES
    To use the table with its pseudomotors the following must be done
    • The file tab3.mac has to be read in done by: startup s. (this file needs: pseudo.mac , stchanges.mac)
    • the piezo motors have to be configured done by: SPECADM (Controller NONE, mnemonic as in startupscript)
    • setup the table ( with tab3setup ) done by: startup s.


Macros:
    tab3setup
    Usage: tab3setup
    Setup one table in the system

    tab3unsetup
    Usage: tab3unsetup (table-mnemonic)
    Delete definitions for one table

    tab3show
    Usage: tab3show
    Shows a list with the actual configuration in this system

    tab3on
    Usage: tab3on table-number
    Sets on the track between table and logical motors

    tab3off
    Usage: tab3off table-number
    Sets off the track between table and logical motors

Internal Macros:
    tab3_trmset
    Usage: tab3_trmset
    === Use only in geometry 7 === Read translation motor to determine which geometry to use Use parameter \"a\" to set a flag

    tab3_bl1get
    Usage: tab3_bl1get
    Read position from controller for bl1.

    tab3_bl2get
    Usage: tab3_bl2get
    Read position from controller for bl2.

    tab3_froget
    Usage: tab3_froget
    Read position from controller for fro.

    tab3_xtiget
    Usage: tab3_xtiget
    Calculates xti from tab1, tab2, tabf

    tab3_ytiget
    Usage: tab3_ytiget
    Calculates yti from tab1, tab2, tabf

    tab3_hgtget
    Usage: tab3_hgtget
    Calculates hgt from tab1, tab2, tabf

    tab3_bl1move
    Usage: tab3_bl1move
    Moves tab1 when xti, yti or hgt change

    tab3_bl2move
    Usage: tab3_bl2move
    Moves tab2 when xti, yti or hgt change

    tab3_fromove
    Usage: tab3_fromove
    Moves tabf when xti, yti or hgt change

    tab3_xtimove
    Usage: tab3_xtimove


    tab3_ytimove
    Usage: tab3_ytimove


    tab3_hgtmove
    Usage: tab3_hgtmove


    tab3_tf
    Usage: tab3_tf (calcidx , tbl1, tbl2, front, xti, yti, z, mode , 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 mode 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.

    _tab3on
    Usage: _tab3on(t3_tabmne)


    _tab3off
    Usage: _tab3off(t3_tabmne)


Filename: tab3.mac
Author: Vicente Rey. June 1995 $Revision: 1.6 $, $Date: 2012/03/20 09:03:39 $
Last mod.: 20/03/2012 10:04 by papillon