23 </sfc> |
20 </sfc> |
24 </coordinateInfo> |
21 </coordinateInfo> |
25 </contentHeader> |
22 </contentHeader> |
26 <types> |
23 <types> |
27 <dataTypes/> |
24 <dataTypes/> |
28 <pous/> |
25 <pous> |
|
26 <pou name="FBDTest" pouType="functionBlock"> |
|
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 <simpleValue value="true"/> |
|
43 </initialValue> |
|
44 </variable> |
|
45 <variable name="IN3"> |
|
46 <type> |
|
47 <BOOL/> |
|
48 </type> |
|
49 </variable> |
|
50 </inputVars> |
|
51 <outputVars> |
|
52 <variable name="OUT"> |
|
53 <type> |
|
54 <BOOL/> |
|
55 </type> |
|
56 </variable> |
|
57 </outputVars> |
|
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"/> |
|
79 <connection refLocalId="11" formalParameter="Q1"> |
|
80 <position y="198" x="587"/> |
|
81 <position y="198" x="517"/> |
|
82 </connection> |
|
83 </connectionPointIn> |
|
84 <expression>OUT</expression> |
|
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> |
|
128 <block localId="8" height="87" width="99" typeName="OR"> |
|
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"/> |
|
173 <connection refLocalId="6" formalParameter="OUT"> |
|
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"/> |
|
184 <connection refLocalId="8" formalParameter="OUT"> |
|
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> |
|
342 <inputVars> |
|
343 <variable name="X1"> |
|
344 <type> |
|
345 <REAL/> |
|
346 </type> |
|
347 <initialValue> |
|
348 <simpleValue value="1.0"/> |
|
349 </initialValue> |
|
350 </variable> |
|
351 </inputVars> |
|
352 <localVars> |
|
353 <variable name="Temp"> |
|
354 <type> |
|
355 <REAL/> |
|
356 </type> |
|
357 </variable> |
|
358 </localVars> |
|
359 <inputVars> |
|
360 <variable name="X2"> |
|
361 <type> |
|
362 <REAL/> |
|
363 </type> |
|
364 <initialValue> |
|
365 <simpleValue value="0.0"/> |
|
366 </initialValue> |
|
367 </variable> |
|
368 <variable name="Y1"> |
|
369 <type> |
|
370 <REAL/> |
|
371 </type> |
|
372 <initialValue> |
|
373 <simpleValue value="1.0"/> |
|
374 </initialValue> |
|
375 </variable> |
|
376 <variable name="Y2"> |
|
377 <type> |
|
378 <REAL/> |
|
379 </type> |
|
380 <initialValue> |
|
381 <simpleValue value="0.0"/> |
|
382 </initialValue> |
|
383 </variable> |
|
384 <variable name="TMax"> |
|
385 <type> |
|
386 <REAL/> |
|
387 </type> |
|
388 </variable> |
|
389 </inputVars> |
|
390 <outputVars> |
|
391 <variable name="ERROR"> |
|
392 <type> |
|
393 <BOOL/> |
|
394 </type> |
|
395 </variable> |
|
396 </outputVars> |
|
397 </interface> |
|
398 <body> |
|
399 <IL> |
|
400 LD Y1 |
|
401 SUB Y2 (* Substract Y2 from Y1 *) |
|
402 ST Temp (* Store Y1-Y2 in Temp *) |
|
403 MUL Temp (* Multiply by Temp to square *) |
|
404 ADD( X1 (* Defer ADD *) |
|
405 SUB X2 (* Substract X1 from X2 *) |
|
406 ST Temp (* Store X1-X2 in Temp *) |
|
407 MUL Temp (* Multiply by Temp to square *) |
|
408 ) |
|
409 SQRT (* Call Square root fun *) |
|
410 ST ILTest (* Setup function result *) |
|
411 GT TMax (* Greater than TMax ? *) |
|
412 JMPC ERR (* Yes, Jump to Error *) |
|
413 S ERROR (* Set ERROR *) |
|
414 RET (* Normal return *) |
|
415 ERR: RET (* Error return, ENO not set *) |
|
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> |
|
453 IF IN1 THEN |
|
454 IN2 := 1; |
|
455 ELSE |
|
456 IN3 := 1; |
|
457 END_IF; |
|
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> |
|
509 <selectionDivergence localId="4" height="1" width="391"> |
|
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=""> |
|
522 <relPosition y="1" x="228"/> |
|
523 </connectionPointOut> |
|
524 <connectionPointOut formalParameter=""> |
|
525 <relPosition y="1" x="391"/> |
|
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"> |
|
547 <position y="262" x="81"/> |
|
548 <connectionPointIn> |
|
549 <relPosition y="0" x="24"/> |
|
550 <connection refLocalId="21"> |
|
551 <position y="262" x="105"/> |
|
552 <position y="237" x="105"/> |
|
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"> |
|
560 <position y="207" x="323"/> |
|
561 <connectionPointIn> |
|
562 <relPosition y="0" x="10"/> |
|
563 <connection refLocalId="4"> |
|
564 <position y="207" x="333"/> |
|
565 <position y="182" x="333"/> |
|
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"> |
|
578 <position y="234" x="309"/> |
|
579 <connectionPointIn> |
|
580 <relPosition y="0" x="24"/> |
|
581 <connection refLocalId="7"> |
|
582 <position y="234" x="333"/> |
|
583 <position y="209" x="333"/> |
|
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"> |
|
591 <position y="207" x="486"/> |
|
592 <connectionPointIn> |
|
593 <relPosition y="0" x="10"/> |
|
594 <connection refLocalId="4"> |
|
595 <position y="207" x="496"/> |
|
596 <position y="182" x="496"/> |
|
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"> |
|
609 <position y="234" x="472"/> |
|
610 <connectionPointIn> |
|
611 <relPosition y="0" x="24"/> |
|
612 <connection refLocalId="9"> |
|
613 <position y="234" x="496"/> |
|
614 <position y="209" x="496"/> |
|
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"> |
|
625 <position y="342" x="95"/> |
|
626 <connectionPointIn> |
|
627 <relPosition y="0" x="10"/> |
|
628 <connection refLocalId="23"> |
|
629 <position y="342" x="105"/> |
|
630 <position y="317" x="105"/> |
|
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"> |
|
643 <position y="369" x="99"/> |
|
644 <connectionPointIn> |
|
645 <relPosition y="0" x="6"/> |
|
646 <connection refLocalId="11"> |
|
647 <position y="369" x="105"/> |
|
648 <position y="344" x="105"/> |
|
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"> |
|
666 <position y="286" x="323"/> |
|
667 <connectionPointIn> |
|
668 <relPosition y="0" x="10"/> |
|
669 <connection refLocalId="8"> |
|
670 <position y="286" x="333"/> |
|
671 <position y="261" x="333"/> |
|
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"> |
|
684 <position y="316" x="486"/> |
|
685 <connectionPointIn> |
|
686 <relPosition y="0" x="10"/> |
|
687 <connection refLocalId="10"> |
|
688 <position y="316" x="496"/> |
|
689 <position y="261" x="496"/> |
|
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> |
|
701 <selectionConvergence localId="16" height="1" width="163"> |
|
702 <position y="343" x="333"/> |
|
703 <connectionPointIn> |
|
704 <relPosition y="0" x="0"/> |
|
705 <connection refLocalId="14"> |
|
706 <position y="343" x="333"/> |
|
707 <position y="288" x="333"/> |
|
708 </connection> |
|
709 </connectionPointIn> |
|
710 <connectionPointIn> |
|
711 <relPosition y="0" x="163"/> |
|
712 <connection refLocalId="15"> |
|
713 <position y="343" x="496"/> |
|
714 <position y="318" x="496"/> |
|
715 </connection> |
|
716 </connectionPointIn> |
|
717 <connectionPointOut> |
|
718 <relPosition y="1" x="80"/> |
|
719 </connectionPointOut> |
|
720 </selectionConvergence> |
|
721 <jumpStep localId="19" height="13" width="12" targetName="Init"> |
|
722 <position y="369" x="407"/> |
|
723 <connectionPointIn> |
|
724 <relPosition y="0" x="6"/> |
|
725 <connection refLocalId="16"> |
|
726 <position y="369" x="413"/> |
|
727 <position y="344" x="413"/> |
|
728 </connection> |
|
729 </connectionPointIn> |
|
730 </jumpStep> |
|
731 <actionBlock localId="20" height="60" width="181"> |
|
732 <position y="232" x="545"/> |
|
733 <connectionPointIn> |
|
734 <relPosition y="15" x="0"/> |
|
735 <connection refLocalId="10"> |
|
736 <position y="247" x="545"/> |
|
737 <position y="247" x="520"/> |
|
738 </connection> |
|
739 </connectionPointIn> |
|
740 <action indicator="IN5" qualifier="N"> |
|
741 <reference name="ACT1"/> |
|
742 </action> |
|
743 <action qualifier="D" duration="T#10s"> |
|
744 <reference name="IN1"/> |
|
745 </action> |
|
746 </actionBlock> |
|
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> |
|
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 <REAL/> |
|
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> |
|
848 IF Collision THEN |
|
849 Speed := 0; |
|
850 Brakes := TRUE; |
|
851 END_IF; |
|
852 |
|
853 IF (Gate = TRUE) AND |
|
854 (Pump = TRUE) AND (Temp > 200.0) THEN |
|
855 Control_State := TRUE; |
|
856 ELSE |
|
857 Control_State := FALSE; |
|
858 PumpSpeed := 10.0; |
|
859 END_IF; |
|
860 </ST> |
|
861 </body> |
|
862 </pou> |
|
863 </pous> |
29 </types> |
864 </types> |
30 <instances> |
865 <instances> |
31 <configurations/> |
866 <configurations> |
|
867 <configuration name="ConfigTest"> |
|
868 <resource name="ResourceTest"> |
|
869 <task interval="01:00:00.100000" 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> |
32 </instances> |
895 </instances> |
33 </project> |
896 </project> |