rename from counterbox to daq
This commit is contained in:
37
README.md
37
README.md
@ -10,7 +10,8 @@ generation systems.
|
||||
## How to Use
|
||||
|
||||
Unless a custom database is needed, a device can be configure simply by setting
|
||||
the required environment variables when calling the correct counterbox script.
|
||||
the required environment variables when calling the correct DAQ interface
|
||||
script.
|
||||
|
||||
Required Variables
|
||||
|
||||
@ -18,8 +19,8 @@ Required Variables
|
||||
|----------------------|-----------------------------------------|
|
||||
| INSTR | Prefix of all device specific PVs |
|
||||
| NAME | First field in all PVs after Prefix |
|
||||
| CNTBOX\_IP | Network IP of device |
|
||||
| CNTBOX\_PORT | Network Port of device |
|
||||
| DAQ\_IP | Network IP of device |
|
||||
| DAQ\_PORT | Network Port of device |
|
||||
|
||||
All PVs take the form
|
||||
|
||||
@ -29,16 +30,16 @@ $(INSTR)$(NAME):*
|
||||
|
||||
Available device startup scripts
|
||||
|
||||
* scripts/counterbox\_4ch.cmd
|
||||
* scripts/counterbox\_8ch.cmd
|
||||
* scripts/counterbox\_v2.cmd
|
||||
* scripts/daq\_4ch.cmd
|
||||
* scripts/daq\_8ch.cmd
|
||||
* scripts/daq\_2nd\_gen.cmd
|
||||
|
||||
A device can be configured using one of the startup scripts as follows
|
||||
|
||||
```
|
||||
epicsEnvSet("INSTR", "SQ:INSTRUMENT:") # can also be set in runScript call
|
||||
|
||||
runScript "$(counterbox_DIR)counterbox_v2.cmd" "NAME=COUNTERBOX, CNTBOX_IP=TestInst-DAQ1, CNTBOX_PORT=2000"
|
||||
runScript "$(sinqDAQ_DIR)daq_2nd_gen.cmd" "NAME=DAQ, DAQ_IP=TestInst-DAQ1, DAQ_PORT=2000"
|
||||
```
|
||||
|
||||
## PVs of Interest
|
||||
@ -52,8 +53,8 @@ runScript "$(counterbox_DIR)counterbox_v2.cmd" "NAME=COUNTERBOX, CNTBOX_IP=TestI
|
||||
| \$(INSTR)\$(NAME):PRESET-TIME | Run count until specified pv value in seconds reached |
|
||||
| \$(INSTR)\$(NAME):THRESHOLD | Minimum rate for counting to preceed. (has RBV) |
|
||||
| \$(INSTR)\$(NAME):THRESHOLD-MONITOR | Channel monitored for minimum rate (has RBV) |
|
||||
| \$(INSTR)\$(NAME):ELAPSED-TIME | Time Counterbox has been measuring for |
|
||||
| \$(INSTR)\$(NAME):M_ | Current count on channel. (1-10 depending on box) |
|
||||
| \$(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) |
|
||||
|
||||
## Generating Test Signals
|
||||
@ -65,34 +66,34 @@ runtime via the following
|
||||
|
||||
```
|
||||
epicsEnvSet("LOAD_TEST_PVS","")
|
||||
runScript "$(counterbox_DIR)counterbox_v2.cmd" "NAME=COUNTERBOX, CNTBOX_IP=TestInst-DAQ1, CNTBOX_PORT=2000"
|
||||
runScript "$(sinqDAQ_DIR)daq_2nd_gen.cmd" "NAME=DAQ, DAQ_IP=TestInst-DAQ1, DAQ_PORT=2000"
|
||||
```
|
||||
|
||||
See the file [counterbox\_v2\_test.db](./db/counterbox_v2_test.db)
|
||||
See the file [daq\_2nd\_gen\_test.db](./db/daq_2nd_gen_test.db)
|
||||
|
||||
## Simulation
|
||||
|
||||
Simulation of the Hardware can be toggled on as follows:
|
||||
|
||||
```
|
||||
epicsEnvSet("SET_SIM_MODE","") # run counterbox simulation instead of connecting to actual box
|
||||
runScript "$(counterbox_DIR)counterbox_v2.cmd" "NAME=CB_TEST, CNTBOX_IP=localhost, CNTBOX_PORT=2000"
|
||||
epicsEnvSet("SET_SIM_MODE","") # run DAQ simulation instead of connecting to actual system
|
||||
runScript "$(sinqDAQ_DIR)daq_2nd_gen.cmd" "NAME=CB_TEST, DAQ_IP=localhost, DAQ_PORT=2000"
|
||||
```
|
||||
|
||||
In such a case, the provided `CNTBOX_IP` is ignored, and a python program
|
||||
In such a case, the provided `DAQ_IP` is ignored, and a python program
|
||||
simulating the hardware is started in the background, listening at the
|
||||
specified `CNTBOX_PORT`. So, if you have multiple devices listening on the same
|
||||
specified `DAQ_PORT`. So, if you have multiple devices listening on the same
|
||||
port, you might have to change this port value of one of the devices when
|
||||
simulating hardware. You can then interact with the PVs as with the normal
|
||||
hardware. Keep in mind, however, that not all functionality has been
|
||||
implemented.
|
||||
|
||||
See [sim/counterbox\_sim.py](sim/counterbox_sim.py).
|
||||
See [sim/daq\_sim.py](sim/daq_sim.py).
|
||||
|
||||
## Testing
|
||||
|
||||
An IOC with the counterbox\_v2 started in simulation mode can be started via
|
||||
the [test/ioc.sh](test/ioc.sh) script.
|
||||
An IOC with the 2nd generation DAQ started in simulation mode can be started
|
||||
via the [test/ioc.sh](test/ioc.sh) script.
|
||||
|
||||
There is also a simple automated test that can be run for a simple check of
|
||||
functionality and that the PVs load [test/test.py](test/test.py).
|
||||
|
Reference in New Issue
Block a user