|
1 | 1 | # Run Control
|
2 | 2 |
|
3 |
| -Run control is implemented purely in EPICS. A DB file support/RunControl/runcontrol.db can be loaded into any IOC and given the name of each PV that needs this feature. It defines a few PVs for this: |
| 3 | +Run control is implemented purely in EPICS, by [the `RUNCTRL` ioc](https://github.com/ISISComputingGroup/EPICS-ioc/tree/master/RUNCTRL), |
| 4 | +which uses [the `runcontrol` support module](https://github.com/isiscomputinggroup/epics-runcontrol). |
4 | 5 |
|
| 6 | +The run control PVs are in the form: |
5 | 7 | ```
|
6 |
| -$(PV):RC:LOW |
7 |
| -$(PV):RC:HIGH |
8 |
| -$(PV):RC:ENABLE |
9 |
| -$(PV):RC:INRANGE |
| 8 | +IN:INSTNAME:CS:SB:block_name:RC:LOW # Run-control low limit |
| 9 | +IN:INSTNAME:CS:SB:block_name:RC:HIGH # Run-control high limit |
| 10 | +IN:INSTNAME:CS:SB:block_name:RC:ENABLE # Whether run-control is enabled |
| 11 | +IN:INSTNAME:CS:SB:block_name:RC:INRANGE # Whether the block is currently in range |
10 | 12 | ```
|
11 | 13 |
|
12 |
| -When a values is out of range, it will push this information into variables managed by INSTETC which will ultimately pause/resume data collection. Feedback can be obtained via: |
| 14 | +When a value is out of range, it will push this information into variables managed by the RUNCTRL ioc, |
| 15 | +which will ultimately pause/resume data collection. Feedback can be obtained via the following PVs: |
13 | 16 |
|
14 | 17 | ```
|
15 |
| -$(P):CS:RC:OUT:CNT number of items out of range |
16 |
| -$(P):CS:RC:OUT:LIST names of PVs out of range (space separated in char waveform) |
| 18 | +IN:INSTNAME:CS:RC:OUT:CNT # number of items out of range |
| 19 | +IN:INSTNAME:CS:RC:OUT:LIST # names of PVs out of range (space separated in char waveform) |
17 | 20 | ```
|
18 | 21 |
|
19 |
| -CA monitors can be posted on either `CNT` or `LIST`, `CNT` is guaranteed to see all transitions, `LIST` will be up to date but may not see all transitions |
| 22 | +Channel access monitors can be posted on either `CNT` or `LIST`, `CNT` is guaranteed to see all transitions, |
| 23 | +`LIST` will be up to date but may not see all transitions. |
20 | 24 |
|
21 |
| -(`LIST` is actually a set which can be added to/removed from via PVs; it is called generically via aSub records so provides a general mechanism for keeping a more readable list of things if we need it). |
22 |
| - |
23 |
| -Run `testRunControl` from `iocBoot` for an example. You need to start `INSTETC` first if you wish to use the above CS variables. |
24 |
| - |
25 |
| -To do run control on SECI blocks a separate IOC ioc/RUNCTRL will be used. This will need to be restarted by the blockserver as appropriate and the blockserver will also need to (re)write a startup file for it containing lines like: |
| 25 | +The blockserver is responsible for configuring the `RUNCTRL` ioc with the current list of blocks; it does |
| 26 | +this by writing to the file |
| 27 | +``` |
| 28 | +C:\Instrument\Settings\config\<machine>\configurations\rc_settings.cmd |
| 29 | +``` |
| 30 | +which contains a set of `dbLoadRecords` instructions, which are picked up on a subsequent restart of the |
| 31 | +`RUNCTRL` ioc, which the blockserver also performs. |
26 | 32 |
|
27 |
| -The system is implemented by a set of db files in `support/RunControl` called `gencontrol.db` and `gencontrolMgr.db`. These define logic for calling an action when values go in and out of range, as well as adding case insensitive aliases. In the ioc/RUNCONTROL these are loaded twice to create: |
28 |
| -* :RC: (run control) PVs who allow setting limits and triggering WAITING on out of range |
29 |
| -* :AC: (alert control) PVs who allow setting limits and triggering sending a message on out of range |
| 33 | +The system is implemented by a set of db files in `support/RunControl` called `gencontrol.db` and `gencontrolMgr.db`. |
| 34 | +These define logic for calling an action when values go in and out of range, as well as adding case insensitive |
| 35 | +aliases. In the `RUNCTRL` ioc, these are loaded twice to create: |
| 36 | +* `:RC:` (run control) PVs which trigger a DAE waiting state when out of range |
| 37 | +* `:AC:` (alert control) PVs which trigger sending a message when out of range |
30 | 38 |
|
31 |
| -On LOQ a separate :DC: instance is also created, this calls a procedure to put in the aperture when the detector count rate exceeds a limit |
| 39 | +On LOQ, a separate `:DC:` instance is also created, this calls a procedure to put in the aperture when the |
| 40 | +detector count rate exceeds a limit. |
32 | 41 |
|
33 | 42 | ## Troubleshooting
|
34 | 43 |
|
35 |
| -If the system gets stuck in a WAITING state with no blocks being outside of runcontrol limits, then you can force a resync of the system with e.g. for OFFSPEC `caput IN:OFFSPEC:CS:RC:SYNC:SP 1` |
| 44 | +If the system gets stuck in a WAITING state with no blocks being outside runcontrol limits, |
| 45 | +then you can force a resync of the system with |
| 46 | +``` |
| 47 | +caput %MYPVPREFIX%CS:RC:SYNC:SP 1 |
| 48 | +``` |
0 commit comments