Files
sinqSPS/README.md
2025-04-24 17:41:20 +02:00

30 lines
1.1 KiB
Markdown

# sinqSPS
A collection of standardised SPS databases (or "modules") for interacting with
the control unit itself and other external hardware.
This makes use of the
[s7plcFW Epics driver](https://gitea.psi.ch/lin-epics-modules/sinqS7plcFW) for
communication with the Siemens 7th Generation PLC via the Fetch-Write Protocol.
# Shutter Module
This script allows the shutter at the instrument to be opened and closed as
well as providing access to many status bits and messages.
```
epicsEnvSet("INSTR", "SQ:INSTRUMENT:") # can also be set in runScript call
require sinqSPS
runScript("$(sinqSPS_DIR)shutter.cmd","SPS_IP=172.28.101.26,FETCH_DB=210")
```
The directly exposed database fields can be found in
[shutter.substitutions](./templates/shutter.substitutions).
A simplified status value and status message is created from these fields via
the logic in [shutter.db](./db/shutter.db).
The corresponding nicos device is located at
[nicos\_sinq/devices/epics/shutter.py](https://gitea.psi.ch/lin-instrument-computers/Nicos/src/branch/release-3.12/nicos_sinq/devices/epics/shutter.py).