author | Laurent Bessard |
Sat, 07 Jul 2012 20:50:24 +0200 | |
changeset 721 | f3dffc1a5ffe |
parent 455 | d39f7fb16ec9 |
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"> |
455 | 6 |
<fileHeader companyName="Example" |
7 |
companyURL="none" |
|
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" |
431
c1c92d068ac5
Changes merged
'Laurent Bessard <laurent.bessard@lolitech.fr>'
parents:
392
diff
changeset
|
15 |
modificationDateTime="2009-09-21T17:43:10" |
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> |
|
431
c1c92d068ac5
Changes merged
'Laurent Bessard <laurent.bessard@lolitech.fr>'
parents:
392
diff
changeset
|
530 |
<localVars> |
c1c92d068ac5
Changes merged
'Laurent Bessard <laurent.bessard@lolitech.fr>'
parents:
392
diff
changeset
|
531 |
<variable name="IN1"> |
c1c92d068ac5
Changes merged
'Laurent Bessard <laurent.bessard@lolitech.fr>'
parents:
392
diff
changeset
|
532 |
<type> |
c1c92d068ac5
Changes merged
'Laurent Bessard <laurent.bessard@lolitech.fr>'
parents:
392
diff
changeset
|
533 |
<BOOL/> |
c1c92d068ac5
Changes merged
'Laurent Bessard <laurent.bessard@lolitech.fr>'
parents:
392
diff
changeset
|
534 |
</type> |
c1c92d068ac5
Changes merged
'Laurent Bessard <laurent.bessard@lolitech.fr>'
parents:
392
diff
changeset
|
535 |
</variable> |
c1c92d068ac5
Changes merged
'Laurent Bessard <laurent.bessard@lolitech.fr>'
parents:
392
diff
changeset
|
536 |
</localVars> |
0 | 537 |
<inputVars> |
538 |
<variable name="IN2"> |
|
539 |
<type> |
|
540 |
<BOOL/> |
|
541 |
</type> |
|
542 |
</variable> |
|
543 |
<variable name="IN3"> |
|
544 |
<type> |
|
545 |
<BOOL/> |
|
546 |
</type> |
|
547 |
</variable> |
|
548 |
<variable name="IN4"> |
|
549 |
<type> |
|
550 |
<BOOL/> |
|
551 |
</type> |
|
552 |
</variable> |
|
553 |
<variable name="IN5"> |
|
554 |
<type> |
|
555 |
<BOOL/> |
|
556 |
</type> |
|
557 |
</variable> |
|
558 |
</inputVars> |
|
68
66308e07402c
Adding support for allowing declarations of function block into POU interface
lbessard
parents:
67
diff
changeset
|
559 |
<localVars> |
66308e07402c
Adding support for allowing declarations of function block into POU interface
lbessard
parents:
67
diff
changeset
|
560 |
<variable name="SR1"> |
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 |
<derived name="SR"/> |
66308e07402c
Adding support for allowing declarations of function block into POU interface
lbessard
parents:
67
diff
changeset
|
563 |
</type> |
66308e07402c
Adding support for allowing declarations of function block into POU interface
lbessard
parents:
67
diff
changeset
|
564 |
</variable> |
66308e07402c
Adding support for allowing declarations of function block into POU interface
lbessard
parents:
67
diff
changeset
|
565 |
</localVars> |
0 | 566 |
</interface> |
567 |
<actions> |
|
568 |
<action name="ACT1"> |
|
569 |
<body> |
|
570 |
<ST> |
|
67
3a1b0afdaf84
Adding support for automatically generate function blocks in interface when a block is added
lbessard
parents:
58
diff
changeset
|
571 |
<![CDATA[ |
1 | 572 |
IF IN1 THEN |
2 | 573 |
IN2 := 1; |
1 | 574 |
ELSE |
2 | 575 |
IN3 := 1; |
1 | 576 |
END_IF; |
67
3a1b0afdaf84
Adding support for automatically generate function blocks in interface when a block is added
lbessard
parents:
58
diff
changeset
|
577 |
]]> |
0 | 578 |
</ST> |
579 |
</body> |
|
580 |
</action> |
|
581 |
</actions> |
|
582 |
<transitions> |
|
583 |
<transition name="TR1"> |
|
584 |
<body> |
|
151 | 585 |
<ST> |
586 |
<![CDATA[:= AND(IN1, IN2, IN3);]]> |
|
587 |
</ST> |
|
67
3a1b0afdaf84
Adding support for automatically generate function blocks in interface when a block is added
lbessard
parents:
58
diff
changeset
|
588 |
</body> |
3a1b0afdaf84
Adding support for automatically generate function blocks in interface when a block is added
lbessard
parents:
58
diff
changeset
|
589 |
</transition> |
3a1b0afdaf84
Adding support for automatically generate function blocks in interface when a block is added
lbessard
parents:
58
diff
changeset
|
590 |
<transition name="TR2"> |
3a1b0afdaf84
Adding support for automatically generate function blocks in interface when a block is added
lbessard
parents:
58
diff
changeset
|
591 |
<body> |
3a1b0afdaf84
Adding support for automatically generate function blocks in interface when a block is added
lbessard
parents:
58
diff
changeset
|
592 |
<FBD> |
151 | 593 |
<inVariable localId="2" height="27" width="54"> |
594 |
<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
|
595 |
<connectionPointOut> |
151 | 596 |
<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
|
597 |
</connectionPointOut> |
3a1b0afdaf84
Adding support for automatically generate function blocks in interface when a block is added
lbessard
parents:
58
diff
changeset
|
598 |
<expression>IN1</expression> |
3a1b0afdaf84
Adding support for automatically generate function blocks in interface when a block is added
lbessard
parents:
58
diff
changeset
|
599 |
</inVariable> |
151 | 600 |
<inVariable localId="3" height="27" width="53"> |
601 |
<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
|
602 |
<connectionPointOut> |
151 | 603 |
<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
|
604 |
</connectionPointOut> |
3a1b0afdaf84
Adding support for automatically generate function blocks in interface when a block is added
lbessard
parents:
58
diff
changeset
|
605 |
<expression>IN2</expression> |
3a1b0afdaf84
Adding support for automatically generate function blocks in interface when a block is added
lbessard
parents:
58
diff
changeset
|
606 |
</inVariable> |
151 | 607 |
<outVariable localId="4" height="27" width="57"> |
608 |
<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
|
609 |
<connectionPointIn> |
151 | 610 |
<relPosition x="0" y="13"/> |
68
66308e07402c
Adding support for allowing declarations of function block into POU interface
lbessard
parents:
67
diff
changeset
|
611 |
<connection refLocalId="5" formalParameter="Q1"> |
151 | 612 |
<position x="340" y="95"/> |
613 |
<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
|
614 |
</connection> |
3a1b0afdaf84
Adding support for automatically generate function blocks in interface when a block is added
lbessard
parents:
58
diff
changeset
|
615 |
</connectionPointIn> |
3a1b0afdaf84
Adding support for automatically generate function blocks in interface when a block is added
lbessard
parents:
58
diff
changeset
|
616 |
<expression>TR2</expression> |
3a1b0afdaf84
Adding support for automatically generate function blocks in interface when a block is added
lbessard
parents:
58
diff
changeset
|
617 |
</outVariable> |
151 | 618 |
<block localId="5" width="100" height="70" typeName="SR" instanceName="SR1"> |
619 |
<position x="161" y="63"/> |
|
68
66308e07402c
Adding support for allowing declarations of function block into POU interface
lbessard
parents:
67
diff
changeset
|
620 |
<inputVariables> |
66308e07402c
Adding support for allowing declarations of function block into POU interface
lbessard
parents:
67
diff
changeset
|
621 |
<variable formalParameter="S1"> |
66308e07402c
Adding support for allowing declarations of function block into POU interface
lbessard
parents:
67
diff
changeset
|
622 |
<connectionPointIn> |
151 | 623 |
<relPosition x="0" y="32"/> |
68
66308e07402c
Adding support for allowing declarations of function block into POU interface
lbessard
parents:
67
diff
changeset
|
624 |
<connection refLocalId="2"> |
151 | 625 |
<position x="161" y="95"/> |
626 |
<position x="121" y="95"/> |
|
627 |
<position x="121" y="72"/> |
|
628 |
<position x="81" y="72"/> |
|
68
66308e07402c
Adding support for allowing declarations of function block into POU interface
lbessard
parents:
67
diff
changeset
|
629 |
</connection> |
66308e07402c
Adding support for allowing declarations of function block into POU interface
lbessard
parents:
67
diff
changeset
|
630 |
</connectionPointIn> |
66308e07402c
Adding support for allowing declarations of function block into POU interface
lbessard
parents:
67
diff
changeset
|
631 |
</variable> |
66308e07402c
Adding support for allowing declarations of function block into POU interface
lbessard
parents:
67
diff
changeset
|
632 |
<variable formalParameter="R"> |
66308e07402c
Adding support for allowing declarations of function block into POU interface
lbessard
parents:
67
diff
changeset
|
633 |
<connectionPointIn> |
151 | 634 |
<relPosition x="0" y="57"/> |
68
66308e07402c
Adding support for allowing declarations of function block into POU interface
lbessard
parents:
67
diff
changeset
|
635 |
<connection refLocalId="3"> |
151 | 636 |
<position x="161" y="120"/> |
637 |
<position x="121" y="120"/> |
|
638 |
<position x="121" y="153"/> |
|
639 |
<position x="81" y="153"/> |
|
68
66308e07402c
Adding support for allowing declarations of function block into POU interface
lbessard
parents:
67
diff
changeset
|
640 |
</connection> |
66308e07402c
Adding support for allowing declarations of function block into POU interface
lbessard
parents:
67
diff
changeset
|
641 |
</connectionPointIn> |
66308e07402c
Adding support for allowing declarations of function block into POU interface
lbessard
parents:
67
diff
changeset
|
642 |
</variable> |
66308e07402c
Adding support for allowing declarations of function block into POU interface
lbessard
parents:
67
diff
changeset
|
643 |
</inputVariables> |
66308e07402c
Adding support for allowing declarations of function block into POU interface
lbessard
parents:
67
diff
changeset
|
644 |
<inOutVariables/> |
66308e07402c
Adding support for allowing declarations of function block into POU interface
lbessard
parents:
67
diff
changeset
|
645 |
<outputVariables> |
66308e07402c
Adding support for allowing declarations of function block into POU interface
lbessard
parents:
67
diff
changeset
|
646 |
<variable formalParameter="Q1"> |
66308e07402c
Adding support for allowing declarations of function block into POU interface
lbessard
parents:
67
diff
changeset
|
647 |
<connectionPointOut> |
151 | 648 |
<relPosition x="100" y="32"/> |
68
66308e07402c
Adding support for allowing declarations of function block into POU interface
lbessard
parents:
67
diff
changeset
|
649 |
</connectionPointOut> |
66308e07402c
Adding support for allowing declarations of function block into POU interface
lbessard
parents:
67
diff
changeset
|
650 |
</variable> |
66308e07402c
Adding support for allowing declarations of function block into POU interface
lbessard
parents:
67
diff
changeset
|
651 |
</outputVariables> |
66308e07402c
Adding support for allowing declarations of function block into POU interface
lbessard
parents:
67
diff
changeset
|
652 |
</block> |
67
3a1b0afdaf84
Adding support for automatically generate function blocks in interface when a block is added
lbessard
parents:
58
diff
changeset
|
653 |
</FBD> |
3a1b0afdaf84
Adding support for automatically generate function blocks in interface when a block is added
lbessard
parents:
58
diff
changeset
|
654 |
</body> |
3a1b0afdaf84
Adding support for automatically generate function blocks in interface when a block is added
lbessard
parents:
58
diff
changeset
|
655 |
</transition> |
3a1b0afdaf84
Adding support for automatically generate function blocks in interface when a block is added
lbessard
parents:
58
diff
changeset
|
656 |
<transition name="TR3"> |
3a1b0afdaf84
Adding support for automatically generate function blocks in interface when a block is added
lbessard
parents:
58
diff
changeset
|
657 |
<body> |
3a1b0afdaf84
Adding support for automatically generate function blocks in interface when a block is added
lbessard
parents:
58
diff
changeset
|
658 |
<LD> |
3a1b0afdaf84
Adding support for automatically generate function blocks in interface when a block is added
lbessard
parents:
58
diff
changeset
|
659 |
<leftPowerRail localId="1" height="98" width="2"> |
151 | 660 |
<position x="31" y="20"/> |
80 | 661 |
<connectionPointOut formalParameter="None"> |
151 | 662 |
<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
|
663 |
</connectionPointOut> |
80 | 664 |
<connectionPointOut formalParameter="None"> |
151 | 665 |
<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
|
666 |
</connectionPointOut> |
3a1b0afdaf84
Adding support for automatically generate function blocks in interface when a block is added
lbessard
parents:
58
diff
changeset
|
667 |
</leftPowerRail> |
151 | 668 |
<contact localId="2" height="15" width="21"> |
669 |
<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
|
670 |
<connectionPointIn> |
151 | 671 |
<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
|
672 |
<connection refLocalId="1"> |
151 | 673 |
<position x="72" y="40"/> |
674 |
<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
|
675 |
</connection> |
3a1b0afdaf84
Adding support for automatically generate function blocks in interface when a block is added
lbessard
parents:
58
diff
changeset
|
676 |
</connectionPointIn> |
3a1b0afdaf84
Adding support for automatically generate function blocks in interface when a block is added
lbessard
parents:
58
diff
changeset
|
677 |
<connectionPointOut> |
151 | 678 |
<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
|
679 |
</connectionPointOut> |
3a1b0afdaf84
Adding support for automatically generate function blocks in interface when a block is added
lbessard
parents:
58
diff
changeset
|
680 |
<variable>IN2</variable> |
3a1b0afdaf84
Adding support for automatically generate function blocks in interface when a block is added
lbessard
parents:
58
diff
changeset
|
681 |
</contact> |
151 | 682 |
<contact localId="3" height="15" width="21" edge="rising"> |
683 |
<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
|
684 |
<connectionPointIn> |
151 | 685 |
<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
|
686 |
<connection refLocalId="1"> |
151 | 687 |
<position x="72" y="84"/> |
688 |
<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
|
689 |
</connection> |
3a1b0afdaf84
Adding support for automatically generate function blocks in interface when a block is added
lbessard
parents:
58
diff
changeset
|
690 |
</connectionPointIn> |
3a1b0afdaf84
Adding support for automatically generate function blocks in interface when a block is added
lbessard
parents:
58
diff
changeset
|
691 |
<connectionPointOut> |
151 | 692 |
<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
|
693 |
</connectionPointOut> |
3a1b0afdaf84
Adding support for automatically generate function blocks in interface when a block is added
lbessard
parents:
58
diff
changeset
|
694 |
<variable>IN5</variable> |
3a1b0afdaf84
Adding support for automatically generate function blocks in interface when a block is added
lbessard
parents:
58
diff
changeset
|
695 |
</contact> |
151 | 696 |
<coil localId="4" height="15" width="21" negated="true"> |
697 |
<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
|
698 |
<connectionPointIn> |
151 | 699 |
<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
|
700 |
<connection refLocalId="2"> |
151 | 701 |
<position x="208" y="40"/> |
702 |
<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
|
703 |
</connection> |
3a1b0afdaf84
Adding support for automatically generate function blocks in interface when a block is added
lbessard
parents:
58
diff
changeset
|
704 |
<connection refLocalId="3"> |
151 | 705 |
<position x="208" y="40"/> |
706 |
<position x="131" y="40"/> |
|
707 |
<position x="131" y="84"/> |
|
708 |
<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
|
709 |
</connection> |
3a1b0afdaf84
Adding support for automatically generate function blocks in interface when a block is added
lbessard
parents:
58
diff
changeset
|
710 |
</connectionPointIn> |
3a1b0afdaf84
Adding support for automatically generate function blocks in interface when a block is added
lbessard
parents:
58
diff
changeset
|
711 |
<connectionPointOut> |
151 | 712 |
<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
|
713 |
</connectionPointOut> |
3a1b0afdaf84
Adding support for automatically generate function blocks in interface when a block is added
lbessard
parents:
58
diff
changeset
|
714 |
<variable>TR3</variable> |
3a1b0afdaf84
Adding support for automatically generate function blocks in interface when a block is added
lbessard
parents:
58
diff
changeset
|
715 |
</coil> |
3a1b0afdaf84
Adding support for automatically generate function blocks in interface when a block is added
lbessard
parents:
58
diff
changeset
|
716 |
<rightPowerRail localId="5" height="40" width="2"> |
151 | 717 |
<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
|
718 |
<connectionPointIn> |
151 | 719 |
<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
|
720 |
<connection refLocalId="4"> |
151 | 721 |
<position x="271" y="40"/> |
722 |
<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
|
723 |
</connection> |
3a1b0afdaf84
Adding support for automatically generate function blocks in interface when a block is added
lbessard
parents:
58
diff
changeset
|
724 |
</connectionPointIn> |
3a1b0afdaf84
Adding support for automatically generate function blocks in interface when a block is added
lbessard
parents:
58
diff
changeset
|
725 |
</rightPowerRail> |
3a1b0afdaf84
Adding support for automatically generate function blocks in interface when a block is added
lbessard
parents:
58
diff
changeset
|
726 |
</LD> |
3a1b0afdaf84
Adding support for automatically generate function blocks in interface when a block is added
lbessard
parents:
58
diff
changeset
|
727 |
</body> |
3a1b0afdaf84
Adding support for automatically generate function blocks in interface when a block is added
lbessard
parents:
58
diff
changeset
|
728 |
</transition> |
3a1b0afdaf84
Adding support for automatically generate function blocks in interface when a block is added
lbessard
parents:
58
diff
changeset
|
729 |
<transition name="TR4"> |
3a1b0afdaf84
Adding support for automatically generate function blocks in interface when a block is added
lbessard
parents:
58
diff
changeset
|
730 |
<body> |
3a1b0afdaf84
Adding support for automatically generate function blocks in interface when a block is added
lbessard
parents:
58
diff
changeset
|
731 |
<IL> |
3a1b0afdaf84
Adding support for automatically generate function blocks in interface when a block is added
lbessard
parents:
58
diff
changeset
|
732 |
<![CDATA[ |
3a1b0afdaf84
Adding support for automatically generate function blocks in interface when a block is added
lbessard
parents:
58
diff
changeset
|
733 |
LD IN3 |
3a1b0afdaf84
Adding support for automatically generate function blocks in interface when a block is added
lbessard
parents:
58
diff
changeset
|
734 |
AND IN4 |
3a1b0afdaf84
Adding support for automatically generate function blocks in interface when a block is added
lbessard
parents:
58
diff
changeset
|
735 |
]]> |
3a1b0afdaf84
Adding support for automatically generate function blocks in interface when a block is added
lbessard
parents:
58
diff
changeset
|
736 |
</IL> |
0 | 737 |
</body> |
738 |
</transition> |
|
739 |
</transitions> |
|
740 |
<body> |
|
741 |
<SFC> |
|
158 | 742 |
<step localId="1" height="38" width="69" name="Start" initialStep="true"> |
743 |
<position x="71" y="39"/> |
|
744 |
<connectionPointOut formalParameter=""> |
|
745 |
<relPosition x="34" y="38"/> |
|
0 | 746 |
</connectionPointOut> |
747 |
</step> |
|
748 |
<transition localId="2" height="2" width="20"> |
|
151 | 749 |
<position x="95" y="102"/> |
750 |
<connectionPointIn> |
|
751 |
<relPosition x="10" y="0"/> |
|
0 | 752 |
<connection refLocalId="1"> |
151 | 753 |
<position x="105" y="102"/> |
754 |
<position x="105" y="77"/> |
|
755 |
</connection> |
|
756 |
</connectionPointIn> |
|
757 |
<connectionPointOut> |
|
758 |
<relPosition x="10" y="2"/> |
|
0 | 759 |
</connectionPointOut> |
760 |
<condition> |
|
761 |
<reference name="TR1"/> |
|
762 |
</condition> |
|
763 |
</transition> |
|
158 | 764 |
<step localId="3" height="27" width="52" name="Init"> |
765 |
<position x="79" y="129"/> |
|
766 |
<connectionPointIn> |
|
767 |
<relPosition x="26" y="0"/> |
|
0 | 768 |
<connection refLocalId="2"> |
151 | 769 |
<position x="105" y="129"/> |
770 |
<position x="105" y="104"/> |
|
0 | 771 |
</connection> |
772 |
</connectionPointIn> |
|
158 | 773 |
<connectionPointOut formalParameter=""> |
774 |
<relPosition x="26" y="27"/> |
|
775 |
</connectionPointOut> |
|
776 |
<connectionPointOutAction formalParameter=""> |
|
777 |
<relPosition x="52" y="13"/> |
|
0 | 778 |
</connectionPointOutAction> |
779 |
</step> |
|
2 | 780 |
<selectionDivergence localId="4" height="1" width="391"> |
151 | 781 |
<position x="105" y="181"/> |
782 |
<connectionPointIn> |
|
783 |
<relPosition x="0" y="0"/> |
|
0 | 784 |
<connection refLocalId="3"> |
151 | 785 |
<position x="105" y="181"/> |
786 |
<position x="105" y="156"/> |
|
0 | 787 |
</connection> |
788 |
</connectionPointIn> |
|
158 | 789 |
<connectionPointOut formalParameter=""> |
151 | 790 |
<relPosition x="0" y="1"/> |
0 | 791 |
</connectionPointOut> |
158 | 792 |
<connectionPointOut formalParameter=""> |
151 | 793 |
<relPosition x="228" y="1"/> |
2 | 794 |
</connectionPointOut> |
158 | 795 |
<connectionPointOut formalParameter=""> |
151 | 796 |
<relPosition x="391" y="1"/> |
0 | 797 |
</connectionPointOut> |
798 |
</selectionDivergence> |
|
799 |
<transition localId="5" height="2" width="20"> |
|
151 | 800 |
<position x="95" y="207"/> |
801 |
<connectionPointIn> |
|
802 |
<relPosition x="10" y="0"/> |
|
0 | 803 |
<connection refLocalId="4"> |
151 | 804 |
<position x="105" y="207"/> |
805 |
<position x="105" y="182"/> |
|
806 |
</connection> |
|
807 |
</connectionPointIn> |
|
808 |
<connectionPointOut> |
|
809 |
<relPosition x="10" y="2"/> |
|
0 | 810 |
</connectionPointOut> |
811 |
<condition> |
|
80 | 812 |
<inline name="None"> |
151 | 813 |
<ST> |
814 |
<![CDATA[IN2 AND IN3]]> |
|
815 |
</ST> |
|
0 | 816 |
</inline> |
817 |
</condition> |
|
818 |
</transition> |
|
158 | 819 |
<step localId="6" height="37" width="63" name="Step1"> |
820 |
<position x="74" y="262"/> |
|
821 |
<connectionPointIn> |
|
822 |
<relPosition x="31" y="0"/> |
|
2 | 823 |
<connection refLocalId="21"> |
151 | 824 |
<position x="105" y="262"/> |
825 |
<position x="105" y="237"/> |
|
0 | 826 |
</connection> |
827 |
</connectionPointIn> |
|
158 | 828 |
<connectionPointOut formalParameter=""> |
829 |
<relPosition x="31" y="37"/> |
|
0 | 830 |
</connectionPointOut> |
831 |
</step> |
|
151 | 832 |
<transition localId="7" height="2" width="20" priority="1"> |
833 |
<position x="323" y="207"/> |
|
834 |
<connectionPointIn> |
|
835 |
<relPosition x="10" y="0"/> |
|
0 | 836 |
<connection refLocalId="4"> |
151 | 837 |
<position x="333" y="207"/> |
838 |
<position x="333" y="182"/> |
|
839 |
</connection> |
|
840 |
</connectionPointIn> |
|
841 |
<connectionPointOut> |
|
842 |
<relPosition x="10" y="2"/> |
|
0 | 843 |
</connectionPointOut> |
844 |
<condition> |
|
67
3a1b0afdaf84
Adding support for automatically generate function blocks in interface when a block is added
lbessard
parents:
58
diff
changeset
|
845 |
<reference name="TR2"/> |
0 | 846 |
</condition> |
847 |
</transition> |
|
158 | 848 |
<step localId="8" height="35" width="57" name="Step2"> |
849 |
<position x="305" y="234"/> |
|
850 |
<connectionPointIn> |
|
851 |
<relPosition x="28" y="0"/> |
|
0 | 852 |
<connection refLocalId="7"> |
151 | 853 |
<position x="333" y="234"/> |
854 |
<position x="333" y="209"/> |
|
0 | 855 |
</connection> |
856 |
</connectionPointIn> |
|
158 | 857 |
<connectionPointOut formalParameter=""> |
858 |
<relPosition x="28" y="35"/> |
|
0 | 859 |
</connectionPointOut> |
860 |
</step> |
|
861 |
<transition localId="9" height="2" width="20"> |
|
151 | 862 |
<position x="486" y="207"/> |
863 |
<connectionPointIn> |
|
864 |
<relPosition x="10" y="0"/> |
|
0 | 865 |
<connection refLocalId="4"> |
151 | 866 |
<position x="496" y="207"/> |
867 |
<position x="496" y="182"/> |
|
868 |
</connection> |
|
869 |
</connectionPointIn> |
|
870 |
<connectionPointOut> |
|
871 |
<relPosition x="10" y="2"/> |
|
0 | 872 |
</connectionPointOut> |
873 |
<condition> |
|
67
3a1b0afdaf84
Adding support for automatically generate function blocks in interface when a block is added
lbessard
parents:
58
diff
changeset
|
874 |
<reference name="TR4"/> |
0 | 875 |
</condition> |
876 |
</transition> |
|
158 | 877 |
<step localId="10" height="36" width="60" name="Step3"> |
878 |
<position x="466" y="234"/> |
|
879 |
<connectionPointIn> |
|
880 |
<relPosition x="30" y="0"/> |
|
0 | 881 |
<connection refLocalId="9"> |
151 | 882 |
<position x="496" y="234"/> |
883 |
<position x="496" y="209"/> |
|
0 | 884 |
</connection> |
885 |
</connectionPointIn> |
|
158 | 886 |
<connectionPointOut formalParameter=""> |
887 |
<relPosition x="30" y="36"/> |
|
888 |
</connectionPointOut> |
|
889 |
<connectionPointOutAction formalParameter=""> |
|
890 |
<relPosition x="60" y="18"/> |
|
0 | 891 |
</connectionPointOutAction> |
892 |
</step> |
|
893 |
<transition localId="11" height="2" width="20"> |
|
158 | 894 |
<position x="95" y="362"/> |
151 | 895 |
<connectionPointIn> |
896 |
<relPosition x="10" y="0"/> |
|
2 | 897 |
<connection refLocalId="23"> |
158 | 898 |
<position x="105" y="362"/> |
899 |
<position x="105" y="337"/> |
|
151 | 900 |
</connection> |
901 |
</connectionPointIn> |
|
902 |
<connectionPointOut> |
|
903 |
<relPosition x="10" y="2"/> |
|
0 | 904 |
</connectionPointOut> |
905 |
<condition> |
|
67
3a1b0afdaf84
Adding support for automatically generate function blocks in interface when a block is added
lbessard
parents:
58
diff
changeset
|
906 |
<reference name="TR3"/> |
0 | 907 |
</condition> |
908 |
</transition> |
|
909 |
<jumpStep localId="12" height="13" width="12" targetName="Start"> |
|
158 | 910 |
<position x="99" y="389"/> |
151 | 911 |
<connectionPointIn> |
912 |
<relPosition x="6" y="0"/> |
|
0 | 913 |
<connection refLocalId="11"> |
158 | 914 |
<position x="105" y="389"/> |
915 |
<position x="105" y="364"/> |
|
0 | 916 |
</connection> |
917 |
</connectionPointIn> |
|
918 |
</jumpStep> |
|
392 | 919 |
<actionBlock localId="13" width="100" height="30"> |
158 | 920 |
<position x="175" y="127"/> |
151 | 921 |
<connectionPointIn> |
922 |
<relPosition x="0" y="15"/> |
|
0 | 923 |
<connection refLocalId="3"> |
158 | 924 |
<position x="175" y="142"/> |
925 |
<position x="131" y="142"/> |
|
0 | 926 |
</connection> |
927 |
</connectionPointIn> |
|
392 | 928 |
<action localId="0"> |
929 |
<relPosition x="0" y="0"/> |
|
0 | 930 |
<reference name="ACT1"/> |
931 |
</action> |
|
932 |
</actionBlock> |
|
933 |
<transition localId="14" height="2" width="20"> |
|
158 | 934 |
<position x="323" y="294"/> |
151 | 935 |
<connectionPointIn> |
936 |
<relPosition x="10" y="0"/> |
|
0 | 937 |
<connection refLocalId="8"> |
158 | 938 |
<position x="333" y="294"/> |
939 |
<position x="333" y="269"/> |
|
151 | 940 |
</connection> |
941 |
</connectionPointIn> |
|
942 |
<connectionPointOut> |
|
943 |
<relPosition x="10" y="2"/> |
|
0 | 944 |
</connectionPointOut> |
945 |
<condition> |
|
158 | 946 |
<inline name=""> |
151 | 947 |
<ST> |
948 |
<![CDATA[IN5]]> |
|
949 |
</ST> |
|
0 | 950 |
</inline> |
951 |
</condition> |
|
952 |
</transition> |
|
953 |
<transition localId="15" height="2" width="20"> |
|
151 | 954 |
<position x="486" y="346"/> |
955 |
<connectionPointIn> |
|
956 |
<relPosition x="10" y="0"/> |
|
0 | 957 |
<connection refLocalId="10"> |
151 | 958 |
<position x="496" y="346"/> |
158 | 959 |
<position x="496" y="270"/> |
151 | 960 |
</connection> |
961 |
</connectionPointIn> |
|
962 |
<connectionPointOut> |
|
963 |
<relPosition x="10" y="2"/> |
|
0 | 964 |
</connectionPointOut> |
965 |
<condition> |
|
158 | 966 |
<inline name=""> |
151 | 967 |
<ST> |
968 |
<![CDATA[IN5]]> |
|
969 |
</ST> |
|
0 | 970 |
</inline> |
971 |
</condition> |
|
972 |
</transition> |
|
2 | 973 |
<selectionConvergence localId="16" height="1" width="163"> |
151 | 974 |
<position x="333" y="373"/> |
975 |
<connectionPointIn> |
|
976 |
<relPosition x="0" y="0"/> |
|
0 | 977 |
<connection refLocalId="14"> |
151 | 978 |
<position x="333" y="373"/> |
158 | 979 |
<position x="333" y="296"/> |
151 | 980 |
</connection> |
981 |
</connectionPointIn> |
|
982 |
<connectionPointIn> |
|
983 |
<relPosition x="163" y="0"/> |
|
0 | 984 |
<connection refLocalId="15"> |
151 | 985 |
<position x="496" y="373"/> |
986 |
<position x="496" y="348"/> |
|
987 |
</connection> |
|
988 |
</connectionPointIn> |
|
989 |
<connectionPointOut> |
|
990 |
<relPosition x="80" y="1"/> |
|
0 | 991 |
</connectionPointOut> |
992 |
</selectionConvergence> |
|
993 |
<jumpStep localId="19" height="13" width="12" targetName="Init"> |
|
151 | 994 |
<position x="407" y="399"/> |
995 |
<connectionPointIn> |
|
996 |
<relPosition x="6" y="0"/> |
|
0 | 997 |
<connection refLocalId="16"> |
151 | 998 |
<position x="413" y="399"/> |
999 |
<position x="413" y="374"/> |
|
0 | 1000 |
</connection> |
1001 |
</connectionPointIn> |
|
1002 |
</jumpStep> |
|
392 | 1003 |
<actionBlock localId="20" width="237" height="90"> |
158 | 1004 |
<position x="582" y="237"/> |
151 | 1005 |
<connectionPointIn> |
1006 |
<relPosition x="0" y="15"/> |
|
0 | 1007 |
<connection refLocalId="10"> |
158 | 1008 |
<position x="582" y="252"/> |
1009 |
<position x="526" y="252"/> |
|
0 | 1010 |
</connection> |
1011 |
</connectionPointIn> |
|
392 | 1012 |
<action localId="0" indicator="IN5"> |
1013 |
<relPosition x="0" y="0"/> |
|
0 | 1014 |
<reference name="ACT1"/> |
1015 |
</action> |
|
392 | 1016 |
<action localId="0" qualifier="D" duration="T#10s"> |
1017 |
<relPosition x="0" y="0"/> |
|
0 | 1018 |
<reference name="IN1"/> |
1019 |
</action> |
|
392 | 1020 |
<action localId="0" qualifier="P"> |
1021 |
<relPosition x="0" y="0"/> |
|
46 | 1022 |
<inline> |
151 | 1023 |
<ST> |
1024 |
<![CDATA[IN2 := TRUE;]]> |
|
1025 |
</ST> |
|
46 | 1026 |
</inline> |
1027 |
</action> |
|
0 | 1028 |
</actionBlock> |
2 | 1029 |
<simultaneousDivergence localId="21" height="3" width="118"> |
151 | 1030 |
<position x="105" y="234"/> |
1031 |
<connectionPointIn> |
|
1032 |
<relPosition x="0" y="0"/> |
|
2 | 1033 |
<connection refLocalId="5"> |
151 | 1034 |
<position x="105" y="234"/> |
1035 |
<position x="105" y="209"/> |
|
2 | 1036 |
</connection> |
1037 |
</connectionPointIn> |
|
80 | 1038 |
<connectionPointOut formalParameter="None"> |
151 | 1039 |
<relPosition x="0" y="3"/> |
2 | 1040 |
</connectionPointOut> |
80 | 1041 |
<connectionPointOut formalParameter="None"> |
151 | 1042 |
<relPosition x="118" y="3"/> |
2 | 1043 |
</connectionPointOut> |
1044 |
</simultaneousDivergence> |
|
158 | 1045 |
<step localId="22" height="36" width="61" name="Step4"> |
1046 |
<position x="193" y="261"/> |
|
1047 |
<connectionPointIn> |
|
1048 |
<relPosition x="30" y="0"/> |
|
2 | 1049 |
<connection refLocalId="21"> |
158 | 1050 |
<position x="223" y="261"/> |
151 | 1051 |
<position x="223" y="237"/> |
2 | 1052 |
</connection> |
1053 |
</connectionPointIn> |
|
158 | 1054 |
<connectionPointOut formalParameter=""> |
1055 |
<relPosition x="30" y="36"/> |
|
2 | 1056 |
</connectionPointOut> |
1057 |
</step> |
|
1058 |
<simultaneousConvergence localId="23" height="3" width="118"> |
|
158 | 1059 |
<position x="105" y="334"/> |
151 | 1060 |
<connectionPointIn> |
1061 |
<relPosition x="0" y="0"/> |
|
2 | 1062 |
<connection refLocalId="6"> |
158 | 1063 |
<position x="105" y="334"/> |
1064 |
<position x="105" y="299"/> |
|
151 | 1065 |
</connection> |
1066 |
</connectionPointIn> |
|
1067 |
<connectionPointIn> |
|
1068 |
<relPosition x="118" y="0"/> |
|
2 | 1069 |
<connection refLocalId="22"> |
158 | 1070 |
<position x="223" y="334"/> |
1071 |
<position x="223" y="297"/> |
|
151 | 1072 |
</connection> |
1073 |
</connectionPointIn> |
|
1074 |
<connectionPointOut> |
|
1075 |
<relPosition x="0" y="3"/> |
|
2 | 1076 |
</connectionPointOut> |
1077 |
</simultaneousConvergence> |
|
0 | 1078 |
</SFC> |
1079 |
</body> |
|
1080 |
</pou> |
|
1081 |
<pou name="STTest" pouType="functionBlock"> |
|
1082 |
<interface> |
|
1083 |
<inputVars> |
|
1084 |
<variable name="Collision"> |
|
1085 |
<type> |
|
1086 |
<BOOL/> |
|
1087 |
</type> |
|
1088 |
</variable> |
|
1089 |
<variable name="Gate"> |
|
1090 |
<type> |
|
1091 |
<BOOL/> |
|
1092 |
</type> |
|
1093 |
</variable> |
|
1094 |
<variable name="Pump"> |
|
1095 |
<type> |
|
1096 |
<BOOL/> |
|
1097 |
</type> |
|
1098 |
</variable> |
|
1099 |
<variable name="Temp"> |
|
1100 |
<type> |
|
17 | 1101 |
<REAL/> |
0 | 1102 |
</type> |
1103 |
</variable> |
|
1104 |
</inputVars> |
|
1105 |
<outputVars> |
|
1106 |
<variable name="Speed"> |
|
1107 |
<type> |
|
1108 |
<INT/> |
|
1109 |
</type> |
|
1110 |
</variable> |
|
1111 |
<variable name="PumpSpeed"> |
|
1112 |
<type> |
|
1113 |
<INT/> |
|
1114 |
</type> |
|
1115 |
</variable> |
|
1116 |
<variable name="Brakes"> |
|
1117 |
<type> |
|
1118 |
<BOOL/> |
|
1119 |
</type> |
|
1120 |
</variable> |
|
1121 |
<variable name="Control_State"> |
|
1122 |
<type> |
|
1123 |
<BOOL/> |
|
1124 |
</type> |
|
1125 |
</variable> |
|
1126 |
</outputVars> |
|
1127 |
</interface> |
|
1128 |
<body> |
|
1129 |
<ST> |
|
67
3a1b0afdaf84
Adding support for automatically generate function blocks in interface when a block is added
lbessard
parents:
58
diff
changeset
|
1130 |
<![CDATA[ |
1 | 1131 |
IF Collision THEN |
2 | 1132 |
Speed := 0; |
13
69075340d6a9
Adding support for forbidding insertion of function block into function
lbessard
parents:
2
diff
changeset
|
1133 |
Brakes := TRUE; |
1 | 1134 |
END_IF; |
0 | 1135 |
|
126 | 1136 |
IF (Gate = open) AND |
13
69075340d6a9
Adding support for forbidding insertion of function block into function
lbessard
parents:
2
diff
changeset
|
1137 |
(Pump = TRUE) AND (Temp > 200.0) THEN |
69075340d6a9
Adding support for forbidding insertion of function block into function
lbessard
parents:
2
diff
changeset
|
1138 |
Control_State := TRUE; |
1 | 1139 |
ELSE |
13
69075340d6a9
Adding support for forbidding insertion of function block into function
lbessard
parents:
2
diff
changeset
|
1140 |
Control_State := FALSE; |
56
7187e1c00975
Adding support for Undo/Redo and Unsaved File On Close detection
lbessard
parents:
47
diff
changeset
|
1141 |
|
2 | 1142 |
PumpSpeed := 10.0; |
1 | 1143 |
END_IF; |
67
3a1b0afdaf84
Adding support for automatically generate function blocks in interface when a block is added
lbessard
parents:
58
diff
changeset
|
1144 |
]]> |
0 | 1145 |
</ST> |
1146 |
</body> |
|
1147 |
</pou> |
|
1148 |
</pous> |
|
1149 |
</types> |
|
1150 |
<instances> |
|
1151 |
<configurations> |
|
1152 |
<configuration name="ConfigTest"> |
|
1153 |
<resource name="ResourceTest"> |
|
151 | 1154 |
<task name="Toto" single="Tutu" priority="6"> |
392 | 1155 |
<pouInstance name="Program1" typeName="SFCTest"/> |
0 | 1156 |
</task> |
1157 |
<globalVars> |
|
56
7187e1c00975
Adding support for Undo/Redo and Unsaved File On Close detection
lbessard
parents:
47
diff
changeset
|
1158 |
<variable name="Titi" address="%MW30"> |
0 | 1159 |
<type> |
1160 |
<INT/> |
|
1161 |
</type> |
|
1162 |
</variable> |
|
1163 |
</globalVars> |
|
1164 |
</resource> |
|
1165 |
<globalVars> |
|
56
7187e1c00975
Adding support for Undo/Redo and Unsaved File On Close detection
lbessard
parents:
47
diff
changeset
|
1166 |
<variable name="Toto" address="%MW10"> |
0 | 1167 |
<type> |
1168 |
<INT/> |
|
1169 |
</type> |
|
1170 |
</variable> |
|
56
7187e1c00975
Adding support for Undo/Redo and Unsaved File On Close detection
lbessard
parents:
47
diff
changeset
|
1171 |
<variable name="Tutu" address="%MX20"> |
0 | 1172 |
<type> |
1173 |
<BOOL/> |
|
1174 |
</type> |
|
1175 |
</variable> |
|
1176 |
</globalVars> |
|
1177 |
</configuration> |
|
1178 |
</configurations> |
|
1179 |
</instances> |
|
1180 |
</project> |