You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/tutorials/ioc_changes2.md
+15-38Lines changed: 15 additions & 38 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -32,11 +32,7 @@ For this exercise we will work locally inside the `ioc-adsimdetector`
32
32
developer container. Following tutorials will show how to fork repositories
33
33
and push changes back to GitHub
34
34
35
-
For this exercise we will be using an example IOC Instance to test our changes.
36
-
Instead of working with a beamline repository, we will use the example ioc instance
37
-
inside `ioc-adsimdetector`. It is a good idea for Generic IOC authors to
38
-
include an example IOC Instance in their repository for testing changes in
39
-
isolation.
35
+
For this exercise we will be using an example IOC Instance to test our changes. Instead of working with a beamline repository, we will use the example ioc instance inside `ioc-adsimdetector`. It is a good idea for Generic IOC authors to include an example IOC Instance in their repository for testing changes in isolation. Obviously, this is easy for a simulation IOC, for IOCs that normally connect to real hardware this would require an additional simulator of some kind.
40
36
41
37
## Preparation
42
38
@@ -49,19 +45,16 @@ cd ioc-adsimdetector
49
45
./build
50
46
code .
51
47
# Choose "Reopen in Container"
48
+
# Or ctrl+shift+p and choose "Remote-Containers: Reopen in Container"
52
49
```
53
50
54
51
Note that if you do not see the prompt to reopen in container, you can open
55
52
the `Remote` menu with `Ctrl+Alt+O` and select `Reopen in Container`.
56
53
57
54
The `build` script does two things.
58
55
59
-
- it fetches the git submodule called `ibek-support`. This submodule is shared
60
-
between all the EPICS IOC container images and contains the support YAML files
61
-
that tell `ibek` how to build support modules inside the container
62
-
environment and how to use them at runtime.
63
-
- it builds the Generic IOC container image developer target locally using
64
-
podman or docker.
56
+
- it fetches the git submodule called `ibek-support`. This submodule is shared between all the Generic IOC container images and contains the support YAML files that tell `ibek` how to build support modules inside the container environment and how to use them at runtime.
57
+
- it builds the Generic IOC container image developer target locally using podman or docker.
65
58
66
59
## Verify the Example IOC Instance is working
67
60
@@ -71,31 +64,15 @@ that need to be done before you can run an IOC instance inside of it.
71
64
- Build the IOC binary
72
65
- Select an IOC instance definition to run
73
66
74
-
The folder `ioc` inside of the `ioc-adsimdetector` is where the IOC source code
75
-
resided. However our containers always make a symlink to this folder at
76
-
`/epics/ioc`. This is so that it is always in the same place and can easily be
77
-
found by ibek (and the developer!). Therefore you can build the binary with the
67
+
The folder `ioc` inside of the `ioc-adsimdetector` is where the IOC source code resided. However our containers always make a symlink to this folder at `/epics/ioc`. This is so that it is always in the same place and can easily be found by ibek (and the developer!). Therefore you can build the IOC binary with the
78
68
following command:
79
69
80
70
```console
81
71
cd /epics/ioc
82
72
make
83
73
```
84
74
85
-
:::{note}
86
-
Note that we are required to build the IOC.
87
-
This is even though the container you are using already had the IOC
88
-
source code built by its Dockerfile (`ioc-adsimdetector/Dockerfile`
89
-
contains the same command).
90
-
91
-
For a detailed explanation of why this is the case see {any}`ioc-source`
92
-
:::
93
-
94
-
The IOC instance definition is a YAML file that tells `ibek` what the runtime
95
-
assets (ie. EPICS DB and startup script) should look like. Previous tutorials
96
-
selected the IOC instance definition from a beamline repository. In this case
97
-
we will use the example IOC instance that comes with `ioc-adsimdetector`. The
98
-
following command will select the example IOC instance:
75
+
The IOC instance definition is a YAML file that tells `ibek` what the runtime assets (ie. EPICS DB and startup script) should look like. Previous tutorials selected the IOC instance definition from a beamline repository. In this case we will use the example IOC instance that comes with `ioc-adsimdetector`. The following command will select the example IOC instance:
99
76
100
77
```console
101
78
ibek dev instance /workspaces/ioc-adsimdetector/ioc_examples/bl01t-ea-test-02
@@ -128,15 +105,15 @@ pip install c2dataviewer
128
105
Run the `c2dv` tool and connect it to our IOCs PVA output:
129
106
130
107
```console
131
-
c2dv --pv BL01T-EA-TST-03:PVA:OUTPUT &
108
+
c2dv --pv BL01T-EA-TST-02:PVA:OUTPUT &
132
109
```
133
110
134
111
Back inside the developer container, you can now start the detector and
135
112
the PVA plugin, by opening a new terminal and running the following:
136
113
137
114
```console
138
-
caput BL01T-EA-TST-03:PVA:EnableCallbacks 1
139
-
caput BL01T-EA-TST-03:CAM:Acquire 1
115
+
caput BL01T-EA-TST-02:PVA:EnableCallbacks 1
116
+
caput BL01T-EA-TST-02:DET:Acquire 1
140
117
```
141
118
142
119
You should see the moving image in the `c2dv` window. We now have a working
@@ -154,8 +131,8 @@ YAML file. We will change the startup script that it generates so that the
154
131
simulation detector is automatically started when the IOC starts.
155
132
156
133
To make this change we just need to have the startup script set the values
0 commit comments