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