esrf

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

TRANSFOCATOR.MAC
See other macros in category: All
Description:
    transfocator.mac - transfocator control
Documentation:
    DESCRIPTION
    A set of macros to control transfocators. The macros control one transfocator at a time, but allow to show the status of all the configured in the same session vessels.

    SETUP
    The lenses are controlled by WAGO output/input modules, via TANGO device server.

    DEPENDENCIES
    XML_utils.mac


Macros:
    tfsetup
    Usage: tfsetup <name device_name>
    Configure the transfocator. The name is a free string to be used to identify the tranfocator, controlled by device_name server. If needed, a local setup can be added.

    tfdelete
    Usage: tfdelete [tfname]
    Delete the tfname from the list of the setup transfocators.

    tfhosetup
    Usage: tfhosetup [name filename root label position]
    Set the transfocator name hardware object parameteres: the xml filename; the root path for each lense; the label keyword; the positionkeyword. first control (output) channel.

    tfshow
    Usage: tfshow [name]
    Read transfocator and display all the lenses positions if name, all the configured transfocators otherwise.

    tfselect
    Usage: tfselect [name]
    With no argument displays the available transfocator and shows which is currently selected. Otherwise set the name transfocator as the current one.

    tfstatus
    Usage: tfstatus
    Read transfocator name status, display it and show all the lenses positions.

    tfin
    Usage: tfin number
    Put the lense number in the beam. If number=99, put only the pinhole(s) in, all other lenses out.

    tfout
    Usage: tfout number
    Put the lense number out of the beam. If number=99, take the pinhole(s) out.

    tfget
    Usage: tfget
    Print out status of current transfocator

    tfset
    Usage: tfset <status>
    Set current transfocator to desired status.

    tfinall
    Usage: tfinall
    Put all the lenses in the beam. Do not touch the pinhole, if any.

    tfoutall
    Usage: tfoutall
    Take all the lenses out of the beam. Do not touch the pinhole, if any.

    tftoggle
    Usage: tftoggle number
    Toggle the position in the beam of lense number.

    tf_getxml
    Usage: tf_getxml
    Get the lenses name and ordinal positions (starting from 1) for the current transfocator from the default hardware object - xml file.

    tf_writexml
    Usage: tf_writexml
    Write the lense names and corresponding ordinal positions (starting from 1) for the current transfocator from the default hardware object - xml file. The information to write is taken from the TF_LENSE arary.

Internal Macros:
    _tf_get
    Usage: _tf_get ()
    Get the current tranfocator state.

    _tf_set
    Usage: _tf_set (st, name)
    Set the tranfocator name to a status st. If name not specified, the current transfocator is set.

    _tf_getxml
    Usage: _tf_getxml (ho, tfname, keys_root, keys)
    Get the lense names and corresponding ordinal positions (starting from 1) for the tfname transfocator from the ho hardware object - xml file.

    _tf_writexml
    Usage: _tf_writexml (ho, tfname, keys_root, keys)
    Write the lense names and corresponding ordinal positions (starting from 1) for the tfname transfocator in the ho hardware object - xml file. The information to write is taken from the TF_LENSE arary.

    _tf_lock
    Usage: _tf_lock (name)
    Define a local beamline macro to lock the name transfocators. If name not specified, the current transfocator is checked.

    tf_calc_lense
    Usage: tf_calc_lense (from, name)
    Calculate the lense status from the from parameter, that is:
    from[0]=1 - energy; from[0]=2 - distance; from[0]=3 - beamsize
    from[1] - energy [keV]/distance [m]/vertical beam size [mm]
    from[2] - horizontal beam size. If name not specified, the current transfocator is used. Return the lense status to be set if OK, -1 if error.

    tf_calc_energy
    Usage: tf_calc_energy (status, name)
    Calculate the energy from the lense status. If name not specified, the current transfocator is used. Return the energy [keV] if OK, -1 in case of error.

    tf_calc_beamsize
    Usage: tf_calc_beamsize (status, name)
    Calculate the beam size from the lense status. If name not specified, the current transfocator is used. Return the beam size [mm] - vertical, horizontal if OK, -1 in case of error.

    tf_calc_distance
    Usage: tf_calc_distance (status, name)
    Calculate the distance from the lense status. If name not specified, the current transfocator is used. Return the distance [m] if OK, -1 in case of error.

    tf_local_macrodefs
    Usage: tf_local_macrodefs ()
    Define, if not already the case, the local macros, used as hooks.

Filename: transfocator_ds.mac
Author: A.Beteva, BLISS
Last mod.: 26/02/2014 11:27 by beteva