esrf

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

BCDU8.MAC
See other macros in category: All
Description:
    Macros to control the 8-channel Bunch Clock Delay Unit (BCDU8).
Documentation:
    DESCRIPTION
    This macroset implements macromotors to drive the variuous programmable delays in a BCDU8 module. It also allows to open a dedicated window to dialogate interactively with the module, check and/or set the configuration and give the possibility of executing directly any BCDU8 command. The macro bcdu8 opens the interactive window. The macros bcdu_rflock and bcdu8_sync perform initialisation and synchronisation actions. The configuration of macro motors is explained below .
    Configuring macro motors
    1) You must have an entry in "MOTORS" table for each BCDU8 module
    - The "DEVICE" field must be set to string "bcdu8"
    - The "ADDR" must be set to the module hostname. The communication port can optionaly be specified also (ex: "bcdu8id261")
    - The "NUM" should be set to 8
    - The "TYPE" field must be set to "Macro Motors"
    2) For each delay value to control you must define a motor with:
    - The "Controller" field set to "MAC_MOT"
    - The "Unit" field, numbered from 0, set to MOTORS entry
    - The "Module" field, specify the delay value to control:
    - 1: coarse delay, unit is RF clock cycles
    - 2: fine delay, unit is RF clock cycles
    - 3: global delay, the channel field is not used
    - The "Chan" field, numbered from 1 to 8, must be set to the particular BCDU8 channel
    - The "Backlash" value set to 0
    3) Extra "Custom Parameters":
    "user_unit"
    Specifies the time unit used by the macro motor, possible values are "ps" "ns" "us" "ms" "s" "#". If the parameter is not set, then the unit is RF clock cycles.
    4) Extra motor_par() parameters:
    motor_par(motor,"ramp_dd",delay)
    motor_par(motor,"ramp_dt",time)
    Instead of changing the delay values instantaneously, macromotors may vary the channel delays progressively by approximating the variation by a stepping ramp. The amplitud of each step is given by ramp_dd, while the minimum duration of each step is ramp_dt in seconds. In order to activate this special ramping mode, both parameters must be specified.


    DEPENDENCIES
    These macros make use of the following macro sets:
    • deepdevice.mac


Macros:
    bcdu8
    Usage: bcdu8 [hostname]
    Launch an interactive command line interface in an external xterm window. This allows for instance to check the configuration of the module with the ?CONFIG query.

    bcdu8_rflock
    Usage: bcdu8_rflock [hostname]
    Initialize RF clock locking. To be used if the BCDU8 RFMODE is set to USER and the RF clock lock is lost.

    bcdu8_sync
    Usage: bcdu8_sync [hostname]
    Try to synchronize the BCDU8 channels with external signal. The module waits for an external pulse at the 'SYNC IN' input. Automatically gives up after a while.

    bcdu8debug
    Usage: bcdu8debug
    Switches debug mode

Internal Macros:
    dprint
    Usage: dprint


    dprinterr
    Usage: dprinterr


    dprintdbg
    Usage: dprintdbg


    bcdu8_config
    Usage: bcdu8_config(num,type,p1,p2,p3)
    MACRO MOTOR: Called by spec after reading the config file

    bcdu8_par
    Usage: bcdu8_par(num,key,todo,p1)
    MACRO MOTOR: Called by spec on motor_par()

    bcdu8_update_limits
    Usage: bcdu8_update_limits (motor)
    MACRO MOTOR: Update the motor software limits if needed

    bcdu8_cmd
    Usage: bcdu8_cmd(num,key,p1,p2)
    MACRO MOTOR: Called by spec on motor operation.

    BCDU8DEBUG
    Usage: BCDU8DEBUG


Filename: bcdu8.mac
Author: PF+MP BLISS (Original 2011/Feb).
$Revision: 1.1 $ / $Date: 2012/03/26 12:15:08 $
Last mod.: 26/03/2012 14:15 by perez