esrf

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

XLENS_tango.mac $Revision: 1.2 $
See other macros in category: All
Description:
    Macros for CRL lenses tango device servers.
Documentation:
    DESCRIPTION
    The macros provide users with an interface between SPEC and CRL lenses tango device servers.

    SETUP
    When doing the config, declare a motor controller.
    MOTORS    DEVICE   ADDR                      <>MODE  NUM        <>TYPE
       YES   __XLENS   //orion:10000/fe/xlens-mot/id18     2  Macro Motors

    Please note, that the "-x" and "-z" parts of the tango domain name will added in the macros, depending on the channel number!
    Channel 0 will be "-x",
    channel 1 will be "-z" !




    Then create macro motors in a similar manner. Unit is index number of the controller.
    Number: <>Controller        0: MAC_MOT   1: MAC_MOT
    Unit/[Module/]Channel              x/0          x/1
    Name                            FE_L_Y       FE_L_Z
    Mnemonic                           fly          flz
    
    Steps per degree/mm                160         2000
    Sign of user * dial                  1            1
    Backlash [steps]                     0            0
    Steady-state rate [Hz]            1000         1000
    Base rate [Hz]                     200           15
    Acceleration time [msec]          2000          500
    Motor accumulator                    0            0
    Restrictions <>                   NONE         NONE
    
    Dial = accumulator / steps
      High limit                    7.0000       6.8755
      Current                       0.0000       0.0000
      Low limit                    -6.4000      -6.5265
    User = sign * dial + offset
      Offset                        0.0000       0.0000
      `High' limit                  7.0000       6.8755
      Current                       0.0000       0.0000
      `Low' limit                  -6.4000      -6.5265
    
    Please note, that step size and rates are not taken into account!

    INTERNALS


Macros:
    XLENS_debug
    Usage: XLENS_debug
    toggle debug mode for the present macros.

Internal Macros:
    __XLENS_tango_catch_error
    Usage: __XLENS_tango_catch_error
    called after each tango_[get|io] call. Checks for errors.

    __XLENS_config
    Usage: __XLENS_config (mnum, type, unit, mod, chan)
    The macro motor configuration function

    __XLENS_cmd
    Usage: __XLENS_cmd (mnum, cmd, p1, p2, p3)
    The macro motor command function

    __XLENS_state
    Usage: __XLENS_state (und)
    Get state of xlens motor


    __XLENS_error
    Usage: __XLENS_error (mesg)
    Writes indentical error message only once in a while.

Filename: XLENS_tango.mac
Author: H. Witsch, BLISS - ESRF $Revision: 1.2 $, $Date: 2016/12/02 12:05:51 $
Last mod.: 02/12/2016 13:06 by guilloud