Skip to content

Commit 0643a23

Browse files
committed
update tests to match fix
1 parent 0b4af2f commit 0643a23

8 files changed

+610
-611
lines changed

tests/results/NX102_PreVacCoils_SMPortPositionStatus.template

Lines changed: 51 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -10,22 +10,22 @@
1010
# The Port Position status readback. This is actually held by the PreVac Modbus PLC as a number of Coils
1111
# but the DLS NX102 PLC organises them into bitflags for efficient readback interface.
1212
#
13-
record(mbbiDirect, "$(device)$(posportprefix)$(posportID):POSSTA") {
13+
record(mbbiDirect, "$(device)$(_posportprefix)$(posportID):POSSTA") {
1414
field(DESC, "Sample Manipulator Position $(posportID) Status")
1515
field(DTYP, "EtherIP")
16-
field(INP, "@$(PORT) $(TAG).$(TAGPREFIX)$(TAGNAME)[$(TAGIDX)] B 0")
16+
field(INP, "@$(_PORT) $(_TAG).$(_TAGPREFIX)$(_TAGNAME)[$(_TAGIDX)] B 0")
1717
field(SCAN, ".5 second")
1818
field(NOBT, "16")
19-
field(FLNK, "$(device)$(posportprefix)$(posportID):POSSTA:FAN")
19+
field(FLNK, "$(device)$(_posportprefix)$(posportID):POSSTA:FAN")
2020
}
2121

2222
# Fanout to calculations dependent on the POSSTA value (the port position status).
2323
#
24-
record(fanout, "$(device)$(posportprefix)$(posportID):POSSTA:FAN") {
24+
record(fanout, "$(device)$(_posportprefix)$(posportID):POSSTA:FAN") {
2525
field(DESC, "Propagate posport$(posportID) Status")
2626
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")
2929
}
3030

3131
# Records DESC0...15 to set labels to display against the position status word.
@@ -34,153 +34,153 @@ record(fanout, "$(device)$(posportprefix)$(posportID):POSSTA:FAN") {
3434
# become optional with defaults in the higher level template.
3535
#
3636
# Label for bit 0 of the position status word.
37-
record(stringout, "$(device)$(posportprefix)$(posportID):DESC0") {
37+
record(stringout, "$(device)$(_posportprefix)$(posportID):DESC0") {
3838
field(DESC, "Description of bit 0 status.")
3939
field(DTYP, "Soft Channel")
4040
field(PINI, "YES")
41-
field(VAL, "$(desc_label0)")
41+
field(VAL, "$(_desc_label0)")
4242
}
4343

4444
# Label for bit 1 of the position status word.
45-
record(stringout, "$(device)$(posportprefix)$(posportID):DESC1") {
45+
record(stringout, "$(device)$(_posportprefix)$(posportID):DESC1") {
4646
field(DESC, "Description of bit 1 status.")
4747
field(DTYP, "Soft Channel")
4848
field(PINI, "YES")
49-
field(VAL, "$(desc_label1)")
49+
field(VAL, "$(_desc_label1)")
5050
}
5151

5252
# Label for bit 2 of the position status word.
53-
record(stringout, "$(device)$(posportprefix)$(posportID):DESC2") {
53+
record(stringout, "$(device)$(_posportprefix)$(posportID):DESC2") {
5454
field(DESC, "Description of bit 2 status.")
5555
field(DTYP, "Soft Channel")
5656
field(PINI, "YES")
57-
field(VAL, "$(desc_label2)")
57+
field(VAL, "$(_desc_label2)")
5858
}
5959

6060
# Label for bit 3 of the position status word.
61-
record(stringout, "$(device)$(posportprefix)$(posportID):DESC3") {
61+
record(stringout, "$(device)$(_posportprefix)$(posportID):DESC3") {
6262
field(DESC, "Description of bit 3 status.")
6363
field(DTYP, "Soft Channel")
6464
field(PINI, "YES")
65-
field(VAL, "$(desc_label3)")
65+
field(VAL, "$(_desc_label3)")
6666
}
6767

6868
# Label for bit 4 of the position status word.
69-
record(stringout, "$(device)$(posportprefix)$(posportID):DESC4") {
69+
record(stringout, "$(device)$(_posportprefix)$(posportID):DESC4") {
7070
field(DESC, "Description of bit 4 status.")
7171
field(DTYP, "Soft Channel")
7272
field(PINI, "YES")
73-
field(VAL, "$(desc_label4)")
73+
field(VAL, "$(_desc_label4)")
7474
}
7575

7676
# Label for bit 5 of the position status word.
77-
record(stringout, "$(device)$(posportprefix)$(posportID):DESC5") {
77+
record(stringout, "$(device)$(_posportprefix)$(posportID):DESC5") {
7878
field(DESC, "Description of bit 5 status.")
7979
field(DTYP, "Soft Channel")
8080
field(PINI, "YES")
81-
field(VAL, "$(desc_label5)")
81+
field(VAL, "$(_desc_label5)")
8282
}
8383

8484
# Label for bit 6 of the position status word.
85-
record(stringout, "$(device)$(posportprefix)$(posportID):DESC6") {
85+
record(stringout, "$(device)$(_posportprefix)$(posportID):DESC6") {
8686
field(DESC, "Description of bit 6 status.")
8787
field(DTYP, "Soft Channel")
8888
field(PINI, "YES")
89-
field(VAL, "$(desc_label6)")
89+
field(VAL, "$(_desc_label6)")
9090
}
9191

9292
# Label for bit 7 of the position status word.
93-
record(stringout, "$(device)$(posportprefix)$(posportID):DESC7") {
93+
record(stringout, "$(device)$(_posportprefix)$(posportID):DESC7") {
9494
field(DESC, "Description of bit 7 status.")
9595
field(DTYP, "Soft Channel")
9696
field(PINI, "YES")
97-
field(VAL, "$(desc_label7)")
97+
field(VAL, "$(_desc_label7)")
9898
}
9999

100100
# Label for bit 8 of the position status word.
101-
record(stringout, "$(device)$(posportprefix)$(posportID):DESC8") {
101+
record(stringout, "$(device)$(_posportprefix)$(posportID):DESC8") {
102102
field(DESC, "Description of bit 8 status.")
103103
field(DTYP, "Soft Channel")
104104
field(PINI, "YES")
105-
field(VAL, "$(desc_label8)")
105+
field(VAL, "$(_desc_label8)")
106106
}
107107

108108
# Label for bit 9 of the position status word.
109-
record(stringout, "$(device)$(posportprefix)$(posportID):DESC9") {
109+
record(stringout, "$(device)$(_posportprefix)$(posportID):DESC9") {
110110
field(DESC, "Description of bit 9 status.")
111111
field(DTYP, "Soft Channel")
112112
field(PINI, "YES")
113-
field(VAL, "$(desc_label9)")
113+
field(VAL, "$(_desc_label9)")
114114
}
115115

116116
# Label for bit 10 of the position status word.
117-
record(stringout, "$(device)$(posportprefix)$(posportID):DESC10") {
117+
record(stringout, "$(device)$(_posportprefix)$(posportID):DESC10") {
118118
field(DESC, "Description of bit 10 status.")
119119
field(DTYP, "Soft Channel")
120120
field(PINI, "YES")
121-
field(VAL, "$(desc_label10)")
121+
field(VAL, "$(_desc_label10)")
122122
}
123123

124124
# Label for bit 11 of the position status word.
125-
record(stringout, "$(device)$(posportprefix)$(posportID):DESC11") {
125+
record(stringout, "$(device)$(_posportprefix)$(posportID):DESC11") {
126126
field(DESC, "Description of bit 11 status.")
127127
field(DTYP, "Soft Channel")
128128
field(PINI, "YES")
129-
field(VAL, "$(desc_label11)")
129+
field(VAL, "$(_desc_label11)")
130130
}
131131

132132
# Label for bit 12 of the position status word.
133-
record(stringout, "$(device)$(posportprefix)$(posportID):DESC12") {
133+
record(stringout, "$(device)$(_posportprefix)$(posportID):DESC12") {
134134
field(DESC, "Description of bit 12 status.")
135135
field(DTYP, "Soft Channel")
136136
field(PINI, "YES")
137-
field(VAL, "$(desc_label12)")
137+
field(VAL, "$(_desc_label12)")
138138
}
139139

140140
# Label for bit 13 of the position status word.
141-
record(stringout, "$(device)$(posportprefix)$(posportID):DESC13") {
141+
record(stringout, "$(device)$(_posportprefix)$(posportID):DESC13") {
142142
field(DESC, "Description of bit 13 status.")
143143
field(DTYP, "Soft Channel")
144144
field(PINI, "YES")
145-
field(VAL, "$(desc_label13)")
145+
field(VAL, "$(_desc_label13)")
146146
}
147147

148148
# Label for bit 14 of the position status word.
149-
record(stringout, "$(device)$(posportprefix)$(posportID):DESC14") {
149+
record(stringout, "$(device)$(_posportprefix)$(posportID):DESC14") {
150150
field(DESC, "Description of bit 14 status.")
151151
field(DTYP, "Soft Channel")
152152
field(PINI, "YES")
153-
field(VAL, "$(desc_label14)")
153+
field(VAL, "$(_desc_label14)")
154154
}
155155

156156
# Label for bit 15 of the position status word.
157-
record(stringout, "$(device)$(posportprefix)$(posportID):DESC15") {
157+
record(stringout, "$(device)$(_posportprefix)$(posportID):DESC15") {
158158
field(DESC, "Description of bit 15 status.")
159159
field(DTYP, "Soft Channel")
160160
field(PINI, "YES")
161-
field(VAL, "$(desc_label15)")
161+
field(VAL, "$(_desc_label15)")
162162
}
163163

164164
# Long description of the position port.
165-
record(stringout, "$(device)$(posportprefix)$(posportID):LONGDESC") {
165+
record(stringout, "$(device)$(_posportprefix)$(posportID):LONGDESC") {
166166
field(DESC, "Position port $(posportID) description")
167167
field(PINI, "YES")
168-
field(VAL, "$(longdesc)")
168+
field(VAL, "$(_longdesc)")
169169
}
170170

171171
# Short description of the position port.
172-
record(stringout, "$(device)$(posportprefix)$(posportID):SHORTDESC") {
172+
record(stringout, "$(device)$(_posportprefix)$(posportID):SHORTDESC") {
173173
field(DESC, "Posport$(posportID) short description")
174174
field(PINI, "YES")
175-
field(VAL, "$(shortdesc)")
175+
field(VAL, "$(_shortdesc)")
176176
}
177177

178178
#
179179
# The ID of the position port (as the value in a record as opposed to
180180
# a string in the name of a record. It was originally a stringout
181181
# but now it has to be an integer as it gets used in calculations.
182182
#
183-
record(ao, "$(device)$(posportprefix)$(posportID):POSPORTID") {
183+
record(ao, "$(device)$(_posportprefix)$(posportID):POSPORTID") {
184184
field(DESC, "Posport$(posportID) ID number")
185185
field(PINI, "YES")
186186
field(VAL, "$(posportID)")
@@ -207,13 +207,13 @@ record(ao, "$(device)$(posportprefix)$(posportID):POSPORTID") {
207207
#
208208
# Writes the result to the fixed ID port record in the NX102_PreVacCoils_SMStatus template.
209209
#
210-
record(calcout, "$(device)$(posportprefix)$(posportID):SAMPLEMANIP:READY:CALC") {
210+
record(calcout, "$(device)$(_posportprefix)$(posportID):SAMPLEMANIP:READY:CALC") {
211211
field(DESC, "Posport$(posportID) SM ready calculation")
212212
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")
215215
field(CALC, "(B>>A)&1")
216-
field(OUT, "$(device)$(posportprefix)$(posportID):SAMPLEMANIP:READY PP")
216+
field(OUT, "$(device)$(_posportprefix)$(posportID):SAMPLEMANIP:READY PP")
217217
}
218218

219219
#
@@ -231,11 +231,11 @@ record(calcout, "$(device)$(posportprefix)$(posportID):SAMPLEMANIP:READY:CALC")
231231
# Shift the status record by bitno places to get it into position and bitmask it off with a 1.
232232
# Writes the result to the fixed ID port record in the Status template.
233233
#
234-
record(calcout, "$(device)$(posportprefix)$(posportID):SAMPLEHOLDER:CALC") {
234+
record(calcout, "$(device)$(_posportprefix)$(posportID):SAMPLEHOLDER:CALC") {
235235
field(DESC, "Posport$(posportID) sample calculation")
236236
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")
239239
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")
241241
}

tests/results/NX102_digitalIn_Debounced.template

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,3 @@ record(mbbiDirect, "$(device):DBBIT") {
2727
field(SCAN, ".5 second")
2828
field(NOBT, "16")
2929
}
30-

0 commit comments

Comments
 (0)