esrf

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

ID.MAC
See other macros in category: Accelerator
Description:
    ESRF Insertion Devices
Documentation:
    DESCRIPTION
       This macro set allows to access axes on insertion devices as motors in SPEC.
    
       Since version 4.0 (Jul 2006) this macro file allows also to
       define new style macro motors on an insertion device.
    
       To define new style macro motors you must define:
    
       an id controller in config:
    
       MOTORS       DEVICE    ADDR   <>MODE      NUM               <>TYPE
          YES       id        //aries/id/id/28     4         Macro Motors
    
       motors in config referring to that controller. Channel assignment
       will decide on the motor role as follow:
    
       Channel
         0   -   GAP
         1   -   TAPER
         2   -   REVOLVER GAP 1 (Not Implemented yet)
         3   -   REVOLVER GAP 2 (Not Implemented yet)
    
       Module holds the "mechanics" number starting from 1.
       Example: gap and taper motors on first undulator should
          share the same module=1... and channel=0 for gap
          channel=1 for taper)
    
    


    SETUP
    In the current setup your computer must have access to aries (where the data base is running) The macros will only work for authorized users. You need to ask for permission to the machine group For getting id parameters. Type idsetup once to get information then define motors in setup file and in config as you can see below in example (not necessary if using macro motors)

    EXAMPLE
    idsetup
    Without parameters returns the list of axes found in the beamline frontend
       Devname:  //aries/id/id/61   for  2 carriages
       2 axes in the system
        1 -      U46 :     carriage: id/meca/61m1 ; type: TAPER
        2 -      U48 :     carriage: id/meca/61m2 ; type: TAPER
    
    
    idsetup u46 1 gap t48 2 taper
    defines two motors u46 and t48 (that should be defined in config) to move axes 1 and 2 (as shown by idsetup without parameters). The first one will do movements on the gap of the first axis the second one on the taper of the second axis. active axes and move to the desired one.
    mv u46 23
    Will move u46 gap to position 23
    mv t48 0.2
    Will move taper t48 to position 0.2


Macros:
    id_config
    Usage: id_config [parma]


    idsetup
    Usage: idsetup [mnemonic axe-number gap/taper [mnemonic2 axe-number2 gap/taper ...]]
    Macro to setup the insertion device parameters. It uses the SPECBL variable to get information from the frontend device server If called with no parameters it will get information from frontend device server and show to the user info about: present axes ant types. It can then be called with parameters to configure pseudo motors.

    idunsetup
    Usage: idunsetup


    idoff
    Usage: idoff
    This macro undefines all macros related with the beamline insertion device.

    idon
    Usage: idon
    Makes all the definitions active

Internal Macros:
    id_cmd
    Usage: id_cmd (<mne>, <cmd>, <p1>, <p2>)
    Macro motor main macro.

    idbody
    Usage: idbody(mode)


    id_poll
    Usage: id_poll
    Polls in the state of the front end

    id_axedef
    Usage: id_axedef (<axis>, <idmne>, <tapergap>)
    Sets the "def" and "tapmne" or "gapmne" fields in IDAXIS. <axis> : axis number. <idmne> : ID motor mnemonic. <tapergap> : can be {"1"|"TAPER"|"taper"|"t"|"Taper"}

    id_getallinfo
    Usage: id_getallinfo (<devname>)
    Gets all info from frontend device server Fills IDNOMECA IDMECA IDMECADEV

    id_showinfo
    Usage: id_showinfo ()
    Print out main info from frontend device server

    id_getallpos
    Usage: id_getallpos ()
    Reads position for all axes

    id_getpos
    Usage: id_getpos (axis,idmne,gaptap)
    Assigns position to each motor

    id_moveone
    Usage: id_moveone (<axis>, <idmne>, <gaptap>)
    Flags whether axes should be moved or not.

    id_prompt
    Usage: id_prompt ()


    id_premove
    Usage: id_premove ()


    id_moveall
    Usage: id_moveall ()
    Move all axes that were previously flagged to move

Filename: id.mac
Author: V.Rey - BLISS - (Original 11/1996) $Revision: 5.0 $ / $Date: 2012/05/03 12:33:32 $
Last mod.: 03/05/2012 14:33 by witsch