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