esrf

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

ATTE.MAC
See other macros in category: Other hardware
Description:
    Attenuator Macros
Documentation:
    DESCRIPTION
    This file provides a set of macros for controlling and monitoring attenuators from spec. There is a menu to easily access the different axes together with a complete macro set for combining attenuator with other equipment or macros inside spec.


    OVERVIEW
    Basic commands are:
    atteconfig
    Configures the system from a file or interactively.
    attemenu
    Shows main attenuator menu. From there you can see active axes and move to the desired one.
    atteset
    Sets active a certain filter/axis combination
    attestatus
    Returns a report on every axis position
    attepos
    Reduced version of attestatus



    EXAMPLE
    attemenu
    (Opens the menu)
    atteset 2 3
    (Sets active the filter number three on axis two )
    attepos
    (Shows the current position of the axes)
    atteconfig atte.dat %B%
    ( Configure the system from file atte.dat)



    SETUP
    The macro atteconfig with no arguments will prompt for all configuration parameters.
    The configuration can be done from a configuration file too. The syntax for this file can be seen in the following example:
    ---
     #
     # Axe 1
     #
     Axe id01/atte011_1/1 0
     {
    	filter 1 1.2 Carbon Carbon_1.2
    	filter 2 0.8 Aluminium Poroto
    	filter 3 2.0 Silicon Tururu
     }
     
     #
     # Axe 2
     #
     Axe id01/atte011_1/1 1
     {
    	filter 3 2 Carbon Carbon1 
    	filter 5 1 Carbon Carbon2
    	filter 2 0.5 Carbon Carbon3
    	filter 1 0.25 Carbon Carbon4
     }
    --- 
    
    Three kind of lines are understood by atteconfig macros:
    • Comments: any line starting with the # character
    • Axis lines; keyword "Axe" plus two parameters:device-name and axenumber
    • Filter lines: Keyword is "filter", four fields must follow: position of the filter in its axis, thickness, attenuation file-name and label to be identify the filter in the menu.
    Each group of filter lines belonging to the same axis must be surrounded by curly brackets.
    # atteconfig #

Macros:
    atteconfig
    Usage: atteconfig [config-file]
    Configure the system for axes and filters... get the configuration data from the file given as first argument or interactively asks for data. For an example of a configuration file see above.

    attepos
    Usage: attepos [axis]
    Fully checks the status of the system and gives a report if ATTE_FRIEND is not set

    attestatus
    Usage: attestatus [axis]
    Fully checks the status of the system and gives a report if ATTE_FRIEND is not set

    attemenu
    Usage: attemenu
    Starts the interactive menu.

    atteset
    Usage: atteset axis filter
    Moves axis to the desired filter

    attestop
    Usage: attestop
    Stops all movement in attenuator system

Internal Macros:
    _attepos
    Usage: _attepos axis
    Fully checks the status of one axis and gives a report if ATTE_FRIEND is not set.

    atte_update_state
    Usage: atte_update_state


    atte_update_menu
    Usage: atte_update_menu


    attegui
    Usage: attegui


    Xatte
    Usage: Xatte


    _atte_showmenu
    Usage: _atte_showmenu
    Macro that prepares and shows the menu on the screen.

    _atte_read_file
    Usage: _atte_read_file
    Reads information from configuration file

    _atte_read_filter
    Usage: _atte_read_filter
    Reads from configuration file information concerning an axis.

    attewait
    Usage: attewait
    Waits until the attenuator system is not moving.

Filename: atte.mac
Author: Vicente Rey 27 Feb. 1996
Last mod.: 25/06/2007 17:25 by rey