esrf

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

CHECKAIR.MAC
See other macros in category: Positioning
Description:
    Macros to handle motors with airpads
Documentation:
    DESCRIPTION
    This is a macro package which can be used for moving motors where an airpad has to be switched on before the move The airpad will be switched on every time the motor is moved. The macro will wait a certain time until the air is inflated and inform the user. Before displaying a prompt the airpad will be switched off again. During counting ( for example in scans) the air will be switched off.
    The air will just be switched off if it has been switched on before by the macro set. If the airpad has been switched on explicitly by the user (for example with the special beamline macro airpad_on) the air will stay inflated even during scans.


    EXAMPLE
    checkairsetup "ID10/airpad/0" ttm th2
    This will setup the motors ttm and th2 to check if the air is inflated before attempting to move them
    move ttm 3
    The airpad will be switched on , the motor moved and the airpad switched off again.
    ascan th2 0 10 10 1
    The motor th2 will be scanned from 0 to 10 . The motor will only be moved after the air has been switched on. At each point the air will be switched off during counting
    airpad_on
    The airpad will be switched on
    ascan th2 0 10 10 1
    The motor will be scanned again. The airpad will not! be switched off during counting because the user switched the air on himself.
    airpad_off
    The airpad will be switched off again


    ATTENTION
    The check if air is inflated is not really done. The only thing which is checked is the status of the digital output on the icv196 card. You should check if everything is working with airpad-on and airpad-off

    DEPENDENCIES
    • Switching the air off is implemented with the new hook macros hooks have been put into : user_getpangles and prompt_mac Checking the air is implemented as pseudo-motors
    • The file checkair.mac has to be read in !done by: startup script (this file needs: hook.mac stchanges.mac pseudo.mac)


Macros:
    checkairsetup
    Usage: checkairsetup [device] [motormne1] [motormne2] [..]
    declares the motor [motormne1] to be moved only if air is inflated. The device is the device name of the ICV192 digital output channel to control the airpad

    airpad_on
    Usage: airpad_on
    switches the air on

    airpad_off
    Usage: airpad_off
    switches the air off

Internal Macros:
    checkoff
    Usage: checkoff
    Waits for motor to stop and switches air off if we switched it on.

    checkair
    Usage: checkair <motor>
    checks if <motor> will move, air is switched on and switches it on if necessary. Will to be done before the move.

    checkifonair
    Usage: checkifonair
    Reads device and puts result in boolean ISONAIR

    checksavepos
    Usage: checksavepos <motor>
    Saves old position for <motor>

    checkswitchairon
    Usage: checkswitchairon <motor>
    Switches air on and remembers that we did it

    checkswitchairoff
    Usage: checkswitchairoff <motor>
    Switches air off if we switched it on internally

Filename: checkair.mac
Author: JK 10.93
Last mod.: 27/02/2008 14:26 by rey