Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Editing

...

a

...

configuration

...

More

...

info

...

here

...

Selecting

...

detectors

...

for

...

readout

...

More

...

info

...

here

...

Starting/stopping

...

a

...

run

...

If

...

the

...

DAQ

...

system

...

is

...

not

...

already

...

running,

...

then

...

there

...

should

...

be

...

a

...

"Restart

...

DAQ"

...

icon

...

on

...

the

...

operators

...

console.

...

Open

...

that

...

to

...

start

...

the

...

DAQ

...

system.

...

  When

...

you

...

do

...

you

...

will

...

get

...

a

...

number

...

of

...

windows

...

opening.

...

First

...

examine

...

the

...

control

...

gui

...

window

...

shown

...

below.

...

Select

...

the

...

appropriate

...

configuration.

...

You

...

should

...

also

...

decide

...

if

...

you

...

want

...

to

...

record

...

the

...

run.

...

It

...

defaults

...

to

...

recording,

...

but

...

if

...

you

...

don't

...

want

...

to

...

record,

...

just

...

click

...

on

...

it

...

to

...

turn

...

it

...

yellow.

...

Image Added

Next you should click on the Partition Select button to choose what devices will be in the system during the run. You will get a window like the one shown below, just click on an item to toggle it's state as in or out of the partition during the run.

Image Added

Once you have clicked "OK" above, you will get a target state offering to allow you to start the run. You can see this below. Just select "BEGIN RUNNING" to start the run.

Image Added

You can stop the run from the control gui window by selecting one of the available target states. These are to disable, end running or shut down. If you need to reconfigure or are finished, then shut down. End running will end the run so that next time you will get a new run number. Disabling will allow you continue the same run latter.

Watching progress of a run

Once the run is going you can watch the progress of it on the control gui window. It will show you the statistics, like the duration of the run and the number of events including the damaged event count. The bottom pane gives the file status, recording or not. Notice that the file names are given even if not recording. Embedded in the file name, you will see the run number.

Image Added

Other windows other windows will show you the status of the DAQ processes, or allow you to do online monitoring of each device.

Running scans

Most every experiment requires efficient acquisition of data coordinated with changes in the beamline or detector; i.e. a parameter scan.  The DAQ system provides two separate interfaces for automating such a scan. 

...

Launching a Scan from DAQ Control GUI

...

The first interface is part of the DAQ Control GUI, and is found by clicking the "Scan" button in the "Configuration" section of the main GUI window.  This opens a dialog which has two tabs : one for scanning an EPICS process variable ("PV") and one for scanning a DAQ trigger delay. Image Added

For the EPICS PV scan, the user chooses the number of steps, the name of the PV to control, and the start and stop value of that variable.  The scan points will be calculated linearly from the steps, start, and stop values:

  • 1 step  = 2 scan points {start, stop},
  • 2 steps = 3 data points {start, (start+stop)/2,

...

  • stop},

...

  • 3

...

  • steps

...

  • =

...

  • 4

...

  • data

...

  • points

...

  • {start,

...

  • start*2/3+stop*1/3,

...

  • start*1/3

...

  • +

...

  • stop*2/3,

...

  • stop},

...

  • and

...

  • so

...

  • on.

...

A

...

readback

...

channel

...

may

...

also

...

be

...

entered

...

if

...

there

...

is

...

a

...

need

...

to

...

separately

...

monitor

...

the

...

precision

...

with

...

which

...

the

...

control

...

variable

...

makes

...

its

...

steps.

...

  In

...

this

...

instance,

...

the

...

"offset"

...

specifies

...

any

...

systematic

...

difference

...

of

...

the

...

readback

...

value

...

from

...

the

...

control

...

value,

...

and

...

the

...

"margin"

...

specifies

...

how

...

accurately

...

the

...

readback

...

channel

...

(minus

...

offset)

...

must

...

match

...

the

...

control

...

channel

...

for

...

data

...

acquisition

...

to

...

continue. 

Image Added

For the DAQ trigger scan, the user provides the number of steps, the pulse number to scan, the width of the pulse (in seconds), and the begin and end delay settings of the pulse (also in seconds).  The scan points for the delay values are calculated linearly from the steps, begin, and end values as described above for EPICS PVs.

Finally, the user enters either the number of events to acquire at each step or the amount of time with which to acquire events at each step.  Clicking "Apply" will interrupt any current running and start the scan in a new run.  The scan will proceed automatically to completion.  It may be interrupted manually by choosing "EndRunning" from the "Target State" button.  "BeginRunning" will launch another scan as long as the "Scan" button remains highlighted.  Close the Scan dialog to disable scans.

...

Launching Scans Remotely (scripted)

...

The DAQ system also supports a socket interface to allow scripts or other processes to make acquisition requests of the DAQ.  In this way, the script becomes responsible for iterating the scan variable (setting an EPICS PV) and commanding the DAQ to acquire data at each scan point.  Thus, non-linear scans or multi-dimensional scans may be implemented as needed by the user.

An example Python script for running a scan may look like this:

Code Block

import socket
import DaqScan
import ConfigDb

if __name__ == "__main__":
#
#  Connect the socket to the appropriate hutch DAQ system
#
    s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
    s.connect((options.host,options.port))
#
#  Get the current configuration key in use and set the value to be used
#   (assumes we are using the same detector configuration as currently running)
#
    cdb = ConfigDb.Db()
    cdb.recv_path(s)
    key = DaqScan.DAQKey(s)
    key.set(key.value)
#
#  Send the structure the first time to put the control variables
#    in the file header
#
    data = DaqScan.DAQData()
    data.setevents(0)
    data.addcontrol(DaqScan.ControlPV('EXAMPLEPV1',0))
    data.addcontrol(DaqScan.ControlPV('EXAMPLEPV2',0))
    data.addmonitor(DaqScan.MonitorPV('BEAM:LCLS:ELEC:Q',options.qbeam,1.))
    data.send(s)
#
#  Wait for the DAQ to declare 'configured'
#
    result = DaqScan.DAQStatus(s)
    print "Configured."
#
#  Wait for the user to declare 'ready'
#    Setting up monitoring displays for example
#
    ready = raw_input('--Hit Enter when Ready-->')
    for cycle in range(options.cycles):
        data = DaqScan.DAQData()
        data.setevents(options.events)
        data.addcontrol(DaqScan.ControlPV('EXAMPLEPV1',cycle))
        data.addcontrol(DaqScan.ControlPV('EXAMPLEPV2',100-cycle))
        data.addmonitor(DaqScan.MonitorPV('BEAM:LCLS:ELEC:Q',options.qbeam,1.))
        print "Cycle ", cycle
        data.send(s)
        result = DaqScan.DAQStatus(s)  # wait for enabled , then enable the EVR sequence
        result = DaqScan.DAQStatus(s)  # wait for disabled, then disable the EVR sequence
#
#  Wait for the user to declare 'done'
#    Saving monitoring displays for example
#
    ready = raw_input('--Hit Enter when Done-->')
    s.close()

Running the sequencer

More info here

Recovering from errors:  restarting the DAQ

More info here