Skip to content

Commit 0732a9b

Browse files
Additional documentation on testing.
1 parent 9f7fe00 commit 0732a9b

File tree

1 file changed

+47
-58
lines changed

1 file changed

+47
-58
lines changed

doc/specific_iocs/cryogenics/Oxford-Instruments-Mercury-IPS.md

Lines changed: 47 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,11 @@ noticed, along with additional, undocumented status, such as "Magnet Safety".
2929
It has not been possible to test all alarm scenarios with the IPS unit and as such unable to fully
3030
ascertain that all the expected message strings are correct - they may need to be adjusted later on,
3131
if/when they arise.
32+
Tested and verified to date:
33+
- PSU board open circuit
34+
- PSU board short circuit
35+
- Temperature board open circuit
36+
- Temperature board short circuit
3237

3338
The support module exports an aSub record subroutine to facilitate handling of the responses to
3439
`READ:SYS:ALRM`, which is not feasible with a StreamDevice protocol handler.
@@ -107,56 +112,27 @@ temperature sensor will be `MB1.T1`, the UID for the level meter will be `DB1.L1
107112
the magnet supply will be `GRPZ` for all 4 of the systems.
108113
The 10T system will have an additional temperature sensor `DB8.T1` and a pressure sensor `DB5.P1`.
109114

110-
It appears that:
111-
devices connected to the motherboard are prefixed: `MB1`\
112-
devices connected to a daughter-board are prefixed: `DB<slot #>`
113-
114-
115-
Conversation between Chris Lawson and Oxford Instruments (18 Feb 2025)
116-
SCPI Equivalents:
117-
Yes we are looking for the equivalent between Mercury iPS and iPS-120 control syntax. It may be
118-
some things are missing/changed, but wondered if there was a table of all of this somewhere
119-
internally.
120-
I do not think we have a document which succinctly summarises differences between Mercury iPS and
121-
the IPS-120 in the context of their remote command sets.
122-
123-
Q: What are the new commands to use on the Mercury iPS which are equivalent to the commands from
124-
the old iPS-120 below?\
125-
`F17` (Trip Current)\
126-
`F19` (Trip Field)\
127-
`Xmn`\
128-
`m = 1` quenched\
129-
`m = 2` overheated
115+
Devices connected to the motherboard are prefixed: `MB1`\
116+
Devices connected to a daughter-board are prefixed: `DB<slot #>`
117+
118+
### A comparison of availability of legacy vs SCPI features
119+
| Function | Legacy | SCPI |
120+
|---------------------------------|--------|---------------|
121+
| Trip current readback | `F17` | Not available |
122+
| Trip field readback | `F19` | Not available |
123+
| Ramp mode reporting (fast/slow) | Yes | Not available |
124+
| Status reporting | Yes | Detailed |
125+
| He Level reporting | No | Yes |
126+
| N2 Level reporting | No | Yes |
130127

131-
Answer from Oxford Instruments:\
132-
<em>`F17/F19`\
133-
I assume that you mean legacy commands `R17` (Trip Current) and `R19` (Trip Field).
134-
This functionality is preserved when Mercury iPS remote interface is set to use legacy command set.
135-
But when using "SCPI-style" command set, this exact information cannot be retrieved directly from
136-
the iPS.
137-
Under certain (limited) circumstances `R17/R19` are equivalent to `DEV:<UID>:PSU:SIG:PCUR` and
138-
`DEV:<UID>:PSU:SIG:PFLD` (note that UID must be a group, not an individual PSU).
139128

140-
`Xmn`
141-
There is no equivalent for `X` (examine status) command in the "SCPI-style" command set.
142-
As far as the first portion (`mn`) of the reply to `X` command is concerned, certain `m` values
143-
correspond loosely to the bits of the status word in Mercury iPS group device
144-
(`READ:DEV:<UID>:PSU:STAT`).
145-
The `n` part is not applicable to the Mercury iPS at all.
146-
</em>
147-
148-
Q: For `Xmn`, I note that these may be dealt with by alarms which can be read with
149-
`READ:DEV:<UID>:PSU:STAT` in some hex format which is not defined in the manual
150-
(p. 162 in Issue 20). Could this be clarified?\
151-
152-
Answer from Oxford Instruments:\
153-
<em>
154-
`READ:DEV:<UID>:PSU:STAT`\
129+
130+
### PSU Status:
131+
Using the SCPI command: `READ:DEV:<UID>:PSU:STAT`\
155132
It is important to note that the STATus word should be examined at the group device level,
156133
not the individual PSU level.\
157134
It is also very important to mask out (ignore) all other bits in this 32-bit word (i.e. ones
158135
not defined in the list given below):\
159-
</em>
160136

161137
| Status | Bit value |
162138
| ------ | --------- |
@@ -177,21 +153,8 @@ not defined in the list given below):\
177153
| Voltage ADC error | 00010000 |
178154
| Current ADC error | 00020000 |
179155

180-
Q: Also, is it possible to read if the Mercury iPS has tripped due to a low helium level signal
181-
from the level card (something like the `X` command on the old `iLM200` which has a low level flag at
182-
bit 5 of S)?
183-
184-
Answer:\
185-
<em>
186-
Low helium level
187-
188-
There is no direct indication of the fact that iPS has run the magnet down as a result of helium
189-
level dropping below a set threshold.\
190-
It is possible to read both the helium level (`DEV:<UID>:LVL:SIG:HEL`) and the configured threshold
191-
for low helium alarm (`DEV:<UID>:LVL:HEL:LOW`).
192-
</em>
193156

194-
## Compromises with SCPI command set and EPICS
157+
### Compromises with SCPI command set and EPICS
195158
`STS:SYSTEM:LIMIT`\
196159
Is an `mbbi` and has has 5 possible values:\
197160
- 0: "Normal"
@@ -204,3 +167,29 @@ The limit flags came from the legacy command: `Xmn`
204167
with the index denoted by the `n` value.
205168
SCPI does not provide this information.
206169

170+
## IOC Test Framework:
171+
With support for the new SCPI based IPS command set, there are now two sets of StreamDevice
172+
protocols. The appropriate protocol is implemented by use of a macro (`PROTOCOL` = `SCPI` | `LEGACY`) defined
173+
prior to running the IOC.
174+
175+
The test framework has been adapted by splitting the existing legacy tests into common tests
176+
and tests specific to either control interface. For instance, the legacy command set knows
177+
nothing about cryogen levels, which the SCPI command set does.
178+
179+
The IOC support provides two protocol files:
180+
- Legacy: OxInstIPS.protocol
181+
- SCPI: OxInstIPS_SCPI.protocol
182+
183+
The lewis emulator and IOC test framework for the Mercury IPS is located within the IPS support
184+
module. Manually running the tests is achievable using the following approach:
185+
1. `cd` to `C:\Instrument\Apps\EPICS\support\IPS\master\system_tests`
186+
2. `run_tests.bat -t ips_scpi -a -f` - this will run all the SCPI specific tests
187+
3. `run_tests.bat -t ips -a -f` - this will run all the legacy specific tests
188+
4. To run a specific test, use something like: `run_tests.bat -t ips_scpi.test_WHEN_inductance_set_via_backdoor_THEN_value_in_ioc_updates_0__0_12345 -a -f`
189+
- Note that the -a flag simply prompts as to whether to run tests or simply run the emulator.
190+
- The -f flag forces a fast fail on error and no further tests are run.
191+
192+
193+
## Related Documentation:
194+
[Oxford Instruments IPS](https://isiscomputinggroup.github.io/ibex_developers_manual/specific_iocs/cryogenics/Oxford-Instruments-IPS.html)
195+

0 commit comments

Comments
 (0)