esrf

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

PMB.MAC
See other macros in category: All
Description:
    %B%PMB.MAC%B% - Pneumatic Mirror Bender set of macros
Documentation:
    DESCRIPTION
    The Pneumatic Mirror Bender is used to bend a mirror, using a proportional pressure control valve to set the radius of the curvature.

    SETUP
    The pressure switch (PS) is automatically open if the pressure in the system is less than 8bars - Relay (Wago 750-402). There is a pneumatic valve (PV1) for additional security - Relay (Wago 750-502). Three way valve (TW - DAC :Wago 750-554) or pressure controller (PACE5000) sets the pressure. We may read a pneumatic valve (PV2) which closes automatically if the pressure is more that 2.2 Bars - Relay (Wago 750-502). The gauge (PT - ADC: Wago 750-492) or pressure controller (PACE5000) reads the pressure. Security read channel, if existing, - ADC (Wago 750-492) confirms the threeway valve output.

    EXAMPLE
    To define the PMB macro motor, you must define it as follows: MAC_MOT, 100000 steps/mm, limits -0.1 to 2.1, readbackslop 10000, hardwarereadmode AL+NQ. %PRE% Example of configuration: MOTORS DEVICE ADDR <>MODE NUM <>TYPE YES pmb 1 Macro Motors Example of the spec config file: If wago setup: MOTPAR:dactype = wago MOTPAR:dacdev = id29/wcid29d/wc MOTPAR:dacname = setp MOTPAR:dacstep = 0.25 MOTPAR:adctype = wago MOTPAR:adcdev = id29/wcid29d/wc MOTPAR:adcname = readp MOTPAR:adcconv = 5 MOTPAR:valtype = wago MOTPAR:valdev = id29/wcid29d/wc MOTPAR:valname = mvopen MOTPAR:pvtype = wago MOTPAR:pvdev = id29/wcid29d/wc MOTPAR:pvroot = mirv *name is the wago channel logical name (as in the resources), *dev is the appropriate device server name, dacstep is the ramping step for setting the pressure, adcch is the channel to be read on the ADC. adcconv is the factor to conver the ADC current to pressure (pres=curr/adcconv),

Macros:
Internal Macros:
    pmb_config
    Usage: pmb_config (mne,type,unit,module,chan)
    The command is executed when spec does (re)config, where %mne% could be .. (if type controller) or the motor number, if motor.

    pmb_getprops
    Usage: pmb_getprops (mot)
    Get and set different properties at the initialisation if the motor mot.

    pmb_cmd
    Usage: pmb_cmd (mot, key, p1, p2)
    Executed by spec, when reading or moving (depends on the key) the motor mot

    _pmbread
    Usage: _pmbread (mot)
    Return the bender pressure - read the ADC and convert the value in pressure [Bar].

    _adcread
    Usage: _adcread (mot)
    Return the reading on the ADC [mA] if wago, pressure [Bar] if PACE .

    _pmbset
    Usage: _pmbset (mot, press)
    Set the bender to a pressure pres [Bar]. Do it in steps.

    _dacset
    Usage: _dacset (mot, val)
    Send the DAC the val . In case of wago (3 way valve) the value is in mA, Bar in case of PACE.

    _valstate
    Usage: _valstate (mot)
    Return the state of the pressure swith (PS valve). Open PV1 and PV2.

    _valread
    Usage: _valread (mot)
    Read the state of the PS valve. Return 0 if open, 1 if closed, -1 if error.

    _pvopen
    Usage: _pvopen(mot)


    _pvclose
    Usage: _pvclose(mot)


    _pace_setpres
    Usage: _pace_setpres (mot, pres)
    Set the pressure pres. Wait until value set. Return the value read from the PACE.

    _pace_readpres
    Usage: _pace_readpres (mot)
    Return the pressure from the PACE.

Filename: pmb_mm.mac
Author: A.Beteva/BLISS
$Revision: 2.0 $, $Date: 2013/03/20 17:00:46 $
Last mod.: 07/11/2023 17:40 by witsch