esrf

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

dld.mpc
See other macros in category: Detection Obsolete
Description:
    Delay Line Detector / OBSOLETE
Documentation:
    WARNING
    This macros are now OBSOLETE

    DESCRIPTION
    This macro implements access to F.Sever's device servers controlling the delay line detector complex.

    The aim of this implementation is to provide easy access to the detector from SPEC, a full access to the functionalities of the Dld is available with F.Sever's SPEC-independent client.
    The frame information has to be prepared in a file. Each line of this file will represent a framepair. Each framepair is made up of seven values.
    • Number of frames.
    • Dead time (in seconds)
    • Dead output (line output active while in dead)
    • Dead pause (yes or no, value 1 or 0)
    • Live time
    • Live output
    • Live pause


    EXAMPLE
    dldsetup id13/dld/1 id13/xfr/1 red data/dld /users/a/opid13/data/dld id13/dc/egy id13/dc/sampledistance id13/dc/detposition
    (Setup the dld macros with device server names and other parameters)
    dldconfig
    (will prompt for all necessary information for a new acquisition cycle)
    dldstart
    (triggers the acquisition)
    dldhmread
    (reads data into file)


    ATTENTION
       Changes in this macro are foreseen:
       - To use the scalers as pseudo-counters inside spec.
       - Two modes of operation, two version of device servers may coexist
         for a while
    


    DEPENDENCIES
    The macro plot2.mac has to be read before this one. The macro Xdld.mac has to be read with this one.

Macros:
    dldsetup
    Usage: dldsetup [dld_dev xfr_dev host remdir headdir energy_dc sample-distance_dc detector-position_dc] :
    The following parameters have to be given with this command or it will ask for them interactively: - dld_dev: device server name for main dld control - xfr_dev: device server name for data transfer - host: where to store remote data - remdir: name of directory where to store data in remote host - headdir: name of local directory where temporarily store header data - energy_dc: name for energy device in data collector it must follow device nomenclature. i.e domain/family/member and be the same as that in monochromator spec application - sample_distance_dc name for sample distance in data collector - detector_position_dc name for detector position in data collector

    dldacq
    Usage: dldacq acqtime
    Do an acquisition on Dld for acqtime seconds on live Single frame, single cycle

    dldsettime
    Usage: dldsettime
    Set time for dldacq

    dldconfig
    Usage: dldconfig
    Ask for values to prepare a new configuration for an acquistion. and make them effective. The values asked are: Resolution in X (possible values: 1,256,512,1024,2048,4096) Resolution in Y (possible values: 1,256,512,1024,2048,4096) Data Length (bits: 16,32) Frame information file name Number of cycles Prefix for output filenames

    dldstart
    Usage: dldstart [0/1 [part-no [title-string [rel. position]]]]
    Triggers an acquisition. When a parameter ( 0 or 1 ) is given the acquisition is started in internal mode (0) or in external mode (1). When no parameter is given the default is internal mode, without needing of external trigger. The second parameter, if present, is the number of the partition to be used. If not present the macro will ask for used partition and will prompt the user for the next partition to be used. Special macro for dealing with 24bit scalers... Saturated after 15seconds with 1 MHz input rate. The macro uses all data in dldconfig but takes as parameter the number of iterations for the acquisition to be performed. Each iteration will save the scaler values in SPEC memory The title-string is stored by dldhmread in the header file. If not specified the default given in dldinfo is used. The relative position is the offset (in mm) of the sample relative to the detector position. It is used to calculate the sampledistance from the detector position (sample distance = detector position + relative position). The sample distance is stored by dldhmread in the header file. If not specified, the sample position is used that is stored in the data base. The following additional parameters are read (mainly from the database): machine info, station info, optics info (currently not), detector position, sample distance, start time Dldconfig has to be issued first.

    dldsum
    Usage: dldsum [frame-no [part-no]]
    Displays the detector counts, anode counts, the number of incident and transmitted photons and the counting time. The number of detector counts are calculated only for 32 bits/pixel. From these numbers the rejection and the effective count rate are calculated. If an other than the current partition number is used only the detector counts are displayed. dldscalerassign must be used first.

    dldconfigstart
    Usage: dldconfigstart
    Change the internal state of the Dld server to "Init"

    dldconfigend
    Usage: dldconfigend
    Change the internal state of the Dld server to "Idle"

    dldconfigall
    Usage: dldconfigall
    Reads frame information from DLD_FRAME_FILE and makes it effective. Then uses DLD_DATA_LENGT and DLD_RESOL values and give them to device server Gives frame info to Tfg

    dldnocycles
    Usage: dldnocycles number
    Sets the value for the number of cycles.

    dldchangepart
    Usage: dldchangepart [partition-number]
    Gives information about the partition status and then prompts the user for a new partition to use. If the partition chosen already has data gives the user the option of clear it or reuse it keeping the old values. When the macros is invoked with no parameter it will prompt the user for a partition number. When one parameter is given, this correspond to the partition number to be used and by default the partition is cleared if it already had data

    dldstatus
    Usage: dldstatus
    Gives full status information.

    dldstop
    Usage: dldstop
    Stops the acquisition that is currently running.

    dldpause
    Usage: dldpause [0/1]
    Suspends the execution of an acquisition until a new dldstart command is issued. Like 'dldstart' this macro accepts a mode parameter 0=internal, 1=external.

    dldhmread
    Usage: dldhmread [part-no] Dumps the 32 scalers and a partition into a file. If the partition number is not given the current partition is dumped. The name of the file is formed with the prefix given in the configuration plus a three number suffix starting with 001. This number is automatically incremented. The full name of the file is echoed to the user. The user should avoid starting a new acquisition on a partition that is being dumped. This risks to make losing the data. To know the status of the reading process use the macro dldreadpoll.


    dldxfrstop
    Usage: dldxfrstop
    Allows to return Xfr to a well known state. Current transfer is stoped. And connections to file and remote hosts are closed.

    dldreadsc
    Usage: dldreadsc [scaler-no]
    Reads into SPEC memory the contents of a selected scaler. If the scaler number is not given the user is prompted for one.

    dldplot
    Usage: dldplot
    Shows in a plot the values read by the previous 'dldreadsc'. Usage : dldplot firstfr lastfr ymin ymax dldplot firstfr lastfr dldplot

    dldscaler
    Usage: dldscaler [scaler-no]


    dldscalersetup
    Usage: dldscalersetup
    Macro that allows the user to give information about each individual scaler.

    dldsave
    Usage: dldsave [filename]
    Save scaler setup values. Takes filename as input. But only considered the string until the first dot. Completes the name with suffix dld.

    dldrestore
    Usage: dldrestore [filename]
    Restore scaler setup values from a previous dldsave. Takes filename as input. But only considered the string until the first dot. Completes the name with suffix dld.

    ws
    Usage: ws [frame-no]
    Macro to show scaler values.

    wss
    Usage: wss
    Displays the zero values and calibration values of all scalers. This information is introduced with dldscalersetup

    dldscalerassign
    Usage: dldscalerassign i0-scaler i1-scaler time-scaler anode-scaler + 4 alt. scalers + HS32depth
    Assignment of a scaler and an alternative scaler as monitor for incident photons (i0), transmitted photons (i1), time (time) and anode counts (anode). An alternative scaler is used, if its value shows, that the basic scaler has an overflow.

    dlddump
    Usage: dlddump [startno [endno]]
    Dump scaler setup on the screen

    dldscalerzero
    Usage: dldscalerzero count-time [iterations [startno [endno]]]
    Measurement of the zero values for scaler startno to endno, default is 1 to 16.

    dldscalercalib
    Usage: dldscalercalib


    dldscalersave
    Usage: dldscalersave
    Save the data from 'dldreadsc' into a file. Can be restored with 'dldload'

    dldload
    Usage: dldload
    Restores scaler data previously saved with dldsave.

    dldprint
    Usage: dldprint [xmin xmax [ymin ymax]]
    Sends to the plot the values from 'dldreadsc'. It allows to select a region of the data by specifying min and max values for both axes.

Internal Macros:
    dldversion
    Usage: dldversion


    dldconnect
    Usage: dldconnect
    Import devices and set timeouts

    dld_cleanup
    Usage: dld_cleanup
    Macro executed at cleanup

    dlddcup
    Usage: dlddcup
    Creates devices for Data Collector

    dldidle
    Usage: dldidle


    dldruncheck
    Usage: dldruncheck


    dldscatomem
    Usage: dldscatomem


    dldconfigshow
    Usage: dldconfigshow
    Shows values from last dldconfigall

    dldstate
    Usage: dldstate


    get_detector_info
    Usage: get_detector_info
    Get the global variable DLD_DETECTORINFO

    dldinfo
    Usage: dldinfo
    Prompts for experiment specific parameters which are stored in the header file.

    dldmono
    Usage: dldmono


    dldpoll
    Usage: dldpoll


    dldpartstatus
    Usage: dldpartstatus


    dldxfrstate
    Usage: dldxfrstate


    dldreadpoll
    Usage: dldreadpoll
    Informs about the status of the reading process.

    dldxfrerror
    Usage: dldxfrerror
    Checks error coming from Xfr device when transferring data.

    dldwatchscalers
    Usage: dldwatchscalers


    dldwatchscalersetup
    Usage: dldwatchscalersetup


    dldscanon
    Usage: dldscanon


    dldscanoff
    Usage: dldscanoff


    dld_head
    Usage: dld_head
    Loop point in dldscan

    dld_loop
    Usage: dld_loop
    Loop point in dldscan

    dld_plot1
    Usage: dld_plot1


Filename: dld.mac
Author: Vicente Rey
Last mod.: 27/02/2008 17:55 by rey