esrf

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

dac_and_relay_magnet_ps.mac
See other macros in category: All
Description:
    Macros to change a dac output together with a relay which changes the polarity on a special box borrowed from ID24.
Documentation:
    DESCRIPTION
    Change a dac output together with a relay which changes the polarity on a special box borrowed from ID24.

    In the config, place yourself on the motor.
    The DAC needs defining in the config, (hit "p", enter the word "dac" to the left and the taco name to the right.
    Type `a`! Then enter the relay name entering relay to the left and the relay taco name to the right.
    Type `a`! For the config value factor enter the word "factor" to the left and the value to the lefts.

    SETUP
    In the config editor in the "Motor and Counter Device Configuration" page (hit "D") create a motor controller like follows:
    MOTORS          DEVICE          ADDR  <>MODE  NUM             <>TYPE
       YES           DACREL            -            1       Macro Motors
    Then create the macro motor:
    Number: <>Controller           0: MAC_MOT
    
    Unit/[Module/]Channel                 0/0 (first num is index num of controller)
    Name                              current
    Mnemonic                             iout
    Steps per degree/mm                  4096
    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                       5.0000
      Current                          0.0000
      Low limit                        0.0000
    User = sign * dial + offset
      Offset                           0.0000
      `High' limit                    50.0000
      Current                          0.0000
      `Low' limit                      -50.0000

    It is advisable to set the backlash for the macro motor to 0.

    ATTENTION
    After a fresh start the macros needed for the macro motor are most likely not available, which necessitates a reconfig first thing.
    The macros are not conceived for more than one motor.

    DEPENDENCIES
    The file dac_and_relay_magnet_ps.mac has to be read in. When read in by the IDXXsetup.mac or the private setup of a particular spec, the fresh start has no access to the _config function. Here, a reconfig is needed before the motors work!

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

    dacrel_simu
    Usage: dacrel_simu
    toggle debug mode for the present macros.

Internal Macros:
    DACREL_config
    Usage: DACREL_config(mnum,type,unit,mod,chan)
    Called by spec

    DACREL_cmd
    Usage: DACREL_cmd(mnum, cmd, sp1, sp2, p3)
    Called by spec

Filename: dac_and_relay_magnet_ps.mac
Author: BLISS - ESRF, H. Witsch
$Revision: 1.4 $, $Date: 2009/12/11 05:09:40 $
Last mod.: 11/12/2009 06:09 by witsch