esrf

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

FlexCurrent_mh.mac $Revision: 1.1 $
See other macros in category: All
Description:
    Macros for a the use of the FlexCurrent (orion:10000/sr/comploop/...) device as a macro motor and/or macro counter.
Documentation:
    DESCRIPTION
    The macros provide users with an interface between SPEC and the FlexCurrent (orion:10000/sr/comploop/... device.

    INTERNALS
    You may declare a motor and a counter, even for the same device! The macro motor/counter macros can handle that.

    Now declare a motor controller:

    MOTORS   DEVICE      ADDR                              NUM       <>TYPE
       YES   FLEXCURRENT //orion:10000/sr/comploop/id18_0    1 Macro Motors

    Then create the macro motor:

    Unit is always 0 !
    Number: <>Controller        0: MAC_MOT
    Unit/[Module/]Channel
    Name                       <FlexCurren
    Mnemonic                          flex

    Steps per degree/mm               1000 <<< precision is 100 steps
    Sign of user * dial                  1
    Backlash [steps]                     0
    Steady-state rate [Hz]               1
    Base rate [Hz]                       1
    Acceleration time [msec]             1
    Motor accumulator                    0
    Restrictions <>                   NONE

    Dial = accumulator / steps
      High limit                 1000.0000
      Current                       0.0000
      Low limit                     0.0000
    User = sign * dial + offset
      Offset                        0.0000
      `High' limit               1000.0000
      Current                       0.0000
      `Low' limit                   0.0000



    Then hit 'm' twice. Set the following for your motor:
    Hardware read mode <>        PR + AL + NQ
    


    If needed, declare a counter controller:

    SCALERS  DEVICE       ADDR                             NUM         <>TYPE
       YES   FLEXCURRENT  //orion:10000/sr/comploop/id18_0   1  Macro Counter



    The counter is then configured as :
    Number     Name  Mnemonic  <>Device  Unit  Chan   <>Use As  Scale Factor
         0    Cflex     Cflex   MAC_CNT     0     0    counter             1





    INTERNALS


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

Internal Macros:
    __FlexC_tango_catch_error
    Usage: __FlexC_tango_catch_error


    __flexc_error
    Usage: __flexc_error (mesg)
    Attempts to write indentical error message only once in a while

    FLEXCURRENT_config
    Usage: FLEXCURRENT_config (mne, type, unit, mod, chan)
    Called by spec

    FLEXCURRENT_cmd
    Usage: FLEXCURRENT_cmd(mne, cmd, p1, p2, p3)
    Called by spec

Filename: FlexCurrent_mh.mac
Author: H. Witsch, BLISS - ESRF, $Revision: 1.1 $, $Date: 2016/12/02 12:07:16 $
Last mod.: 02/12/2016 13:07 by guilloud