author | lbessard |
Fri, 03 Aug 2007 18:00:24 +0200 | |
changeset 60 | ef940f442b8d |
parent 58 | 39cd981ff242 |
child 67 | 3a1b0afdaf84 |
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" |
|
5 |
xsi:schemaLocation="http://www.plcopen.org/xml/tc6.xsd http://www.plcopen.org/xml/tc6.xsd"> |
|
6 |
<fileHeader companyName="Lolitech" |
|
7 |
productName="PLCOpenEditorExample" |
|
8 |
productVersion="1.0" |
|
9 |
creationDateTime="2006-09-07 18:52:43"/> |
|
10 |
<contentHeader name="Test"> |
|
11 |
<coordinateInfo> |
|
12 |
<fbd> |
|
13 |
<scaling y="0" x="0"/> |
|
14 |
</fbd> |
|
15 |
<ld> |
|
16 |
<scaling y="0" x="0"/> |
|
17 |
</ld> |
|
18 |
<sfc> |
|
19 |
<scaling y="0" x="0"/> |
|
20 |
</sfc> |
|
21 |
</coordinateInfo> |
|
22 |
</contentHeader> |
|
23 |
<types> |
|
24 |
<dataTypes/> |
|
25 |
<pous> |
|
13
69075340d6a9
Adding support for forbidding insertion of function block into function
lbessard
parents:
2
diff
changeset
|
26 |
<pou name="FBDTest" pouType="functionBlock"> |
0 | 27 |
<interface> |
28 |
<inputVars> |
|
29 |
<variable name="IN1"> |
|
30 |
<type> |
|
31 |
<BOOL/> |
|
32 |
</type> |
|
33 |
<initialValue> |
|
34 |
<simpleValue value="false"/> |
|
35 |
</initialValue> |
|
36 |
</variable> |
|
37 |
<variable name="IN2"> |
|
38 |
<type> |
|
39 |
<BOOL/> |
|
40 |
</type> |
|
41 |
<initialValue> |
|
58 | 42 |
<simpleValue value="true"/> |
0 | 43 |
</initialValue> |
44 |
</variable> |
|
45 |
<variable name="IN3"> |
|
46 |
<type> |
|
47 |
<BOOL/> |
|
48 |
</type> |
|
49 |
</variable> |
|
50 |
</inputVars> |
|
13
69075340d6a9
Adding support for forbidding insertion of function block into function
lbessard
parents:
2
diff
changeset
|
51 |
<outputVars> |
69075340d6a9
Adding support for forbidding insertion of function block into function
lbessard
parents:
2
diff
changeset
|
52 |
<variable name="OUT"> |
69075340d6a9
Adding support for forbidding insertion of function block into function
lbessard
parents:
2
diff
changeset
|
53 |
<type> |
69075340d6a9
Adding support for forbidding insertion of function block into function
lbessard
parents:
2
diff
changeset
|
54 |
<BOOL/> |
69075340d6a9
Adding support for forbidding insertion of function block into function
lbessard
parents:
2
diff
changeset
|
55 |
</type> |
69075340d6a9
Adding support for forbidding insertion of function block into function
lbessard
parents:
2
diff
changeset
|
56 |
</variable> |
69075340d6a9
Adding support for forbidding insertion of function block into function
lbessard
parents:
2
diff
changeset
|
57 |
</outputVars> |
0 | 58 |
</interface> |
59 |
<body> |
|
60 |
<FBD> |
|
61 |
<inVariable localId="2" width="89" height="27"> |
|
62 |
<position y="84" x="64"/> |
|
63 |
<connectionPointOut> |
|
64 |
<relPosition y="13" x="89"/> |
|
65 |
</connectionPointOut> |
|
66 |
<expression>IN1</expression> |
|
67 |
</inVariable> |
|
68 |
<inVariable localId="3" width="90" height="27"> |
|
69 |
<position y="204" x="63"/> |
|
70 |
<connectionPointOut> |
|
71 |
<relPosition y="13" x="90"/> |
|
72 |
</connectionPointOut> |
|
73 |
<expression>IN2</expression> |
|
74 |
</inVariable> |
|
75 |
<outVariable localId="4" width="95" height="33"> |
|
76 |
<position y="182" x="587"/> |
|
77 |
<connectionPointIn> |
|
78 |
<relPosition y="16" x="0"/> |
|
27 | 79 |
<connection refLocalId="11" formalParameter="Q1"> |
0 | 80 |
<position y="198" x="587"/> |
81 |
<position y="198" x="517"/> |
|
82 |
</connection> |
|
83 |
</connectionPointIn> |
|
13
69075340d6a9
Adding support for forbidding insertion of function block into function
lbessard
parents:
2
diff
changeset
|
84 |
<expression>OUT</expression> |
0 | 85 |
</outVariable> |
86 |
<block localId="6" height="84" width="99" typeName="AND"> |
|
87 |
<position y="105" x="235"/> |
|
88 |
<inputVariables> |
|
89 |
<variable formalParameter="" edge="rising"> |
|
90 |
<connectionPointIn> |
|
91 |
<relPosition y="36" x="0"/> |
|
92 |
<connection refLocalId="2"> |
|
93 |
<position y="141" x="235"/> |
|
94 |
<position y="141" x="190"/> |
|
95 |
<position y="97" x="190"/> |
|
96 |
<position y="97" x="153"/> |
|
97 |
</connection> |
|
98 |
</connectionPointIn> |
|
99 |
</variable> |
|
100 |
<variable formalParameter=""> |
|
101 |
<connectionPointIn> |
|
102 |
<relPosition y="68" x="0"/> |
|
103 |
<connection refLocalId="3"> |
|
104 |
<position y="173" x="235"/> |
|
105 |
<position y="173" x="190"/> |
|
106 |
<position y="217" x="190"/> |
|
107 |
<position y="217" x="153"/> |
|
108 |
</connection> |
|
109 |
</connectionPointIn> |
|
110 |
</variable> |
|
111 |
</inputVariables> |
|
112 |
<inOutVariables/> |
|
113 |
<outputVariables> |
|
114 |
<variable formalParameter="" negated="true"> |
|
115 |
<connectionPointOut> |
|
116 |
<relPosition y="36" x="99"/> |
|
117 |
</connectionPointOut> |
|
118 |
</variable> |
|
119 |
</outputVariables> |
|
120 |
</block> |
|
121 |
<inVariable localId="7" width="90" height="28"> |
|
122 |
<position y="336" x="63"/> |
|
123 |
<connectionPointOut> |
|
124 |
<relPosition y="14" x="90"/> |
|
125 |
</connectionPointOut> |
|
126 |
<expression>IN3</expression> |
|
127 |
</inVariable> |
|
1 | 128 |
<block localId="8" height="87" width="99" typeName="OR"> |
0 | 129 |
<position y="246" x="235"/> |
130 |
<inputVariables> |
|
131 |
<variable formalParameter="IN1" negated="true"> |
|
132 |
<connectionPointIn> |
|
133 |
<relPosition y="36" x="0"/> |
|
134 |
<connection refLocalId="3"> |
|
135 |
<position y="282" x="235"/> |
|
136 |
<position y="282" x="190"/> |
|
137 |
<position y="217" x="190"/> |
|
138 |
<position y="217" x="153"/> |
|
139 |
</connection> |
|
140 |
</connectionPointIn> |
|
141 |
</variable> |
|
142 |
<variable formalParameter="IN2"> |
|
143 |
<connectionPointIn> |
|
144 |
<relPosition y="69" x="0"/> |
|
145 |
<connection refLocalId="7"> |
|
146 |
<position y="315" x="235"/> |
|
147 |
<position y="315" x="191"/> |
|
148 |
<position y="350" x="191"/> |
|
149 |
<position y="350" x="153"/> |
|
150 |
</connection> |
|
151 |
</connectionPointIn> |
|
152 |
</variable> |
|
153 |
</inputVariables> |
|
154 |
<inOutVariables/> |
|
155 |
<outputVariables> |
|
156 |
<variable formalParameter="OUT"> |
|
157 |
<connectionPointOut> |
|
158 |
<relPosition y="36" x="99"/> |
|
159 |
</connectionPointOut> |
|
160 |
</variable> |
|
161 |
</outputVariables> |
|
162 |
</block> |
|
163 |
<comment localId="10" height="37" width="261"> |
|
164 |
<position y="32" x="243"/> |
|
165 |
<content>POU qui sert a tester PLCOpenEditor.</content> |
|
166 |
</comment> |
|
167 |
<block localId="11" height="91" width="97" instanceName="SR1" typeName="SR"> |
|
168 |
<position y="161" x="420"/> |
|
169 |
<inputVariables> |
|
170 |
<variable formalParameter="S1"> |
|
171 |
<connectionPointIn> |
|
172 |
<relPosition y="37" x="0"/> |
|
27 | 173 |
<connection refLocalId="6" formalParameter="OUT"> |
0 | 174 |
<position y="198" x="420"/> |
175 |
<position y="198" x="369"/> |
|
176 |
<position y="141" x="369"/> |
|
177 |
<position y="141" x="334"/> |
|
178 |
</connection> |
|
179 |
</connectionPointIn> |
|
180 |
</variable> |
|
181 |
<variable formalParameter="R"> |
|
182 |
<connectionPointIn> |
|
183 |
<relPosition y="72" x="0"/> |
|
27 | 184 |
<connection refLocalId="8" formalParameter="OUT"> |
0 | 185 |
<position y="233" x="420"/> |
186 |
<position y="233" x="369"/> |
|
187 |
<position y="282" x="369"/> |
|
188 |
<position y="282" x="334"/> |
|
189 |
</connection> |
|
190 |
</connectionPointIn> |
|
191 |
</variable> |
|
192 |
</inputVariables> |
|
193 |
<inOutVariables/> |
|
194 |
<outputVariables> |
|
195 |
<variable formalParameter="Q1"> |
|
196 |
<connectionPointOut> |
|
197 |
<relPosition y="37" x="97"/> |
|
198 |
</connectionPointOut> |
|
199 |
</variable> |
|
200 |
</outputVariables> |
|
201 |
</block> |
|
202 |
</FBD> |
|
203 |
</body> |
|
204 |
</pou> |
|
205 |
<pou name="LDTest" pouType="function"> |
|
206 |
<interface> |
|
207 |
<returnType> |
|
208 |
<BOOL/> |
|
209 |
</returnType> |
|
210 |
<inputVars> |
|
211 |
<variable name="IN1"> |
|
212 |
<type> |
|
213 |
<BOOL/> |
|
214 |
</type> |
|
215 |
</variable> |
|
216 |
<variable name="IN2"> |
|
217 |
<type> |
|
218 |
<BOOL/> |
|
219 |
</type> |
|
220 |
</variable> |
|
221 |
<variable name="IN3"> |
|
222 |
<type> |
|
223 |
<BOOL/> |
|
224 |
</type> |
|
225 |
</variable> |
|
226 |
<variable name="IN4"> |
|
227 |
<type> |
|
228 |
<BOOL/> |
|
229 |
</type> |
|
230 |
</variable> |
|
231 |
</inputVars> |
|
232 |
</interface> |
|
233 |
<body> |
|
234 |
<LD> |
|
235 |
<comment localId="1" height="40" width="600"> |
|
236 |
<position y="10" x="10"/> |
|
237 |
<content>Commentaire</content> |
|
238 |
</comment> |
|
239 |
<leftPowerRail localId="2" height="80" width="2"> |
|
240 |
<position y="60" x="10"/> |
|
241 |
<connectionPointOut formalParameter=""> |
|
242 |
<relPosition y="20" x="2"/> |
|
243 |
</connectionPointOut> |
|
244 |
<connectionPointOut formalParameter=""> |
|
245 |
<relPosition y="60" x="2"/> |
|
246 |
</connectionPointOut> |
|
247 |
</leftPowerRail> |
|
248 |
<coil localId="3" width="21" storage="none" height="15" negated="false"> |
|
249 |
<position y="72" x="265"/> |
|
250 |
<connectionPointIn> |
|
251 |
<relPosition y="8" x="0"/> |
|
252 |
<connection refLocalId="7"> |
|
253 |
<position y="80" x="265"/> |
|
254 |
<position y="80" x="195"/> |
|
255 |
</connection> |
|
256 |
</connectionPointIn> |
|
257 |
<connectionPointOut> |
|
258 |
<relPosition y="8" x="21"/> |
|
259 |
</connectionPointOut> |
|
260 |
<variable>LDTest</variable> |
|
261 |
</coil> |
|
262 |
<rightPowerRail localId="4" height="40" width="2"> |
|
263 |
<position y="60" x="316"/> |
|
264 |
<connectionPointIn> |
|
265 |
<relPosition y="20" x="0"/> |
|
266 |
<connection refLocalId="3"> |
|
267 |
<position y="80" x="316"/> |
|
268 |
<position y="80" x="286"/> |
|
269 |
</connection> |
|
270 |
</connectionPointIn> |
|
271 |
</rightPowerRail> |
|
272 |
<contact localId="5" width="21" height="15" edge="none" negated="true"> |
|
273 |
<position y="72" x="42"/> |
|
274 |
<connectionPointIn> |
|
275 |
<relPosition y="8" x="0"/> |
|
276 |
<connection refLocalId="2"> |
|
277 |
<position y="80" x="42"/> |
|
278 |
<position y="80" x="12"/> |
|
279 |
</connection> |
|
280 |
</connectionPointIn> |
|
281 |
<connectionPointOut> |
|
282 |
<relPosition y="8" x="21"/> |
|
283 |
</connectionPointOut> |
|
284 |
<variable>IN1</variable> |
|
285 |
</contact> |
|
286 |
<contact localId="7" width="21" height="15" edge="none" negated="false"> |
|
287 |
<position y="72" x="174"/> |
|
288 |
<connectionPointIn> |
|
289 |
<relPosition y="8" x="0"/> |
|
290 |
<connection refLocalId="5"> |
|
291 |
<position y="80" x="174"/> |
|
292 |
<position y="80" x="63"/> |
|
293 |
</connection> |
|
294 |
<connection refLocalId="9"> |
|
295 |
<position y="80" x="174"/> |
|
296 |
<position y="80" x="144"/> |
|
297 |
<position y="120" x="144"/> |
|
298 |
<position y="120" x="114"/> |
|
299 |
</connection> |
|
300 |
</connectionPointIn> |
|
301 |
<connectionPointOut> |
|
302 |
<relPosition y="8" x="21"/> |
|
303 |
</connectionPointOut> |
|
304 |
<variable>IN2</variable> |
|
305 |
</contact> |
|
306 |
<contact localId="8" width="21" height="15" edge="none" negated="false"> |
|
307 |
<position y="112" x="42"/> |
|
308 |
<connectionPointIn> |
|
309 |
<relPosition y="8" x="0"/> |
|
310 |
<connection refLocalId="2"> |
|
311 |
<position y="120" x="42"/> |
|
312 |
<position y="120" x="12"/> |
|
313 |
</connection> |
|
314 |
</connectionPointIn> |
|
315 |
<connectionPointOut> |
|
316 |
<relPosition y="8" x="21"/> |
|
317 |
</connectionPointOut> |
|
318 |
<variable>IN3</variable> |
|
319 |
</contact> |
|
320 |
<contact localId="9" width="21" height="15" edge="none" negated="true"> |
|
321 |
<position y="112" x="93"/> |
|
322 |
<connectionPointIn> |
|
323 |
<relPosition y="8" x="0"/> |
|
324 |
<connection refLocalId="8"> |
|
325 |
<position y="120" x="93"/> |
|
326 |
<position y="120" x="63"/> |
|
327 |
</connection> |
|
328 |
</connectionPointIn> |
|
329 |
<connectionPointOut> |
|
330 |
<relPosition y="8" x="21"/> |
|
331 |
</connectionPointOut> |
|
332 |
<variable>IN4</variable> |
|
333 |
</contact> |
|
334 |
</LD> |
|
335 |
</body> |
|
336 |
</pou> |
|
337 |
<pou name="ILTest" pouType="function"> |
|
338 |
<interface> |
|
339 |
<returnType> |
|
340 |
<REAL/> |
|
341 |
</returnType> |
|
1 | 342 |
<inputVars> |
47
2b2f8d88e6d3
Interface changed to show pou interface at the bottom of the window
lbessard
parents:
46
diff
changeset
|
343 |
<variable name="X3"> |
1 | 344 |
<type> |
345 |
<REAL/> |
|
346 |
</type> |
|
347 |
</variable> |
|
348 |
</inputVars> |
|
0 | 349 |
<localVars> |
350 |
<variable name="Temp"> |
|
351 |
<type> |
|
352 |
<REAL/> |
|
353 |
</type> |
|
354 |
</variable> |
|
355 |
</localVars> |
|
356 |
<inputVars> |
|
357 |
<variable name="X2"> |
|
358 |
<type> |
|
359 |
<REAL/> |
|
360 |
</type> |
|
361 |
</variable> |
|
362 |
<variable name="Y1"> |
|
363 |
<type> |
|
364 |
<REAL/> |
|
365 |
</type> |
|
366 |
</variable> |
|
367 |
<variable name="Y2"> |
|
368 |
<type> |
|
369 |
<REAL/> |
|
370 |
</type> |
|
371 |
</variable> |
|
372 |
<variable name="TMax"> |
|
373 |
<type> |
|
374 |
<REAL/> |
|
375 |
</type> |
|
376 |
</variable> |
|
377 |
</inputVars> |
|
378 |
<outputVars> |
|
13
69075340d6a9
Adding support for forbidding insertion of function block into function
lbessard
parents:
2
diff
changeset
|
379 |
<variable name="ERROR"> |
0 | 380 |
<type> |
381 |
<BOOL/> |
|
382 |
</type> |
|
383 |
</variable> |
|
384 |
</outputVars> |
|
385 |
</interface> |
|
386 |
<body> |
|
387 |
<IL> |
|
13
69075340d6a9
Adding support for forbidding insertion of function block into function
lbessard
parents:
2
diff
changeset
|
388 |
LD Y1 |
69075340d6a9
Adding support for forbidding insertion of function block into function
lbessard
parents:
2
diff
changeset
|
389 |
SUB Y2 (* Substract Y2 from Y1 *) |
69075340d6a9
Adding support for forbidding insertion of function block into function
lbessard
parents:
2
diff
changeset
|
390 |
ST Temp (* Store Y1-Y2 in Temp *) |
69075340d6a9
Adding support for forbidding insertion of function block into function
lbessard
parents:
2
diff
changeset
|
391 |
MUL Temp (* Multiply by Temp to square *) |
69075340d6a9
Adding support for forbidding insertion of function block into function
lbessard
parents:
2
diff
changeset
|
392 |
ADD( X1 (* Defer ADD *) |
69075340d6a9
Adding support for forbidding insertion of function block into function
lbessard
parents:
2
diff
changeset
|
393 |
SUB X2 (* Substract X1 from X2 *) |
69075340d6a9
Adding support for forbidding insertion of function block into function
lbessard
parents:
2
diff
changeset
|
394 |
ST Temp (* Store X1-X2 in Temp *) |
69075340d6a9
Adding support for forbidding insertion of function block into function
lbessard
parents:
2
diff
changeset
|
395 |
MUL Temp (* Multiply by Temp to square *) |
69075340d6a9
Adding support for forbidding insertion of function block into function
lbessard
parents:
2
diff
changeset
|
396 |
) |
17 | 397 |
SQRT (* Call Square root fun *) |
13
69075340d6a9
Adding support for forbidding insertion of function block into function
lbessard
parents:
2
diff
changeset
|
398 |
ST ILTest (* Setup function result *) |
69075340d6a9
Adding support for forbidding insertion of function block into function
lbessard
parents:
2
diff
changeset
|
399 |
GT TMax (* Greater than TMax ? *) |
69075340d6a9
Adding support for forbidding insertion of function block into function
lbessard
parents:
2
diff
changeset
|
400 |
JMPC ERR (* Yes, Jump to Error *) |
69075340d6a9
Adding support for forbidding insertion of function block into function
lbessard
parents:
2
diff
changeset
|
401 |
S ERROR (* Set ERROR *) |
69075340d6a9
Adding support for forbidding insertion of function block into function
lbessard
parents:
2
diff
changeset
|
402 |
RET (* Normal return *) |
69075340d6a9
Adding support for forbidding insertion of function block into function
lbessard
parents:
2
diff
changeset
|
403 |
ERR: RET (* Error return, ENO not set *) |
0 | 404 |
</IL> |
405 |
</body> |
|
406 |
</pou> |
|
407 |
<pou name="SFCTest" pouType="program"> |
|
408 |
<interface> |
|
409 |
<inputVars> |
|
410 |
<variable name="IN1"> |
|
411 |
<type> |
|
412 |
<BOOL/> |
|
413 |
</type> |
|
414 |
</variable> |
|
415 |
<variable name="IN2"> |
|
416 |
<type> |
|
417 |
<BOOL/> |
|
418 |
</type> |
|
419 |
</variable> |
|
420 |
<variable name="IN3"> |
|
421 |
<type> |
|
422 |
<BOOL/> |
|
423 |
</type> |
|
424 |
</variable> |
|
425 |
<variable name="IN4"> |
|
426 |
<type> |
|
427 |
<BOOL/> |
|
428 |
</type> |
|
429 |
</variable> |
|
430 |
<variable name="IN5"> |
|
431 |
<type> |
|
432 |
<BOOL/> |
|
433 |
</type> |
|
434 |
</variable> |
|
435 |
</inputVars> |
|
436 |
</interface> |
|
437 |
<actions> |
|
438 |
<action name="ACT1"> |
|
439 |
<body> |
|
440 |
<ST> |
|
1 | 441 |
IF IN1 THEN |
2 | 442 |
IN2 := 1; |
1 | 443 |
ELSE |
2 | 444 |
IN3 := 1; |
1 | 445 |
END_IF; |
0 | 446 |
</ST> |
447 |
</body> |
|
448 |
</action> |
|
449 |
</actions> |
|
450 |
<transitions> |
|
451 |
<transition name="TR1"> |
|
452 |
<body> |
|
453 |
<ST>:= AND(IN1, IN2, IN3);</ST> |
|
454 |
</body> |
|
455 |
</transition> |
|
456 |
</transitions> |
|
457 |
<body> |
|
458 |
<SFC> |
|
459 |
<step localId="1" height="31" width="46" initialStep="true" name="Start"> |
|
460 |
<position y="46" x="82"/> |
|
461 |
<connectionPointOut formalParameter=""> |
|
462 |
<relPosition y="31" x="23"/> |
|
463 |
</connectionPointOut> |
|
464 |
</step> |
|
465 |
<transition localId="2" height="2" width="20"> |
|
466 |
<position y="102" x="95"/> |
|
467 |
<connectionPointIn> |
|
468 |
<relPosition y="0" x="10"/> |
|
469 |
<connection refLocalId="1"> |
|
470 |
<position y="102" x="105"/> |
|
471 |
<position y="77" x="105"/> |
|
472 |
</connection> |
|
473 |
</connectionPointIn> |
|
474 |
<connectionPointOut> |
|
475 |
<relPosition y="2" x="10"/> |
|
476 |
</connectionPointOut> |
|
477 |
<condition> |
|
478 |
<reference name="TR1"/> |
|
479 |
</condition> |
|
480 |
</transition> |
|
481 |
<step localId="3" height="27" width="29" initialStep="false" name="Init"> |
|
482 |
<position y="129" x="91"/> |
|
483 |
<connectionPointIn> |
|
484 |
<relPosition y="0" x="14"/> |
|
485 |
<connection refLocalId="2"> |
|
486 |
<position y="129" x="105"/> |
|
487 |
<position y="104" x="105"/> |
|
488 |
</connection> |
|
489 |
</connectionPointIn> |
|
490 |
<connectionPointOut formalParameter=""> |
|
491 |
<relPosition y="27" x="14"/> |
|
492 |
</connectionPointOut> |
|
493 |
<connectionPointOutAction formalParameter=""> |
|
494 |
<relPosition y="13" x="29"/> |
|
495 |
</connectionPointOutAction> |
|
496 |
</step> |
|
2 | 497 |
<selectionDivergence localId="4" height="1" width="391"> |
0 | 498 |
<position y="181" x="105"/> |
499 |
<connectionPointIn> |
|
500 |
<relPosition y="0" x="0"/> |
|
501 |
<connection refLocalId="3"> |
|
502 |
<position y="181" x="105"/> |
|
503 |
<position y="156" x="105"/> |
|
504 |
</connection> |
|
505 |
</connectionPointIn> |
|
506 |
<connectionPointOut formalParameter=""> |
|
507 |
<relPosition y="1" x="0"/> |
|
508 |
</connectionPointOut> |
|
509 |
<connectionPointOut formalParameter=""> |
|
2 | 510 |
<relPosition y="1" x="228"/> |
511 |
</connectionPointOut> |
|
512 |
<connectionPointOut formalParameter=""> |
|
513 |
<relPosition y="1" x="391"/> |
|
0 | 514 |
</connectionPointOut> |
515 |
</selectionDivergence> |
|
516 |
<transition localId="5" height="2" width="20"> |
|
517 |
<position y="207" x="95"/> |
|
518 |
<connectionPointIn> |
|
519 |
<relPosition y="0" x="10"/> |
|
520 |
<connection refLocalId="4"> |
|
521 |
<position y="207" x="105"/> |
|
522 |
<position y="182" x="105"/> |
|
523 |
</connection> |
|
524 |
</connectionPointIn> |
|
525 |
<connectionPointOut> |
|
526 |
<relPosition y="2" x="10"/> |
|
527 |
</connectionPointOut> |
|
528 |
<condition> |
|
529 |
<inline name=""> |
|
530 |
<ST>IN2 AND IN3</ST> |
|
531 |
</inline> |
|
532 |
</condition> |
|
533 |
</transition> |
|
534 |
<step localId="6" height="27" width="48" initialStep="false" name="Step1"> |
|
2 | 535 |
<position y="262" x="81"/> |
0 | 536 |
<connectionPointIn> |
537 |
<relPosition y="0" x="24"/> |
|
2 | 538 |
<connection refLocalId="21"> |
539 |
<position y="262" x="105"/> |
|
540 |
<position y="237" x="105"/> |
|
0 | 541 |
</connection> |
542 |
</connectionPointIn> |
|
543 |
<connectionPointOut formalParameter=""> |
|
544 |
<relPosition y="27" x="24"/> |
|
545 |
</connectionPointOut> |
|
546 |
</step> |
|
547 |
<transition localId="7" height="2" width="20"> |
|
2 | 548 |
<position y="207" x="323"/> |
0 | 549 |
<connectionPointIn> |
550 |
<relPosition y="0" x="10"/> |
|
551 |
<connection refLocalId="4"> |
|
2 | 552 |
<position y="207" x="333"/> |
553 |
<position y="182" x="333"/> |
|
0 | 554 |
</connection> |
555 |
</connectionPointIn> |
|
556 |
<connectionPointOut> |
|
557 |
<relPosition y="2" x="10"/> |
|
558 |
</connectionPointOut> |
|
559 |
<condition> |
|
560 |
<inline name=""> |
|
561 |
<ST>IN3</ST> |
|
562 |
</inline> |
|
563 |
</condition> |
|
564 |
</transition> |
|
565 |
<step localId="8" height="27" width="48" initialStep="false" name="Step2"> |
|
2 | 566 |
<position y="234" x="309"/> |
0 | 567 |
<connectionPointIn> |
568 |
<relPosition y="0" x="24"/> |
|
569 |
<connection refLocalId="7"> |
|
2 | 570 |
<position y="234" x="333"/> |
571 |
<position y="209" x="333"/> |
|
0 | 572 |
</connection> |
573 |
</connectionPointIn> |
|
574 |
<connectionPointOut formalParameter=""> |
|
575 |
<relPosition y="27" x="24"/> |
|
576 |
</connectionPointOut> |
|
577 |
</step> |
|
578 |
<transition localId="9" height="2" width="20"> |
|
2 | 579 |
<position y="207" x="486"/> |
0 | 580 |
<connectionPointIn> |
581 |
<relPosition y="0" x="10"/> |
|
582 |
<connection refLocalId="4"> |
|
2 | 583 |
<position y="207" x="496"/> |
584 |
<position y="182" x="496"/> |
|
0 | 585 |
</connection> |
586 |
</connectionPointIn> |
|
587 |
<connectionPointOut> |
|
588 |
<relPosition y="2" x="10"/> |
|
589 |
</connectionPointOut> |
|
590 |
<condition> |
|
591 |
<inline name=""> |
|
592 |
<ST>IN4</ST> |
|
593 |
</inline> |
|
594 |
</condition> |
|
595 |
</transition> |
|
596 |
<step localId="10" height="27" width="48" initialStep="false" name="Step3"> |
|
2 | 597 |
<position y="234" x="472"/> |
0 | 598 |
<connectionPointIn> |
599 |
<relPosition y="0" x="24"/> |
|
600 |
<connection refLocalId="9"> |
|
2 | 601 |
<position y="234" x="496"/> |
602 |
<position y="209" x="496"/> |
|
0 | 603 |
</connection> |
604 |
</connectionPointIn> |
|
605 |
<connectionPointOut formalParameter=""> |
|
606 |
<relPosition y="27" x="24"/> |
|
607 |
</connectionPointOut> |
|
608 |
<connectionPointOutAction formalParameter=""> |
|
609 |
<relPosition y="13" x="48"/> |
|
610 |
</connectionPointOutAction> |
|
611 |
</step> |
|
612 |
<transition localId="11" height="2" width="20"> |
|
2 | 613 |
<position y="342" x="95"/> |
0 | 614 |
<connectionPointIn> |
615 |
<relPosition y="0" x="10"/> |
|
2 | 616 |
<connection refLocalId="23"> |
617 |
<position y="342" x="105"/> |
|
618 |
<position y="317" x="105"/> |
|
0 | 619 |
</connection> |
620 |
</connectionPointIn> |
|
621 |
<connectionPointOut> |
|
622 |
<relPosition y="2" x="10"/> |
|
623 |
</connectionPointOut> |
|
624 |
<condition> |
|
625 |
<inline name=""> |
|
626 |
<ST>IN5</ST> |
|
627 |
</inline> |
|
628 |
</condition> |
|
629 |
</transition> |
|
630 |
<jumpStep localId="12" height="13" width="12" targetName="Start"> |
|
2 | 631 |
<position y="369" x="99"/> |
0 | 632 |
<connectionPointIn> |
633 |
<relPosition y="0" x="6"/> |
|
634 |
<connection refLocalId="11"> |
|
2 | 635 |
<position y="369" x="105"/> |
636 |
<position y="344" x="105"/> |
|
0 | 637 |
</connection> |
638 |
</connectionPointIn> |
|
639 |
</jumpStep> |
|
640 |
<actionBlock localId="13" height="30" width="100"> |
|
641 |
<position y="127" x="145"/> |
|
642 |
<connectionPointIn> |
|
643 |
<relPosition y="15" x="0"/> |
|
644 |
<connection refLocalId="3"> |
|
645 |
<position y="142" x="145"/> |
|
646 |
<position y="142" x="120"/> |
|
647 |
</connection> |
|
648 |
</connectionPointIn> |
|
649 |
<action qualifier="N"> |
|
650 |
<reference name="ACT1"/> |
|
651 |
</action> |
|
652 |
</actionBlock> |
|
653 |
<transition localId="14" height="2" width="20"> |
|
2 | 654 |
<position y="286" x="323"/> |
0 | 655 |
<connectionPointIn> |
656 |
<relPosition y="0" x="10"/> |
|
657 |
<connection refLocalId="8"> |
|
2 | 658 |
<position y="286" x="333"/> |
659 |
<position y="261" x="333"/> |
|
0 | 660 |
</connection> |
661 |
</connectionPointIn> |
|
662 |
<connectionPointOut> |
|
663 |
<relPosition y="2" x="10"/> |
|
664 |
</connectionPointOut> |
|
665 |
<condition> |
|
666 |
<inline name=""> |
|
667 |
<ST>IN5</ST> |
|
668 |
</inline> |
|
669 |
</condition> |
|
670 |
</transition> |
|
671 |
<transition localId="15" height="2" width="20"> |
|
46 | 672 |
<position y="346" x="486"/> |
0 | 673 |
<connectionPointIn> |
674 |
<relPosition y="0" x="10"/> |
|
675 |
<connection refLocalId="10"> |
|
46 | 676 |
<position y="346" x="496"/> |
2 | 677 |
<position y="261" x="496"/> |
0 | 678 |
</connection> |
679 |
</connectionPointIn> |
|
680 |
<connectionPointOut> |
|
681 |
<relPosition y="2" x="10"/> |
|
682 |
</connectionPointOut> |
|
683 |
<condition> |
|
684 |
<inline name=""> |
|
685 |
<ST>IN5</ST> |
|
686 |
</inline> |
|
687 |
</condition> |
|
688 |
</transition> |
|
2 | 689 |
<selectionConvergence localId="16" height="1" width="163"> |
46 | 690 |
<position y="373" x="333"/> |
0 | 691 |
<connectionPointIn> |
692 |
<relPosition y="0" x="0"/> |
|
693 |
<connection refLocalId="14"> |
|
46 | 694 |
<position y="373" x="333"/> |
2 | 695 |
<position y="288" x="333"/> |
696 |
</connection> |
|
697 |
</connectionPointIn> |
|
698 |
<connectionPointIn> |
|
699 |
<relPosition y="0" x="163"/> |
|
0 | 700 |
<connection refLocalId="15"> |
46 | 701 |
<position y="373" x="496"/> |
702 |
<position y="348" x="496"/> |
|
2 | 703 |
</connection> |
704 |
</connectionPointIn> |
|
705 |
<connectionPointOut> |
|
706 |
<relPosition y="1" x="80"/> |
|
0 | 707 |
</connectionPointOut> |
708 |
</selectionConvergence> |
|
709 |
<jumpStep localId="19" height="13" width="12" targetName="Init"> |
|
46 | 710 |
<position y="399" x="407"/> |
0 | 711 |
<connectionPointIn> |
712 |
<relPosition y="0" x="6"/> |
|
713 |
<connection refLocalId="16"> |
|
46 | 714 |
<position y="399" x="413"/> |
715 |
<position y="374" x="413"/> |
|
0 | 716 |
</connection> |
717 |
</connectionPointIn> |
|
718 |
</jumpStep> |
|
46 | 719 |
<actionBlock localId="20" height="90" width="173"> |
2 | 720 |
<position y="232" x="545"/> |
0 | 721 |
<connectionPointIn> |
722 |
<relPosition y="15" x="0"/> |
|
723 |
<connection refLocalId="10"> |
|
2 | 724 |
<position y="247" x="545"/> |
725 |
<position y="247" x="520"/> |
|
0 | 726 |
</connection> |
727 |
</connectionPointIn> |
|
1 | 728 |
<action indicator="IN5" qualifier="N"> |
0 | 729 |
<reference name="ACT1"/> |
730 |
</action> |
|
2 | 731 |
<action qualifier="D" duration="T#10s"> |
0 | 732 |
<reference name="IN1"/> |
733 |
</action> |
|
46 | 734 |
<action qualifier="P"> |
735 |
<inline> |
|
736 |
<ST>IN2 := TRUE;</ST> |
|
737 |
</inline> |
|
738 |
</action> |
|
0 | 739 |
</actionBlock> |
2 | 740 |
<simultaneousDivergence localId="21" height="3" width="118"> |
741 |
<position y="234" x="105"/> |
|
742 |
<connectionPointIn> |
|
743 |
<relPosition y="0" x="0"/> |
|
744 |
<connection refLocalId="5"> |
|
745 |
<position y="234" x="105"/> |
|
746 |
<position y="209" x="105"/> |
|
747 |
</connection> |
|
748 |
</connectionPointIn> |
|
749 |
<connectionPointOut formalParameter=""> |
|
750 |
<relPosition y="3" x="0"/> |
|
751 |
</connectionPointOut> |
|
752 |
<connectionPointOut formalParameter=""> |
|
753 |
<relPosition y="3" x="118"/> |
|
754 |
</connectionPointOut> |
|
755 |
</simultaneousDivergence> |
|
756 |
<step localId="22" height="27" width="48" initialStep="false" name="Step4"> |
|
757 |
<position y="262" x="199"/> |
|
758 |
<connectionPointIn> |
|
759 |
<relPosition y="0" x="24"/> |
|
760 |
<connection refLocalId="21"> |
|
761 |
<position y="262" x="223"/> |
|
762 |
<position y="237" x="223"/> |
|
763 |
</connection> |
|
764 |
</connectionPointIn> |
|
765 |
<connectionPointOut formalParameter=""> |
|
766 |
<relPosition y="27" x="24"/> |
|
767 |
</connectionPointOut> |
|
768 |
</step> |
|
769 |
<simultaneousConvergence localId="23" height="3" width="118"> |
|
770 |
<position y="314" x="105"/> |
|
771 |
<connectionPointIn> |
|
772 |
<relPosition y="0" x="0"/> |
|
773 |
<connection refLocalId="6"> |
|
774 |
<position y="314" x="105"/> |
|
775 |
<position y="289" x="105"/> |
|
776 |
</connection> |
|
777 |
</connectionPointIn> |
|
778 |
<connectionPointIn> |
|
779 |
<relPosition y="0" x="118"/> |
|
780 |
<connection refLocalId="22"> |
|
781 |
<position y="314" x="223"/> |
|
782 |
<position y="289" x="223"/> |
|
783 |
</connection> |
|
784 |
</connectionPointIn> |
|
785 |
<connectionPointOut> |
|
786 |
<relPosition y="3" x="0"/> |
|
787 |
</connectionPointOut> |
|
788 |
</simultaneousConvergence> |
|
0 | 789 |
</SFC> |
790 |
</body> |
|
791 |
</pou> |
|
792 |
<pou name="STTest" pouType="functionBlock"> |
|
793 |
<interface> |
|
794 |
<inputVars> |
|
795 |
<variable name="Collision"> |
|
796 |
<type> |
|
797 |
<BOOL/> |
|
798 |
</type> |
|
799 |
</variable> |
|
800 |
<variable name="Gate"> |
|
801 |
<type> |
|
802 |
<BOOL/> |
|
803 |
</type> |
|
804 |
</variable> |
|
805 |
<variable name="Pump"> |
|
806 |
<type> |
|
807 |
<BOOL/> |
|
808 |
</type> |
|
809 |
</variable> |
|
810 |
<variable name="Temp"> |
|
811 |
<type> |
|
17 | 812 |
<REAL/> |
0 | 813 |
</type> |
814 |
</variable> |
|
815 |
</inputVars> |
|
816 |
<outputVars> |
|
817 |
<variable name="Speed"> |
|
818 |
<type> |
|
819 |
<INT/> |
|
820 |
</type> |
|
821 |
</variable> |
|
822 |
<variable name="PumpSpeed"> |
|
823 |
<type> |
|
824 |
<INT/> |
|
825 |
</type> |
|
826 |
</variable> |
|
827 |
<variable name="Brakes"> |
|
828 |
<type> |
|
829 |
<BOOL/> |
|
830 |
</type> |
|
831 |
</variable> |
|
832 |
<variable name="Control_State"> |
|
833 |
<type> |
|
834 |
<BOOL/> |
|
835 |
</type> |
|
836 |
</variable> |
|
837 |
</outputVars> |
|
838 |
</interface> |
|
839 |
<body> |
|
840 |
<ST> |
|
1 | 841 |
IF Collision THEN |
2 | 842 |
Speed := 0; |
13
69075340d6a9
Adding support for forbidding insertion of function block into function
lbessard
parents:
2
diff
changeset
|
843 |
Brakes := TRUE; |
1 | 844 |
END_IF; |
0 | 845 |
|
13
69075340d6a9
Adding support for forbidding insertion of function block into function
lbessard
parents:
2
diff
changeset
|
846 |
IF (Gate = TRUE) AND |
69075340d6a9
Adding support for forbidding insertion of function block into function
lbessard
parents:
2
diff
changeset
|
847 |
(Pump = TRUE) AND (Temp > 200.0) THEN |
69075340d6a9
Adding support for forbidding insertion of function block into function
lbessard
parents:
2
diff
changeset
|
848 |
Control_State := TRUE; |
1 | 849 |
ELSE |
13
69075340d6a9
Adding support for forbidding insertion of function block into function
lbessard
parents:
2
diff
changeset
|
850 |
Control_State := FALSE; |
56
7187e1c00975
Adding support for Undo/Redo and Unsaved File On Close detection
lbessard
parents:
47
diff
changeset
|
851 |
|
2 | 852 |
PumpSpeed := 10.0; |
1 | 853 |
END_IF; |
0 | 854 |
</ST> |
855 |
</body> |
|
856 |
</pou> |
|
857 |
</pous> |
|
858 |
</types> |
|
859 |
<instances> |
|
860 |
<configurations> |
|
861 |
<configuration name="ConfigTest"> |
|
862 |
<resource name="ResourceTest"> |
|
58 | 863 |
<task name="Toto" priority="6" single="Tutu"> |
0 | 864 |
<pouInstance type="SFCTest" name="Program1"/> |
865 |
</task> |
|
866 |
<globalVars> |
|
56
7187e1c00975
Adding support for Undo/Redo and Unsaved File On Close detection
lbessard
parents:
47
diff
changeset
|
867 |
<variable name="Titi" address="%MW30"> |
0 | 868 |
<type> |
869 |
<INT/> |
|
870 |
</type> |
|
871 |
</variable> |
|
872 |
</globalVars> |
|
873 |
</resource> |
|
874 |
<globalVars> |
|
56
7187e1c00975
Adding support for Undo/Redo and Unsaved File On Close detection
lbessard
parents:
47
diff
changeset
|
875 |
<variable name="Toto" address="%MW10"> |
0 | 876 |
<type> |
877 |
<INT/> |
|
878 |
</type> |
|
879 |
</variable> |
|
56
7187e1c00975
Adding support for Undo/Redo and Unsaved File On Close detection
lbessard
parents:
47
diff
changeset
|
880 |
<variable name="Tutu" address="%MX20"> |
0 | 881 |
<type> |
882 |
<BOOL/> |
|
883 |
</type> |
|
884 |
</variable> |
|
885 |
</globalVars> |
|
886 |
</configuration> |
|
887 |
</configurations> |
|
888 |
</instances> |
|
889 |
</project> |