esrf

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

MADC.MAC
See other macros in category: Generic I/O
Description:
    macro to read the ICV150 (ADC) card
Documentation:
    DESCRIPTION
    This macro set provides an interface to work with the ADAS ICV150 (ADC) VME card. You can configure the ADC as a counter or monitor and use the startdar SPEC macros like ct for reading.

    SETUP
    The communication is done using a "device server" MAdc150, which should run in the VME crate. The configuration of the "server" can be found in a resource file xxxMAdc150_y.res, where xxx is the name of the crate (e.g d291, id011 ...) and y is the number of the ICV150 card as form the device descriptor (e.g. for adc1 the UNIT is 1)

    The config parameters for an ADC channel as a pseudo counter are:
    NAME - the name which appears when executing ct
    MNEMONIC - the name which is used by madcsetup
    UNIT - the ADC card number as from the device descriptor
    (e.g. for card 1 (or adc1) the UNIT is 1)
    CHAN - the ADC channel number as cabled (0 - 31)


Macros:
    madcsetup
    Usage: madcsetup [device] [counter_mnem,signal_name(,counter_mnem2, ...)]
    setup the reading of the ADC channels. Each channel is configured as a pseudo counter.
    device is the device name, as for the "device server", assosiated with the pseudo counters (e.g. d29/madc150_d292/1).
    counter_mnem is the mnemonics of the pseudo counter. signal_name is the one configured in the device server. If more than one counters, they are comma separated, no blancs. There is always a couple counter mnemonic - signal name. If ICV150 card used, the signal name is none. Else the signal name corresponds to the one configures in the device server resource.

    madcsetupf
    Usage: madcsetupf (device, counters_list)
    Same as madcsetup, but defined as a function, so it can be used by other macros.
    device is the device name , as for the "device server", assosiated with the pseudo counters (e.g. d29/madc150_d292/1).
    counters_list is a string, containing the mnemonics of the pseudo counters, comma separated, no blancs.

    madcunsetup
    Usage: madcunsetup
    Remove the MADCs from the setup.

    madcshow
    Usage: madcshow
    Shows current configuration and state of MADCs

Internal Macros:
    madcthcsetup
    Usage: madcthcsetup


    wagomadcsetupf
    Usage: wagomadcsetupf(dev, cntlist)


    thcmadcsetupf
    Usage: thcmadcsetupf(dev, cntlist)


    _madcmiscsetup
    Usage: _madcmiscsetup(dev)


    madcblon
    Usage: madcblon(ind)
    add to blmenu

    madcon
    Usage: madcon(ind)
    Enable the counting for the MADC pseudo counters.

    madcoff
    Usage: madcoff(ind)
    Disable the counting for the MADC pseudo counters.

    _madcprecount
    Usage: _madcprecount(ind)
    Reset variables to zero.

    _madcgetcounts
    Usage: _madcgetcounts ()
    Do the reading.

    madcbody
    Usage: madcbody(mode,ind)


Filename: madc.mac
Author: A.Beteva / V.Rey (BLISS/ESRF) $Revision: 2.2 $, $Date: 2008/07/31 06:51:36 $
Last mod.: 26/03/2010 13:40 by beteva