author | b.taylor@willowglen.ca |
Mon, 14 Sep 2009 10:57:12 -0600 | |
changeset 423 | 53aa0c334f2f |
parent 392 | 546053de1426 |
child 431 | c1c92d068ac5 |
permissions | -rw-r--r-- |
0 | 1 |
<?xml version="1.0" encoding="UTF-8"?> |
2 |
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
|
3 |
xmlns="http://www.plcopen.org/xml/tc6.xsd" |
|
4 |
xmlns:xhtml="http://www.w3.org/1999/xhtml" |
|
392 | 5 |
xsi:schemaLocation="http://www.plcopen.org/xml/tc6.xsd"> |
151 | 6 |
<fileHeader companyName="Lolitech" |
145 | 7 |
companyURL="www.lolitech.net" |
0 | 8 |
productName="PLCOpenEditorExample" |
151 | 9 |
productVersion="1.0" |
145 | 10 |
productRelease="rc1" |
392 | 11 |
creationDateTime="2006-09-07T18:52:43" |
151 | 12 |
contentDescription="Example of PLCOpenEditor usage"/> |
145 | 13 |
<contentHeader name="Test" |
151 | 14 |
version="1" |
392 | 15 |
modificationDateTime="2009-07-24T16:17:59" |
145 | 16 |
author="Laurent Bessard" |
151 | 17 |
language="en-US"> |
0 | 18 |
<coordinateInfo> |
213 | 19 |
<pageSize x="1050" y="1485"/> |
0 | 20 |
<fbd> |
151 | 21 |
<scaling x="8" y="8"/> |
0 | 22 |
</fbd> |
23 |
<ld> |
|
151 | 24 |
<scaling x="0" y="0"/> |
0 | 25 |
</ld> |
26 |
<sfc> |
|
151 | 27 |
<scaling x="0" y="0"/> |
0 | 28 |
</sfc> |
29 |
</coordinateInfo> |
|
30 |
</contentHeader> |
|
31 |
<types> |
|
126 | 32 |
<dataTypes> |
33 |
<dataType name="MyType"> |
|
34 |
<baseType> |
|
35 |
<array> |
|
151 | 36 |
<dimension lower="1" upper="16"/> |
37 |
<dimension lower="1" upper="2"/> |
|
126 | 38 |
<baseType> |
39 |
<INT/> |
|
40 |
</baseType> |
|
41 |
</array> |
|
42 |
</baseType> |
|
43 |
<initialValue> |
|
44 |
<arrayValue> |
|
145 | 45 |
<value repetitionValue="8"> |
46 |
<arrayValue> |
|
47 |
<value> |
|
48 |
<simpleValue value="-100"/> |
|
49 |
</value> |
|
50 |
<value> |
|
51 |
<simpleValue value="100"/> |
|
52 |
</value> |
|
53 |
</arrayValue> |
|
126 | 54 |
</value> |
145 | 55 |
<value repetitionValue="8"> |
56 |
<arrayValue> |
|
57 |
<value> |
|
58 |
<simpleValue value="100"/> |
|
59 |
</value> |
|
60 |
<value> |
|
61 |
<simpleValue value="-100"/> |
|
62 |
</value> |
|
63 |
</arrayValue> |
|
126 | 64 |
</value> |
65 |
</arrayValue> |
|
66 |
</initialValue> |
|
67 |
</dataType> |
|
68 |
<dataType name="MyType2"> |
|
69 |
<baseType> |
|
70 |
<BYTE/> |
|
71 |
</baseType> |
|
72 |
<initialValue> |
|
73 |
<simpleValue value="0"/> |
|
74 |
</initialValue> |
|
75 |
</dataType> |
|
76 |
<dataType name="MyType3"> |
|
77 |
<baseType> |
|
78 |
<enum> |
|
79 |
<values> |
|
80 |
<value name="OPEN"/> |
|
81 |
<value name="CLOSED"/> |
|
82 |
</values> |
|
83 |
</enum> |
|
84 |
</baseType> |
|
85 |
<initialValue> |
|
86 |
<simpleValue value="CLOSED"/> |
|
87 |
</initialValue> |
|
88 |
</dataType> |
|
89 |
<dataType name="MyType4"> |
|
90 |
<baseType> |
|
91 |
<subrangeSigned> |
|
151 | 92 |
<range lower="-4500" upper="4500"/> |
126 | 93 |
<baseType> |
94 |
<DINT/> |
|
95 |
</baseType> |
|
96 |
</subrangeSigned> |
|
97 |
</baseType> |
|
98 |
<initialValue> |
|
99 |
<simpleValue value="0"/> |
|
100 |
</initialValue> |
|
101 |
</dataType> |
|
392 | 102 |
<dataType name="MyType5"> |
103 |
<baseType> |
|
104 |
<struct> |
|
105 |
<variable name="x"> |
|
106 |
<type> |
|
107 |
<REAL/> |
|
108 |
</type> |
|
109 |
</variable> |
|
110 |
<variable name="y"> |
|
111 |
<type> |
|
112 |
<REAL/> |
|
113 |
</type> |
|
114 |
</variable> |
|
115 |
</struct> |
|
116 |
</baseType> |
|
117 |
</dataType> |
|
126 | 118 |
</dataTypes> |
0 | 119 |
<pous> |
13
69075340d6a9
Adding support for forbidding insertion of function block into function
lbessard
parents:
2
diff
changeset
|
120 |
<pou name="FBDTest" pouType="functionBlock"> |
0 | 121 |
<interface> |
122 |
<inputVars> |
|
123 |
<variable name="IN1"> |
|
124 |
<type> |
|
125 |
<BOOL/> |
|
126 |
</type> |
|
127 |
<initialValue> |
|
128 |
<simpleValue value="false"/> |
|
129 |
</initialValue> |
|
130 |
</variable> |
|
131 |
<variable name="IN2"> |
|
132 |
<type> |
|
133 |
<BOOL/> |
|
134 |
</type> |
|
135 |
<initialValue> |
|
58 | 136 |
<simpleValue value="true"/> |
0 | 137 |
</initialValue> |
138 |
</variable> |
|
139 |
<variable name="IN3"> |
|
140 |
<type> |
|
141 |
<BOOL/> |
|
142 |
</type> |
|
143 |
</variable> |
|
144 |
</inputVars> |
|
13
69075340d6a9
Adding support for forbidding insertion of function block into function
lbessard
parents:
2
diff
changeset
|
145 |
<outputVars> |
69075340d6a9
Adding support for forbidding insertion of function block into function
lbessard
parents:
2
diff
changeset
|
146 |
<variable name="OUT"> |
69075340d6a9
Adding support for forbidding insertion of function block into function
lbessard
parents:
2
diff
changeset
|
147 |
<type> |
69075340d6a9
Adding support for forbidding insertion of function block into function
lbessard
parents:
2
diff
changeset
|
148 |
<BOOL/> |
69075340d6a9
Adding support for forbidding insertion of function block into function
lbessard
parents:
2
diff
changeset
|
149 |
</type> |
69075340d6a9
Adding support for forbidding insertion of function block into function
lbessard
parents:
2
diff
changeset
|
150 |
</variable> |
69075340d6a9
Adding support for forbidding insertion of function block into function
lbessard
parents:
2
diff
changeset
|
151 |
</outputVars> |
67
3a1b0afdaf84
Adding support for automatically generate function blocks in interface when a block is added
lbessard
parents:
58
diff
changeset
|
152 |
<localVars> |
3a1b0afdaf84
Adding support for automatically generate function blocks in interface when a block is added
lbessard
parents:
58
diff
changeset
|
153 |
<variable name="SR1"> |
3a1b0afdaf84
Adding support for automatically generate function blocks in interface when a block is added
lbessard
parents:
58
diff
changeset
|
154 |
<type> |
3a1b0afdaf84
Adding support for automatically generate function blocks in interface when a block is added
lbessard
parents:
58
diff
changeset
|
155 |
<derived name="SR"/> |
3a1b0afdaf84
Adding support for automatically generate function blocks in interface when a block is added
lbessard
parents:
58
diff
changeset
|
156 |
</type> |
3a1b0afdaf84
Adding support for automatically generate function blocks in interface when a block is added
lbessard
parents:
58
diff
changeset
|
157 |
</variable> |
3a1b0afdaf84
Adding support for automatically generate function blocks in interface when a block is added
lbessard
parents:
58
diff
changeset
|
158 |
</localVars> |
0 | 159 |
</interface> |
160 |
<body> |
|
161 |
<FBD> |
|
151 | 162 |
<inVariable localId="2" height="32" width="88"> |
163 |
<position x="64" y="80"/> |
|
164 |
<connectionPointOut> |
|
165 |
<relPosition x="88" y="16"/> |
|
0 | 166 |
</connectionPointOut> |
167 |
<expression>IN1</expression> |
|
168 |
</inVariable> |
|
151 | 169 |
<inVariable localId="3" height="32" width="88"> |
170 |
<position x="64" y="200"/> |
|
171 |
<connectionPointOut> |
|
172 |
<relPosition x="88" y="16"/> |
|
0 | 173 |
</connectionPointOut> |
174 |
<expression>IN2</expression> |
|
175 |
</inVariable> |
|
151 | 176 |
<outVariable localId="4" height="32" width="96" executionOrderId="2"> |
177 |
<position x="584" y="176"/> |
|
178 |
<connectionPointIn> |
|
179 |
<relPosition x="0" y="16"/> |
|
27 | 180 |
<connection refLocalId="11" formalParameter="Q1"> |
151 | 181 |
<position x="584" y="192"/> |
182 |
<position x="528" y="192"/> |
|
0 | 183 |
</connection> |
184 |
</connectionPointIn> |
|
13
69075340d6a9
Adding support for forbidding insertion of function block into function
lbessard
parents:
2
diff
changeset
|
185 |
<expression>OUT</expression> |
0 | 186 |
</outVariable> |
151 | 187 |
<block localId="6" width="104" height="88" typeName="AND" executionOrderId="3"> |
188 |
<position x="232" y="104"/> |
|
0 | 189 |
<inputVariables> |
67
3a1b0afdaf84
Adding support for automatically generate function blocks in interface when a block is added
lbessard
parents:
58
diff
changeset
|
190 |
<variable formalParameter="IN1" edge="rising"> |
0 | 191 |
<connectionPointIn> |
151 | 192 |
<relPosition x="0" y="40"/> |
0 | 193 |
<connection refLocalId="2"> |
151 | 194 |
<position x="232" y="144"/> |
195 |
<position x="192" y="144"/> |
|
196 |
<position x="192" y="96"/> |
|
197 |
<position x="152" y="96"/> |
|
0 | 198 |
</connection> |
199 |
</connectionPointIn> |
|
200 |
</variable> |
|
67
3a1b0afdaf84
Adding support for automatically generate function blocks in interface when a block is added
lbessard
parents:
58
diff
changeset
|
201 |
<variable formalParameter="IN2"> |
0 | 202 |
<connectionPointIn> |
151 | 203 |
<relPosition x="0" y="72"/> |
0 | 204 |
<connection refLocalId="3"> |
151 | 205 |
<position x="232" y="176"/> |
206 |
<position x="192" y="176"/> |
|
207 |
<position x="192" y="216"/> |
|
208 |
<position x="152" y="216"/> |
|
0 | 209 |
</connection> |
210 |
</connectionPointIn> |
|
211 |
</variable> |
|
212 |
</inputVariables> |
|
213 |
<inOutVariables/> |
|
214 |
<outputVariables> |
|
80 | 215 |
<variable formalParameter="OUT"> |
0 | 216 |
<connectionPointOut> |
151 | 217 |
<relPosition x="104" y="40"/> |
0 | 218 |
</connectionPointOut> |
219 |
</variable> |
|
220 |
</outputVariables> |
|
221 |
</block> |
|
151 | 222 |
<block localId="8" width="104" height="88" typeName="OR" executionOrderId="4"> |
223 |
<position x="232" y="240"/> |
|
0 | 224 |
<inputVariables> |
225 |
<variable formalParameter="IN1" negated="true"> |
|
226 |
<connectionPointIn> |
|
151 | 227 |
<relPosition x="0" y="40"/> |
0 | 228 |
<connection refLocalId="3"> |
151 | 229 |
<position x="232" y="280"/> |
230 |
<position x="192" y="280"/> |
|
231 |
<position x="192" y="216"/> |
|
232 |
<position x="152" y="216"/> |
|
0 | 233 |
</connection> |
234 |
</connectionPointIn> |
|
235 |
</variable> |
|
236 |
<variable formalParameter="IN2"> |
|
237 |
<connectionPointIn> |
|
151 | 238 |
<relPosition x="0" y="72"/> |
392 | 239 |
<connection refLocalId="5"> |
151 | 240 |
<position x="232" y="312"/> |
392 | 241 |
<position x="160" y="312"/> |
0 | 242 |
</connection> |
243 |
</connectionPointIn> |
|
244 |
</variable> |
|
245 |
</inputVariables> |
|
246 |
<inOutVariables/> |
|
247 |
<outputVariables> |
|
248 |
<variable formalParameter="OUT"> |
|
249 |
<connectionPointOut> |
|
151 | 250 |
<relPosition x="104" y="40"/> |
0 | 251 |
</connectionPointOut> |
252 |
</variable> |
|
253 |
</outputVariables> |
|
254 |
</block> |
|
213 | 255 |
<comment localId="10" height="48" width="376"> |
151 | 256 |
<position x="240" y="24"/> |
257 |
<content> |
|
258 |
<![CDATA[POU used for testing PLCOpenEditor.]]> |
|
259 |
</content> |
|
0 | 260 |
</comment> |
151 | 261 |
<block localId="11" width="104" height="96" typeName="SR" instanceName="SR1" executionOrderId="1"> |
262 |
<position x="424" y="152"/> |
|
0 | 263 |
<inputVariables> |
80 | 264 |
<variable formalParameter="S1" negated="true"> |
0 | 265 |
<connectionPointIn> |
151 | 266 |
<relPosition x="0" y="40"/> |
27 | 267 |
<connection refLocalId="6" formalParameter="OUT"> |
151 | 268 |
<position x="424" y="192"/> |
269 |
<position x="376" y="192"/> |
|
270 |
<position x="376" y="144"/> |
|
271 |
<position x="336" y="144"/> |
|
0 | 272 |
</connection> |
273 |
</connectionPointIn> |
|
274 |
</variable> |
|
275 |
<variable formalParameter="R"> |
|
276 |
<connectionPointIn> |
|
151 | 277 |
<relPosition x="0" y="80"/> |
27 | 278 |
<connection refLocalId="8" formalParameter="OUT"> |
151 | 279 |
<position x="424" y="232"/> |
280 |
<position x="376" y="232"/> |
|
281 |
<position x="376" y="280"/> |
|
282 |
<position x="336" y="280"/> |
|
0 | 283 |
</connection> |
284 |
</connectionPointIn> |
|
285 |
</variable> |
|
286 |
</inputVariables> |
|
287 |
<inOutVariables/> |
|
288 |
<outputVariables> |
|
289 |
<variable formalParameter="Q1"> |
|
290 |
<connectionPointOut> |
|
151 | 291 |
<relPosition x="104" y="40"/> |
0 | 292 |
</connectionPointOut> |
293 |
</variable> |
|
294 |
</outputVariables> |
|
295 |
</block> |
|
392 | 296 |
<inVariable localId="1" height="32" width="88"> |
297 |
<position x="64" y="416"/> |
|
298 |
<connectionPointOut> |
|
299 |
<relPosition x="88" y="16"/> |
|
300 |
</connectionPointOut> |
|
301 |
<expression>IN3</expression> |
|
302 |
</inVariable> |
|
303 |
<connector name="Input3" localId="12" height="32" width="104"> |
|
304 |
<position x="208" y="416"/> |
|
305 |
<connectionPointIn> |
|
306 |
<relPosition x="0" y="16"/> |
|
307 |
<connection refLocalId="1"> |
|
308 |
<position x="208" y="432"/> |
|
309 |
<position x="152" y="432"/> |
|
310 |
</connection> |
|
311 |
</connectionPointIn> |
|
312 |
</connector> |
|
313 |
<continuation name="Input3" localId="5" height="32" width="104"> |
|
314 |
<position x="56" y="296"/> |
|
315 |
<connectionPointOut> |
|
316 |
<relPosition x="104" y="16"/> |
|
317 |
</connectionPointOut> |
|
318 |
</continuation> |
|
0 | 319 |
</FBD> |
320 |
</body> |
|
321 |
</pou> |
|
322 |
<pou name="LDTest" pouType="function"> |
|
323 |
<interface> |
|
324 |
<returnType> |
|
325 |
<BOOL/> |
|
326 |
</returnType> |
|
327 |
<inputVars> |
|
328 |
<variable name="IN1"> |
|
329 |
<type> |
|
330 |
<BOOL/> |
|
331 |
</type> |
|
332 |
</variable> |
|
333 |
<variable name="IN2"> |
|
334 |
<type> |
|
335 |
<BOOL/> |
|
336 |
</type> |
|
337 |
</variable> |
|
338 |
<variable name="IN3"> |
|
339 |
<type> |
|
340 |
<BOOL/> |
|
341 |
</type> |
|
342 |
</variable> |
|
343 |
<variable name="IN4"> |
|
344 |
<type> |
|
345 |
<BOOL/> |
|
346 |
</type> |
|
347 |
</variable> |
|
348 |
</inputVars> |
|
349 |
</interface> |
|
350 |
<body> |
|
351 |
<LD> |
|
352 |
<comment localId="1" height="40" width="600"> |
|
151 | 353 |
<position x="10" y="10"/> |
354 |
<content> |
|
355 |
<![CDATA[Comment]]> |
|
356 |
</content> |
|
0 | 357 |
</comment> |
142 | 358 |
<leftPowerRail localId="2" height="80" width="3"> |
151 | 359 |
<position x="10" y="60"/> |
142 | 360 |
<connectionPointOut formalParameter=""> |
151 | 361 |
<relPosition x="3" y="20"/> |
142 | 362 |
</connectionPointOut> |
363 |
<connectionPointOut formalParameter=""> |
|
151 | 364 |
<relPosition x="3" y="60"/> |
0 | 365 |
</connectionPointOut> |
366 |
</leftPowerRail> |
|
151 | 367 |
<coil localId="3" height="15" width="21"> |
368 |
<position x="265" y="72"/> |
|
369 |
<connectionPointIn> |
|
370 |
<relPosition x="0" y="8"/> |
|
0 | 371 |
<connection refLocalId="7"> |
151 | 372 |
<position x="265" y="80"/> |
373 |
<position x="195" y="80"/> |
|
374 |
</connection> |
|
375 |
</connectionPointIn> |
|
376 |
<connectionPointOut> |
|
377 |
<relPosition x="21" y="8"/> |
|
0 | 378 |
</connectionPointOut> |
379 |
<variable>LDTest</variable> |
|
380 |
</coil> |
|
142 | 381 |
<rightPowerRail localId="4" height="40" width="3"> |
151 | 382 |
<position x="323" y="60"/> |
383 |
<connectionPointIn> |
|
384 |
<relPosition x="0" y="20"/> |
|
0 | 385 |
<connection refLocalId="3"> |
151 | 386 |
<position x="323" y="80"/> |
387 |
<position x="286" y="80"/> |
|
0 | 388 |
</connection> |
389 |
</connectionPointIn> |
|
390 |
</rightPowerRail> |
|
151 | 391 |
<contact localId="5" height="15" width="21" negated="true"> |
392 |
<position x="42" y="72"/> |
|
393 |
<connectionPointIn> |
|
394 |
<relPosition x="0" y="8"/> |
|
0 | 395 |
<connection refLocalId="2"> |
151 | 396 |
<position x="42" y="80"/> |
397 |
<position x="13" y="80"/> |
|
398 |
</connection> |
|
399 |
</connectionPointIn> |
|
400 |
<connectionPointOut> |
|
401 |
<relPosition x="21" y="8"/> |
|
0 | 402 |
</connectionPointOut> |
403 |
<variable>IN1</variable> |
|
404 |
</contact> |
|
151 | 405 |
<contact localId="7" height="15" width="21"> |
406 |
<position x="174" y="72"/> |
|
407 |
<connectionPointIn> |
|
408 |
<relPosition x="0" y="8"/> |
|
0 | 409 |
<connection refLocalId="5"> |
151 | 410 |
<position x="174" y="80"/> |
411 |
<position x="63" y="80"/> |
|
0 | 412 |
</connection> |
413 |
<connection refLocalId="9"> |
|
151 | 414 |
<position x="174" y="80"/> |
415 |
<position x="144" y="80"/> |
|
416 |
<position x="144" y="120"/> |
|
417 |
<position x="114" y="120"/> |
|
418 |
</connection> |
|
419 |
</connectionPointIn> |
|
420 |
<connectionPointOut> |
|
421 |
<relPosition x="21" y="8"/> |
|
0 | 422 |
</connectionPointOut> |
423 |
<variable>IN2</variable> |
|
424 |
</contact> |
|
151 | 425 |
<contact localId="8" height="15" width="21"> |
426 |
<position x="42" y="112"/> |
|
427 |
<connectionPointIn> |
|
428 |
<relPosition x="0" y="8"/> |
|
0 | 429 |
<connection refLocalId="2"> |
151 | 430 |
<position x="42" y="120"/> |
431 |
<position x="13" y="120"/> |
|
432 |
</connection> |
|
433 |
</connectionPointIn> |
|
434 |
<connectionPointOut> |
|
435 |
<relPosition x="21" y="8"/> |
|
0 | 436 |
</connectionPointOut> |
437 |
<variable>IN3</variable> |
|
438 |
</contact> |
|
151 | 439 |
<contact localId="9" height="15" width="21" negated="true"> |
440 |
<position x="93" y="112"/> |
|
441 |
<connectionPointIn> |
|
442 |
<relPosition x="0" y="8"/> |
|
0 | 443 |
<connection refLocalId="8"> |
151 | 444 |
<position x="93" y="120"/> |
445 |
<position x="63" y="120"/> |
|
446 |
</connection> |
|
447 |
</connectionPointIn> |
|
448 |
<connectionPointOut> |
|
449 |
<relPosition x="21" y="8"/> |
|
0 | 450 |
</connectionPointOut> |
451 |
<variable>IN4</variable> |
|
452 |
</contact> |
|
453 |
</LD> |
|
454 |
</body> |
|
455 |
</pou> |
|
456 |
<pou name="ILTest" pouType="function"> |
|
457 |
<interface> |
|
458 |
<returnType> |
|
459 |
<REAL/> |
|
460 |
</returnType> |
|
1 | 461 |
<inputVars> |
70 | 462 |
<variable name="X1"> |
1 | 463 |
<type> |
464 |
<REAL/> |
|
465 |
</type> |
|
466 |
</variable> |
|
467 |
</inputVars> |
|
0 | 468 |
<localVars> |
469 |
<variable name="Temp"> |
|
470 |
<type> |
|
471 |
<REAL/> |
|
472 |
</type> |
|
473 |
</variable> |
|
474 |
</localVars> |
|
475 |
<inputVars> |
|
476 |
<variable name="X2"> |
|
477 |
<type> |
|
478 |
<REAL/> |
|
479 |
</type> |
|
480 |
</variable> |
|
481 |
<variable name="Y1"> |
|
482 |
<type> |
|
483 |
<REAL/> |
|
484 |
</type> |
|
485 |
</variable> |
|
486 |
<variable name="Y2"> |
|
487 |
<type> |
|
488 |
<REAL/> |
|
489 |
</type> |
|
490 |
</variable> |
|
491 |
<variable name="TMax"> |
|
492 |
<type> |
|
493 |
<REAL/> |
|
494 |
</type> |
|
495 |
</variable> |
|
496 |
</inputVars> |
|
497 |
<outputVars> |
|
13
69075340d6a9
Adding support for forbidding insertion of function block into function
lbessard
parents:
2
diff
changeset
|
498 |
<variable name="ERROR"> |
0 | 499 |
<type> |
500 |
<BOOL/> |
|
501 |
</type> |
|
502 |
</variable> |
|
503 |
</outputVars> |
|
504 |
</interface> |
|
505 |
<body> |
|
506 |
<IL> |
|
67
3a1b0afdaf84
Adding support for automatically generate function blocks in interface when a block is added
lbessard
parents:
58
diff
changeset
|
507 |
<![CDATA[ |
13
69075340d6a9
Adding support for forbidding insertion of function block into function
lbessard
parents:
2
diff
changeset
|
508 |
LD Y1 |
69075340d6a9
Adding support for forbidding insertion of function block into function
lbessard
parents:
2
diff
changeset
|
509 |
SUB Y2 (* Substract Y2 from Y1 *) |
69075340d6a9
Adding support for forbidding insertion of function block into function
lbessard
parents:
2
diff
changeset
|
510 |
ST Temp (* Store Y1-Y2 in Temp *) |
69075340d6a9
Adding support for forbidding insertion of function block into function
lbessard
parents:
2
diff
changeset
|
511 |
MUL Temp (* Multiply by Temp to square *) |
69075340d6a9
Adding support for forbidding insertion of function block into function
lbessard
parents:
2
diff
changeset
|
512 |
ADD( X1 (* Defer ADD *) |
69075340d6a9
Adding support for forbidding insertion of function block into function
lbessard
parents:
2
diff
changeset
|
513 |
SUB X2 (* Substract X1 from X2 *) |
69075340d6a9
Adding support for forbidding insertion of function block into function
lbessard
parents:
2
diff
changeset
|
514 |
ST Temp (* Store X1-X2 in Temp *) |
69075340d6a9
Adding support for forbidding insertion of function block into function
lbessard
parents:
2
diff
changeset
|
515 |
MUL Temp (* Multiply by Temp to square *) |
69075340d6a9
Adding support for forbidding insertion of function block into function
lbessard
parents:
2
diff
changeset
|
516 |
) |
17 | 517 |
SQRT (* Call Square root fun *) |
13
69075340d6a9
Adding support for forbidding insertion of function block into function
lbessard
parents:
2
diff
changeset
|
518 |
ST ILTest (* Setup function result *) |
69075340d6a9
Adding support for forbidding insertion of function block into function
lbessard
parents:
2
diff
changeset
|
519 |
GT TMax (* Greater than TMax ? *) |
69075340d6a9
Adding support for forbidding insertion of function block into function
lbessard
parents:
2
diff
changeset
|
520 |
JMPC ERR (* Yes, Jump to Error *) |
69075340d6a9
Adding support for forbidding insertion of function block into function
lbessard
parents:
2
diff
changeset
|
521 |
S ERROR (* Set ERROR *) |
69075340d6a9
Adding support for forbidding insertion of function block into function
lbessard
parents:
2
diff
changeset
|
522 |
RET (* Normal return *) |
69075340d6a9
Adding support for forbidding insertion of function block into function
lbessard
parents:
2
diff
changeset
|
523 |
ERR: RET (* Error return, ENO not set *) |
67
3a1b0afdaf84
Adding support for automatically generate function blocks in interface when a block is added
lbessard
parents:
58
diff
changeset
|
524 |
]]> |
0 | 525 |
</IL> |
526 |
</body> |
|
527 |
</pou> |
|
528 |
<pou name="SFCTest" pouType="program"> |
|
529 |
<interface> |
|
530 |
<inputVars> |
|
531 |
<variable name="IN1"> |
|
532 |
<type> |
|
533 |
<BOOL/> |
|
534 |
</type> |
|
535 |
</variable> |
|
536 |
<variable name="IN2"> |
|
537 |
<type> |
|
538 |
<BOOL/> |
|
539 |
</type> |
|
540 |
</variable> |
|
541 |
<variable name="IN3"> |
|
542 |
<type> |
|
543 |
<BOOL/> |
|
544 |
</type> |
|
545 |
</variable> |
|
546 |
<variable name="IN4"> |
|
547 |
<type> |
|
548 |
<BOOL/> |
|
549 |
</type> |
|
550 |
</variable> |
|
551 |
<variable name="IN5"> |
|
552 |
<type> |
|
553 |
<BOOL/> |
|
554 |
</type> |
|
555 |
</variable> |
|
556 |
</inputVars> |
|
68
66308e07402c
Adding support for allowing declarations of function block into POU interface
lbessard
parents:
67
diff
changeset
|
557 |
<localVars> |
66308e07402c
Adding support for allowing declarations of function block into POU interface
lbessard
parents:
67
diff
changeset
|
558 |
<variable name="SR1"> |
66308e07402c
Adding support for allowing declarations of function block into POU interface
lbessard
parents:
67
diff
changeset
|
559 |
<type> |
66308e07402c
Adding support for allowing declarations of function block into POU interface
lbessard
parents:
67
diff
changeset
|
560 |
<derived name="SR"/> |
66308e07402c
Adding support for allowing declarations of function block into POU interface
lbessard
parents:
67
diff
changeset
|
561 |
</type> |
66308e07402c
Adding support for allowing declarations of function block into POU interface
lbessard
parents:
67
diff
changeset
|
562 |
</variable> |
66308e07402c
Adding support for allowing declarations of function block into POU interface
lbessard
parents:
67
diff
changeset
|
563 |
</localVars> |
0 | 564 |
</interface> |
565 |
<actions> |
|
566 |
<action name="ACT1"> |
|
567 |
<body> |
|
568 |
<ST> |
|
67
3a1b0afdaf84
Adding support for automatically generate function blocks in interface when a block is added
lbessard
parents:
58
diff
changeset
|
569 |
<![CDATA[ |
1 | 570 |
IF IN1 THEN |
2 | 571 |
IN2 := 1; |
1 | 572 |
ELSE |
2 | 573 |
IN3 := 1; |
1 | 574 |
END_IF; |
67
3a1b0afdaf84
Adding support for automatically generate function blocks in interface when a block is added
lbessard
parents:
58
diff
changeset
|
575 |
]]> |
0 | 576 |
</ST> |
577 |
</body> |
|
578 |
</action> |
|
579 |
</actions> |
|
580 |
<transitions> |
|
581 |
<transition name="TR1"> |
|
582 |
<body> |
|
151 | 583 |
<ST> |
584 |
<![CDATA[:= AND(IN1, IN2, IN3);]]> |
|
585 |
</ST> |
|
67
3a1b0afdaf84
Adding support for automatically generate function blocks in interface when a block is added
lbessard
parents:
58
diff
changeset
|
586 |
</body> |
3a1b0afdaf84
Adding support for automatically generate function blocks in interface when a block is added
lbessard
parents:
58
diff
changeset
|
587 |
</transition> |
3a1b0afdaf84
Adding support for automatically generate function blocks in interface when a block is added
lbessard
parents:
58
diff
changeset
|
588 |
<transition name="TR2"> |
3a1b0afdaf84
Adding support for automatically generate function blocks in interface when a block is added
lbessard
parents:
58
diff
changeset
|
589 |
<body> |
3a1b0afdaf84
Adding support for automatically generate function blocks in interface when a block is added
lbessard
parents:
58
diff
changeset
|
590 |
<FBD> |
151 | 591 |
<inVariable localId="2" height="27" width="54"> |
592 |
<position x="27" y="59"/> |
|
67
3a1b0afdaf84
Adding support for automatically generate function blocks in interface when a block is added
lbessard
parents:
58
diff
changeset
|
593 |
<connectionPointOut> |
151 | 594 |
<relPosition x="54" y="13"/> |
67
3a1b0afdaf84
Adding support for automatically generate function blocks in interface when a block is added
lbessard
parents:
58
diff
changeset
|
595 |
</connectionPointOut> |
3a1b0afdaf84
Adding support for automatically generate function blocks in interface when a block is added
lbessard
parents:
58
diff
changeset
|
596 |
<expression>IN1</expression> |
3a1b0afdaf84
Adding support for automatically generate function blocks in interface when a block is added
lbessard
parents:
58
diff
changeset
|
597 |
</inVariable> |
151 | 598 |
<inVariable localId="3" height="27" width="53"> |
599 |
<position x="28" y="140"/> |
|
67
3a1b0afdaf84
Adding support for automatically generate function blocks in interface when a block is added
lbessard
parents:
58
diff
changeset
|
600 |
<connectionPointOut> |
151 | 601 |
<relPosition x="53" y="13"/> |
67
3a1b0afdaf84
Adding support for automatically generate function blocks in interface when a block is added
lbessard
parents:
58
diff
changeset
|
602 |
</connectionPointOut> |
3a1b0afdaf84
Adding support for automatically generate function blocks in interface when a block is added
lbessard
parents:
58
diff
changeset
|
603 |
<expression>IN2</expression> |
3a1b0afdaf84
Adding support for automatically generate function blocks in interface when a block is added
lbessard
parents:
58
diff
changeset
|
604 |
</inVariable> |
151 | 605 |
<outVariable localId="4" height="27" width="57"> |
606 |
<position x="340" y="82"/> |
|
67
3a1b0afdaf84
Adding support for automatically generate function blocks in interface when a block is added
lbessard
parents:
58
diff
changeset
|
607 |
<connectionPointIn> |
151 | 608 |
<relPosition x="0" y="13"/> |
68
66308e07402c
Adding support for allowing declarations of function block into POU interface
lbessard
parents:
67
diff
changeset
|
609 |
<connection refLocalId="5" formalParameter="Q1"> |
151 | 610 |
<position x="340" y="95"/> |
611 |
<position x="261" y="95"/> |
|
67
3a1b0afdaf84
Adding support for automatically generate function blocks in interface when a block is added
lbessard
parents:
58
diff
changeset
|
612 |
</connection> |
3a1b0afdaf84
Adding support for automatically generate function blocks in interface when a block is added
lbessard
parents:
58
diff
changeset
|
613 |
</connectionPointIn> |
3a1b0afdaf84
Adding support for automatically generate function blocks in interface when a block is added
lbessard
parents:
58
diff
changeset
|
614 |
<expression>TR2</expression> |
3a1b0afdaf84
Adding support for automatically generate function blocks in interface when a block is added
lbessard
parents:
58
diff
changeset
|
615 |
</outVariable> |
151 | 616 |
<block localId="5" width="100" height="70" typeName="SR" instanceName="SR1"> |
617 |
<position x="161" y="63"/> |
|
68
66308e07402c
Adding support for allowing declarations of function block into POU interface
lbessard
parents:
67
diff
changeset
|
618 |
<inputVariables> |
66308e07402c
Adding support for allowing declarations of function block into POU interface
lbessard
parents:
67
diff
changeset
|
619 |
<variable formalParameter="S1"> |
66308e07402c
Adding support for allowing declarations of function block into POU interface
lbessard
parents:
67
diff
changeset
|
620 |
<connectionPointIn> |
151 | 621 |
<relPosition x="0" y="32"/> |
68
66308e07402c
Adding support for allowing declarations of function block into POU interface
lbessard
parents:
67
diff
changeset
|
622 |
<connection refLocalId="2"> |
151 | 623 |
<position x="161" y="95"/> |
624 |
<position x="121" y="95"/> |
|
625 |
<position x="121" y="72"/> |
|
626 |
<position x="81" y="72"/> |
|
68
66308e07402c
Adding support for allowing declarations of function block into POU interface
lbessard
parents:
67
diff
changeset
|
627 |
</connection> |
66308e07402c
Adding support for allowing declarations of function block into POU interface
lbessard
parents:
67
diff
changeset
|
628 |
</connectionPointIn> |
66308e07402c
Adding support for allowing declarations of function block into POU interface
lbessard
parents:
67
diff
changeset
|
629 |
</variable> |
66308e07402c
Adding support for allowing declarations of function block into POU interface
lbessard
parents:
67
diff
changeset
|
630 |
<variable formalParameter="R"> |
66308e07402c
Adding support for allowing declarations of function block into POU interface
lbessard
parents:
67
diff
changeset
|
631 |
<connectionPointIn> |
151 | 632 |
<relPosition x="0" y="57"/> |
68
66308e07402c
Adding support for allowing declarations of function block into POU interface
lbessard
parents:
67
diff
changeset
|
633 |
<connection refLocalId="3"> |
151 | 634 |
<position x="161" y="120"/> |
635 |
<position x="121" y="120"/> |
|
636 |
<position x="121" y="153"/> |
|
637 |
<position x="81" y="153"/> |
|
68
66308e07402c
Adding support for allowing declarations of function block into POU interface
lbessard
parents:
67
diff
changeset
|
638 |
</connection> |
66308e07402c
Adding support for allowing declarations of function block into POU interface
lbessard
parents:
67
diff
changeset
|
639 |
</connectionPointIn> |
66308e07402c
Adding support for allowing declarations of function block into POU interface
lbessard
parents:
67
diff
changeset
|
640 |
</variable> |
66308e07402c
Adding support for allowing declarations of function block into POU interface
lbessard
parents:
67
diff
changeset
|
641 |
</inputVariables> |
66308e07402c
Adding support for allowing declarations of function block into POU interface
lbessard
parents:
67
diff
changeset
|
642 |
<inOutVariables/> |
66308e07402c
Adding support for allowing declarations of function block into POU interface
lbessard
parents:
67
diff
changeset
|
643 |
<outputVariables> |
66308e07402c
Adding support for allowing declarations of function block into POU interface
lbessard
parents:
67
diff
changeset
|
644 |
<variable formalParameter="Q1"> |
66308e07402c
Adding support for allowing declarations of function block into POU interface
lbessard
parents:
67
diff
changeset
|
645 |
<connectionPointOut> |
151 | 646 |
<relPosition x="100" y="32"/> |
68
66308e07402c
Adding support for allowing declarations of function block into POU interface
lbessard
parents:
67
diff
changeset
|
647 |
</connectionPointOut> |
66308e07402c
Adding support for allowing declarations of function block into POU interface
lbessard
parents:
67
diff
changeset
|
648 |
</variable> |
66308e07402c
Adding support for allowing declarations of function block into POU interface
lbessard
parents:
67
diff
changeset
|
649 |
</outputVariables> |
66308e07402c
Adding support for allowing declarations of function block into POU interface
lbessard
parents:
67
diff
changeset
|
650 |
</block> |
67
3a1b0afdaf84
Adding support for automatically generate function blocks in interface when a block is added
lbessard
parents:
58
diff
changeset
|
651 |
</FBD> |
3a1b0afdaf84
Adding support for automatically generate function blocks in interface when a block is added
lbessard
parents:
58
diff
changeset
|
652 |
</body> |
3a1b0afdaf84
Adding support for automatically generate function blocks in interface when a block is added
lbessard
parents:
58
diff
changeset
|
653 |
</transition> |
3a1b0afdaf84
Adding support for automatically generate function blocks in interface when a block is added
lbessard
parents:
58
diff
changeset
|
654 |
<transition name="TR3"> |
3a1b0afdaf84
Adding support for automatically generate function blocks in interface when a block is added
lbessard
parents:
58
diff
changeset
|
655 |
<body> |
3a1b0afdaf84
Adding support for automatically generate function blocks in interface when a block is added
lbessard
parents:
58
diff
changeset
|
656 |
<LD> |
3a1b0afdaf84
Adding support for automatically generate function blocks in interface when a block is added
lbessard
parents:
58
diff
changeset
|
657 |
<leftPowerRail localId="1" height="98" width="2"> |
151 | 658 |
<position x="31" y="20"/> |
80 | 659 |
<connectionPointOut formalParameter="None"> |
151 | 660 |
<relPosition x="2" y="20"/> |
67
3a1b0afdaf84
Adding support for automatically generate function blocks in interface when a block is added
lbessard
parents:
58
diff
changeset
|
661 |
</connectionPointOut> |
80 | 662 |
<connectionPointOut formalParameter="None"> |
151 | 663 |
<relPosition x="2" y="64"/> |
67
3a1b0afdaf84
Adding support for automatically generate function blocks in interface when a block is added
lbessard
parents:
58
diff
changeset
|
664 |
</connectionPointOut> |
3a1b0afdaf84
Adding support for automatically generate function blocks in interface when a block is added
lbessard
parents:
58
diff
changeset
|
665 |
</leftPowerRail> |
151 | 666 |
<contact localId="2" height="15" width="21"> |
667 |
<position x="72" y="32"/> |
|
67
3a1b0afdaf84
Adding support for automatically generate function blocks in interface when a block is added
lbessard
parents:
58
diff
changeset
|
668 |
<connectionPointIn> |
151 | 669 |
<relPosition x="0" y="8"/> |
67
3a1b0afdaf84
Adding support for automatically generate function blocks in interface when a block is added
lbessard
parents:
58
diff
changeset
|
670 |
<connection refLocalId="1"> |
151 | 671 |
<position x="72" y="40"/> |
672 |
<position x="33" y="40"/> |
|
67
3a1b0afdaf84
Adding support for automatically generate function blocks in interface when a block is added
lbessard
parents:
58
diff
changeset
|
673 |
</connection> |
3a1b0afdaf84
Adding support for automatically generate function blocks in interface when a block is added
lbessard
parents:
58
diff
changeset
|
674 |
</connectionPointIn> |
3a1b0afdaf84
Adding support for automatically generate function blocks in interface when a block is added
lbessard
parents:
58
diff
changeset
|
675 |
<connectionPointOut> |
151 | 676 |
<relPosition x="21" y="8"/> |
67
3a1b0afdaf84
Adding support for automatically generate function blocks in interface when a block is added
lbessard
parents:
58
diff
changeset
|
677 |
</connectionPointOut> |
3a1b0afdaf84
Adding support for automatically generate function blocks in interface when a block is added
lbessard
parents:
58
diff
changeset
|
678 |
<variable>IN2</variable> |
3a1b0afdaf84
Adding support for automatically generate function blocks in interface when a block is added
lbessard
parents:
58
diff
changeset
|
679 |
</contact> |
151 | 680 |
<contact localId="3" height="15" width="21" edge="rising"> |
681 |
<position x="72" y="76"/> |
|
67
3a1b0afdaf84
Adding support for automatically generate function blocks in interface when a block is added
lbessard
parents:
58
diff
changeset
|
682 |
<connectionPointIn> |
151 | 683 |
<relPosition x="0" y="8"/> |
67
3a1b0afdaf84
Adding support for automatically generate function blocks in interface when a block is added
lbessard
parents:
58
diff
changeset
|
684 |
<connection refLocalId="1"> |
151 | 685 |
<position x="72" y="84"/> |
686 |
<position x="33" y="84"/> |
|
67
3a1b0afdaf84
Adding support for automatically generate function blocks in interface when a block is added
lbessard
parents:
58
diff
changeset
|
687 |
</connection> |
3a1b0afdaf84
Adding support for automatically generate function blocks in interface when a block is added
lbessard
parents:
58
diff
changeset
|
688 |
</connectionPointIn> |
3a1b0afdaf84
Adding support for automatically generate function blocks in interface when a block is added
lbessard
parents:
58
diff
changeset
|
689 |
<connectionPointOut> |
151 | 690 |
<relPosition x="21" y="8"/> |
67
3a1b0afdaf84
Adding support for automatically generate function blocks in interface when a block is added
lbessard
parents:
58
diff
changeset
|
691 |
</connectionPointOut> |
3a1b0afdaf84
Adding support for automatically generate function blocks in interface when a block is added
lbessard
parents:
58
diff
changeset
|
692 |
<variable>IN5</variable> |
3a1b0afdaf84
Adding support for automatically generate function blocks in interface when a block is added
lbessard
parents:
58
diff
changeset
|
693 |
</contact> |
151 | 694 |
<coil localId="4" height="15" width="21" negated="true"> |
695 |
<position x="208" y="32"/> |
|
67
3a1b0afdaf84
Adding support for automatically generate function blocks in interface when a block is added
lbessard
parents:
58
diff
changeset
|
696 |
<connectionPointIn> |
151 | 697 |
<relPosition x="0" y="8"/> |
67
3a1b0afdaf84
Adding support for automatically generate function blocks in interface when a block is added
lbessard
parents:
58
diff
changeset
|
698 |
<connection refLocalId="2"> |
151 | 699 |
<position x="208" y="40"/> |
700 |
<position x="93" y="40"/> |
|
67
3a1b0afdaf84
Adding support for automatically generate function blocks in interface when a block is added
lbessard
parents:
58
diff
changeset
|
701 |
</connection> |
3a1b0afdaf84
Adding support for automatically generate function blocks in interface when a block is added
lbessard
parents:
58
diff
changeset
|
702 |
<connection refLocalId="3"> |
151 | 703 |
<position x="208" y="40"/> |
704 |
<position x="131" y="40"/> |
|
705 |
<position x="131" y="84"/> |
|
706 |
<position x="93" y="84"/> |
|
67
3a1b0afdaf84
Adding support for automatically generate function blocks in interface when a block is added
lbessard
parents:
58
diff
changeset
|
707 |
</connection> |
3a1b0afdaf84
Adding support for automatically generate function blocks in interface when a block is added
lbessard
parents:
58
diff
changeset
|
708 |
</connectionPointIn> |
3a1b0afdaf84
Adding support for automatically generate function blocks in interface when a block is added
lbessard
parents:
58
diff
changeset
|
709 |
<connectionPointOut> |
151 | 710 |
<relPosition x="21" y="8"/> |
67
3a1b0afdaf84
Adding support for automatically generate function blocks in interface when a block is added
lbessard
parents:
58
diff
changeset
|
711 |
</connectionPointOut> |
3a1b0afdaf84
Adding support for automatically generate function blocks in interface when a block is added
lbessard
parents:
58
diff
changeset
|
712 |
<variable>TR3</variable> |
3a1b0afdaf84
Adding support for automatically generate function blocks in interface when a block is added
lbessard
parents:
58
diff
changeset
|
713 |
</coil> |
3a1b0afdaf84
Adding support for automatically generate function blocks in interface when a block is added
lbessard
parents:
58
diff
changeset
|
714 |
<rightPowerRail localId="5" height="40" width="2"> |
151 | 715 |
<position x="271" y="19"/> |
67
3a1b0afdaf84
Adding support for automatically generate function blocks in interface when a block is added
lbessard
parents:
58
diff
changeset
|
716 |
<connectionPointIn> |
151 | 717 |
<relPosition x="0" y="21"/> |
67
3a1b0afdaf84
Adding support for automatically generate function blocks in interface when a block is added
lbessard
parents:
58
diff
changeset
|
718 |
<connection refLocalId="4"> |
151 | 719 |
<position x="271" y="40"/> |
720 |
<position x="229" y="40"/> |
|
67
3a1b0afdaf84
Adding support for automatically generate function blocks in interface when a block is added
lbessard
parents:
58
diff
changeset
|
721 |
</connection> |
3a1b0afdaf84
Adding support for automatically generate function blocks in interface when a block is added
lbessard
parents:
58
diff
changeset
|
722 |
</connectionPointIn> |
3a1b0afdaf84
Adding support for automatically generate function blocks in interface when a block is added
lbessard
parents:
58
diff
changeset
|
723 |
</rightPowerRail> |
3a1b0afdaf84
Adding support for automatically generate function blocks in interface when a block is added
lbessard
parents:
58
diff
changeset
|
724 |
</LD> |
3a1b0afdaf84
Adding support for automatically generate function blocks in interface when a block is added
lbessard
parents:
58
diff
changeset
|
725 |
</body> |
3a1b0afdaf84
Adding support for automatically generate function blocks in interface when a block is added
lbessard
parents:
58
diff
changeset
|
726 |
</transition> |
3a1b0afdaf84
Adding support for automatically generate function blocks in interface when a block is added
lbessard
parents:
58
diff
changeset
|
727 |
<transition name="TR4"> |
3a1b0afdaf84
Adding support for automatically generate function blocks in interface when a block is added
lbessard
parents:
58
diff
changeset
|
728 |
<body> |
3a1b0afdaf84
Adding support for automatically generate function blocks in interface when a block is added
lbessard
parents:
58
diff
changeset
|
729 |
<IL> |
3a1b0afdaf84
Adding support for automatically generate function blocks in interface when a block is added
lbessard
parents:
58
diff
changeset
|
730 |
<![CDATA[ |
3a1b0afdaf84
Adding support for automatically generate function blocks in interface when a block is added
lbessard
parents:
58
diff
changeset
|
731 |
LD IN3 |
3a1b0afdaf84
Adding support for automatically generate function blocks in interface when a block is added
lbessard
parents:
58
diff
changeset
|
732 |
AND IN4 |
3a1b0afdaf84
Adding support for automatically generate function blocks in interface when a block is added
lbessard
parents:
58
diff
changeset
|
733 |
]]> |
3a1b0afdaf84
Adding support for automatically generate function blocks in interface when a block is added
lbessard
parents:
58
diff
changeset
|
734 |
</IL> |
0 | 735 |
</body> |
736 |
</transition> |
|
737 |
</transitions> |
|
738 |
<body> |
|
739 |
<SFC> |
|
158 | 740 |
<step localId="1" height="38" width="69" name="Start" initialStep="true"> |
741 |
<position x="71" y="39"/> |
|
742 |
<connectionPointOut formalParameter=""> |
|
743 |
<relPosition x="34" y="38"/> |
|
0 | 744 |
</connectionPointOut> |
745 |
</step> |
|
746 |
<transition localId="2" height="2" width="20"> |
|
151 | 747 |
<position x="95" y="102"/> |
748 |
<connectionPointIn> |
|
749 |
<relPosition x="10" y="0"/> |
|
0 | 750 |
<connection refLocalId="1"> |
151 | 751 |
<position x="105" y="102"/> |
752 |
<position x="105" y="77"/> |
|
753 |
</connection> |
|
754 |
</connectionPointIn> |
|
755 |
<connectionPointOut> |
|
756 |
<relPosition x="10" y="2"/> |
|
0 | 757 |
</connectionPointOut> |
758 |
<condition> |
|
759 |
<reference name="TR1"/> |
|
760 |
</condition> |
|
761 |
</transition> |
|
158 | 762 |
<step localId="3" height="27" width="52" name="Init"> |
763 |
<position x="79" y="129"/> |
|
764 |
<connectionPointIn> |
|
765 |
<relPosition x="26" y="0"/> |
|
0 | 766 |
<connection refLocalId="2"> |
151 | 767 |
<position x="105" y="129"/> |
768 |
<position x="105" y="104"/> |
|
0 | 769 |
</connection> |
770 |
</connectionPointIn> |
|
158 | 771 |
<connectionPointOut formalParameter=""> |
772 |
<relPosition x="26" y="27"/> |
|
773 |
</connectionPointOut> |
|
774 |
<connectionPointOutAction formalParameter=""> |
|
775 |
<relPosition x="52" y="13"/> |
|
0 | 776 |
</connectionPointOutAction> |
777 |
</step> |
|
2 | 778 |
<selectionDivergence localId="4" height="1" width="391"> |
151 | 779 |
<position x="105" y="181"/> |
780 |
<connectionPointIn> |
|
781 |
<relPosition x="0" y="0"/> |
|
0 | 782 |
<connection refLocalId="3"> |
151 | 783 |
<position x="105" y="181"/> |
784 |
<position x="105" y="156"/> |
|
0 | 785 |
</connection> |
786 |
</connectionPointIn> |
|
158 | 787 |
<connectionPointOut formalParameter=""> |
151 | 788 |
<relPosition x="0" y="1"/> |
0 | 789 |
</connectionPointOut> |
158 | 790 |
<connectionPointOut formalParameter=""> |
151 | 791 |
<relPosition x="228" y="1"/> |
2 | 792 |
</connectionPointOut> |
158 | 793 |
<connectionPointOut formalParameter=""> |
151 | 794 |
<relPosition x="391" y="1"/> |
0 | 795 |
</connectionPointOut> |
796 |
</selectionDivergence> |
|
797 |
<transition localId="5" height="2" width="20"> |
|
151 | 798 |
<position x="95" y="207"/> |
799 |
<connectionPointIn> |
|
800 |
<relPosition x="10" y="0"/> |
|
0 | 801 |
<connection refLocalId="4"> |
151 | 802 |
<position x="105" y="207"/> |
803 |
<position x="105" y="182"/> |
|
804 |
</connection> |
|
805 |
</connectionPointIn> |
|
806 |
<connectionPointOut> |
|
807 |
<relPosition x="10" y="2"/> |
|
0 | 808 |
</connectionPointOut> |
809 |
<condition> |
|
80 | 810 |
<inline name="None"> |
151 | 811 |
<ST> |
812 |
<![CDATA[IN2 AND IN3]]> |
|
813 |
</ST> |
|
0 | 814 |
</inline> |
815 |
</condition> |
|
816 |
</transition> |
|
158 | 817 |
<step localId="6" height="37" width="63" name="Step1"> |
818 |
<position x="74" y="262"/> |
|
819 |
<connectionPointIn> |
|
820 |
<relPosition x="31" y="0"/> |
|
2 | 821 |
<connection refLocalId="21"> |
151 | 822 |
<position x="105" y="262"/> |
823 |
<position x="105" y="237"/> |
|
0 | 824 |
</connection> |
825 |
</connectionPointIn> |
|
158 | 826 |
<connectionPointOut formalParameter=""> |
827 |
<relPosition x="31" y="37"/> |
|
0 | 828 |
</connectionPointOut> |
829 |
</step> |
|
151 | 830 |
<transition localId="7" height="2" width="20" priority="1"> |
831 |
<position x="323" y="207"/> |
|
832 |
<connectionPointIn> |
|
833 |
<relPosition x="10" y="0"/> |
|
0 | 834 |
<connection refLocalId="4"> |
151 | 835 |
<position x="333" y="207"/> |
836 |
<position x="333" y="182"/> |
|
837 |
</connection> |
|
838 |
</connectionPointIn> |
|
839 |
<connectionPointOut> |
|
840 |
<relPosition x="10" y="2"/> |
|
0 | 841 |
</connectionPointOut> |
842 |
<condition> |
|
67
3a1b0afdaf84
Adding support for automatically generate function blocks in interface when a block is added
lbessard
parents:
58
diff
changeset
|
843 |
<reference name="TR2"/> |
0 | 844 |
</condition> |
845 |
</transition> |
|
158 | 846 |
<step localId="8" height="35" width="57" name="Step2"> |
847 |
<position x="305" y="234"/> |
|
848 |
<connectionPointIn> |
|
849 |
<relPosition x="28" y="0"/> |
|
0 | 850 |
<connection refLocalId="7"> |
151 | 851 |
<position x="333" y="234"/> |
852 |
<position x="333" y="209"/> |
|
0 | 853 |
</connection> |
854 |
</connectionPointIn> |
|
158 | 855 |
<connectionPointOut formalParameter=""> |
856 |
<relPosition x="28" y="35"/> |
|
0 | 857 |
</connectionPointOut> |
858 |
</step> |
|
859 |
<transition localId="9" height="2" width="20"> |
|
151 | 860 |
<position x="486" y="207"/> |
861 |
<connectionPointIn> |
|
862 |
<relPosition x="10" y="0"/> |
|
0 | 863 |
<connection refLocalId="4"> |
151 | 864 |
<position x="496" y="207"/> |
865 |
<position x="496" y="182"/> |
|
866 |
</connection> |
|
867 |
</connectionPointIn> |
|
868 |
<connectionPointOut> |
|
869 |
<relPosition x="10" y="2"/> |
|
0 | 870 |
</connectionPointOut> |
871 |
<condition> |
|
67
3a1b0afdaf84
Adding support for automatically generate function blocks in interface when a block is added
lbessard
parents:
58
diff
changeset
|
872 |
<reference name="TR4"/> |
0 | 873 |
</condition> |
874 |
</transition> |
|
158 | 875 |
<step localId="10" height="36" width="60" name="Step3"> |
876 |
<position x="466" y="234"/> |
|
877 |
<connectionPointIn> |
|
878 |
<relPosition x="30" y="0"/> |
|
0 | 879 |
<connection refLocalId="9"> |
151 | 880 |
<position x="496" y="234"/> |
881 |
<position x="496" y="209"/> |
|
0 | 882 |
</connection> |
883 |
</connectionPointIn> |
|
158 | 884 |
<connectionPointOut formalParameter=""> |
885 |
<relPosition x="30" y="36"/> |
|
886 |
</connectionPointOut> |
|
887 |
<connectionPointOutAction formalParameter=""> |
|
888 |
<relPosition x="60" y="18"/> |
|
0 | 889 |
</connectionPointOutAction> |
890 |
</step> |
|
891 |
<transition localId="11" height="2" width="20"> |
|
158 | 892 |
<position x="95" y="362"/> |
151 | 893 |
<connectionPointIn> |
894 |
<relPosition x="10" y="0"/> |
|
2 | 895 |
<connection refLocalId="23"> |
158 | 896 |
<position x="105" y="362"/> |
897 |
<position x="105" y="337"/> |
|
151 | 898 |
</connection> |
899 |
</connectionPointIn> |
|
900 |
<connectionPointOut> |
|
901 |
<relPosition x="10" y="2"/> |
|
0 | 902 |
</connectionPointOut> |
903 |
<condition> |
|
67
3a1b0afdaf84
Adding support for automatically generate function blocks in interface when a block is added
lbessard
parents:
58
diff
changeset
|
904 |
<reference name="TR3"/> |
0 | 905 |
</condition> |
906 |
</transition> |
|
907 |
<jumpStep localId="12" height="13" width="12" targetName="Start"> |
|
158 | 908 |
<position x="99" y="389"/> |
151 | 909 |
<connectionPointIn> |
910 |
<relPosition x="6" y="0"/> |
|
0 | 911 |
<connection refLocalId="11"> |
158 | 912 |
<position x="105" y="389"/> |
913 |
<position x="105" y="364"/> |
|
0 | 914 |
</connection> |
915 |
</connectionPointIn> |
|
916 |
</jumpStep> |
|
392 | 917 |
<actionBlock localId="13" width="100" height="30"> |
158 | 918 |
<position x="175" y="127"/> |
151 | 919 |
<connectionPointIn> |
920 |
<relPosition x="0" y="15"/> |
|
0 | 921 |
<connection refLocalId="3"> |
158 | 922 |
<position x="175" y="142"/> |
923 |
<position x="131" y="142"/> |
|
0 | 924 |
</connection> |
925 |
</connectionPointIn> |
|
392 | 926 |
<action localId="0"> |
927 |
<relPosition x="0" y="0"/> |
|
0 | 928 |
<reference name="ACT1"/> |
929 |
</action> |
|
930 |
</actionBlock> |
|
931 |
<transition localId="14" height="2" width="20"> |
|
158 | 932 |
<position x="323" y="294"/> |
151 | 933 |
<connectionPointIn> |
934 |
<relPosition x="10" y="0"/> |
|
0 | 935 |
<connection refLocalId="8"> |
158 | 936 |
<position x="333" y="294"/> |
937 |
<position x="333" y="269"/> |
|
151 | 938 |
</connection> |
939 |
</connectionPointIn> |
|
940 |
<connectionPointOut> |
|
941 |
<relPosition x="10" y="2"/> |
|
0 | 942 |
</connectionPointOut> |
943 |
<condition> |
|
158 | 944 |
<inline name=""> |
151 | 945 |
<ST> |
946 |
<![CDATA[IN5]]> |
|
947 |
</ST> |
|
0 | 948 |
</inline> |
949 |
</condition> |
|
950 |
</transition> |
|
951 |
<transition localId="15" height="2" width="20"> |
|
151 | 952 |
<position x="486" y="346"/> |
953 |
<connectionPointIn> |
|
954 |
<relPosition x="10" y="0"/> |
|
0 | 955 |
<connection refLocalId="10"> |
151 | 956 |
<position x="496" y="346"/> |
158 | 957 |
<position x="496" y="270"/> |
151 | 958 |
</connection> |
959 |
</connectionPointIn> |
|
960 |
<connectionPointOut> |
|
961 |
<relPosition x="10" y="2"/> |
|
0 | 962 |
</connectionPointOut> |
963 |
<condition> |
|
158 | 964 |
<inline name=""> |
151 | 965 |
<ST> |
966 |
<![CDATA[IN5]]> |
|
967 |
</ST> |
|
0 | 968 |
</inline> |
969 |
</condition> |
|
970 |
</transition> |
|
2 | 971 |
<selectionConvergence localId="16" height="1" width="163"> |
151 | 972 |
<position x="333" y="373"/> |
973 |
<connectionPointIn> |
|
974 |
<relPosition x="0" y="0"/> |
|
0 | 975 |
<connection refLocalId="14"> |
151 | 976 |
<position x="333" y="373"/> |
158 | 977 |
<position x="333" y="296"/> |
151 | 978 |
</connection> |
979 |
</connectionPointIn> |
|
980 |
<connectionPointIn> |
|
981 |
<relPosition x="163" y="0"/> |
|
0 | 982 |
<connection refLocalId="15"> |
151 | 983 |
<position x="496" y="373"/> |
984 |
<position x="496" y="348"/> |
|
985 |
</connection> |
|
986 |
</connectionPointIn> |
|
987 |
<connectionPointOut> |
|
988 |
<relPosition x="80" y="1"/> |
|
0 | 989 |
</connectionPointOut> |
990 |
</selectionConvergence> |
|
991 |
<jumpStep localId="19" height="13" width="12" targetName="Init"> |
|
151 | 992 |
<position x="407" y="399"/> |
993 |
<connectionPointIn> |
|
994 |
<relPosition x="6" y="0"/> |
|
0 | 995 |
<connection refLocalId="16"> |
151 | 996 |
<position x="413" y="399"/> |
997 |
<position x="413" y="374"/> |
|
0 | 998 |
</connection> |
999 |
</connectionPointIn> |
|
1000 |
</jumpStep> |
|
392 | 1001 |
<actionBlock localId="20" width="237" height="90"> |
158 | 1002 |
<position x="582" y="237"/> |
151 | 1003 |
<connectionPointIn> |
1004 |
<relPosition x="0" y="15"/> |
|
0 | 1005 |
<connection refLocalId="10"> |
158 | 1006 |
<position x="582" y="252"/> |
1007 |
<position x="526" y="252"/> |
|
0 | 1008 |
</connection> |
1009 |
</connectionPointIn> |
|
392 | 1010 |
<action localId="0" indicator="IN5"> |
1011 |
<relPosition x="0" y="0"/> |
|
0 | 1012 |
<reference name="ACT1"/> |
1013 |
</action> |
|
392 | 1014 |
<action localId="0" qualifier="D" duration="T#10s"> |
1015 |
<relPosition x="0" y="0"/> |
|
0 | 1016 |
<reference name="IN1"/> |
1017 |
</action> |
|
392 | 1018 |
<action localId="0" qualifier="P"> |
1019 |
<relPosition x="0" y="0"/> |
|
46 | 1020 |
<inline> |
151 | 1021 |
<ST> |
1022 |
<![CDATA[IN2 := TRUE;]]> |
|
1023 |
</ST> |
|
46 | 1024 |
</inline> |
1025 |
</action> |
|
0 | 1026 |
</actionBlock> |
2 | 1027 |
<simultaneousDivergence localId="21" height="3" width="118"> |
151 | 1028 |
<position x="105" y="234"/> |
1029 |
<connectionPointIn> |
|
1030 |
<relPosition x="0" y="0"/> |
|
2 | 1031 |
<connection refLocalId="5"> |
151 | 1032 |
<position x="105" y="234"/> |
1033 |
<position x="105" y="209"/> |
|
2 | 1034 |
</connection> |
1035 |
</connectionPointIn> |
|
80 | 1036 |
<connectionPointOut formalParameter="None"> |
151 | 1037 |
<relPosition x="0" y="3"/> |
2 | 1038 |
</connectionPointOut> |
80 | 1039 |
<connectionPointOut formalParameter="None"> |
151 | 1040 |
<relPosition x="118" y="3"/> |
2 | 1041 |
</connectionPointOut> |
1042 |
</simultaneousDivergence> |
|
158 | 1043 |
<step localId="22" height="36" width="61" name="Step4"> |
1044 |
<position x="193" y="261"/> |
|
1045 |
<connectionPointIn> |
|
1046 |
<relPosition x="30" y="0"/> |
|
2 | 1047 |
<connection refLocalId="21"> |
158 | 1048 |
<position x="223" y="261"/> |
151 | 1049 |
<position x="223" y="237"/> |
2 | 1050 |
</connection> |
1051 |
</connectionPointIn> |
|
158 | 1052 |
<connectionPointOut formalParameter=""> |
1053 |
<relPosition x="30" y="36"/> |
|
2 | 1054 |
</connectionPointOut> |
1055 |
</step> |
|
1056 |
<simultaneousConvergence localId="23" height="3" width="118"> |
|
158 | 1057 |
<position x="105" y="334"/> |
151 | 1058 |
<connectionPointIn> |
1059 |
<relPosition x="0" y="0"/> |
|
2 | 1060 |
<connection refLocalId="6"> |
158 | 1061 |
<position x="105" y="334"/> |
1062 |
<position x="105" y="299"/> |
|
151 | 1063 |
</connection> |
1064 |
</connectionPointIn> |
|
1065 |
<connectionPointIn> |
|
1066 |
<relPosition x="118" y="0"/> |
|
2 | 1067 |
<connection refLocalId="22"> |
158 | 1068 |
<position x="223" y="334"/> |
1069 |
<position x="223" y="297"/> |
|
151 | 1070 |
</connection> |
1071 |
</connectionPointIn> |
|
1072 |
<connectionPointOut> |
|
1073 |
<relPosition x="0" y="3"/> |
|
2 | 1074 |
</connectionPointOut> |
1075 |
</simultaneousConvergence> |
|
0 | 1076 |
</SFC> |
1077 |
</body> |
|
1078 |
</pou> |
|
1079 |
<pou name="STTest" pouType="functionBlock"> |
|
1080 |
<interface> |
|
1081 |
<inputVars> |
|
1082 |
<variable name="Collision"> |
|
1083 |
<type> |
|
1084 |
<BOOL/> |
|
1085 |
</type> |
|
1086 |
</variable> |
|
1087 |
<variable name="Gate"> |
|
1088 |
<type> |
|
1089 |
<BOOL/> |
|
1090 |
</type> |
|
1091 |
</variable> |
|
1092 |
<variable name="Pump"> |
|
1093 |
<type> |
|
1094 |
<BOOL/> |
|
1095 |
</type> |
|
1096 |
</variable> |
|
1097 |
<variable name="Temp"> |
|
1098 |
<type> |
|
17 | 1099 |
<REAL/> |
0 | 1100 |
</type> |
1101 |
</variable> |
|
1102 |
</inputVars> |
|
1103 |
<outputVars> |
|
1104 |
<variable name="Speed"> |
|
1105 |
<type> |
|
1106 |
<INT/> |
|
1107 |
</type> |
|
1108 |
</variable> |
|
1109 |
<variable name="PumpSpeed"> |
|
1110 |
<type> |
|
1111 |
<INT/> |
|
1112 |
</type> |
|
1113 |
</variable> |
|
1114 |
<variable name="Brakes"> |
|
1115 |
<type> |
|
1116 |
<BOOL/> |
|
1117 |
</type> |
|
1118 |
</variable> |
|
1119 |
<variable name="Control_State"> |
|
1120 |
<type> |
|
1121 |
<BOOL/> |
|
1122 |
</type> |
|
1123 |
</variable> |
|
1124 |
</outputVars> |
|
1125 |
</interface> |
|
1126 |
<body> |
|
1127 |
<ST> |
|
67
3a1b0afdaf84
Adding support for automatically generate function blocks in interface when a block is added
lbessard
parents:
58
diff
changeset
|
1128 |
<![CDATA[ |
1 | 1129 |
IF Collision THEN |
2 | 1130 |
Speed := 0; |
13
69075340d6a9
Adding support for forbidding insertion of function block into function
lbessard
parents:
2
diff
changeset
|
1131 |
Brakes := TRUE; |
1 | 1132 |
END_IF; |
0 | 1133 |
|
126 | 1134 |
IF (Gate = open) AND |
13
69075340d6a9
Adding support for forbidding insertion of function block into function
lbessard
parents:
2
diff
changeset
|
1135 |
(Pump = TRUE) AND (Temp > 200.0) THEN |
69075340d6a9
Adding support for forbidding insertion of function block into function
lbessard
parents:
2
diff
changeset
|
1136 |
Control_State := TRUE; |
1 | 1137 |
ELSE |
13
69075340d6a9
Adding support for forbidding insertion of function block into function
lbessard
parents:
2
diff
changeset
|
1138 |
Control_State := FALSE; |
56
7187e1c00975
Adding support for Undo/Redo and Unsaved File On Close detection
lbessard
parents:
47
diff
changeset
|
1139 |
|
2 | 1140 |
PumpSpeed := 10.0; |
1 | 1141 |
END_IF; |
67
3a1b0afdaf84
Adding support for automatically generate function blocks in interface when a block is added
lbessard
parents:
58
diff
changeset
|
1142 |
]]> |
0 | 1143 |
</ST> |
1144 |
</body> |
|
1145 |
</pou> |
|
1146 |
</pous> |
|
1147 |
</types> |
|
1148 |
<instances> |
|
1149 |
<configurations> |
|
1150 |
<configuration name="ConfigTest"> |
|
1151 |
<resource name="ResourceTest"> |
|
151 | 1152 |
<task name="Toto" single="Tutu" priority="6"> |
392 | 1153 |
<pouInstance name="Program1" typeName="SFCTest"/> |
0 | 1154 |
</task> |
1155 |
<globalVars> |
|
56
7187e1c00975
Adding support for Undo/Redo and Unsaved File On Close detection
lbessard
parents:
47
diff
changeset
|
1156 |
<variable name="Titi" address="%MW30"> |
0 | 1157 |
<type> |
1158 |
<INT/> |
|
1159 |
</type> |
|
1160 |
</variable> |
|
1161 |
</globalVars> |
|
1162 |
</resource> |
|
1163 |
<globalVars> |
|
56
7187e1c00975
Adding support for Undo/Redo and Unsaved File On Close detection
lbessard
parents:
47
diff
changeset
|
1164 |
<variable name="Toto" address="%MW10"> |
0 | 1165 |
<type> |
1166 |
<INT/> |
|
1167 |
</type> |
|
1168 |
</variable> |
|
56
7187e1c00975
Adding support for Undo/Redo and Unsaved File On Close detection
lbessard
parents:
47
diff
changeset
|
1169 |
<variable name="Tutu" address="%MX20"> |
0 | 1170 |
<type> |
1171 |
<BOOL/> |
|
1172 |
</type> |
|
1173 |
</variable> |
|
1174 |
</globalVars> |
|
1175 |
</configuration> |
|
1176 |
</configurations> |
|
1177 |
</instances> |
|
1178 |
</project> |