esrf

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

HEXAPODE.MAC
See other macros in category: All
Description:
    HEXAPODE.MAC - Macros to access hexapode device server from spec. $Revision: 4.10 $
Documentation:
    DESCRIPTION
       This macro set allows you to define pseudo motors on hexapode.
    
       Since version 4.0 (Feb 2006) this macro file allows also to
       define new style macro motors on an hexapod device.
    
       To define new style macro motors you must define:
    
       an hexapod controller in config:
    
       MOTORS       DEVICE    ADDR   <>MODE      NUM               <>TYPE
          YES       hexa      id28/hexapode/01     6         Macro Motors
    
       motors in config referring to that controller. Channel assignment
       will decide on the motor role as follow:
    
       Channel
         0   -   X
         1   -   Y
         2   -   Z
         3   -   RotZ
         4   -   RotY
         5   -   RotX
    
      Caution : take care not to swap RotZ and RotX...
    
      for the time being motors defined on arbitrary translations/rotations
      can only be defined as old-style pseudo motors.
    

    $Log: hexapode.mac,v $ Revision 4.10 2015/12/18 15:21:04 perez Improve <ctrl-c> handling Revision 4.9 2015/09/24 13:17:42 perez Workaround for unexpected "start_all" calls Revision 4.8 2015/02/26 10:28:47 perez Add macros to change dynamicaly the Ref Position Revision 4.7 2014/11/04 13:53:44 perez Fix bug of several hexapods in same session + fix bug of version 4.4 on fresh restart Revision 4.6 2014/09/23 11:24:42 perez Add <ctrl-c> handle for macro motors Revision 4.5 2014/09/22 12:24:23 guilloud + global variable to disable hexapods in a loop using hexa_enable hexa_disable can be useful to avoid to slow down scans. Revision 4.4 2012/12/17 09:35:38 lagier in hexa_cmd, "get_status", test HEXAGO_POS global has been initialised prior to eventually launch the message "too large discrepancy on axis" that prevents this message to systematically show up after spec restarts from fresh, and as long as no motion has been requested on the hexapode. Revision 4.3 2010/08/31 12:05:02 perez Fix cumulative error Revision 4.1 2006/09/15 14:00:23 lagier bug fix in auto doc syntax Revision 4.0 2006/08/01 11:04:11 lagier New style macro motors support. Revision 3.9 2005/03/23 10:44:50 rey Newmode in hexasim declared now as local variable. Created conflict with beamline macros. Revision 3.8 2003/03/27 10:34:37 rey Bug in hexamenu corrected. The bug made impossible to select from several hexapodes in hexamenu. Revision 3.7 2002/10/30 07:20:17 sole variable hxn renamed to hxn0 in hexamenu to avoid problem when calling hexashow from hexamenu Revision 3.7 2002/10/30 08:20:00 sole Problem with hxn variable when calling hexashow from hexamenu Revision 3.6 2002/04/10 17:06:26 papillon Explicit definition of local variables Update hexapode position in HEXA_DEV after mv, hexamove or hexaleg command (Done in hexa_movecleanup, hexa_legcleanup) Add a hook for user position checking called user_hexa_check Add logfile and debug flag that were in ID27 version


    EXAMPLE
    hexapode
    Shows complete information about current state and position of the hexapode
    hexaadd id43/hexapode/01
    It will declare the hexapode id43/hexapode/01 so that it is known by the macros.
    hexamot hexz id43/hexapode/01 main z
    Defines motor hexz ( previously defined in config ) to move the id43/hexapode/01 in the direction defined as Z
    hexamenu
    It provides a number of commands useful when starting up with a new hexapode. To be used with care.


Macros:
    hexamot
    Usage: hexamot
    Adds a hexapode motor to the SPEC application. Type the macro with no parameter to see the full syntax

    hexaadd
    Usage: hexaadd device-name
    Defines a hexapode to the system. Without motors. When using hexamot to define a hexapode motor. The hexapode device is automatically defined.

    hexaon
    Usage: hexaon
    Activates all hexapode motors This macro use cdef and then cannot be called in a loop... use in this case hexa_disable to disable your motors.

    hexaoff
    Usage: hexaoff
    De-activates all hexapode motors

    hexamove
    Usage: hexamove
    Moves hexapode to absolute position

    hexaleg
    Usage: hexaleg
    Moves actuators by length

    hexacalc
    Usage: hexacalc
    Enters a loop to prompt for positions to check No motion is done with this macro

    hexapode
    Usage: hexapode [ hexapode-number ]
    Alias to hexashow: Macro to visualize state/position/lengths of hexapode

    hexashow
    Usage: hexashow [ hexapode-number ]
    Macro to visualize state/position/lengths of hexapode

    hexapos
    Usage: hexapos [ hexapode-number ]
    Shows position of one hexapode

    hexadesc
    Usage: hexadesc [ hexapode-number ]
    Shows general description/state for one hexapode

    hexalength
    Usage: hexalength [ hexapode-number ]
    Shows leg lengths of one hexapode

    hexanormal
    Usage: hexanormal [ hexapode-number ]
    Set operation mode to NORMAL

    hexasim
    Usage: hexasim [ hexapode-number ]
    Set operation mode to SIMULATION

    hexareset
    Usage: hexareset [ hexapode-number ]
    Does a soft reset on one hexapode

    hexahard
    Usage: hexahard [hexapode-number]
    Does a full reset on one hexapode

    hexastop
    Usage: hexastop


    hexamenu
    Usage: hexamenu
    Tool for hexapode calibration

    hexasetref
    Usage: hexasetref [hexapod]
    Change the Reference Position using the current hexapod position. The hexapod will then rotate arround the Reference System at the current position (LRS==IRS). Only axes X/Y/Z are concerned.

    hexashowref
    Usage: hexashowref [hexapod]
    Print Reference Position offset compared to default one (defined in the Device Server resources)

Internal Macros:
    hexa_config
    Usage: hexa_config (mne, type, unit, module, channel)
    Macro motor implementation

    hexa_cmd
    Usage: hexa_cmd (mne, cmd, p1, p2)
    Macro motor implementation

    hexainit
    Usage: hexainit


    hexamotadd
    Usage: hexamotadd %MDESC


    hexaunsetup
    Usage: hexaunsetup


    hexa_enable
    Usage: hexa_enable


    hexa_disable
    Usage: hexa_disable


    hexa_is_disabled
    Usage: hexa_is_disabled()


    hexa_is_enabled
    Usage: hexa_is_enabled()


    hexalog
    Usage: hexalog


    hexadebug
    Usage: hexadebug


    hexabody
    Usage: hexabody(mode)
    To use on/off from blmenu macro. You need to use blmenuadd to use it. blmenuadd("Hexapode","Hexapode show","hexabody","_hxb_")

    hexa_movecleanup
    Usage: hexa_movecleanup(hxdev)


    hexa_legcleanup
    Usage: hexa_legcleanup(hxdev)


    _hexadesc
    Usage: _hexadesc(hxn)


    _hexalength
    Usage: _hexalength(hxn)


    _hexapos
    Usage: _hexapos(hxn)


    hexa_onsim
    Usage: hexa_onsim


    hexa_offsim
    Usage: hexa_offsim


    hexaselect
    Usage: hexaselect()
    Utility macro for other macros

    hexa_prompt
    Usage: hexa_prompt


    hexa_getmain
    Usage: hexa_getmain


    hexa_premove
    Usage: hexa_premove


    hexa_moveall
    Usage: hexa_moveall


    user_hexa_check
    Usage: user_hexa_check (hxdev, hxpos)
    Hook macro called before hexapode motion in a hexamove or mv command
    Parameters
    $1 = device name
    $2 = position array (x, y, z, rotz, roty, rotx)
    Should return 0 if motion must be canceled, 1 otherwise

    hexa_check
    Usage: hexa_check(hxn,action,argin)


    hexa_poll
    Usage: hexa_poll


    hexa_getpos
    Usage: hexa_getpos(num)


    hexa_moveone
    Usage: hexa_moveone(num)


    hexa_cleanup
    Usage: hexa_cleanup


    hexasearch
    Usage: hexasearch(hxdev)
    This macro does a search new home command. It reports at the end the position at which the home lengths have been found. These should be noted at written into the hexapode resource file.

    hexa_newhomelen
    Usage: hexa_newhomelen(hxdev)


    hexa_showcmds
    Usage: hexa_showcmds()


    hexasetref
    Usage: hexasetref(hxdev)


    hexaloadpos
    Usage: hexaloadpos(hxdev)


    hexarandom
    Usage: hexarandom


    isnum
    Usage: isnum(variab)


    _hexa_select
    Usage: _hexa_select


Filename: hexapode.mac
Author: V. Rey / BLISS / ESRF 1996-1999
Last mod.: 18/12/2015 16:21 by perez