esrf

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

shexamacromot.mac
See other macros in category: All
Description:
    shexamacromot.mac
Documentation:
    DESCRIPTION
      Macro to support Symetrie Hexapod BORA or BREVA. 
    
    • shexastatus
    • shexaclearerrors
    • shexaon
    • shexaoff
    • shexapoweron
    • shexapoweroff
    • shexaref


    EXAMPLE


    SETUP
    The motor configuration uses the standard SPEC config pages.
    In page 1, controller must be set to MAC_MOT,
    page 2 DEVICE to shexa, ADDR to ipaddr:255 or Name:255.
    After rebooting the controler, SPEC checks if the homes have been made. If not the motors are disabled, and you must use shexaref and run reconfig.
    
    \t\tchannel\t\t\t: channel on the controller 1 to 6
    \t\tStep_per_deg/mm\t: must be used to specify the resolution. The effective resolution is [unit]/[step_per_mm*scale_factor].
    example : the controller unit are mm but you want to have positions in microns with 0.020 micron resolution. So you need a scale factor of 1000 and step per deg of 50
    \t\tSign\t\t\t: may be negative to change the direction
    \t\tBacklash\t\t\t: must be 0
    \t\tVelocity and acceleration are not used. Default values saved in the controller are used.
    The first axis of each controler has an extended configuration feature via the Generic Parameters.
    If these parameters are not defined, the defaults values saved in the controller are used.
    • 1 : Definition of user references, with a comma separated list for tx,ty,tz,rx,ry,rz in units defined in controler. The angles must be positive values. example : 0,0,1,0,0,0 Set origin at 1 unit above hexapod
    • 2 : Definition of the object's reference
      example : 0,0,1,0,0,0
    • 3 : Definition of units in controller, comma separated list, for translations [m,mm,micron] and rotations [rad,deg,sec]
      example : mm,rad
    • 4 : Scale factor. The value sent to the controller is devided by the scale factor, readings are multiplied by this factor and assigned in spec A[] array
      example : 1000 convert rad to mrad
    The shexastatus gives information on the system, and indicates if the controller is on (motor powered, feedback on) or not, if there is error.
    Errors are buffered and need to be cleared with the shexaclearerrors macro.
    For debugging purposes, the internal variable SHEXA_IO_DEBUG can be set to 1 or 2
    \t1:display io actions
    \t2:write all io actions on "dlog" file


Macros:
    shexaref
    Usage: shexaref [unit]
    Make reference on hexapod

    shexapoweron
    Usage: shexapoweron [unit]
    Turn Hexapode power on

    shexaon
    Usage: shexaon [unit]
    Turn Hexapode on

    shexapoweroff
    Usage: shexapoweroff [unit]
    Turn Hexapode power off.

    shexaoff
    Usage: shexaoff [unit]
    Turn Hexapode on

    shexastatus
    Usage: shexastatus [unit]
    Return the status of Hexapods

    shexaclearerros
    Usage: shexaclearerros [unit]
    Clear errors

Internal Macros:
    _shexa_config_error
    Usage: _shexa_config_error(mes)


    _shexa_io_dbgon
    Usage: _shexa_io_dbgon
    Writes all io action on "dlog" file

    _shexa_io_dbgoff
    Usage: _shexa_io_dbgoff
    Turn off io debuging

    _shexa_io
    Usage: _shexa_io [unit] [cmd] [] or [1]
    io function

    _shexa_getpar
    Usage: _shexa_getpar(pos,unit,par)


    _shexa_getstatus_HEXA
    Usage: _shexa_getstatus_HEXA(unit)


    _shexa_getstatus
    Usage: _shexa_getstatus(unit)


    _shexaerror
    Usage: _shexaerror(unit)


    shexa_config
    Usage: shexa_config(motormne, type, unit, module, chan)
    misc_par_1 definition of user reference x,y,z,rx,ry,rz
    misc_par_2 definition of object reference x,y,z,rx,ry,rz
    misc_par_3 units in format a,b where a in [m,mm,micron] b in [rad,deg,sec]
    misc_par_4 scale factor


    shexa_cmd
    Usage: shexa_cmd(mne, key, p1, p2)


    shexa_par
    Usage: shexa_par(motormne,key,type,p1,p2)


    _shexa_get_scale
    Usage: _shexa_get_scale [unit] [par]


    _shexa_get_help
    Usage: _shexa_get_help [unit]
    Display hexapod commands

    _shexa_bench
    Usage: _shexa_bench [unit] [command]
    To test speed and status returned by controller. [unit] [command]

Filename: shexamacromotor.mac
Author: R.Homs / O.Ulrich 2012
Last mod.: 07/05/2012 18:07 by claustre