esrf

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

MICRODIFF.MAC
See other macros in category: All
Description:
    MICRODIFF.MAC - Macros to controll the micro diffractometer
Documentation:
    DESCRIPTION
    The macros give access to the fast shutter and the oscillation scan of the micro diffractometer MD2 via a TANGO device server. The setup needs the name of the TANGO device as parameter to open the access for the macros to the device server and the oscilation motor mnemonic.

Macros:
    microdiff_setup
    Usage: microdiff_setup [device_name oscil_motor_name]
    Declare the micro diffractometer device to be used by the macros.

    microdiff_unsetup
    Usage: microdiff_unsetup
    Clean-up all hooks for the set of macros

    msopen
    Usage: msopen
    Open the fast shutter.

    msclose
    Usage: msclose
    Close the fast shutter.

    backin
    Usage: backin
    Move BeamStop ON beam

    backout
    Usage: backout
    Move BeamStop OFF beam

    fldetin
    Usage: fldetin
    Insert the fluorescent detector.

    fldetout
    Usage: fldetout
    Extract the fluorescent detector.

    cryoin
    Usage: cryoin
    Insert the cryostream.

    cryout
    Usage: cryout
    Extract the cryostream.

    lightin
    Usage: lightin
    Insert the backlight.

    lightout
    Usage: lightout
    Extract the backlight.

    scinton
    Usage: scinton
    Move Scintilator ON beam.

    scintoff
    Usage: scintoff
    Move Scintilator OFF beam.

    diodein
    Usage: diodein
    Move photodiode ON beam.

    diodeout
    Usage: diodeout
    Move photodiode OFF beam.

    md2diode_gainread
    Usage: md2diode_gainread ()
    Read the diode gain. Index id 1=internal diode, 2 = external diode, Return the current gain if 0K, -1 if error

    md2diode_gainset
    Usage: md2diode_gainset (value)
    Change the diode gain (values 0, 1, 2, 3).Return the current gain if 0K, -1 if error

Internal Macros:
    microdiff_get_calibration
    Usage: microdiff_get_calibration()


    microdiff_get_beamsize
    Usage: microdiff_get_beamsize()


    microdiff_prompt
    Usage: microdiff_prompt
    Delete the hook created for the cleanup

    microdiff_init
    Usage: microdiff_init


    phi_init
    Usage: phi_init


    zoom_init
    Usage: zoom_init()


    _msstate
    Usage: _msstate ()
    Return the fast shutter position.

    microdiff_msopen
    Usage: microdiff_msopen ()
    Open the fast shutter

    microdiff_msclose
    Usage: microdiff_msclose ()
    Close the fast shutter

    microdiff_beamstop
    Usage: microdiff_beamstop (pos)
    Move BeamStop to pos on beam (pos=1), out of the beam (pos=2).

    _bsstate
    Usage: _bsstate ()
    Return the position of the BeamStop.

    microdiff_bson
    Usage: microdiff_bson ()
    Move BeamStop ON the beam.

    microdiff_bsoff
    Usage: microdiff_bsoff ()
    Move BeamStop OFF beam

    microdiff_fldet
    Usage: microdiff_fldet (pos)
    Move the fluo detector in (pos = 0) or out (pos = 1).

    _flstate
    Usage: _flstate ()
    Return the fluorescen detector position.

    microdiff_fldetin
    Usage: microdiff_fldetin ()
    Insert the fluorescent detector.

    microdiff_fldetout
    Usage: microdiff_fldetout ()
    Extract the fluorescent detector.

    microdiff_cryo
    Usage: microdiff_cryo (pos)
    Move the cryo in (pos = 0) or out (pos = 1).

    _cryostate
    Usage: _cryostate ()
    Return the cryostream position.

    microdiff_cryoin
    Usage: microdiff_cryoin ()
    Insert the cryostream.

    microdiff_cryout
    Usage: microdiff_cryout ()
    Extract the cryostream.

    microdiff_light
    Usage: microdiff_light (pos)
    Move the backlight in (pos = 1) or out (pos = 0).

    _backlightstate
    Usage: _backlightstate ()
    return the backlight position

    microdiff_lightin
    Usage: microdiff_lightin ()
    Insert the backlight.

    microdiff_lightout
    Usage: microdiff_lightout ()
    Extract the backlight.

    microdiff_light_factor
    Usage: microdiff_light_factor (value)
    Set the backlight factor (value = 0 to 2). Read it (value = 99). Return the light factor if OK, -1 if error.

    microdiff_image_path
    Usage: microdiff_image_path <disk> <directory>
    <disk>= windows disk (ex:\\bldata)
    <directory>= windows mapped directory (ex: opd14\inhouse\md2)

    _microdiff_image_path
    Usage: _microdiff_image_path (disk, directory)
    Set the path to save the image.

    microdiff_abort_scan
    Usage: microdiff_abort_scan ()
    Abort the scan.

    microdiff_cleanup
    Usage: microdiff_cleanup
    Called from the cleanup (by typing Ctrl-C). Stops properly the scan.

    microdiff_oscil_on
    Usage: microdiff_oscil_on
    hook the oscillation to the data collection macro.

    microdiff_oscil_off
    Usage: microdiff_oscil_off
    Remove the data collection macro hook

    microdiff_prepare_oscil
    Usage: microdiff_prepare_oscil
    Dummy macro required by the prodc data collection one.

    microdiff_reset
    Usage: microdiff_reset
    Resets all faults or alarms on the micro diffractometer

    microdiff_sample_off
    Usage: microdiff_sample_off
    Move sample out of beam

    microdiff_sample_on
    Usage: microdiff_sample_on
    Move sample in beam

    microdiff_GUI_lock
    Usage: microdiff_GUI_lock
    Lock GUI

    microdiff_GUI_unlock
    Usage: microdiff_GUI_unlock
    Unock GUI

    microdiff_osc_scan_m
    Usage: microdiff_osc_scan_m [start_angle end_angle exposure_time nb_of_oscillations]
    Program the oscillation frame on the micro diffractometer. The spindle oscillates the "number_of_oscillations" times between the "start_angle" and the "end_angle" for the "exposure_time" seconds.

    microdiff_osc_scan
    Usage: microdiff_osc_scan (start_angle, end_angle, exposure_time, nr_osc, flag)
    Program the oscillation frame from start_angle to end_angle for exposure_time seconds, nr_osc times. If flag = 1, do not open the fastshutter.

    microdiff_aperture_type
    Usage: microdiff_aperture_type (pos)
    Get/set wich aperture. With pos=0 returns the aperture in use. Accepted values 1 and 2. Return value is the aperture name, unknown if error.

    microdiff_aperture_diameter
    Usage: microdiff_aperture_diameter (pos)
    Get/set current aperture diameter. With pos=0 returns the current aperture diameter. Accepted values 1, 2 and 3. Return value is the aperture diameter, -1 if error.

    _aperturestate
    Usage: _aperturestate ()
    Return the position of the aperture - in or out

    microdiff_aperture
    Usage: microdiff_aperture (pos)
    Move the aperture to pos on beam (pos=1), out of the beam (pos=2).

    aperturein
    Usage: aperturein
    Move the aperture on the beam.

    apertureout
    Usage: apertureout
    Move the aperture out of the beam.

    anneal
    Usage: anneal


    annealon
    Usage: annealon


    annealoff
    Usage: annealoff


    microdiff_scintil
    Usage: microdiff_scintil (pos)
    Move Scintilator to pos - 1 to put in, 2 to put the photodiode in, 3 to take out of the beam.

    _scintilstate
    Usage: _scintilstate ()
    Return the position of the Scintilator

    microdiff_scintilon
    Usage: microdiff_scintilon()
    Move Scintilator ON beam

    microdiff_scintiloff
    Usage: microdiff_scintiloff ()
    Move Scintilator OFF beam

    md2diode_adjgain
    Usage: md2diode_adjgain (start)
    Adjust automatically the diode gain, starting from gain start.

    microdiff_flight
    Usage: microdiff_flight (pos)
    Switch the front light pos off (pos=0) or on (pos=1).

    _flightstate
    Usage: _flightstate ()
    return the front light status - ON, OFF or unknown.

    flighton
    Usage: flighton ()
    Switch the front light on.

    flightoff
    Usage: flightoff ()
    Switch the front light off.

    phase_pos_translate
    Usage: phase_pos_translate (pos)
    Return a string, which corresponds to the pos.

    microdiff_phase
    Usage: microdiff_phase (pos)
    Set the microdiff eqipment to different positions pos: sample centring (pos=1), beam location (pos=2), data acquisition (pos=4), sample transfer (pos=5). Return 0 if set OK, -1 if error or the position (if pos = 0).

    microdiff_preparecollect
    Usage: microdiff_preparecollect ()
    Move the oscillation motor to the start angle. Prepare the microdiff for data collection. If needed, do a dummy frame to get the dark current time.

    wait_cleanup
    Usage: wait_cleanup


    wait_ready
    Usage: wait_ready ()
    Wait until movement has finished.

    get_cameracalib
    Usage: get_cameracalib (calpars)
    Return the pizel/mm values.

    microdiff_take_periodic_backgrounds
    Usage: microdiff_take_periodic_backgrounds


    _microdiff_take_zoom_backgrounds
    Usage: _microdiff_take_zoom_backgrounds


    microdiff_take_backgrounds
    Usage: microdiff_take_backgrounds


    microdiff_kappaena
    Usage: microdiff_kappaena (val)
    Enable (val=1)/disable (val=0) minikappa.

    phi_cleanup
    Usage: phi_cleanup


    microdiff_cover
    Usage: microdiff_cover ()
    Set all the devices under the cover

Filename: microdiff.mac
Author: A.Beteva / BLISS
$Revision: 2.4 $ $Date: 2014/09/10 08:14:08 $
Last mod.: 10/09/2014 10:14 by beteva