esrf

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

ELMETER.MAC $Revision: 2.17 $
See other macros in category: All
Description:
    %B%ELMETER.MAC%B% - Macros for %B%electrometer%B% control.
Documentation:
    DESCRIPTION
    This macro set provides the possibility to read electrometers with automatic gain adujustement. %PRE% Three types of electrometers are supported for the moment:
    • Type 0: ADC reading with three input lines with all bit combinations for gain adjustment. Eight posible gain values are posible.
    • Type 1: ADC reading with three input lines with exclusive values. Only three gain values are posible.
    • Type 2: Other type. The macros do not read the counter value but other macros or SPEC itself take care of that. The min/max thresholds are normalized with counting time. For the moment, in this case only three mutually exclusive input lines are used for gain adjustment. Electrometers are seen in SPEC as counters and must be defined as such in SPEC config.
    • Type 3: ID11 electrometers. Like type 1 only that the gains can vary in elmeteradd you need to supply ( not the min gain ) but the gains for the three relay positions.
    • Type 4: Like type 3 but with a vmeadc linux device server madc
    • Type 5: Novelec on a WAGO box. First trial 25.1.2005
    • Type 6: Novelec on a WAGO box. Value is read with icv150 (petitdem).
    • Type 7: gain + adc control by wago (petitdem).



      SETUP
      Use the setup command:
    • Start electrometer definition with a line containing elmeterinit Use elmeteradd to configure a new electrometer.
    • To setup several electrometers, use elmeteradd several times. Without parameters elmeteradd allows keyboard entry for setup.


Macros:
    elmeter_debug
    Usage: elmeter_debug
    toggle debug mode for the present macros.

    elmeteradd
    Usage: elmeteradd mne type icv150name icv150channel icv196name icv1596channel lowthresh highthresh [gain1 gain2 gain3|lowgain] usedatacoll
    Attention: different number of arguments for different types of electrometers.

    elmetermin
    Usage: elmetermin
    Sets all electrometers to minimum gain

    elmeterdel
    Usage: elmeterdel <counter mne>
    deletes from setup an electrometer.

    pindiode
    Usage: pindiode
    shows the currently defined electrometers in setup.

    elmeteroff
    Usage: elmeteroff
    Disables all electrometer counters

    elmeterfix
    Usage: elmeterfix
    For interactive use

Internal Macros:
    elmeterbody
    Usage: elmeterbody(mode)
    Use with blmenu

    elmeterinit
    Usage: elmeterinit


    elmeterunsetup
    Usage: elmeterunsetup


    elmetershow
    Usage: elmetershow


    elmpr
    Usage: elmpr(label, var, n)


    elmeteron
    Usage: elmeteron
    Enables all electrometer counters

    elmeter_prepcount
    Usage: elmeter_prepcount


    elmeter_getcounts
    Usage: elmeter_getcounts


    elmeter_mread
    Usage: elmeter_mread
    For ADC type electrometers (type 0 and 1), since read/gain corrected during counting

    elmetergain
    Usage: elmetergain
    For interactive use

    elmeter_set
    Usage: elmeter_set(mne, gain)


    elmget
    Usage: elmget


    elmeter_gainadj
    Usage: elmeter_gainadj(ctime)
    Adjusts the gains for all electrometers

    elmupdate
    Usage: elmupdate


    elmetergainadj1
    Usage: elmetergainadj1
    Adjusts the gain for ONLY ONE electrometer

    _adc_read
    Usage: _adc_read (mne)
    Read the appropriate adc device.

    _wago_elmeter_read
    Usage: _wago_elmeter_read (mne)
    Read the appropriate adc device.

Filename: elmeter.mac
Author: V. Rey to start, H. Witsch recently ELMETER.MAC - ICNTL - 10/96 $Revision: 2.17 $, $Date: 2017/03/09 15:18:09 $
Last mod.: 04/07/2017 14:32 by witsch