Skip to content

Commit 07d5d09

Browse files
committed
Add purchasing devices guide
1 parent d59e986 commit 07d5d09

File tree

7 files changed

+96
-90
lines changed

7 files changed

+96
-90
lines changed

doc/Glossary.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,11 @@ The version of [IBEX](#ibex) to be deployed.
233233

234234
## SECI
235235

236-
**Sample Environment Control Interface. An old instrument control system, used before IBEX. No longer in use on any instruments. Written in C# and incorporating [LabVIEW](#labview) drivers for the sample environment equipment.
236+
**Sample Environment Control Interface**. An old instrument control system, used before IBEX. No longer in use on any instruments. Written in C# and incorporating [LabVIEW](#labview) drivers for the sample environment equipment.
237+
238+
## SECoP
239+
240+
**Sample Environment Communication Protocol**. See {external+secop:doc}`SECoP docs <index>` for details.
237241

238242
## Sequencer
239243

doc/IOCs.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,6 @@ If you're not creating a StreamDevice IOC or you would like to know how an IOC c
8080
* [IOC Testing framework](iocs/testing/IOC-Testing-Framework)
8181
* [Complexity of LabVIEW Drivers](system_components/labview/Complexity-of-LabVIEW-Drivers)
8282
* [Typical start up log for an ioc](iocs/troubleshooting/IOC-Start-Example)
83-
* [Some Design thoughts for a serial/Ethernet IOC](iocs/tips_tricks/Some-Design-thoughts-for-a-serial-or-Ethernet-IOC)
8483
* [Reducing build dependencies for older iocs](iocs/compiling/Reducing-Build-Dependencies)
8584
* [Template Substitutions](iocs/tools/Template-Substitutions)
8685
* [Creating a State Machine](iocs/tools/Creating-a-State-Machine-(Sequencer))

doc/conf.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,4 +112,5 @@
112112
"genie_python": ("https://isiscomputinggroup.github.io/genie/", None),
113113
"ibex_bluesky_core": ("https://isiscomputinggroup.github.io/ibex_bluesky_core/", None),
114114
"matplotlib": ("https://matplotlib.org/stable/", None),
115+
"secop": ("https://sampleenvironment.github.io/secop-site/", None),
115116
}
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# Purchasing new equipment
2+
3+
```{toctree}
4+
:hidden:
5+
:glob:
6+
:titlesonly:
7+
:maxdepth: 1
8+
9+
purchasing_new_equipment/*
10+
```
11+
12+
```{note}
13+
This page relates to "slow" control; if looking at items like cameras, DAQ, or items at a higher frequency than 10Hz, please {external+ibex_user_manual:ref}`contact Experiment Controls <report_a_problem>`.
14+
```
15+
16+
## Off the shelf devices
17+
If purchasing "simple" off the shelf devices (e.g. power supplies, temperature controllers, gaussmeters, etc.) please bear the following in mind:
18+
- The device itself needs to allow an external computer to control it.
19+
- Only certain transport layers will interact with our architecture readily. If it is not in this list, we are unlikely to be able to integrate it easily, so please engage with the group as soon as possible. This list is in order of preference.
20+
* **Serial** (RS232 is preferred, but RS422 and RS485 can be accommodated with advanced warning). Ideally DB9 or DB25 connectors.
21+
* **Ethernet** - but please make sure there is provision for updates to the device system. Ideally this would be DHCP capable, but should also allow for configuration of a static IP.
22+
* **GPIB**
23+
- If the only connection option available is **USB**, then you **MUST** get in touch with us early, as the options for integrating these devices are limited, and it may need a dedicated computer purchasing.
24+
- With regards to the control protocol, the following can all be integrated easily, other protocols would need to be discussed:
25+
* {external+secop:doc}`SECoP <index>`
26+
* [SCPI](https://en.wikipedia.org/wiki/Standard_Commands_for_Programmable_Instruments)
27+
* [OPCUA](https://en.wikipedia.org/wiki/OPC_Unified_Architecture)
28+
* ASCII based command sets (please see the {doc}`purchasing_new_equipment/Designing-Protocols` guide for more details of preferences of how these would look)
29+
* [Modbus](https://en.wikipedia.org/wiki/Modbus)
30+
31+
If a protocol needs to be designed, please consider {external+secop:doc}`SECoP <index>` first, or read the {doc}`purchasing_new_equipment/Designing-Protocols` guide.
32+
33+
As much warning as possible is needed to ensure availability of new devices within IBEX; please {external+ibex_user_manual:ref}`contact Experiment Controls <report_a_problem>` as soon as possible when considering the purchase of a new device.
34+
35+
## Systems which integrate a Computer
36+
37+
It is not unusual for moderately complex systems to require a computer to provide suitable control. This raises greater concerns for ISIS generally, as well as the Experiment Controls team.
38+
39+
Agreement needs to be ensured during tender and selection in relation to:
40+
- Who supplies the computer
41+
- Who maintains it
42+
- Who ensures it is kept up to date
43+
- Who deals with changes when the hardware must be updated or the operating system updates cause something to function in an unanticipated manner
44+
- Recovery procedures for failure conditions
45+
- Who is responsible for the cybersecurity level and maintenance of this computer
46+
47+
Service level agreements for any of these issues should also be agreed. These should match the expected lifetime of the item being purchased. If this is not possible, then an agreement as to the risk needs to be made, and considerations for ways to mitigate it which do not put undue stress on the resources in question.
48+
49+
Conversations with the Experiment Controls team from the outset would be beneficial for such items.
50+
51+
Updates for security aspects are especially important for any item which is placed on a network, there is greater grace available should the communication between IBEX and the device be via a transport layer other than ethernet as the computer can be kept off a network.
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
{#designing_comms_protocol}
2+
# Designing protocols
3+
4+
```{important}
5+
If you are considering purshasing a new device or designing a new protocol, please read the
6+
{doc}`../Purchasing-New-Equipment` page before continuing with this guide.
7+
```
8+
9+
Ideally the transport layer will be one of those listed in the {doc}`../Purchasing-New-Equipment` guide. If a protocol needs to be developed, we would advocate using {external+secop:doc}`SECoP <index>`. If that is not an option for you, then the following guidelines allow for easier integration.
10+
11+
## Termination characters
12+
13+
It is very helpful for devices to terminate their messages with a unique set of characters that do not appear elsewhere in the message. A common example of a terminator is a carriage-return, line-feed pair (`<CR><LF>`, `\r\n`, HEX: `0D 0A`).
14+
15+
## Readability/encoding
16+
17+
Commands to a device are ideally human-readable so that they can be used via terminal emulators and the device interacted with. Many protocols use an ASCII encoding.
18+
19+
For example, a temperature controller might implement commands like the following:
20+
21+
```
22+
Driver to device:
23+
temp?<CR><LF>
24+
(HEX: 74 65 6D 70 3F 0D 0A)
25+
26+
Device to driver:
27+
temp=30.5<CR><LF>
28+
(HEX: 74 65 6D 70 3D 33 30 2E 35 0D 0A)
29+
```
30+
31+
## Replies
32+
33+
All commands to a device, whether setting or reading a value, should ideally return some form of reply. This helps the control system to distinguish between a device which is unplugged and an incorrect or invalid command.
34+
35+
Where no data needs to be returned, a device could generate either an `ACK` ASCII control code or a reply string like `OK` or similar response. Commands which are invalid or rejected could return a `NAK` ASCII control code, or a text string like `NOK` or `error` or similar responses.
36+
37+
## Unsolicited messages
38+
39+
We prefer not to receive unsolicited messages. It is better for a driver to explicitly ask for a parameter each time it is required.

doc/iocs/tips_tricks/Communication-layer-likes-and-dislikes-(protocol,-new-devices).md

Lines changed: 0 additions & 69 deletions
This file was deleted.

doc/iocs/tips_tricks/Some-Design-thoughts-for-a-serial-or-Ethernet-IOC.md

Lines changed: 0 additions & 19 deletions
This file was deleted.

0 commit comments

Comments
 (0)