author | Andrey Skvortsov <andrej.skvortzov@gmail.com> |
Thu, 28 Sep 2017 15:17:57 +0300 | |
changeset 1832 | 0f1081928d65 |
parent 1546 | f1840d27823d |
child 2296 | a2ab363f9e90 |
permissions | -rw-r--r-- |
1383 | 1 |
<?xml version='1.0' encoding='utf-8'?> |
2 |
<project xmlns="http://www.plcopen.org/xml/tc6_0201" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xhtml="http://www.w3.org/1999/xhtml" xsi:schemaLocation="http://www.plcopen.org/xml/tc6_0201"> |
|
1546
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
3 |
<fileHeader companyName="Beremiz" productName="Unnamed" productVersion="1" creationDateTime="2012-09-04T16:16:33"/> |
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
4 |
<contentHeader name="traffic_lights" modificationDateTime="2016-10-20T13:08:53"> |
1383 | 5 |
<coordinateInfo> |
6 |
<fbd> |
|
7 |
<scaling x="0" y="0"/> |
|
8 |
</fbd> |
|
9 |
<ld> |
|
10 |
<scaling x="0" y="0"/> |
|
11 |
</ld> |
|
12 |
<sfc> |
|
13 |
<scaling x="0" y="0"/> |
|
14 |
</sfc> |
|
15 |
</coordinateInfo> |
|
16 |
</contentHeader> |
|
17 |
<types> |
|
18 |
<dataTypes/> |
|
19 |
<pous> |
|
20 |
<pou name="traffic_light_sequence" pouType="functionBlock"> |
|
21 |
<interface> |
|
22 |
<inputVars> |
|
23 |
<variable name="SWITCH_BUTTON"> |
|
24 |
<type> |
|
25 |
<BOOL/> |
|
26 |
</type> |
|
27 |
</variable> |
|
28 |
<variable name="PEDESTRIAN_BUTTON"> |
|
29 |
<type> |
|
30 |
<BOOL/> |
|
31 |
</type> |
|
32 |
</variable> |
|
33 |
</inputVars> |
|
34 |
<outputVars> |
|
35 |
<variable name="RED_LIGHT"> |
|
36 |
<type> |
|
37 |
<BOOL/> |
|
38 |
</type> |
|
39 |
</variable> |
|
40 |
<variable name="ORANGE_LIGHT"> |
|
41 |
<type> |
|
42 |
<BOOL/> |
|
43 |
</type> |
|
44 |
</variable> |
|
45 |
<variable name="GREEN_LIGHT"> |
|
46 |
<type> |
|
47 |
<BOOL/> |
|
48 |
</type> |
|
49 |
</variable> |
|
50 |
<variable name="PEDESTRIAN_RED_LIGHT"> |
|
51 |
<type> |
|
52 |
<BOOL/> |
|
53 |
</type> |
|
54 |
</variable> |
|
55 |
<variable name="PEDESTRIAN_GREEN_LIGHT"> |
|
56 |
<type> |
|
57 |
<BOOL/> |
|
58 |
</type> |
|
59 |
</variable> |
|
60 |
</outputVars> |
|
61 |
<localVars> |
|
62 |
<variable name="TON1"> |
|
63 |
<type> |
|
64 |
<derived name="TON"/> |
|
65 |
</type> |
|
66 |
</variable> |
|
67 |
<variable name="TON2"> |
|
68 |
<type> |
|
69 |
<derived name="TON"/> |
|
70 |
</type> |
|
71 |
</variable> |
|
72 |
<variable name="ALLOW_CARS"> |
|
73 |
<type> |
|
74 |
<BOOL/> |
|
75 |
</type> |
|
76 |
</variable> |
|
77 |
<variable name="WARN_CARS"> |
|
78 |
<type> |
|
79 |
<BOOL/> |
|
80 |
</type> |
|
81 |
</variable> |
|
82 |
<variable name="STOP_CARS"> |
|
83 |
<type> |
|
84 |
<BOOL/> |
|
85 |
</type> |
|
86 |
</variable> |
|
87 |
<variable name="ALLOW_PEDESTRIANS"> |
|
88 |
<type> |
|
89 |
<BOOL/> |
|
90 |
</type> |
|
91 |
</variable> |
|
92 |
<variable name="STOP_PEDESTRIANS"> |
|
93 |
<type> |
|
94 |
<BOOL/> |
|
95 |
</type> |
|
96 |
</variable> |
|
97 |
<variable name="TON3"> |
|
98 |
<type> |
|
99 |
<derived name="TON"/> |
|
100 |
</type> |
|
101 |
</variable> |
|
102 |
<variable name="R_TRIG0"> |
|
103 |
<type> |
|
104 |
<derived name="R_TRIG"/> |
|
105 |
</type> |
|
106 |
</variable> |
|
107 |
<variable name="R_TRIG1"> |
|
108 |
<type> |
|
109 |
<derived name="R_TRIG"/> |
|
110 |
</type> |
|
111 |
</variable> |
|
112 |
<variable name="SR0"> |
|
113 |
<type> |
|
114 |
<derived name="SR"/> |
|
115 |
</type> |
|
116 |
</variable> |
|
117 |
</localVars> |
|
118 |
</interface> |
|
119 |
<actions> |
|
120 |
<action name="BLINK_ORANGE_LIGHT"> |
|
121 |
<body> |
|
122 |
<LD> |
|
123 |
<leftPowerRail localId="1" height="40" width="2"> |
|
124 |
<position x="54" y="123"/> |
|
125 |
<connectionPointOut formalParameter=""> |
|
126 |
<relPosition x="2" y="20"/> |
|
127 |
</connectionPointOut> |
|
128 |
</leftPowerRail> |
|
129 |
<contact localId="2" height="15" width="21" negated="true"> |
|
130 |
<position x="121" y="135"/> |
|
131 |
<connectionPointIn> |
|
132 |
<relPosition x="0" y="8"/> |
|
133 |
<connection refLocalId="1"> |
|
134 |
<position x="121" y="143"/> |
|
135 |
<position x="56" y="143"/> |
|
136 |
</connection> |
|
137 |
</connectionPointIn> |
|
138 |
<connectionPointOut> |
|
139 |
<relPosition x="21" y="8"/> |
|
140 |
</connectionPointOut> |
|
141 |
<variable>ORANGE_LIGHT</variable> |
|
142 |
</contact> |
|
143 |
<block localId="3" width="97" height="102" typeName="TON" instanceName="TON1"> |
|
144 |
<position x="216" y="103"/> |
|
145 |
<inputVariables> |
|
146 |
<variable formalParameter="IN"> |
|
147 |
<connectionPointIn> |
|
148 |
<relPosition x="0" y="40"/> |
|
149 |
<connection refLocalId="2"> |
|
150 |
<position x="216" y="143"/> |
|
151 |
<position x="142" y="143"/> |
|
152 |
</connection> |
|
153 |
</connectionPointIn> |
|
154 |
</variable> |
|
155 |
<variable formalParameter="PT"> |
|
156 |
<connectionPointIn> |
|
157 |
<relPosition x="0" y="81"/> |
|
158 |
<connection refLocalId="4"> |
|
159 |
<position x="216" y="184"/> |
|
160 |
<position x="151" y="184"/> |
|
161 |
</connection> |
|
162 |
</connectionPointIn> |
|
163 |
</variable> |
|
164 |
</inputVariables> |
|
165 |
<inOutVariables/> |
|
166 |
<outputVariables> |
|
167 |
<variable formalParameter="Q"> |
|
168 |
<connectionPointOut> |
|
169 |
<relPosition x="97" y="40"/> |
|
170 |
</connectionPointOut> |
|
171 |
</variable> |
|
172 |
<variable formalParameter="ET"> |
|
173 |
<connectionPointOut> |
|
174 |
<relPosition x="97" y="81"/> |
|
175 |
</connectionPointOut> |
|
176 |
</variable> |
|
177 |
</outputVariables> |
|
178 |
</block> |
|
179 |
<inVariable localId="4" height="27" width="72"> |
|
180 |
<position x="79" y="171"/> |
|
181 |
<connectionPointOut> |
|
182 |
<relPosition x="72" y="13"/> |
|
183 |
</connectionPointOut> |
|
184 |
<expression>T#500ms</expression> |
|
185 |
</inVariable> |
|
186 |
<block localId="5" width="97" height="106" typeName="TON" instanceName="TON2"> |
|
187 |
<position x="216" y="251"/> |
|
188 |
<inputVariables> |
|
189 |
<variable formalParameter="IN"> |
|
190 |
<connectionPointIn> |
|
191 |
<relPosition x="0" y="41"/> |
|
192 |
<connection refLocalId="14"> |
|
193 |
<position x="216" y="292"/> |
|
194 |
<position x="155" y="292"/> |
|
195 |
</connection> |
|
196 |
</connectionPointIn> |
|
197 |
</variable> |
|
198 |
<variable formalParameter="PT"> |
|
199 |
<connectionPointIn> |
|
200 |
<relPosition x="0" y="84"/> |
|
201 |
<connection refLocalId="15"> |
|
202 |
<position x="216" y="335"/> |
|
203 |
<position x="162" y="335"/> |
|
204 |
</connection> |
|
205 |
</connectionPointIn> |
|
206 |
</variable> |
|
207 |
</inputVariables> |
|
208 |
<inOutVariables/> |
|
209 |
<outputVariables> |
|
210 |
<variable formalParameter="Q"> |
|
211 |
<connectionPointOut> |
|
212 |
<relPosition x="97" y="41"/> |
|
213 |
</connectionPointOut> |
|
214 |
</variable> |
|
215 |
<variable formalParameter="ET"> |
|
216 |
<connectionPointOut> |
|
217 |
<relPosition x="97" y="84"/> |
|
218 |
</connectionPointOut> |
|
219 |
</variable> |
|
220 |
</outputVariables> |
|
221 |
</block> |
|
222 |
<coil localId="6" height="15" width="21" storage="reset"> |
|
223 |
<position x="517" y="284"/> |
|
224 |
<connectionPointIn> |
|
225 |
<relPosition x="0" y="8"/> |
|
226 |
<connection refLocalId="10" formalParameter="Q"> |
|
227 |
<position x="517" y="292"/> |
|
228 |
<position x="427" y="292"/> |
|
229 |
</connection> |
|
230 |
</connectionPointIn> |
|
231 |
<connectionPointOut> |
|
232 |
<relPosition x="21" y="8"/> |
|
233 |
</connectionPointOut> |
|
234 |
<variable>ORANGE_LIGHT</variable> |
|
235 |
</coil> |
|
236 |
<rightPowerRail localId="7" height="40" width="2"> |
|
237 |
<position x="598" y="123"/> |
|
238 |
<connectionPointIn> |
|
239 |
<relPosition x="0" y="20"/> |
|
240 |
<connection refLocalId="8"> |
|
241 |
<position x="598" y="143"/> |
|
242 |
<position x="530" y="143"/> |
|
243 |
</connection> |
|
244 |
</connectionPointIn> |
|
245 |
</rightPowerRail> |
|
246 |
<coil localId="8" height="15" width="21" storage="set"> |
|
247 |
<position x="509" y="135"/> |
|
248 |
<connectionPointIn> |
|
249 |
<relPosition x="0" y="8"/> |
|
250 |
<connection refLocalId="11" formalParameter="Q"> |
|
251 |
<position x="509" y="143"/> |
|
252 |
<position x="428" y="143"/> |
|
253 |
</connection> |
|
254 |
</connectionPointIn> |
|
255 |
<connectionPointOut> |
|
256 |
<relPosition x="21" y="8"/> |
|
257 |
</connectionPointOut> |
|
258 |
<variable>ORANGE_LIGHT</variable> |
|
259 |
</coil> |
|
260 |
<comment localId="9" height="39" width="308"> |
|
261 |
<position x="54" y="26"/> |
|
262 |
<content> |
|
263 |
<xhtml:p><![CDATA[This action makes the orange light blink]]></xhtml:p> |
|
264 |
</content> |
|
265 |
</comment> |
|
266 |
<block localId="10" width="57" height="40" typeName="R_TRIG" instanceName="R_TRIG0"> |
|
267 |
<position x="370" y="262"/> |
|
268 |
<inputVariables> |
|
269 |
<variable formalParameter="CLK"> |
|
270 |
<connectionPointIn> |
|
271 |
<relPosition x="0" y="30"/> |
|
272 |
<connection refLocalId="5" formalParameter="Q"> |
|
273 |
<position x="370" y="292"/> |
|
274 |
<position x="313" y="292"/> |
|
275 |
</connection> |
|
276 |
</connectionPointIn> |
|
277 |
</variable> |
|
278 |
</inputVariables> |
|
279 |
<inOutVariables/> |
|
280 |
<outputVariables> |
|
281 |
<variable formalParameter="Q"> |
|
282 |
<connectionPointOut> |
|
283 |
<relPosition x="57" y="30"/> |
|
284 |
</connectionPointOut> |
|
285 |
</variable> |
|
286 |
</outputVariables> |
|
287 |
</block> |
|
288 |
<block localId="11" width="57" height="40" typeName="R_TRIG" instanceName="R_TRIG1"> |
|
289 |
<position x="371" y="113"/> |
|
290 |
<inputVariables> |
|
291 |
<variable formalParameter="CLK"> |
|
292 |
<connectionPointIn> |
|
293 |
<relPosition x="0" y="30"/> |
|
294 |
<connection refLocalId="3" formalParameter="Q"> |
|
295 |
<position x="371" y="143"/> |
|
296 |
<position x="313" y="143"/> |
|
297 |
</connection> |
|
298 |
</connectionPointIn> |
|
299 |
</variable> |
|
300 |
</inputVariables> |
|
301 |
<inOutVariables/> |
|
302 |
<outputVariables> |
|
303 |
<variable formalParameter="Q"> |
|
304 |
<connectionPointOut> |
|
305 |
<relPosition x="57" y="30"/> |
|
306 |
</connectionPointOut> |
|
307 |
</variable> |
|
308 |
</outputVariables> |
|
309 |
</block> |
|
310 |
<rightPowerRail localId="12" height="40" width="2"> |
|
311 |
<position x="597" y="272"/> |
|
312 |
<connectionPointIn> |
|
313 |
<relPosition x="0" y="20"/> |
|
314 |
<connection refLocalId="6"> |
|
315 |
<position x="597" y="292"/> |
|
316 |
<position x="538" y="292"/> |
|
317 |
</connection> |
|
318 |
</connectionPointIn> |
|
319 |
</rightPowerRail> |
|
320 |
<leftPowerRail localId="13" height="40" width="2"> |
|
321 |
<position x="67" y="272"/> |
|
322 |
<connectionPointOut formalParameter=""> |
|
323 |
<relPosition x="2" y="20"/> |
|
324 |
</connectionPointOut> |
|
325 |
</leftPowerRail> |
|
326 |
<contact localId="14" height="15" width="21"> |
|
327 |
<position x="134" y="284"/> |
|
328 |
<connectionPointIn> |
|
329 |
<relPosition x="0" y="8"/> |
|
330 |
<connection refLocalId="13"> |
|
331 |
<position x="134" y="292"/> |
|
332 |
<position x="69" y="292"/> |
|
333 |
</connection> |
|
334 |
</connectionPointIn> |
|
335 |
<connectionPointOut> |
|
336 |
<relPosition x="21" y="8"/> |
|
337 |
</connectionPointOut> |
|
338 |
<variable>ORANGE_LIGHT</variable> |
|
339 |
</contact> |
|
340 |
<inVariable localId="15" height="27" width="72"> |
|
341 |
<position x="90" y="322"/> |
|
342 |
<connectionPointOut> |
|
343 |
<relPosition x="72" y="13"/> |
|
344 |
</connectionPointOut> |
|
345 |
<expression>T#500ms</expression> |
|
346 |
</inVariable> |
|
347 |
</LD> |
|
348 |
</body> |
|
349 |
</action> |
|
350 |
</actions> |
|
351 |
<transitions> |
|
352 |
<transition name="STOP"> |
|
353 |
<body> |
|
354 |
<FBD> |
|
355 |
<block localId="42" width="59" height="40" typeName="NOT"> |
|
356 |
<position x="230" y="40"/> |
|
357 |
<inputVariables> |
|
358 |
<variable formalParameter="IN"> |
|
359 |
<connectionPointIn> |
|
360 |
<relPosition x="0" y="30"/> |
|
361 |
<connection refLocalId="43"> |
|
362 |
<position x="230" y="70"/> |
|
363 |
<position x="202" y="70"/> |
|
364 |
</connection> |
|
365 |
</connectionPointIn> |
|
366 |
</variable> |
|
367 |
</inputVariables> |
|
368 |
<inOutVariables/> |
|
369 |
<outputVariables> |
|
370 |
<variable formalParameter="OUT"> |
|
371 |
<connectionPointOut> |
|
372 |
<relPosition x="59" y="30"/> |
|
373 |
</connectionPointOut> |
|
374 |
</variable> |
|
375 |
</outputVariables> |
|
376 |
</block> |
|
377 |
<inVariable localId="43" height="27" width="156"> |
|
378 |
<position x="46" y="57"/> |
|
379 |
<connectionPointOut> |
|
380 |
<relPosition x="156" y="13"/> |
|
381 |
</connectionPointOut> |
|
382 |
<expression>SWITCH_BUTTON</expression> |
|
383 |
</inVariable> |
|
384 |
<outVariable localId="44" height="27" width="46"> |
|
385 |
<position x="351" y="57"/> |
|
386 |
<connectionPointIn> |
|
387 |
<relPosition x="0" y="13"/> |
|
388 |
<connection refLocalId="42" formalParameter="OUT"> |
|
389 |
<position x="351" y="70"/> |
|
390 |
<position x="289" y="70"/> |
|
391 |
</connection> |
|
392 |
</connectionPointIn> |
|
393 |
<expression>STOP</expression> |
|
394 |
</outVariable> |
|
395 |
</FBD> |
|
396 |
</body> |
|
397 |
</transition> |
|
398 |
</transitions> |
|
399 |
<body> |
|
400 |
<SFC> |
|
401 |
<step localId="1" height="37" width="78" name="Standstill" initialStep="true"> |
|
402 |
<position x="530" y="31"/> |
|
403 |
<connectionPointIn> |
|
404 |
<relPosition x="39" y="0"/> |
|
405 |
<connection refLocalId="39"> |
|
406 |
<position x="569" y="31"/> |
|
407 |
<position x="569" y="11"/> |
|
1546
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
408 |
<position x="980" y="11"/> |
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
409 |
<position x="980" y="1151"/> |
1383 | 410 |
<position x="776" y="1151"/> |
411 |
<position x="776" y="1097"/> |
|
412 |
</connection> |
|
413 |
</connectionPointIn> |
|
414 |
<connectionPointOut formalParameter=""> |
|
415 |
<relPosition x="39" y="37"/> |
|
416 |
</connectionPointOut> |
|
417 |
<connectionPointOutAction formalParameter=""> |
|
418 |
<relPosition x="78" y="18"/> |
|
419 |
</connectionPointOutAction> |
|
420 |
</step> |
|
421 |
<transition localId="2" height="2" width="20"> |
|
422 |
<position x="559" y="225"/> |
|
423 |
<connectionPointIn> |
|
424 |
<relPosition x="10" y="0"/> |
|
425 |
<connection refLocalId="1"> |
|
426 |
<position x="569" y="225"/> |
|
427 |
<position x="569" y="68"/> |
|
428 |
</connection> |
|
429 |
</connectionPointIn> |
|
430 |
<connectionPointOut> |
|
431 |
<relPosition x="10" y="2"/> |
|
432 |
</connectionPointOut> |
|
433 |
<condition> |
|
434 |
<inline name=""> |
|
435 |
<ST> |
|
436 |
<xhtml:p><![CDATA[SWITCH_BUTTON]]></xhtml:p> |
|
437 |
</ST> |
|
438 |
</inline> |
|
439 |
</condition> |
|
440 |
</transition> |
|
441 |
<step localId="3" height="27" width="69" name="ORANGE"> |
|
442 |
<position x="535" y="252"/> |
|
443 |
<connectionPointIn> |
|
444 |
<relPosition x="34" y="0"/> |
|
445 |
<connection refLocalId="2"> |
|
446 |
<position x="569" y="252"/> |
|
447 |
<position x="569" y="227"/> |
|
448 |
</connection> |
|
449 |
</connectionPointIn> |
|
450 |
<connectionPointOut formalParameter=""> |
|
451 |
<relPosition x="34" y="27"/> |
|
452 |
</connectionPointOut> |
|
453 |
<connectionPointOutAction formalParameter=""> |
|
454 |
<relPosition x="69" y="13"/> |
|
455 |
</connectionPointOutAction> |
|
456 |
</step> |
|
457 |
<transition localId="6" height="2" width="20"> |
|
458 |
<position x="559" y="376"/> |
|
459 |
<connectionPointIn> |
|
460 |
<relPosition x="10" y="0"/> |
|
461 |
<connection refLocalId="15"> |
|
462 |
<position x="569" y="376"/> |
|
463 |
<position x="569" y="336"/> |
|
464 |
</connection> |
|
465 |
</connectionPointIn> |
|
466 |
<connectionPointOut> |
|
467 |
<relPosition x="10" y="2"/> |
|
468 |
</connectionPointOut> |
|
469 |
<condition> |
|
470 |
<inline name=""> |
|
471 |
<ST> |
|
472 |
<xhtml:p><![CDATA[STOP_CARS]]></xhtml:p> |
|
473 |
</ST> |
|
474 |
</inline> |
|
475 |
</condition> |
|
476 |
</transition> |
|
477 |
<actionBlock localId="8" width="231" height="162"> |
|
478 |
<position x="711" y="34"/> |
|
479 |
<connectionPointIn> |
|
480 |
<relPosition x="0" y="15"/> |
|
481 |
<connection refLocalId="1"> |
|
482 |
<position x="711" y="49"/> |
|
483 |
<position x="608" y="49"/> |
|
484 |
</connection> |
|
485 |
</connectionPointIn> |
|
486 |
<action localId="0" qualifier="P"> |
|
487 |
<relPosition x="0" y="0"/> |
|
488 |
<inline> |
|
489 |
<ST> |
|
490 |
<xhtml:p><![CDATA[ORANGE_LIGHT := 1;]]></xhtml:p> |
|
491 |
</ST> |
|
492 |
</inline> |
|
493 |
</action> |
|
494 |
<action localId="0"> |
|
495 |
<relPosition x="0" y="0"/> |
|
496 |
<reference name="BLINK_ORANGE_LIGHT"/> |
|
497 |
</action> |
|
498 |
<action localId="0" qualifier="R"> |
|
499 |
<relPosition x="0" y="0"/> |
|
500 |
<reference name="PEDESTRIAN_RED_LIGHT"/> |
|
501 |
</action> |
|
502 |
<action localId="0" qualifier="R"> |
|
503 |
<relPosition x="0" y="0"/> |
|
504 |
<reference name="PEDESTRIAN_GREEN_LIGHT"/> |
|
505 |
</action> |
|
506 |
<action localId="0" qualifier="R"> |
|
507 |
<relPosition x="0" y="0"/> |
|
508 |
<reference name="RED_LIGHT"/> |
|
509 |
</action> |
|
510 |
<action localId="0" qualifier="R"> |
|
511 |
<relPosition x="0" y="0"/> |
|
512 |
<reference name="GREEN_LIGHT"/> |
|
513 |
</action> |
|
514 |
</actionBlock> |
|
1546
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
515 |
<actionBlock localId="9" width="232" height="125"> |
1383 | 516 |
<position x="711" y="250"/> |
517 |
<connectionPointIn> |
|
518 |
<relPosition x="0" y="15"/> |
|
519 |
<connection refLocalId="3"> |
|
520 |
<position x="711" y="265"/> |
|
521 |
<position x="604" y="265"/> |
|
522 |
</connection> |
|
523 |
</connectionPointIn> |
|
524 |
<action localId="0" qualifier="R"> |
|
525 |
<relPosition x="0" y="0"/> |
|
526 |
<reference name="GREEN_LIGHT"/> |
|
527 |
</action> |
|
528 |
<action localId="0" qualifier="S"> |
|
529 |
<relPosition x="0" y="0"/> |
|
530 |
<reference name="ORANGE_LIGHT"/> |
|
531 |
</action> |
|
532 |
<action localId="0" qualifier="S"> |
|
533 |
<relPosition x="0" y="0"/> |
|
534 |
<reference name="PEDESTRIAN_RED_LIGHT"/> |
|
535 |
</action> |
|
536 |
<action localId="0" qualifier="D" duration="T#2s"> |
|
537 |
<relPosition x="0" y="0"/> |
|
538 |
<reference name="STOP_CARS"/> |
|
539 |
</action> |
|
540 |
</actionBlock> |
|
541 |
<step localId="10" height="34" width="37" name="RED"> |
|
542 |
<position x="551" y="411"/> |
|
543 |
<connectionPointIn> |
|
544 |
<relPosition x="18" y="0"/> |
|
545 |
<connection refLocalId="6"> |
|
546 |
<position x="569" y="411"/> |
|
547 |
<position x="569" y="378"/> |
|
548 |
</connection> |
|
549 |
</connectionPointIn> |
|
550 |
<connectionPointOut formalParameter=""> |
|
551 |
<relPosition x="18" y="34"/> |
|
552 |
</connectionPointOut> |
|
553 |
<connectionPointOutAction formalParameter=""> |
|
554 |
<relPosition x="37" y="17"/> |
|
555 |
</connectionPointOutAction> |
|
556 |
</step> |
|
1546
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
557 |
<actionBlock localId="11" width="235" height="103"> |
1383 | 558 |
<position x="710" y="413"/> |
559 |
<connectionPointIn> |
|
560 |
<relPosition x="0" y="15"/> |
|
561 |
<connection refLocalId="10"> |
|
562 |
<position x="710" y="428"/> |
|
563 |
<position x="588" y="428"/> |
|
564 |
</connection> |
|
565 |
</connectionPointIn> |
|
566 |
<action localId="0" qualifier="R"> |
|
567 |
<relPosition x="0" y="0"/> |
|
568 |
<reference name="ORANGE_LIGHT"/> |
|
569 |
</action> |
|
570 |
<action localId="0" qualifier="S"> |
|
571 |
<relPosition x="0" y="0"/> |
|
572 |
<reference name="RED_LIGHT"/> |
|
573 |
</action> |
|
574 |
<action localId="0" qualifier="D" duration="T#2s"> |
|
575 |
<relPosition x="0" y="0"/> |
|
576 |
<reference name="ALLOW_PEDESTRIANS"/> |
|
577 |
</action> |
|
578 |
</actionBlock> |
|
579 |
<transition localId="12" height="2" width="20"> |
|
580 |
<position x="559" y="533"/> |
|
581 |
<connectionPointIn> |
|
582 |
<relPosition x="10" y="0"/> |
|
583 |
<connection refLocalId="7"> |
|
584 |
<position x="569" y="533"/> |
|
585 |
<position x="569" y="487"/> |
|
586 |
</connection> |
|
587 |
</connectionPointIn> |
|
588 |
<connectionPointOut> |
|
589 |
<relPosition x="10" y="2"/> |
|
590 |
</connectionPointOut> |
|
591 |
<condition> |
|
592 |
<inline name=""> |
|
593 |
<ST> |
|
594 |
<xhtml:p><![CDATA[ALLOW_PEDESTRIANS]]></xhtml:p> |
|
595 |
</ST> |
|
596 |
</inline> |
|
597 |
</condition> |
|
598 |
</transition> |
|
599 |
<selectionDivergence localId="15" height="1" width="154"> |
|
600 |
<position x="415" y="335"/> |
|
601 |
<connectionPointIn> |
|
602 |
<relPosition x="154" y="0"/> |
|
603 |
<connection refLocalId="3"> |
|
604 |
<position x="569" y="335"/> |
|
605 |
<position x="569" y="279"/> |
|
606 |
</connection> |
|
607 |
</connectionPointIn> |
|
608 |
<connectionPointOut formalParameter=""> |
|
609 |
<relPosition x="0" y="1"/> |
|
610 |
</connectionPointOut> |
|
611 |
<connectionPointOut formalParameter=""> |
|
612 |
<relPosition x="154" y="1"/> |
|
613 |
</connectionPointOut> |
|
614 |
</selectionDivergence> |
|
615 |
<transition localId="16" height="2" width="20"> |
|
616 |
<position x="405" y="377"/> |
|
617 |
<connectionPointIn> |
|
618 |
<relPosition x="10" y="0"/> |
|
619 |
<connection refLocalId="15"> |
|
620 |
<position x="415" y="377"/> |
|
621 |
<position x="415" y="336"/> |
|
622 |
</connection> |
|
623 |
</connectionPointIn> |
|
624 |
<connectionPointOut> |
|
625 |
<relPosition x="10" y="2"/> |
|
626 |
</connectionPointOut> |
|
627 |
<condition> |
|
628 |
<reference name="STOP"/> |
|
629 |
</condition> |
|
630 |
</transition> |
|
631 |
<jumpStep localId="17" height="13" width="12" targetName="Standstill"> |
|
632 |
<position x="409" y="418"/> |
|
633 |
<connectionPointIn> |
|
634 |
<relPosition x="6" y="0"/> |
|
635 |
<connection refLocalId="16"> |
|
636 |
<position x="415" y="418"/> |
|
637 |
<position x="415" y="379"/> |
|
638 |
</connection> |
|
639 |
</connectionPointIn> |
|
640 |
</jumpStep> |
|
641 |
<transition localId="4" height="2" width="20"> |
|
642 |
<position x="400" y="528"/> |
|
643 |
<connectionPointIn> |
|
644 |
<relPosition x="10" y="0"/> |
|
645 |
<connection refLocalId="7"> |
|
646 |
<position x="410" y="528"/> |
|
647 |
<position x="410" y="487"/> |
|
648 |
</connection> |
|
649 |
</connectionPointIn> |
|
650 |
<connectionPointOut> |
|
651 |
<relPosition x="10" y="2"/> |
|
652 |
</connectionPointOut> |
|
653 |
<condition> |
|
654 |
<reference name="STOP"/> |
|
655 |
</condition> |
|
656 |
</transition> |
|
657 |
<jumpStep localId="5" height="13" width="12" targetName="Standstill"> |
|
658 |
<position x="404" y="569"/> |
|
659 |
<connectionPointIn> |
|
660 |
<relPosition x="6" y="0"/> |
|
661 |
<connection refLocalId="4"> |
|
662 |
<position x="410" y="569"/> |
|
663 |
<position x="410" y="530"/> |
|
664 |
</connection> |
|
665 |
</connectionPointIn> |
|
666 |
</jumpStep> |
|
667 |
<selectionDivergence localId="7" height="1" width="159"> |
|
668 |
<position x="410" y="486"/> |
|
669 |
<connectionPointIn> |
|
670 |
<relPosition x="159" y="0"/> |
|
671 |
<connection refLocalId="10"> |
|
672 |
<position x="569" y="486"/> |
|
673 |
<position x="569" y="445"/> |
|
674 |
</connection> |
|
675 |
</connectionPointIn> |
|
676 |
<connectionPointOut formalParameter=""> |
|
677 |
<relPosition x="0" y="1"/> |
|
678 |
</connectionPointOut> |
|
679 |
<connectionPointOut formalParameter=""> |
|
680 |
<relPosition x="159" y="1"/> |
|
681 |
</connectionPointOut> |
|
682 |
</selectionDivergence> |
|
683 |
<step localId="18" height="27" width="148" name="PEDESTRIAN_GREEN"> |
|
684 |
<position x="495" y="575"/> |
|
685 |
<connectionPointIn> |
|
686 |
<relPosition x="74" y="0"/> |
|
687 |
<connection refLocalId="12"> |
|
688 |
<position x="569" y="575"/> |
|
689 |
<position x="569" y="535"/> |
|
690 |
</connection> |
|
691 |
</connectionPointIn> |
|
692 |
<connectionPointOut formalParameter=""> |
|
693 |
<relPosition x="74" y="27"/> |
|
694 |
</connectionPointOut> |
|
695 |
<connectionPointOutAction formalParameter=""> |
|
696 |
<relPosition x="148" y="13"/> |
|
697 |
</connectionPointOutAction> |
|
698 |
</step> |
|
1546
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
699 |
<actionBlock localId="19" width="236" height="110"> |
1383 | 700 |
<position x="708" y="573"/> |
701 |
<connectionPointIn> |
|
702 |
<relPosition x="0" y="15"/> |
|
703 |
<connection refLocalId="18"> |
|
704 |
<position x="708" y="588"/> |
|
705 |
<position x="643" y="588"/> |
|
706 |
</connection> |
|
707 |
</connectionPointIn> |
|
708 |
<action localId="0" qualifier="S"> |
|
709 |
<relPosition x="0" y="0"/> |
|
710 |
<reference name="PEDESTRIAN_GREEN_LIGHT"/> |
|
711 |
</action> |
|
712 |
<action localId="0" qualifier="R"> |
|
713 |
<relPosition x="0" y="0"/> |
|
714 |
<reference name="PEDESTRIAN_RED_LIGHT"/> |
|
715 |
</action> |
|
716 |
<action localId="0" qualifier="D" duration="T#10s"> |
|
717 |
<relPosition x="0" y="0"/> |
|
718 |
<reference name="STOP_PEDESTRIANS"/> |
|
719 |
</action> |
|
720 |
</actionBlock> |
|
721 |
<transition localId="20" height="2" width="20"> |
|
722 |
<position x="400" y="653"/> |
|
723 |
<connectionPointIn> |
|
724 |
<relPosition x="10" y="0"/> |
|
725 |
<connection refLocalId="22"> |
|
726 |
<position x="410" y="653"/> |
|
727 |
<position x="410" y="626"/> |
|
728 |
</connection> |
|
729 |
</connectionPointIn> |
|
730 |
<connectionPointOut> |
|
731 |
<relPosition x="10" y="2"/> |
|
732 |
</connectionPointOut> |
|
733 |
<condition> |
|
1546
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
734 |
<inline name=""> |
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
735 |
<ST> |
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
736 |
<xhtml:p><![CDATA[NOT SWITCH_BUTTON]]></xhtml:p> |
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
737 |
</ST> |
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
738 |
</inline> |
1383 | 739 |
</condition> |
740 |
</transition> |
|
741 |
<jumpStep localId="21" height="13" width="12" targetName="Standstill"> |
|
742 |
<position x="404" y="694"/> |
|
743 |
<connectionPointIn> |
|
744 |
<relPosition x="6" y="0"/> |
|
745 |
<connection refLocalId="20"> |
|
746 |
<position x="410" y="694"/> |
|
747 |
<position x="410" y="655"/> |
|
748 |
</connection> |
|
749 |
</connectionPointIn> |
|
750 |
</jumpStep> |
|
751 |
<selectionDivergence localId="22" height="1" width="159"> |
|
752 |
<position x="410" y="625"/> |
|
753 |
<connectionPointIn> |
|
754 |
<relPosition x="159" y="0"/> |
|
755 |
<connection refLocalId="18"> |
|
756 |
<position x="569" y="625"/> |
|
757 |
<position x="569" y="602"/> |
|
758 |
</connection> |
|
759 |
</connectionPointIn> |
|
760 |
<connectionPointOut formalParameter=""> |
|
761 |
<relPosition x="0" y="1"/> |
|
762 |
</connectionPointOut> |
|
763 |
<connectionPointOut formalParameter=""> |
|
764 |
<relPosition x="159" y="1"/> |
|
765 |
</connectionPointOut> |
|
766 |
</selectionDivergence> |
|
767 |
<transition localId="23" height="2" width="20"> |
|
768 |
<position x="559" y="709"/> |
|
769 |
<connectionPointIn> |
|
770 |
<relPosition x="10" y="0"/> |
|
771 |
<connection refLocalId="22"> |
|
772 |
<position x="569" y="709"/> |
|
773 |
<position x="569" y="626"/> |
|
774 |
</connection> |
|
775 |
</connectionPointIn> |
|
776 |
<connectionPointOut> |
|
777 |
<relPosition x="10" y="2"/> |
|
778 |
</connectionPointOut> |
|
779 |
<condition> |
|
780 |
<inline name=""> |
|
781 |
<ST> |
|
782 |
<xhtml:p><![CDATA[STOP_PEDESTRIANS]]></xhtml:p> |
|
783 |
</ST> |
|
784 |
</inline> |
|
785 |
</condition> |
|
786 |
</transition> |
|
787 |
<step localId="24" height="27" width="148" name="PEDESTRIAN_RED"> |
|
788 |
<position x="495" y="750"/> |
|
789 |
<connectionPointIn> |
|
790 |
<relPosition x="74" y="0"/> |
|
791 |
<connection refLocalId="23"> |
|
792 |
<position x="569" y="750"/> |
|
793 |
<position x="569" y="711"/> |
|
794 |
</connection> |
|
795 |
</connectionPointIn> |
|
796 |
<connectionPointOut formalParameter=""> |
|
797 |
<relPosition x="74" y="27"/> |
|
798 |
</connectionPointOut> |
|
799 |
<connectionPointOutAction formalParameter=""> |
|
800 |
<relPosition x="148" y="13"/> |
|
801 |
</connectionPointOutAction> |
|
802 |
</step> |
|
1546
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
803 |
<actionBlock localId="25" width="233" height="110"> |
1383 | 804 |
<position x="708" y="748"/> |
805 |
<connectionPointIn> |
|
806 |
<relPosition x="0" y="15"/> |
|
807 |
<connection refLocalId="24"> |
|
808 |
<position x="708" y="763"/> |
|
809 |
<position x="643" y="763"/> |
|
810 |
</connection> |
|
811 |
</connectionPointIn> |
|
812 |
<action localId="0" qualifier="S"> |
|
813 |
<relPosition x="0" y="0"/> |
|
814 |
<reference name="PEDESTRIAN_RED_LIGHT"/> |
|
815 |
</action> |
|
816 |
<action localId="0" qualifier="R"> |
|
817 |
<relPosition x="0" y="0"/> |
|
818 |
<reference name="PEDESTRIAN_GREEN_LIGHT"/> |
|
819 |
</action> |
|
820 |
<action localId="0" qualifier="D" duration="T#2s"> |
|
821 |
<relPosition x="0" y="0"/> |
|
822 |
<reference name="ALLOW_CARS"/> |
|
823 |
</action> |
|
824 |
</actionBlock> |
|
825 |
<transition localId="26" height="2" width="20"> |
|
826 |
<position x="400" y="857"/> |
|
827 |
<connectionPointIn> |
|
828 |
<relPosition x="10" y="0"/> |
|
829 |
<connection refLocalId="28"> |
|
830 |
<position x="410" y="857"/> |
|
831 |
<position x="410" y="816"/> |
|
832 |
</connection> |
|
833 |
</connectionPointIn> |
|
834 |
<connectionPointOut> |
|
835 |
<relPosition x="10" y="2"/> |
|
836 |
</connectionPointOut> |
|
837 |
<condition> |
|
1546
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
838 |
<connectionPointIn> |
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
839 |
<connection refLocalId="48"> |
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
840 |
<position x="400" y="858"/> |
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
841 |
<position x="290" y="858"/> |
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
842 |
</connection> |
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
843 |
</connectionPointIn> |
1383 | 844 |
</condition> |
845 |
</transition> |
|
846 |
<jumpStep localId="27" height="13" width="12" targetName="Standstill"> |
|
847 |
<position x="404" y="898"/> |
|
848 |
<connectionPointIn> |
|
849 |
<relPosition x="6" y="0"/> |
|
850 |
<connection refLocalId="26"> |
|
851 |
<position x="410" y="898"/> |
|
852 |
<position x="410" y="859"/> |
|
853 |
</connection> |
|
854 |
</connectionPointIn> |
|
855 |
</jumpStep> |
|
856 |
<selectionDivergence localId="28" height="1" width="159"> |
|
857 |
<position x="410" y="815"/> |
|
858 |
<connectionPointIn> |
|
859 |
<relPosition x="159" y="0"/> |
|
860 |
<connection refLocalId="24"> |
|
861 |
<position x="569" y="815"/> |
|
862 |
<position x="569" y="777"/> |
|
863 |
</connection> |
|
864 |
</connectionPointIn> |
|
865 |
<connectionPointOut formalParameter=""> |
|
866 |
<relPosition x="0" y="1"/> |
|
867 |
</connectionPointOut> |
|
868 |
<connectionPointOut formalParameter=""> |
|
869 |
<relPosition x="159" y="1"/> |
|
870 |
</connectionPointOut> |
|
871 |
</selectionDivergence> |
|
872 |
<transition localId="29" height="2" width="20"> |
|
873 |
<position x="559" y="879"/> |
|
874 |
<connectionPointIn> |
|
875 |
<relPosition x="10" y="0"/> |
|
876 |
<connection refLocalId="28"> |
|
877 |
<position x="569" y="879"/> |
|
878 |
<position x="569" y="816"/> |
|
879 |
</connection> |
|
880 |
</connectionPointIn> |
|
881 |
<connectionPointOut> |
|
882 |
<relPosition x="10" y="2"/> |
|
883 |
</connectionPointOut> |
|
884 |
<condition> |
|
885 |
<inline name=""> |
|
886 |
<ST> |
|
887 |
<xhtml:p><![CDATA[ALLOW_CARS]]></xhtml:p> |
|
888 |
</ST> |
|
889 |
</inline> |
|
890 |
</condition> |
|
891 |
</transition> |
|
892 |
<step localId="30" height="27" width="56" name="GREEN"> |
|
893 |
<position x="541" y="933"/> |
|
894 |
<connectionPointIn> |
|
895 |
<relPosition x="28" y="0"/> |
|
896 |
<connection refLocalId="29"> |
|
897 |
<position x="569" y="933"/> |
|
898 |
<position x="569" y="881"/> |
|
899 |
</connection> |
|
900 |
</connectionPointIn> |
|
901 |
<connectionPointOut formalParameter=""> |
|
902 |
<relPosition x="28" y="27"/> |
|
903 |
</connectionPointOut> |
|
904 |
<connectionPointOutAction formalParameter=""> |
|
905 |
<relPosition x="56" y="13"/> |
|
906 |
</connectionPointOutAction> |
|
907 |
</step> |
|
1546
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
908 |
<actionBlock localId="31" width="227" height="110"> |
1383 | 909 |
<position x="709" y="931"/> |
910 |
<connectionPointIn> |
|
911 |
<relPosition x="0" y="15"/> |
|
912 |
<connection refLocalId="30"> |
|
913 |
<position x="709" y="946"/> |
|
914 |
<position x="597" y="946"/> |
|
915 |
</connection> |
|
916 |
</connectionPointIn> |
|
917 |
<action localId="0" qualifier="S"> |
|
918 |
<relPosition x="0" y="0"/> |
|
919 |
<reference name="GREEN_LIGHT"/> |
|
920 |
</action> |
|
921 |
<action localId="0" qualifier="R"> |
|
922 |
<relPosition x="0" y="0"/> |
|
923 |
<reference name="RED_LIGHT"/> |
|
924 |
</action> |
|
925 |
<action localId="0" qualifier="D" duration="T#20s"> |
|
926 |
<relPosition x="0" y="0"/> |
|
927 |
<reference name="WARN_CARS"/> |
|
928 |
</action> |
|
929 |
</actionBlock> |
|
930 |
<block localId="32" width="89" height="94" typeName="TON" instanceName="TON3"> |
|
931 |
<position x="308" y="1053"/> |
|
932 |
<inputVariables> |
|
933 |
<variable formalParameter="IN"> |
|
934 |
<connectionPointIn> |
|
935 |
<relPosition x="0" y="38"/> |
|
936 |
<connection refLocalId="44" formalParameter="Q1"> |
|
937 |
<position x="308" y="1091"/> |
|
938 |
<position x="291" y="1091"/> |
|
939 |
<position x="291" y="1065"/> |
|
940 |
<position x="274" y="1065"/> |
|
941 |
</connection> |
|
942 |
</connectionPointIn> |
|
943 |
</variable> |
|
944 |
<variable formalParameter="PT"> |
|
945 |
<connectionPointIn> |
|
946 |
<relPosition x="0" y="75"/> |
|
947 |
<connection refLocalId="34"> |
|
948 |
<position x="308" y="1128"/> |
|
949 |
<position x="270" y="1128"/> |
|
950 |
</connection> |
|
951 |
</connectionPointIn> |
|
952 |
</variable> |
|
953 |
</inputVariables> |
|
954 |
<inOutVariables/> |
|
955 |
<outputVariables> |
|
956 |
<variable formalParameter="Q"> |
|
957 |
<connectionPointOut> |
|
958 |
<relPosition x="89" y="38"/> |
|
959 |
</connectionPointOut> |
|
960 |
</variable> |
|
961 |
<variable formalParameter="ET"> |
|
962 |
<connectionPointOut> |
|
963 |
<relPosition x="89" y="75"/> |
|
964 |
</connectionPointOut> |
|
965 |
</variable> |
|
966 |
</outputVariables> |
|
967 |
</block> |
|
968 |
<inVariable localId="33" height="27" width="159"> |
|
969 |
<position x="24" y="1052"/> |
|
970 |
<connectionPointOut> |
|
971 |
<relPosition x="159" y="13"/> |
|
972 |
</connectionPointOut> |
|
973 |
<expression>PEDESTRIAN_BUTTON</expression> |
|
974 |
</inVariable> |
|
975 |
<inVariable localId="34" height="27" width="43"> |
|
976 |
<position x="227" y="1115"/> |
|
977 |
<connectionPointOut> |
|
978 |
<relPosition x="43" y="13"/> |
|
979 |
</connectionPointOut> |
|
980 |
<expression>T#2s</expression> |
|
981 |
</inVariable> |
|
982 |
<block localId="35" width="67" height="60" typeName="OR"> |
|
983 |
<position x="459" y="1061"/> |
|
984 |
<inputVariables> |
|
985 |
<variable formalParameter="IN1"> |
|
986 |
<connectionPointIn> |
|
987 |
<relPosition x="0" y="30"/> |
|
988 |
<connection refLocalId="32" formalParameter="Q"> |
|
989 |
<position x="459" y="1091"/> |
|
990 |
<position x="397" y="1091"/> |
|
991 |
</connection> |
|
992 |
</connectionPointIn> |
|
993 |
</variable> |
|
994 |
<variable formalParameter="IN2"> |
|
995 |
<connectionPointIn> |
|
996 |
<relPosition x="0" y="50"/> |
|
997 |
<connection refLocalId="36"> |
|
998 |
<position x="459" y="1111"/> |
|
999 |
<position x="427" y="1111"/> |
|
1000 |
<position x="427" y="1195"/> |
|
1001 |
<position x="260" y="1195"/> |
|
1002 |
</connection> |
|
1003 |
</connectionPointIn> |
|
1004 |
</variable> |
|
1005 |
</inputVariables> |
|
1006 |
<inOutVariables/> |
|
1007 |
<outputVariables> |
|
1008 |
<variable formalParameter="OUT"> |
|
1009 |
<connectionPointOut> |
|
1010 |
<relPosition x="67" y="30"/> |
|
1011 |
</connectionPointOut> |
|
1012 |
</variable> |
|
1013 |
</outputVariables> |
|
1014 |
</block> |
|
1015 |
<inVariable localId="36" height="27" width="97"> |
|
1016 |
<position x="163" y="1182"/> |
|
1017 |
<connectionPointOut> |
|
1018 |
<relPosition x="97" y="13"/> |
|
1019 |
</connectionPointOut> |
|
1020 |
<expression>WARN_CARS</expression> |
|
1021 |
</inVariable> |
|
1022 |
<transition localId="37" height="2" width="20"> |
|
1023 |
<position x="559" y="1090"/> |
|
1024 |
<connectionPointIn> |
|
1025 |
<relPosition x="10" y="0"/> |
|
1026 |
<connection refLocalId="38"> |
|
1027 |
<position x="569" y="1090"/> |
|
1028 |
<position x="569" y="1060"/> |
|
1029 |
</connection> |
|
1030 |
</connectionPointIn> |
|
1031 |
<connectionPointOut> |
|
1032 |
<relPosition x="10" y="2"/> |
|
1033 |
</connectionPointOut> |
|
1034 |
<condition> |
|
1035 |
<connectionPointIn> |
|
1036 |
<connection refLocalId="35" formalParameter="OUT"> |
|
1037 |
<position x="559" y="1091"/> |
|
1038 |
<position x="526" y="1091"/> |
|
1039 |
</connection> |
|
1040 |
</connectionPointIn> |
|
1041 |
</condition> |
|
1042 |
</transition> |
|
1043 |
<selectionDivergence localId="38" height="1" width="207"> |
|
1044 |
<position x="569" y="1059"/> |
|
1045 |
<connectionPointIn> |
|
1046 |
<relPosition x="0" y="0"/> |
|
1047 |
<connection refLocalId="30"> |
|
1048 |
<position x="569" y="1059"/> |
|
1049 |
<position x="569" y="960"/> |
|
1050 |
</connection> |
|
1051 |
</connectionPointIn> |
|
1052 |
<connectionPointOut formalParameter=""> |
|
1053 |
<relPosition x="0" y="1"/> |
|
1054 |
</connectionPointOut> |
|
1055 |
<connectionPointOut formalParameter=""> |
|
1056 |
<relPosition x="207" y="1"/> |
|
1057 |
</connectionPointOut> |
|
1058 |
</selectionDivergence> |
|
1059 |
<transition localId="39" height="2" width="20"> |
|
1060 |
<position x="766" y="1095"/> |
|
1061 |
<connectionPointIn> |
|
1062 |
<relPosition x="10" y="0"/> |
|
1063 |
<connection refLocalId="38"> |
|
1064 |
<position x="776" y="1095"/> |
|
1065 |
<position x="776" y="1060"/> |
|
1066 |
</connection> |
|
1067 |
</connectionPointIn> |
|
1068 |
<connectionPointOut> |
|
1069 |
<relPosition x="10" y="2"/> |
|
1070 |
</connectionPointOut> |
|
1071 |
<condition> |
|
1072 |
<inline name=""> |
|
1073 |
<ST> |
|
1074 |
<xhtml:p><![CDATA[NOT SWITCH_BUTTON]]></xhtml:p> |
|
1075 |
</ST> |
|
1076 |
</inline> |
|
1077 |
</condition> |
|
1078 |
</transition> |
|
1079 |
<jumpStep localId="41" height="13" width="12" targetName="ORANGE"> |
|
1080 |
<position x="563" y="1137"/> |
|
1081 |
<connectionPointIn> |
|
1082 |
<relPosition x="6" y="0"/> |
|
1083 |
<connection refLocalId="37"> |
|
1084 |
<position x="569" y="1137"/> |
|
1085 |
<position x="569" y="1092"/> |
|
1086 |
</connection> |
|
1087 |
</connectionPointIn> |
|
1088 |
</jumpStep> |
|
1089 |
<block localId="44" width="50" height="60" typeName="SR" instanceName="SR0"> |
|
1090 |
<position x="224" y="1035"/> |
|
1091 |
<inputVariables> |
|
1092 |
<variable formalParameter="S1"> |
|
1093 |
<connectionPointIn> |
|
1094 |
<relPosition x="0" y="30"/> |
|
1095 |
<connection refLocalId="33"> |
|
1096 |
<position x="224" y="1065"/> |
|
1097 |
<position x="183" y="1065"/> |
|
1098 |
</connection> |
|
1099 |
</connectionPointIn> |
|
1100 |
</variable> |
|
1101 |
<variable formalParameter="R"> |
|
1102 |
<connectionPointIn> |
|
1103 |
<relPosition x="0" y="50"/> |
|
1104 |
<connection refLocalId="32" formalParameter="Q"> |
|
1105 |
<position x="224" y="1085"/> |
|
1106 |
<position x="203" y="1085"/> |
|
1107 |
<position x="203" y="1167"/> |
|
1108 |
<position x="416" y="1167"/> |
|
1109 |
<position x="416" y="1091"/> |
|
1110 |
<position x="397" y="1091"/> |
|
1111 |
</connection> |
|
1112 |
</connectionPointIn> |
|
1113 |
</variable> |
|
1114 |
</inputVariables> |
|
1115 |
<inOutVariables/> |
|
1116 |
<outputVariables> |
|
1117 |
<variable formalParameter="Q1"> |
|
1118 |
<connectionPointOut> |
|
1119 |
<relPosition x="50" y="30"/> |
|
1120 |
</connectionPointOut> |
|
1121 |
</variable> |
|
1122 |
</outputVariables> |
|
1123 |
</block> |
|
1546
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1124 |
<comment localId="45" height="681" width="645"> |
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1125 |
<position x="1021" y="21"/> |
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1126 |
<content> |
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1127 |
<xhtml:p><![CDATA[*** Description of SFC action qualifiers *** |
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1128 |
|
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1129 |
N : non-stored - The action code body is executed or the Boolean variable is set as |
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1130 |
long as the step is active. |
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1131 |
|
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1132 |
R : overriding reset – When the step has previously been executed with the S |
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1133 |
(including DS, DS, and SL) qualifier, the R qualifier will stop the execution of the |
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1134 |
code or reset the Boolean variable. |
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1135 |
|
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1136 |
S : set (stored) - The action code body is executed or the Boolean variable is set. |
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1137 |
This state is stored as soon as the step becomes active. It can only be reset |
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1138 |
explicitly by associating the same action to a different step using the qualifier 'R'. |
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1139 |
|
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1140 |
L : time limited - The action code body is executed or the Boolean variable is set as |
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1141 |
long as the step is active but maximal for the fixed time interval. |
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1142 |
|
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1143 |
D : time delayed - The action code body is executed or the Boolean variable is set |
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1144 |
after the fixed delay time has elapsed. The action remains active as long as the step |
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1145 |
is active. If the step is active shorter than the fixed delay time the action does not |
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1146 |
become active. |
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1147 |
|
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1148 |
P : pulse - As soon as the step is active the action code body is executed or the |
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1149 |
Boolean variable is set for one operating cycle. (Note: The code body will then |
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1150 |
execute for one additional operating cycle with the Step.X variable FALSE.) |
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1151 |
|
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1152 |
SD : stored and time delayed - the action code body is executed or the Boolean |
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1153 |
variable is stored and set when the fixed delay time has elapsed after the step |
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1154 |
activation, even if the step becomes inactive. The action remains active until it is |
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1155 |
reset. If the step is active shorter than the fixed delay time the action becomes active |
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1156 |
anyway. |
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1157 |
|
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1158 |
DS : delayed and stored - The action code body is executed or the Boolean variable |
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1159 |
is set when the fixed delay time has elapsed after the step activation. The action |
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1160 |
remains active until it is reset. If the step is active shorter than the fixed delay time |
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1161 |
the action does not become active. |
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1162 |
|
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1163 |
SL : stored and time limited - The action code body is executed or the Boolean |
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1164 |
variable is set and stored for a fixed time interval as soon as the step is active. If the |
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1165 |
step is active shorter than the time interval the action is active for the whole time |
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1166 |
interval anyway. If the action is reset during the time interval the action becomes |
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1167 |
inactive as soon as the action is reset. |
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1168 |
]]></xhtml:p> |
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1169 |
</content> |
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1170 |
</comment> |
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1171 |
<comment localId="46" height="160" width="375"> |
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1172 |
<position x="8" y="326"/> |
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1173 |
<content> |
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1174 |
<xhtml:p><![CDATA[Conditions can be written in any IEC 61131-3 language. |
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1175 |
They can be implemented in defferent ways: |
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1176 |
- reference to external implementation; |
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1177 |
- inline implementation; |
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1178 |
- written in FBD or LD on SFC diagram and connected to the condition. |
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1179 |
|
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1180 |
See below examples of all these types.]]></xhtml:p> |
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1181 |
</content> |
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1182 |
</comment> |
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1183 |
<leftPowerRail localId="47" height="40" width="3"> |
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1184 |
<position x="189" y="838"/> |
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1185 |
<connectionPointOut formalParameter=""> |
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1186 |
<relPosition x="3" y="20"/> |
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1187 |
</connectionPointOut> |
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1188 |
</leftPowerRail> |
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1189 |
<contact localId="48" height="15" width="21" negated="true"> |
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1190 |
<position x="269" y="850"/> |
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1191 |
<connectionPointIn> |
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1192 |
<relPosition x="0" y="8"/> |
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1193 |
<connection refLocalId="47"> |
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1194 |
<position x="269" y="858"/> |
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1195 |
<position x="192" y="858"/> |
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1196 |
</connection> |
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1197 |
</connectionPointIn> |
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1198 |
<connectionPointOut> |
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1199 |
<relPosition x="21" y="8"/> |
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1200 |
</connectionPointOut> |
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1201 |
<variable>SWITCH_BUTTON</variable> |
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1202 |
</contact> |
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1203 |
<comment localId="13" height="66" width="375"> |
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1204 |
<position x="9" y="28"/> |
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1205 |
<content> |
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1206 |
<xhtml:p><![CDATA[ |
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1207 |
Sequential function chart (SFC) is commonly used to describe state machines.]]></xhtml:p> |
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1208 |
</content> |
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1209 |
</comment> |
1383 | 1210 |
</SFC> |
1211 |
</body> |
|
1212 |
</pou> |
|
1213 |
<pou name="main_program" pouType="program"> |
|
1214 |
<interface> |
|
1215 |
<localVars> |
|
1216 |
<variable name="trafic_light_sequence0"> |
|
1217 |
<type> |
|
1218 |
<derived name="traffic_light_sequence"/> |
|
1219 |
</type> |
|
1220 |
</variable> |
|
1221 |
<variable name="SwitchButton"> |
|
1222 |
<type> |
|
1223 |
<derived name="Button"/> |
|
1224 |
</type> |
|
1225 |
</variable> |
|
1226 |
<variable name="PedestrianButton"> |
|
1227 |
<type> |
|
1228 |
<derived name="Button"/> |
|
1229 |
</type> |
|
1230 |
</variable> |
|
1231 |
<variable name="RedLight"> |
|
1232 |
<type> |
|
1233 |
<derived name="Led"/> |
|
1234 |
</type> |
|
1235 |
</variable> |
|
1236 |
<variable name="OrangeLight"> |
|
1237 |
<type> |
|
1238 |
<derived name="Led"/> |
|
1239 |
</type> |
|
1240 |
</variable> |
|
1241 |
<variable name="GreenLight"> |
|
1242 |
<type> |
|
1243 |
<derived name="Led"/> |
|
1244 |
</type> |
|
1245 |
</variable> |
|
1246 |
<variable name="PedestrianRedLight"> |
|
1247 |
<type> |
|
1248 |
<derived name="Led"/> |
|
1249 |
</type> |
|
1250 |
</variable> |
|
1251 |
<variable name="PedestrianGreenLight"> |
|
1252 |
<type> |
|
1253 |
<derived name="Led"/> |
|
1254 |
</type> |
|
1255 |
</variable> |
|
1256 |
</localVars> |
|
1257 |
</interface> |
|
1258 |
<body> |
|
1259 |
<FBD> |
|
1546
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1260 |
<block localId="1" width="349" height="836" typeName="traffic_light_sequence" instanceName="trafic_light_sequence0" executionOrderId="0"> |
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1261 |
<position x="470" y="406"/> |
1383 | 1262 |
<inputVariables> |
1263 |
<variable formalParameter="SWITCH_BUTTON"> |
|
1264 |
<connectionPointIn> |
|
1265 |
<relPosition x="0" y="101"/> |
|
1266 |
<connection refLocalId="2" formalParameter="state_out"> |
|
1546
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1267 |
<position x="470" y="507"/> |
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1268 |
<position x="333" y="507"/> |
1383 | 1269 |
</connection> |
1270 |
</connectionPointIn> |
|
1271 |
</variable> |
|
1272 |
<variable formalParameter="PEDESTRIAN_BUTTON"> |
|
1273 |
<connectionPointIn> |
|
1274 |
<relPosition x="0" y="264"/> |
|
1275 |
<connection refLocalId="3" formalParameter="state_out"> |
|
1546
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1276 |
<position x="470" y="670"/> |
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1277 |
<position x="402" y="670"/> |
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1278 |
<position x="402" y="721"/> |
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1279 |
<position x="335" y="721"/> |
1383 | 1280 |
</connection> |
1281 |
</connectionPointIn> |
|
1282 |
</variable> |
|
1283 |
</inputVariables> |
|
1284 |
<inOutVariables/> |
|
1285 |
<outputVariables> |
|
1286 |
<variable formalParameter="RED_LIGHT"> |
|
1287 |
<connectionPointOut> |
|
1288 |
<relPosition x="349" y="101"/> |
|
1289 |
</connectionPointOut> |
|
1290 |
</variable> |
|
1291 |
<variable formalParameter="ORANGE_LIGHT"> |
|
1292 |
<connectionPointOut> |
|
1293 |
<relPosition x="349" y="264"/> |
|
1294 |
</connectionPointOut> |
|
1295 |
</variable> |
|
1296 |
<variable formalParameter="GREEN_LIGHT"> |
|
1297 |
<connectionPointOut> |
|
1298 |
<relPosition x="349" y="427"/> |
|
1299 |
</connectionPointOut> |
|
1300 |
</variable> |
|
1301 |
<variable formalParameter="PEDESTRIAN_RED_LIGHT"> |
|
1302 |
<connectionPointOut> |
|
1303 |
<relPosition x="349" y="590"/> |
|
1304 |
</connectionPointOut> |
|
1305 |
</variable> |
|
1306 |
<variable formalParameter="PEDESTRIAN_GREEN_LIGHT"> |
|
1307 |
<connectionPointOut> |
|
1308 |
<relPosition x="349" y="753"/> |
|
1309 |
</connectionPointOut> |
|
1310 |
</variable> |
|
1311 |
</outputVariables> |
|
1312 |
</block> |
|
1546
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1313 |
<block localId="2" width="143" height="183" typeName="Button" instanceName="SwitchButton" executionOrderId="0"> |
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1314 |
<position x="190" y="471"/> |
1383 | 1315 |
<inputVariables> |
1316 |
<variable formalParameter="back_id"> |
|
1317 |
<connectionPointIn> |
|
1318 |
<relPosition x="0" y="36"/> |
|
1319 |
<connection refLocalId="5"> |
|
1546
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1320 |
<position x="190" y="507"/> |
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1321 |
<position x="136" y="507"/> |
1383 | 1322 |
</connection> |
1323 |
</connectionPointIn> |
|
1324 |
</variable> |
|
1325 |
<variable formalParameter="sele_id"> |
|
1326 |
<connectionPointIn> |
|
1327 |
<relPosition x="0" y="68"/> |
|
1328 |
<connection refLocalId="6"> |
|
1546
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1329 |
<position x="190" y="539"/> |
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1330 |
<position x="136" y="539"/> |
1383 | 1331 |
</connection> |
1332 |
</connectionPointIn> |
|
1333 |
</variable> |
|
1334 |
<variable formalParameter="toggle"> |
|
1335 |
<connectionPointIn> |
|
1336 |
<relPosition x="0" y="100"/> |
|
1337 |
<connection refLocalId="4"> |
|
1546
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1338 |
<position x="190" y="571"/> |
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1339 |
<position x="136" y="571"/> |
1383 | 1340 |
</connection> |
1341 |
</connectionPointIn> |
|
1342 |
</variable> |
|
1343 |
<variable formalParameter="set_state"> |
|
1344 |
<connectionPointIn> |
|
1345 |
<relPosition x="0" y="132"/> |
|
1346 |
</connectionPointIn> |
|
1347 |
</variable> |
|
1348 |
<variable formalParameter="state_in"> |
|
1349 |
<connectionPointIn> |
|
1350 |
<relPosition x="0" y="164"/> |
|
1351 |
</connectionPointIn> |
|
1352 |
</variable> |
|
1353 |
</inputVariables> |
|
1354 |
<inOutVariables/> |
|
1355 |
<outputVariables> |
|
1356 |
<variable formalParameter="state_out"> |
|
1357 |
<connectionPointOut> |
|
1358 |
<relPosition x="143" y="36"/> |
|
1359 |
</connectionPointOut> |
|
1360 |
</variable> |
|
1361 |
</outputVariables> |
|
1362 |
</block> |
|
1546
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1363 |
<block localId="3" width="143" height="198" typeName="Button" instanceName="PedestrianButton" executionOrderId="0"> |
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1364 |
<position x="192" y="684"/> |
1383 | 1365 |
<inputVariables> |
1366 |
<variable formalParameter="back_id"> |
|
1367 |
<connectionPointIn> |
|
1368 |
<relPosition x="0" y="37"/> |
|
1369 |
<connection refLocalId="7"> |
|
1546
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1370 |
<position x="192" y="721"/> |
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1371 |
<position x="159" y="721"/> |
1383 | 1372 |
</connection> |
1373 |
</connectionPointIn> |
|
1374 |
</variable> |
|
1375 |
<variable formalParameter="sele_id"> |
|
1376 |
<connectionPointIn> |
|
1377 |
<relPosition x="0" y="72"/> |
|
1378 |
<connection refLocalId="8"> |
|
1546
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1379 |
<position x="192" y="756"/> |
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1380 |
<position x="159" y="756"/> |
1383 | 1381 |
</connection> |
1382 |
</connectionPointIn> |
|
1383 |
</variable> |
|
1384 |
<variable formalParameter="toggle"> |
|
1385 |
<connectionPointIn> |
|
1386 |
<relPosition x="0" y="107"/> |
|
1387 |
</connectionPointIn> |
|
1388 |
</variable> |
|
1389 |
<variable formalParameter="set_state"> |
|
1390 |
<connectionPointIn> |
|
1391 |
<relPosition x="0" y="142"/> |
|
1392 |
</connectionPointIn> |
|
1393 |
</variable> |
|
1394 |
<variable formalParameter="state_in"> |
|
1395 |
<connectionPointIn> |
|
1396 |
<relPosition x="0" y="177"/> |
|
1397 |
</connectionPointIn> |
|
1398 |
</variable> |
|
1399 |
</inputVariables> |
|
1400 |
<inOutVariables/> |
|
1401 |
<outputVariables> |
|
1402 |
<variable formalParameter="state_out"> |
|
1403 |
<connectionPointOut> |
|
1404 |
<relPosition x="143" y="37"/> |
|
1405 |
</connectionPointOut> |
|
1406 |
</variable> |
|
1407 |
</outputVariables> |
|
1408 |
</block> |
|
1546
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1409 |
<inVariable localId="4" height="27" width="18" executionOrderId="0" negated="false"> |
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1410 |
<position x="118" y="558"/> |
1383 | 1411 |
<connectionPointOut> |
1412 |
<relPosition x="18" y="13"/> |
|
1413 |
</connectionPointOut> |
|
1414 |
<expression>1</expression> |
|
1415 |
</inVariable> |
|
1546
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1416 |
<inVariable localId="5" height="27" width="105" executionOrderId="0" negated="false"> |
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1417 |
<position x="31" y="494"/> |
1383 | 1418 |
<connectionPointOut> |
1419 |
<relPosition x="105" y="13"/> |
|
1420 |
</connectionPointOut> |
|
1421 |
<expression>'SWITCH_OFF'</expression> |
|
1422 |
</inVariable> |
|
1546
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1423 |
<inVariable localId="6" height="27" width="105" executionOrderId="0" negated="false"> |
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1424 |
<position x="31" y="526"/> |
1383 | 1425 |
<connectionPointOut> |
1426 |
<relPosition x="105" y="13"/> |
|
1427 |
</connectionPointOut> |
|
1428 |
<expression>'SWITCH_ON'</expression> |
|
1429 |
</inVariable> |
|
1546
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1430 |
<inVariable localId="7" height="27" width="137" executionOrderId="0" negated="false"> |
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1431 |
<position x="22" y="708"/> |
1383 | 1432 |
<connectionPointOut> |
1433 |
<relPosition x="137" y="13"/> |
|
1434 |
</connectionPointOut> |
|
1435 |
<expression>'PEDESTRIAN_OFF'</expression> |
|
1436 |
</inVariable> |
|
1546
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1437 |
<inVariable localId="8" height="27" width="137" executionOrderId="0" negated="false"> |
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1438 |
<position x="22" y="743"/> |
1383 | 1439 |
<connectionPointOut> |
1440 |
<relPosition x="137" y="13"/> |
|
1441 |
</connectionPointOut> |
|
1442 |
<expression>'PEDESTRIAN_ON'</expression> |
|
1443 |
</inVariable> |
|
1546
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1444 |
<block localId="9" width="115" height="133" typeName="Led" instanceName="RedLight" executionOrderId="0"> |
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1445 |
<position x="1057" y="395"/> |
1383 | 1446 |
<inputVariables> |
1447 |
<variable formalParameter="back_id"> |
|
1448 |
<connectionPointIn> |
|
1449 |
<relPosition x="0" y="38"/> |
|
1450 |
<connection refLocalId="10"> |
|
1546
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1451 |
<position x="1057" y="433"/> |
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1452 |
<position x="1010" y="433"/> |
1383 | 1453 |
</connection> |
1454 |
</connectionPointIn> |
|
1455 |
</variable> |
|
1456 |
<variable formalParameter="sele_id"> |
|
1457 |
<connectionPointIn> |
|
1458 |
<relPosition x="0" y="75"/> |
|
1459 |
<connection refLocalId="11"> |
|
1546
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1460 |
<position x="1057" y="470"/> |
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1461 |
<position x="1010" y="470"/> |
1383 | 1462 |
</connection> |
1463 |
</connectionPointIn> |
|
1464 |
</variable> |
|
1465 |
<variable formalParameter="state_in"> |
|
1466 |
<connectionPointIn> |
|
1467 |
<relPosition x="0" y="112"/> |
|
1468 |
<connection refLocalId="1" formalParameter="RED_LIGHT"> |
|
1546
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1469 |
<position x="1057" y="507"/> |
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1470 |
<position x="819" y="507"/> |
1383 | 1471 |
</connection> |
1472 |
</connectionPointIn> |
|
1473 |
</variable> |
|
1474 |
</inputVariables> |
|
1475 |
<inOutVariables/> |
|
1476 |
<outputVariables/> |
|
1477 |
</block> |
|
1546
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1478 |
<inVariable localId="10" height="27" width="79" executionOrderId="0" negated="false"> |
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1479 |
<position x="931" y="420"/> |
1383 | 1480 |
<connectionPointOut> |
1481 |
<relPosition x="79" y="13"/> |
|
1482 |
</connectionPointOut> |
|
1483 |
<expression>'RED_OFF'</expression> |
|
1484 |
</inVariable> |
|
1546
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1485 |
<inVariable localId="11" height="27" width="79" executionOrderId="0" negated="false"> |
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1486 |
<position x="931" y="457"/> |
1383 | 1487 |
<connectionPointOut> |
1488 |
<relPosition x="79" y="13"/> |
|
1489 |
</connectionPointOut> |
|
1490 |
<expression>'RED_ON'</expression> |
|
1491 |
</inVariable> |
|
1546
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1492 |
<block localId="12" width="115" height="133" typeName="Led" instanceName="OrangeLight" executionOrderId="0"> |
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1493 |
<position x="1058" y="558"/> |
1383 | 1494 |
<inputVariables> |
1495 |
<variable formalParameter="back_id"> |
|
1496 |
<connectionPointIn> |
|
1497 |
<relPosition x="0" y="38"/> |
|
1498 |
<connection refLocalId="13"> |
|
1546
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1499 |
<position x="1058" y="596"/> |
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1500 |
<position x="1010" y="596"/> |
1383 | 1501 |
</connection> |
1502 |
</connectionPointIn> |
|
1503 |
</variable> |
|
1504 |
<variable formalParameter="sele_id"> |
|
1505 |
<connectionPointIn> |
|
1506 |
<relPosition x="0" y="75"/> |
|
1507 |
<connection refLocalId="14"> |
|
1546
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1508 |
<position x="1058" y="633"/> |
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1509 |
<position x="1010" y="633"/> |
1383 | 1510 |
</connection> |
1511 |
</connectionPointIn> |
|
1512 |
</variable> |
|
1513 |
<variable formalParameter="state_in"> |
|
1514 |
<connectionPointIn> |
|
1515 |
<relPosition x="0" y="112"/> |
|
1516 |
<connection refLocalId="1" formalParameter="ORANGE_LIGHT"> |
|
1546
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1517 |
<position x="1058" y="670"/> |
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1518 |
<position x="819" y="670"/> |
1383 | 1519 |
</connection> |
1520 |
</connectionPointIn> |
|
1521 |
</variable> |
|
1522 |
</inputVariables> |
|
1523 |
<inOutVariables/> |
|
1524 |
<outputVariables/> |
|
1525 |
</block> |
|
1546
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1526 |
<inVariable localId="13" height="27" width="111" executionOrderId="0" negated="false"> |
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1527 |
<position x="899" y="583"/> |
1383 | 1528 |
<connectionPointOut> |
1529 |
<relPosition x="111" y="13"/> |
|
1530 |
</connectionPointOut> |
|
1531 |
<expression>'ORANGE_OFF'</expression> |
|
1532 |
</inVariable> |
|
1546
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1533 |
<inVariable localId="14" height="27" width="106" executionOrderId="0" negated="false"> |
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1534 |
<position x="904" y="620"/> |
1383 | 1535 |
<connectionPointOut> |
1536 |
<relPosition x="106" y="13"/> |
|
1537 |
</connectionPointOut> |
|
1538 |
<expression>'ORANGE_ON'</expression> |
|
1539 |
</inVariable> |
|
1546
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1540 |
<block localId="15" width="115" height="133" typeName="Led" instanceName="GreenLight" executionOrderId="0"> |
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1541 |
<position x="1058" y="721"/> |
1383 | 1542 |
<inputVariables> |
1543 |
<variable formalParameter="back_id"> |
|
1544 |
<connectionPointIn> |
|
1545 |
<relPosition x="0" y="38"/> |
|
1546 |
<connection refLocalId="16"> |
|
1546
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1547 |
<position x="1058" y="759"/> |
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1548 |
<position x="1010" y="759"/> |
1383 | 1549 |
</connection> |
1550 |
</connectionPointIn> |
|
1551 |
</variable> |
|
1552 |
<variable formalParameter="sele_id"> |
|
1553 |
<connectionPointIn> |
|
1554 |
<relPosition x="0" y="75"/> |
|
1555 |
<connection refLocalId="17"> |
|
1546
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1556 |
<position x="1058" y="796"/> |
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1557 |
<position x="1010" y="796"/> |
1383 | 1558 |
</connection> |
1559 |
</connectionPointIn> |
|
1560 |
</variable> |
|
1561 |
<variable formalParameter="state_in"> |
|
1562 |
<connectionPointIn> |
|
1563 |
<relPosition x="0" y="112"/> |
|
1564 |
<connection refLocalId="1" formalParameter="GREEN_LIGHT"> |
|
1546
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1565 |
<position x="1058" y="833"/> |
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1566 |
<position x="819" y="833"/> |
1383 | 1567 |
</connection> |
1568 |
</connectionPointIn> |
|
1569 |
</variable> |
|
1570 |
</inputVariables> |
|
1571 |
<inOutVariables/> |
|
1572 |
<outputVariables/> |
|
1573 |
</block> |
|
1546
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1574 |
<inVariable localId="16" height="27" width="111" executionOrderId="0" negated="false"> |
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1575 |
<position x="899" y="746"/> |
1383 | 1576 |
<connectionPointOut> |
1577 |
<relPosition x="111" y="13"/> |
|
1578 |
</connectionPointOut> |
|
1579 |
<expression>'GREEN_OFF'</expression> |
|
1580 |
</inVariable> |
|
1546
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1581 |
<inVariable localId="17" height="27" width="106" executionOrderId="0" negated="false"> |
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1582 |
<position x="904" y="783"/> |
1383 | 1583 |
<connectionPointOut> |
1584 |
<relPosition x="106" y="13"/> |
|
1585 |
</connectionPointOut> |
|
1586 |
<expression>'GREEN_ON'</expression> |
|
1587 |
</inVariable> |
|
1546
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1588 |
<block localId="18" width="115" height="133" typeName="Led" instanceName="PedestrianRedLight" executionOrderId="0"> |
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1589 |
<position x="1059" y="884"/> |
1383 | 1590 |
<inputVariables> |
1591 |
<variable formalParameter="back_id"> |
|
1592 |
<connectionPointIn> |
|
1593 |
<relPosition x="0" y="38"/> |
|
1594 |
<connection refLocalId="19"> |
|
1546
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1595 |
<position x="1059" y="922"/> |
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1596 |
<position x="1020" y="922"/> |
1383 | 1597 |
</connection> |
1598 |
</connectionPointIn> |
|
1599 |
</variable> |
|
1600 |
<variable formalParameter="sele_id"> |
|
1601 |
<connectionPointIn> |
|
1602 |
<relPosition x="0" y="75"/> |
|
1603 |
<connection refLocalId="20"> |
|
1546
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1604 |
<position x="1059" y="959"/> |
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1605 |
<position x="1020" y="959"/> |
1383 | 1606 |
</connection> |
1607 |
</connectionPointIn> |
|
1608 |
</variable> |
|
1609 |
<variable formalParameter="state_in"> |
|
1610 |
<connectionPointIn> |
|
1611 |
<relPosition x="0" y="112"/> |
|
1612 |
<connection refLocalId="1" formalParameter="PEDESTRIAN_RED_LIGHT"> |
|
1546
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1613 |
<position x="1059" y="996"/> |
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1614 |
<position x="819" y="996"/> |
1383 | 1615 |
</connection> |
1616 |
</connectionPointIn> |
|
1617 |
</variable> |
|
1618 |
</inputVariables> |
|
1619 |
<inOutVariables/> |
|
1620 |
<outputVariables/> |
|
1621 |
</block> |
|
1546
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1622 |
<inVariable localId="19" height="27" width="171" executionOrderId="0" negated="false"> |
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1623 |
<position x="849" y="909"/> |
1383 | 1624 |
<connectionPointOut> |
1625 |
<relPosition x="171" y="13"/> |
|
1626 |
</connectionPointOut> |
|
1627 |
<expression>'PEDESTRIAN_RED_OFF'</expression> |
|
1628 |
</inVariable> |
|
1546
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1629 |
<inVariable localId="20" height="27" width="166" executionOrderId="0" negated="false"> |
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1630 |
<position x="854" y="946"/> |
1383 | 1631 |
<connectionPointOut> |
1632 |
<relPosition x="166" y="13"/> |
|
1633 |
</connectionPointOut> |
|
1634 |
<expression>'PEDESTRIAN_RED_ON'</expression> |
|
1635 |
</inVariable> |
|
1546
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1636 |
<block localId="21" width="115" height="133" typeName="Led" instanceName="PedestrianGreenLight" executionOrderId="0"> |
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1637 |
<position x="1059" y="1047"/> |
1383 | 1638 |
<inputVariables> |
1639 |
<variable formalParameter="back_id"> |
|
1640 |
<connectionPointIn> |
|
1641 |
<relPosition x="0" y="38"/> |
|
1642 |
<connection refLocalId="22"> |
|
1546
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1643 |
<position x="1059" y="1085"/> |
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1644 |
<position x="1035" y="1085"/> |
1383 | 1645 |
</connection> |
1646 |
</connectionPointIn> |
|
1647 |
</variable> |
|
1648 |
<variable formalParameter="sele_id"> |
|
1649 |
<connectionPointIn> |
|
1650 |
<relPosition x="0" y="75"/> |
|
1651 |
<connection refLocalId="23"> |
|
1546
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1652 |
<position x="1059" y="1122"/> |
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1653 |
<position x="1035" y="1122"/> |
1383 | 1654 |
</connection> |
1655 |
</connectionPointIn> |
|
1656 |
</variable> |
|
1657 |
<variable formalParameter="state_in"> |
|
1658 |
<connectionPointIn> |
|
1659 |
<relPosition x="0" y="112"/> |
|
1660 |
<connection refLocalId="1" formalParameter="PEDESTRIAN_GREEN_LIGHT"> |
|
1546
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1661 |
<position x="1059" y="1159"/> |
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1662 |
<position x="819" y="1159"/> |
1383 | 1663 |
</connection> |
1664 |
</connectionPointIn> |
|
1665 |
</variable> |
|
1666 |
</inputVariables> |
|
1667 |
<inOutVariables/> |
|
1668 |
<outputVariables/> |
|
1669 |
</block> |
|
1546
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1670 |
<inVariable localId="22" height="27" width="190" executionOrderId="0" negated="false"> |
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1671 |
<position x="845" y="1072"/> |
1383 | 1672 |
<connectionPointOut> |
1673 |
<relPosition x="190" y="13"/> |
|
1674 |
</connectionPointOut> |
|
1675 |
<expression>'PEDESTRIAN_GREEN_OFF'</expression> |
|
1676 |
</inVariable> |
|
1546
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1677 |
<inVariable localId="23" height="27" width="185" executionOrderId="0" negated="false"> |
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1678 |
<position x="850" y="1109"/> |
1383 | 1679 |
<connectionPointOut> |
1680 |
<relPosition x="185" y="13"/> |
|
1681 |
</connectionPointOut> |
|
1682 |
<expression>'PEDESTRIAN_GREEN_ON'</expression> |
|
1683 |
</inVariable> |
|
1546
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1684 |
<comment localId="24" height="262" width="804"> |
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1685 |
<position x="22" y="13"/> |
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1686 |
<content> |
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1687 |
<xhtml:p><![CDATA[This example implements control of traffic lights. |
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1688 |
|
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1689 |
Basically it shows following features of Beremiz: |
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1690 |
- web interface (SCADA) using integrated web server in svgui extension; |
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1691 |
- interaction with web UI; |
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1692 |
- functional blocks in SFC language. |
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1693 |
|
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1694 |
|
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1695 |
|
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1696 |
|
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1697 |
SVGUI is extensions to build web interface to PLC. It has *integrated* web-server. So it's NOT necessary to install Apache, lighttpd or nginx for that!!! |
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1698 |
|
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1699 |
As the program is running in PLC, web UI will be available at http://localhost:8009/. |
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1700 |
|
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1701 |
Web interface is build as SVG file in Inkscape. To edit SVG file click 'Inkscape' button in 0x: svgui extension. |
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1702 |
Inkscape is a free and open-source vector graphics editor. It's not part of Beremiz and needs to be installed separately. |
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1703 |
]]></xhtml:p> |
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1704 |
</content> |
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1705 |
</comment> |
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1706 |
<comment localId="102" height="126" width="411"> |
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1707 |
<position x="20" y="319"/> |
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1708 |
<content> |
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1709 |
<xhtml:p><![CDATA[In this example FB like 'Button', 'Led' and 'Text' are used. |
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1710 |
Back_id and sele_id inputs of these blocks are IDs of |
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1711 |
graphic primitives in SVG file. |
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1712 |
This is the way how elements in SVG are bound to elements |
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1713 |
in PLC program. You can find out or edit these IDs in Inkscape.]]></xhtml:p> |
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1714 |
</content> |
f1840d27823d
cleanup traffic lights example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
1383
diff
changeset
|
1715 |
</comment> |
1383 | 1716 |
</FBD> |
1717 |
</body> |
|
1718 |
</pou> |
|
1719 |
</pous> |
|
1720 |
</types> |
|
1721 |
<instances> |
|
1722 |
<configurations> |
|
1723 |
<configuration name="config"> |
|
1724 |
<resource name="resource1"> |
|
1725 |
<task name="test_task" interval="T#100ms" priority="0"> |
|
1726 |
<pouInstance name="main_instance" typeName="main_program"/> |
|
1727 |
</task> |
|
1728 |
</resource> |
|
1729 |
</configuration> |
|
1730 |
</configurations> |
|
1731 |
</instances> |
|
1732 |
</project> |