esrf

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

Skeleton_mh.mac $Revision: $
See other macros in category: All
Description:
    Macros for a the use of the Skeleton device as a macro motor.
Documentation:
    DESCRIPTION
    The macros provide users with an interface between SPEC and the Skeleton 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  <>MODE  NUM             <>TYPE
       YES     SKELETON idxx/skeleton/0_0          1       Macro Motors

    Then create the macro motor:

    Unit is always 0 !
    Number: <>Controller           0: MAC_MOT
    
    Unit/[Module/]Channel                 0/0
    Name                             Skeleton
    Mnemonic                           skeleton
    Steps per degree/mm                     1
    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

    (Skeleton: possibly necessary ?)Then hit 'm' twice. Set the following for your motor:
    Hardware read mode <>        PR + AL + NQ
    


    Now declare a scaler controller:
    SCALERS         DEVICE          ADDR  <>MODE  NUM             <>TYPE
       YES           SKELETON sr/comploop/id18_0 1          1      Macro Counter



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





    INTERNALS


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

Internal Macros:
    __Skeleton_tango_catch_error
    Usage: __Skeleton_tango_catch_error


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

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

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

Filename: MacroHardware_skeleton.mac
Author: Yourself, BLISS - ESRF, $Revision: $, $Date: $
Last mod.: 02/12/2016 13:05 by guilloud