esrf

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

Motor Power
See other macros in category: All
Description:
    Macros to manage the electrical power of motors.
Documentation:
    DESCRIPTION
    These macros allow the electrical power of a motor to be turned off while the motor is not moving. This avoids the motor heating, specially useful with high-power motors in vacuum environments. There are two working modes:
    • Standard - Motor power is always ON
    • Optimum - Motor power is ON just when the motor moves
    Currently this only works for MAXE motors. Please not that this won't work with the DPAP7. Recent versions of the Maxe device server (linux version) implement this functionality through the use of device server resources. The macros can still be interested if using an os9 version.

    EXAMPLE
    motorpowersetup m1 m2 m3
    Initialises the macros and configure motors m1, m2 and m3 in Optimum mode
    motorpowerstandard m3
    Switch motor m3 to Standard mode
    motorpoweroptimum m3
    Switch motor m3 back to Optimum mode


    INTERNALS
    The macros use the standard user_getangles, user_checkall and user_finished macros. In principle, a real motor should not have hooks on those macros. If another set of macros hooks on them, the later in the setup will be the only one to work.

Macros:
    motorpowersetup
    Usage: motorpowersetup mne1 mne2 ...
    Setup the motorpower macros. Specified motors will be added in Optimum mode. Multiple motorpowersetup lines can be specified.

    motorpower_enable
    Usage: motorpower_enable (mnum)
    Enables the specified motor power

    motorpower_disable
    Usage: motorpower_disable (mnum)
    Disables the specified motor power

    motorpowerdel
    Usage: motorpowerdel mne1 mne2 ...
    Delete hooks in macros for the specified mnemonics

    motorpowerstatus
    Usage: motorpowerstatus
    Show the status of all configured motors

Internal Macros:
    motorpower_check
    Usage: motorpower_check (mnum)
    Checks that the specified motor is a MAXE

    motorpower_getangles
    Usage: motorpower_getangles mne
    Called in user_getangles. It will save the current position of the motor

    motorpower_checkall
    Usage: motorpower_checkall mne
    Called in user_checkall. It will check if the motor is going to move and enable its power in case of Optimum mode

    motorpower_finished
    Usage: motorpower_finished mne
    Called in user_finished. If the motor was moved, disable the power if it's on Optimum mode

    motorpowerstandard
    Usage: motorpowerstandard mne
    Switch to Standard motor power control: always on

    motorpoweroptimum
    Usage: motorpoweroptimum mne
    Switch to Optimum motor power control: on only while moving

    motorpowerunsetup
    Usage: motorpowerunsetup mne
    Called when the particular motor is removed from the setup

Filename: motorpower.mac
Author: A. Homs, (Original 11/2003)
$Revision: 1.2 $ / $Date: 2008/08/12 14:10:35 $
Last mod.: 12/08/2008 16:10 by rey