10
10
# The Port Position status readback. This is actually held by the PreVac Modbus PLC as a number of Coils
11
11
# but the DLS NX102 PLC organises them into bitflags for efficient readback interface.
12
12
#
13
- record(mbbiDirect, "$(device)$(posportprefix )$(posportID):POSSTA") {
13
+ record(mbbiDirect, "$(device)$(_posportprefix )$(posportID):POSSTA") {
14
14
field(DESC, "Sample Manipulator Position $(posportID) Status")
15
15
field(DTYP, "EtherIP")
16
- field(INP, "@$(PORT ) $(TAG ).$(TAGPREFIX )$(TAGNAME )[$(TAGIDX )] B 0")
16
+ field(INP, "@$(_PORT ) $(_TAG ).$(_TAGPREFIX )$(_TAGNAME )[$(_TAGIDX )] B 0")
17
17
field(SCAN, ".5 second")
18
18
field(NOBT, "16")
19
- field(FLNK, "$(device)$(posportprefix )$(posportID):POSSTA:FAN")
19
+ field(FLNK, "$(device)$(_posportprefix )$(posportID):POSSTA:FAN")
20
20
}
21
21
22
22
# Fanout to calculations dependent on the POSSTA value (the port position status).
23
23
#
24
- record(fanout, "$(device)$(posportprefix )$(posportID):POSSTA:FAN") {
24
+ record(fanout, "$(device)$(_posportprefix )$(posportID):POSSTA:FAN") {
25
25
field(DESC, "Propagate posport$(posportID) Status")
26
26
field(SCAN, "Passive")
27
- field(LNK1, "$(device)$(posportprefix )$(posportID):SAMPLEMANIP:READY:CALC")
28
- field(LNK2, "$(device)$(posportprefix )$(posportID):SAMPLEHOLDER:CALC")
27
+ field(LNK1, "$(device)$(_posportprefix )$(posportID):SAMPLEMANIP:READY:CALC")
28
+ field(LNK2, "$(device)$(_posportprefix )$(posportID):SAMPLEHOLDER:CALC")
29
29
}
30
30
31
31
# Records DESC0...15 to set labels to display against the position status word.
@@ -34,153 +34,153 @@ record(fanout, "$(device)$(posportprefix)$(posportID):POSSTA:FAN") {
34
34
# become optional with defaults in the higher level template.
35
35
#
36
36
# Label for bit 0 of the position status word.
37
- record(stringout, "$(device)$(posportprefix )$(posportID):DESC0") {
37
+ record(stringout, "$(device)$(_posportprefix )$(posportID):DESC0") {
38
38
field(DESC, "Description of bit 0 status.")
39
39
field(DTYP, "Soft Channel")
40
40
field(PINI, "YES")
41
- field(VAL, "$(desc_label0 )")
41
+ field(VAL, "$(_desc_label0 )")
42
42
}
43
43
44
44
# Label for bit 1 of the position status word.
45
- record(stringout, "$(device)$(posportprefix )$(posportID):DESC1") {
45
+ record(stringout, "$(device)$(_posportprefix )$(posportID):DESC1") {
46
46
field(DESC, "Description of bit 1 status.")
47
47
field(DTYP, "Soft Channel")
48
48
field(PINI, "YES")
49
- field(VAL, "$(desc_label1 )")
49
+ field(VAL, "$(_desc_label1 )")
50
50
}
51
51
52
52
# Label for bit 2 of the position status word.
53
- record(stringout, "$(device)$(posportprefix )$(posportID):DESC2") {
53
+ record(stringout, "$(device)$(_posportprefix )$(posportID):DESC2") {
54
54
field(DESC, "Description of bit 2 status.")
55
55
field(DTYP, "Soft Channel")
56
56
field(PINI, "YES")
57
- field(VAL, "$(desc_label2 )")
57
+ field(VAL, "$(_desc_label2 )")
58
58
}
59
59
60
60
# Label for bit 3 of the position status word.
61
- record(stringout, "$(device)$(posportprefix )$(posportID):DESC3") {
61
+ record(stringout, "$(device)$(_posportprefix )$(posportID):DESC3") {
62
62
field(DESC, "Description of bit 3 status.")
63
63
field(DTYP, "Soft Channel")
64
64
field(PINI, "YES")
65
- field(VAL, "$(desc_label3 )")
65
+ field(VAL, "$(_desc_label3 )")
66
66
}
67
67
68
68
# Label for bit 4 of the position status word.
69
- record(stringout, "$(device)$(posportprefix )$(posportID):DESC4") {
69
+ record(stringout, "$(device)$(_posportprefix )$(posportID):DESC4") {
70
70
field(DESC, "Description of bit 4 status.")
71
71
field(DTYP, "Soft Channel")
72
72
field(PINI, "YES")
73
- field(VAL, "$(desc_label4 )")
73
+ field(VAL, "$(_desc_label4 )")
74
74
}
75
75
76
76
# Label for bit 5 of the position status word.
77
- record(stringout, "$(device)$(posportprefix )$(posportID):DESC5") {
77
+ record(stringout, "$(device)$(_posportprefix )$(posportID):DESC5") {
78
78
field(DESC, "Description of bit 5 status.")
79
79
field(DTYP, "Soft Channel")
80
80
field(PINI, "YES")
81
- field(VAL, "$(desc_label5 )")
81
+ field(VAL, "$(_desc_label5 )")
82
82
}
83
83
84
84
# Label for bit 6 of the position status word.
85
- record(stringout, "$(device)$(posportprefix )$(posportID):DESC6") {
85
+ record(stringout, "$(device)$(_posportprefix )$(posportID):DESC6") {
86
86
field(DESC, "Description of bit 6 status.")
87
87
field(DTYP, "Soft Channel")
88
88
field(PINI, "YES")
89
- field(VAL, "$(desc_label6 )")
89
+ field(VAL, "$(_desc_label6 )")
90
90
}
91
91
92
92
# Label for bit 7 of the position status word.
93
- record(stringout, "$(device)$(posportprefix )$(posportID):DESC7") {
93
+ record(stringout, "$(device)$(_posportprefix )$(posportID):DESC7") {
94
94
field(DESC, "Description of bit 7 status.")
95
95
field(DTYP, "Soft Channel")
96
96
field(PINI, "YES")
97
- field(VAL, "$(desc_label7 )")
97
+ field(VAL, "$(_desc_label7 )")
98
98
}
99
99
100
100
# Label for bit 8 of the position status word.
101
- record(stringout, "$(device)$(posportprefix )$(posportID):DESC8") {
101
+ record(stringout, "$(device)$(_posportprefix )$(posportID):DESC8") {
102
102
field(DESC, "Description of bit 8 status.")
103
103
field(DTYP, "Soft Channel")
104
104
field(PINI, "YES")
105
- field(VAL, "$(desc_label8 )")
105
+ field(VAL, "$(_desc_label8 )")
106
106
}
107
107
108
108
# Label for bit 9 of the position status word.
109
- record(stringout, "$(device)$(posportprefix )$(posportID):DESC9") {
109
+ record(stringout, "$(device)$(_posportprefix )$(posportID):DESC9") {
110
110
field(DESC, "Description of bit 9 status.")
111
111
field(DTYP, "Soft Channel")
112
112
field(PINI, "YES")
113
- field(VAL, "$(desc_label9 )")
113
+ field(VAL, "$(_desc_label9 )")
114
114
}
115
115
116
116
# Label for bit 10 of the position status word.
117
- record(stringout, "$(device)$(posportprefix )$(posportID):DESC10") {
117
+ record(stringout, "$(device)$(_posportprefix )$(posportID):DESC10") {
118
118
field(DESC, "Description of bit 10 status.")
119
119
field(DTYP, "Soft Channel")
120
120
field(PINI, "YES")
121
- field(VAL, "$(desc_label10 )")
121
+ field(VAL, "$(_desc_label10 )")
122
122
}
123
123
124
124
# Label for bit 11 of the position status word.
125
- record(stringout, "$(device)$(posportprefix )$(posportID):DESC11") {
125
+ record(stringout, "$(device)$(_posportprefix )$(posportID):DESC11") {
126
126
field(DESC, "Description of bit 11 status.")
127
127
field(DTYP, "Soft Channel")
128
128
field(PINI, "YES")
129
- field(VAL, "$(desc_label11 )")
129
+ field(VAL, "$(_desc_label11 )")
130
130
}
131
131
132
132
# Label for bit 12 of the position status word.
133
- record(stringout, "$(device)$(posportprefix )$(posportID):DESC12") {
133
+ record(stringout, "$(device)$(_posportprefix )$(posportID):DESC12") {
134
134
field(DESC, "Description of bit 12 status.")
135
135
field(DTYP, "Soft Channel")
136
136
field(PINI, "YES")
137
- field(VAL, "$(desc_label12 )")
137
+ field(VAL, "$(_desc_label12 )")
138
138
}
139
139
140
140
# Label for bit 13 of the position status word.
141
- record(stringout, "$(device)$(posportprefix )$(posportID):DESC13") {
141
+ record(stringout, "$(device)$(_posportprefix )$(posportID):DESC13") {
142
142
field(DESC, "Description of bit 13 status.")
143
143
field(DTYP, "Soft Channel")
144
144
field(PINI, "YES")
145
- field(VAL, "$(desc_label13 )")
145
+ field(VAL, "$(_desc_label13 )")
146
146
}
147
147
148
148
# Label for bit 14 of the position status word.
149
- record(stringout, "$(device)$(posportprefix )$(posportID):DESC14") {
149
+ record(stringout, "$(device)$(_posportprefix )$(posportID):DESC14") {
150
150
field(DESC, "Description of bit 14 status.")
151
151
field(DTYP, "Soft Channel")
152
152
field(PINI, "YES")
153
- field(VAL, "$(desc_label14 )")
153
+ field(VAL, "$(_desc_label14 )")
154
154
}
155
155
156
156
# Label for bit 15 of the position status word.
157
- record(stringout, "$(device)$(posportprefix )$(posportID):DESC15") {
157
+ record(stringout, "$(device)$(_posportprefix )$(posportID):DESC15") {
158
158
field(DESC, "Description of bit 15 status.")
159
159
field(DTYP, "Soft Channel")
160
160
field(PINI, "YES")
161
- field(VAL, "$(desc_label15 )")
161
+ field(VAL, "$(_desc_label15 )")
162
162
}
163
163
164
164
# Long description of the position port.
165
- record(stringout, "$(device)$(posportprefix )$(posportID):LONGDESC") {
165
+ record(stringout, "$(device)$(_posportprefix )$(posportID):LONGDESC") {
166
166
field(DESC, "Position port $(posportID) description")
167
167
field(PINI, "YES")
168
- field(VAL, "$(longdesc )")
168
+ field(VAL, "$(_longdesc )")
169
169
}
170
170
171
171
# Short description of the position port.
172
- record(stringout, "$(device)$(posportprefix )$(posportID):SHORTDESC") {
172
+ record(stringout, "$(device)$(_posportprefix )$(posportID):SHORTDESC") {
173
173
field(DESC, "Posport$(posportID) short description")
174
174
field(PINI, "YES")
175
- field(VAL, "$(shortdesc )")
175
+ field(VAL, "$(_shortdesc )")
176
176
}
177
177
178
178
#
179
179
# The ID of the position port (as the value in a record as opposed to
180
180
# a string in the name of a record. It was originally a stringout
181
181
# but now it has to be an integer as it gets used in calculations.
182
182
#
183
- record(ao, "$(device)$(posportprefix )$(posportID):POSPORTID") {
183
+ record(ao, "$(device)$(_posportprefix )$(posportID):POSPORTID") {
184
184
field(DESC, "Posport$(posportID) ID number")
185
185
field(PINI, "YES")
186
186
field(VAL, "$(posportID)")
@@ -207,13 +207,13 @@ record(ao, "$(device)$(posportprefix)$(posportID):POSPORTID") {
207
207
#
208
208
# Writes the result to the fixed ID port record in the NX102_PreVacCoils_SMStatus template.
209
209
#
210
- record(calcout, "$(device)$(posportprefix )$(posportID):SAMPLEMANIP:READY:CALC") {
210
+ record(calcout, "$(device)$(_posportprefix )$(posportID):SAMPLEMANIP:READY:CALC") {
211
211
field(DESC, "Posport$(posportID) SM ready calculation")
212
212
field(SCAN, "Passive")
213
- field(INPA, "$(smready_bitno )")
214
- field(INPB, "$(device)$(posportprefix )$(posportID):POSSTA")
213
+ field(INPA, "$(_smready_bitno )")
214
+ field(INPB, "$(device)$(_posportprefix )$(posportID):POSSTA")
215
215
field(CALC, "(B>>A)&1")
216
- field(OUT, "$(device)$(posportprefix )$(posportID):SAMPLEMANIP:READY PP")
216
+ field(OUT, "$(device)$(_posportprefix )$(posportID):SAMPLEMANIP:READY PP")
217
217
}
218
218
219
219
#
@@ -231,11 +231,11 @@ record(calcout, "$(device)$(posportprefix)$(posportID):SAMPLEMANIP:READY:CALC")
231
231
# Shift the status record by bitno places to get it into position and bitmask it off with a 1.
232
232
# Writes the result to the fixed ID port record in the Status template.
233
233
#
234
- record(calcout, "$(device)$(posportprefix )$(posportID):SAMPLEHOLDER:CALC") {
234
+ record(calcout, "$(device)$(_posportprefix )$(posportID):SAMPLEHOLDER:CALC") {
235
235
field(DESC, "Posport$(posportID) sample calculation")
236
236
field(SCAN, "Passive")
237
- field(INPA, "$(sampleholder_bitno )")
238
- field(INPB, "$(device)$(posportprefix )$(posportID):POSSTA")
237
+ field(INPA, "$(_sampleholder_bitno )")
238
+ field(INPB, "$(device)$(_posportprefix )$(posportID):POSSTA")
239
239
field(CALC, "(B>>A)&1")
240
- field(OUT, "$(device)$(posportprefix )$(posportID):SAMPLEHOLDER:IN_CHAMBER PP")
240
+ field(OUT, "$(device)$(_posportprefix )$(posportID):SAMPLEHOLDER:IN_CHAMBER PP")
241
241
}
0 commit comments