esrf

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

SMARACT.MAC
See other macros in category: Positioning
Description:
    Macro motor for SmarAct piezo controller used through a serial line.
Documentation:
    DESCRIPTION
    Configuring macro motors
    1) You must have an entry in "MOTORS" table for each icepap MASTER
    - The "DEVICE" field must be set to string "smaract"
    - The "ADDR" is set to the serial line entry in the config
    - The "NUM" should be set to 10
    - The "TYPE" field must be set to "Macro Motors"
    2) For each axis you must define a motor with:
    - The "Controller" field set to "MAC_MOT"
    - The "Unit" must be set to the above MOTORS entry
    - The "Module" field, must be set to 0
    - The "Chan" field, numbered from 0, must be set to the SmartAct axis channel
    - The "Linear/Rotary" must be set to 1 for rotation stages
    - The "Readback slop" has probably to be set also (typically 100)


Macros:
    smaract_setup
    Usage: smaract_setup
    Setup smaract controller (NOTE MP: utility of this macro ??????)

    smaract_unsetup
    Usage: smaract_unsetup
    Unsetup smaract controller (NOTE MP: utility of this macro ??????)

Internal Macros:
    smaract_config
    Usage: smaract_config (mne, type, unit, module, channel)


    smaract_par
    Usage: smaract_par (motnum, key, action, p1, p2)
    The smaract_par function is called when various motor parameters are set and when the motor_par() function is used to retrieve a user-defined parameter.

    smaract_cmd
    Usage: smaract_cmd (<motnum>, <cmd>, <p1>, <p2>)
    This function is called to control *hardware* macro_motors. <p1> and <p2> signification depends on cmd.

    _smaract_set
    Usage: _smaract_set(unit, comm)


    _smaract_gettype
    Usage: _smaract_gettype (code)
    Return a string corresponding to the encoder type hardcoded in the controller, no way to set its resolution

    _smaract_geterr
    Usage: _smaract_geterr (code)
    Return a string corresponding to the specified error code

    _smaract_checkerr
    Usage: _smaract_checkerr (answer)
    Return a non zero value if the controller answer contains an error and print out an explicit error message.

    _smaract_get
    Usage: _smaract_get(unit)


    _smaract_query
    Usage: _smaract_query(unit, comm)


    _smaract_perror
    Usage: _smaract_perror (string)


    _smaract_print
    Usage: _smaract_print (string)


Filename: smaract.mac
Author: GB+EP+MP BLISS
$Revision: 1.3 $ / $Date: 2014/01/10 09:17:32 $
Last mod.: 10/01/2014 10:17 by papillon