esrf

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

dac_macmot.mac
See other macros in category: All
Description:
    Macros to control a dac device server (VME card ICV712), optionally with a ADC (VME card ICV150) input to display the position.
Documentation:
    DESCRIPTION
    This macro file allows to define dac channels as motors in SPEC. Optionally one may define an ADC channel as position readout.

    In order to allow for adequate feedback, one may define an ADC ds name in the motor parameter ADC of the motor definition (hit "p", enter the word "ADC" to the left and the ADC channel name to the left).

    The config values factor (hit "p", enter the word "factor" to the left and the value to the left) and encoder_factor can be set to reflect the gain of the DAC and ADC channels.

    In the config editor create a motor controller like follows:
    MOTORS          DEVICE          ADDR  <>MODE  NUM             <>TYPE
       YES          DAC     IDXX/DAC/\f\*(#B00_\f1            2       Macro Motors


    ATTENTION
    The DAC device server offers one device per channel. Leave the channel part of the name away, it will be completed with the unit number of your motor.

    Then create the motor(s): %PRE% Number: <>Controller           0: MAC_MOT
    Unit/[Module/]Channel                 0/1
    Name                              current
    Mnemonic                             iout
    Steps per degree/mm                    40
    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                     5.0000
      Current                          0.0000
      `Low' limit                      0.0000


    EXAMPLE
    mv dac1 50
    Move the motor to 50 This value converted to dac output depending on the ICV712 settings.
    In order to avoid the message "Motor didn't reach final position." set the slop parameter in the spec config to a small number of steps (10).
    $Revision: 1.1 $, $Date: 2008/03/18 08:31:44 $

    DEPENDENCIES
    The file dac_macmot.mac has to be read in.

Macros:
Internal Macros:
    DAC_config
    Usage: DAC_config(mne,type,unit,mod,chan)
    Called by spec

    DAC_cmd
    Usage: DAC_cmd(mne, cmd, p1, p2, unit)
    Called by spec

Filename: dac_macmot.mac
Author: BLISS - ESRF, H. Witsch
$Revision: 1.1 $, $Date: 2008/03/18 08:31:44 $
Last mod.: 18/03/2008 09:31 by witsch