adds gating stuff, writes all thresholds simultaneously, updates readme with example
This commit is contained in:
100
README.md
100
README.md
@@ -56,6 +56,7 @@ runScript "$(sinqDAQ_DIR)daq_2nd_gen.cmd" "NAME=DAQ, DAQ_IP=TestInst-DAQ1, DAQ_P
|
||||
| \$(INSTR)\$(NAME):ELAPSED-TIME | Time DAQ has been measuring for |
|
||||
| \$(INSTR)\$(NAME):M_ | Current count on channel. (1-10 depending on DAQ system) |
|
||||
| \$(INSTR)\$(NAME):CHANNELS | Number of available channels (4, 8 or 10) |
|
||||
| \$(INSTR)\$(NAME):GATE-_ | Configuration for Gating in newer hardware |
|
||||
|
||||
## Generating Test Signals
|
||||
|
||||
@@ -71,6 +72,105 @@ runScript "$(sinqDAQ_DIR)daq_2nd_gen.cmd" "NAME=DAQ, DAQ_IP=TestInst-DAQ1, DAQ_P
|
||||
|
||||
See the file [daq\_2nd\_gen\_test.db](./db/daq_2nd_gen_test.db)
|
||||
|
||||
## Nicos Interface
|
||||
|
||||
A set of Nicos devices have been developed which allow control of the Detector
|
||||
Hardware via this Epics Driver. The corresponding code can be found in
|
||||
[sinqdaq.py](https://gitea.psi.ch/lin-instrument-computers/Nicos/src/branch/release-3.12/nicos_sinq/devices/epics/sinqdaq.py).
|
||||
|
||||
## Full Example
|
||||
|
||||
Include the following snippet in your IOC
|
||||
|
||||
```
|
||||
# st.cmd at SINQTEST
|
||||
|
||||
epicsEnvSet("STREAM_PROTOCOL_PATH","./db")
|
||||
epicsEnvSet("INSTR","SQ:SINQTEST:")
|
||||
|
||||
require sinqDAQ
|
||||
runScript "$(sinqDAQ_DIR)daq_2nd_gen.cmd" "NAME=DAQ, DAQ_IP=TestInst-DAQ1, DAQ_PORT=2000"
|
||||
```
|
||||
|
||||
What follows is an example Nicos setup file. The "channels" are created in the loop
|
||||
at the bottom.
|
||||
|
||||
```
|
||||
# DAQDetector.py
|
||||
description = 'Devices for the detectors'
|
||||
|
||||
countprefix = 'SQ:SINQTEST:DAQ'
|
||||
|
||||
devices = dict(
|
||||
ElapsedTime = device(
|
||||
'nicos_sinq.devices.epics.sinqdaq.DAQTime',
|
||||
daqpvprefix = countprefix,
|
||||
),
|
||||
DAQPreset = device(
|
||||
'nicos_sinq.devices.epics.sinqdaq.DAQPreset',
|
||||
description = '2nd Generation Data Acquisition',
|
||||
daqpvprefix = countprefix,
|
||||
channels = [],
|
||||
time_channel = ['ElapsedTime'],
|
||||
),
|
||||
DAQV2 = device(
|
||||
'nicos_sinq.devices.epics.sinqdaq.SinqDetector',
|
||||
description = 'Detector Interface',
|
||||
timers = ['ElapsedTime'],
|
||||
counters = [],
|
||||
monitors = ['DAQPreset'],
|
||||
images = [],
|
||||
others = [],
|
||||
liveinterval = 2,
|
||||
saveintervals = [2]
|
||||
),
|
||||
ThresholdChannel = device(
|
||||
'nicos_sinq.devices.epics.sinqdaq.DAQMinThresholdChannel',
|
||||
daqpvprefix = countprefix,
|
||||
channels = [],
|
||||
visibility = {'metadata', 'namespace'},
|
||||
),
|
||||
Threshold = device(
|
||||
'nicos_sinq.devices.epics.sinqdaq.DAQMinThreshold',
|
||||
daqpvprefix = countprefix,
|
||||
min_rate_channel = 'ThresholdChannel',
|
||||
visibility = {'metadata', 'namespace'},
|
||||
),
|
||||
Gate1 = device(
|
||||
'nicos_sinq.devices.epics.sinqdaq.DAQGate',
|
||||
daqpvprefix = countprefix,
|
||||
channel = 1,
|
||||
visibility = {'metadata', 'namespace'},
|
||||
),
|
||||
Gate2 = device(
|
||||
'nicos_sinq.devices.epics.sinqdaq.DAQGate',
|
||||
daqpvprefix = countprefix,
|
||||
channel = 2,
|
||||
visibility = {'metadata', 'namespace'},
|
||||
),
|
||||
TestGen = device('nicos_sinq.devices.epics.sinqdaq.DAQTestGen',
|
||||
daqpvprefix = countprefix,
|
||||
visibility = {'metadata', 'namespace'},
|
||||
),
|
||||
)
|
||||
|
||||
for i in range(10):
|
||||
devices[f'monitor{i+1}'] = device(
|
||||
'nicos_sinq.devices.epics.sinqdaq.DAQChannel',
|
||||
description = f'Monitor {i + 1}',
|
||||
daqpvprefix = countprefix,
|
||||
channel = i + 1,
|
||||
type = 'monitor',
|
||||
)
|
||||
devices['DAQPreset'][1]['channels'].append(f'monitor{i+1}')
|
||||
devices['ThresholdChannel'][1]['channels'].append(f'monitor{i+1}')
|
||||
devices['DAQV2'][1]['monitors'].append(f'monitor{i+1}')
|
||||
|
||||
startupcode = '''
|
||||
SetDetectors(DAQV2)
|
||||
'''
|
||||
```
|
||||
|
||||
## Simulation
|
||||
|
||||
Simulation of the Hardware can be toggled on as follows:
|
||||
|
||||
Reference in New Issue
Block a user