esrf

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

millimarC1210.MAC
See other macros in category: All
Description:
    Macros to control a MILLIMAR C 1210 or 1216
Documentation:
    DESCRIPTION
    This macro file allows to connect a millimar micrometer as a macro counter in SPEC.
    History:


    SETUP
    Controller 1210 or 1216
    The Millimar controller has to be configured before using it with this macros.
    Press the \"MENU\" press-button (on the front panel), then go to:
    • -> SETUP
    • -> PARCOM
    • -> PROTOCOL = M1240
    • -> FORMAT = 8-N-1 (8bit,no-paritiy, 1 stop bit)
    • -> HANDSHK = SANS
    • -> BAUD = 9600 or 19200
    • -> ENVOYER = MANUELL
    SPEC
    configure a ESRF serial device with baud rate set to 9600 or 19200 and with \"raw\" mode.
    SerialLine dserver. Default resources are enough.
    You can also use a serial port without server (e.g. /dev/ttyS0)
    In order to configure a macro counter:
    1) You must have a "SCALERS" defined with:
    DEVICE set to "milc1210"
    ADDR set to the SPEC serial address (e.g. 0)
    TYPE set to "Macro Counter"
    NUM must be set also according to the number of sensor you use. Max is 2.
    2) You must define a counter with:
    Device set to "MAC_CNT"
    Mnemonic as you want
    Unit must correspond to the milc1210 macro scaler you choose
    Chan channel number in the micc1210 controller, 0 or 1
    END% constant MILC1210_HEAD "MIL C1210: " global MILC1210_LIST MILC1210_CNT_LIST list_init MILC1210_LIST list_init MILC1210_CNT_LIST

    DEPENDENCIES
    To use a millitron as a counter the following conditions have to be fulfilled:
    • The file millitron.mac has to be read in done by: startup s. (this file needs: pseudo.mac , stchanges.mac)
    • the millitron counters have to be configured done by: SPECADM (Controller NONE, mnemonic as in startupscript)
    • setup the mils ( with milsetup ) done by: startup s.


Macros:
    milsetup
    Usage: milsetup [mil-mne1 serial_id1 channel_nr1 [...]]
    Sets parameters for a group of millitron micrometer pseudocounters. It can be called interactively or non-interactively by giving all parameters in the command line.

    milreset
    Usage: milreset
    Reset internal lists.

    milshow
    Usage: milshow
    Shows current MIL pseudocounters definition.

    miloff
    Usage: miloff
    Deactivates definitions for MIL pseudocounters.

    milon
    Usage: milon
    Activates definitions for MIL pseudocounters.

Internal Macros:
    milc1210_config
    Usage: milc1210_config(num, type, p1, p2, p3)


    milc1210_cmd
    Usage: milc1210_cmd(num, key, p1, p2, p3)


    miladd
    Usage: miladd mil-mnemonic serial_id channel_nr
    Add definitions for a millitron micrometer pseudocounter

    mil_add
    Usage: mil_add (mil-mnemonic, serial_id, channel_nr)
    Add definitions for a millitron micrometer pseudocounter

    milblon
    Usage: milblon()


    milbody
    Usage: milbody(mode)


    milunsetup
    Usage: milunsetup (mil-mnemonic)
    Delete definitions for one MILLI mnemonic

    mildel
    Usage: mildel (mil-mnemonic)
    Delete definitions for one MIL mnemonic

    mil_getcounts
    Usage: mil_getcounts


Filename: millimarC1210.mac
Author: Laurent
Last mod.: 31/05/2016 19:20 by guilloud