Laurent@1383: <?xml version='1.0' encoding='utf-8'?>
Laurent@1383: <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">
andrej@1546:   <fileHeader companyName="Beremiz" productName="Unnamed" productVersion="1" creationDateTime="2012-09-04T16:16:33"/>
andrej@1546:   <contentHeader name="traffic_lights" modificationDateTime="2016-10-20T13:08:53">
Laurent@1383:     <coordinateInfo>
Laurent@1383:       <fbd>
Laurent@1383:         <scaling x="0" y="0"/>
Laurent@1383:       </fbd>
Laurent@1383:       <ld>
Laurent@1383:         <scaling x="0" y="0"/>
Laurent@1383:       </ld>
Laurent@1383:       <sfc>
Laurent@1383:         <scaling x="0" y="0"/>
Laurent@1383:       </sfc>
Laurent@1383:     </coordinateInfo>
Laurent@1383:   </contentHeader>
Laurent@1383:   <types>
Laurent@1383:     <dataTypes/>
Laurent@1383:     <pous>
Laurent@1383:       <pou name="traffic_light_sequence" pouType="functionBlock">
Laurent@1383:         <interface>
Laurent@1383:           <inputVars>
Laurent@1383:             <variable name="SWITCH_BUTTON">
Laurent@1383:               <type>
Laurent@1383:                 <BOOL/>
Laurent@1383:               </type>
Laurent@1383:             </variable>
Laurent@1383:             <variable name="PEDESTRIAN_BUTTON">
Laurent@1383:               <type>
Laurent@1383:                 <BOOL/>
Laurent@1383:               </type>
Laurent@1383:             </variable>
Laurent@1383:           </inputVars>
Laurent@1383:           <outputVars>
Laurent@1383:             <variable name="RED_LIGHT">
Laurent@1383:               <type>
Laurent@1383:                 <BOOL/>
Laurent@1383:               </type>
Laurent@1383:             </variable>
Laurent@1383:             <variable name="ORANGE_LIGHT">
Laurent@1383:               <type>
Laurent@1383:                 <BOOL/>
Laurent@1383:               </type>
Laurent@1383:             </variable>
Laurent@1383:             <variable name="GREEN_LIGHT">
Laurent@1383:               <type>
Laurent@1383:                 <BOOL/>
Laurent@1383:               </type>
Laurent@1383:             </variable>
Laurent@1383:             <variable name="PEDESTRIAN_RED_LIGHT">
Laurent@1383:               <type>
Laurent@1383:                 <BOOL/>
Laurent@1383:               </type>
Laurent@1383:             </variable>
Laurent@1383:             <variable name="PEDESTRIAN_GREEN_LIGHT">
Laurent@1383:               <type>
Laurent@1383:                 <BOOL/>
Laurent@1383:               </type>
Laurent@1383:             </variable>
Laurent@1383:           </outputVars>
Laurent@1383:           <localVars>
Laurent@1383:             <variable name="TON1">
Laurent@1383:               <type>
Laurent@1383:                 <derived name="TON"/>
Laurent@1383:               </type>
Laurent@1383:             </variable>
Laurent@1383:             <variable name="TON2">
Laurent@1383:               <type>
Laurent@1383:                 <derived name="TON"/>
Laurent@1383:               </type>
Laurent@1383:             </variable>
Laurent@1383:             <variable name="ALLOW_CARS">
Laurent@1383:               <type>
Laurent@1383:                 <BOOL/>
Laurent@1383:               </type>
Laurent@1383:             </variable>
Laurent@1383:             <variable name="WARN_CARS">
Laurent@1383:               <type>
Laurent@1383:                 <BOOL/>
Laurent@1383:               </type>
Laurent@1383:             </variable>
Laurent@1383:             <variable name="STOP_CARS">
Laurent@1383:               <type>
Laurent@1383:                 <BOOL/>
Laurent@1383:               </type>
Laurent@1383:             </variable>
Laurent@1383:             <variable name="ALLOW_PEDESTRIANS">
Laurent@1383:               <type>
Laurent@1383:                 <BOOL/>
Laurent@1383:               </type>
Laurent@1383:             </variable>
Laurent@1383:             <variable name="STOP_PEDESTRIANS">
Laurent@1383:               <type>
Laurent@1383:                 <BOOL/>
Laurent@1383:               </type>
Laurent@1383:             </variable>
Laurent@1383:             <variable name="TON3">
Laurent@1383:               <type>
Laurent@1383:                 <derived name="TON"/>
Laurent@1383:               </type>
Laurent@1383:             </variable>
Laurent@1383:             <variable name="R_TRIG0">
Laurent@1383:               <type>
Laurent@1383:                 <derived name="R_TRIG"/>
Laurent@1383:               </type>
Laurent@1383:             </variable>
Laurent@1383:             <variable name="R_TRIG1">
Laurent@1383:               <type>
Laurent@1383:                 <derived name="R_TRIG"/>
Laurent@1383:               </type>
Laurent@1383:             </variable>
Laurent@1383:             <variable name="SR0">
Laurent@1383:               <type>
Laurent@1383:                 <derived name="SR"/>
Laurent@1383:               </type>
Laurent@1383:             </variable>
Laurent@1383:           </localVars>
Laurent@1383:         </interface>
Laurent@1383:         <actions>
Laurent@1383:           <action name="BLINK_ORANGE_LIGHT">
Laurent@1383:             <body>
Laurent@1383:               <LD>
Laurent@1383:                 <leftPowerRail localId="1" height="40" width="2">
Laurent@1383:                   <position x="54" y="123"/>
Laurent@1383:                   <connectionPointOut formalParameter="">
Laurent@1383:                     <relPosition x="2" y="20"/>
Laurent@1383:                   </connectionPointOut>
Laurent@1383:                 </leftPowerRail>
Laurent@1383:                 <contact localId="2" height="15" width="21" negated="true">
Laurent@1383:                   <position x="121" y="135"/>
Laurent@1383:                   <connectionPointIn>
Laurent@1383:                     <relPosition x="0" y="8"/>
Laurent@1383:                     <connection refLocalId="1">
Laurent@1383:                       <position x="121" y="143"/>
Laurent@1383:                       <position x="56" y="143"/>
Laurent@1383:                     </connection>
Laurent@1383:                   </connectionPointIn>
Laurent@1383:                   <connectionPointOut>
Laurent@1383:                     <relPosition x="21" y="8"/>
Laurent@1383:                   </connectionPointOut>
Laurent@1383:                   <variable>ORANGE_LIGHT</variable>
Laurent@1383:                 </contact>
Laurent@1383:                 <block localId="3" width="97" height="102" typeName="TON" instanceName="TON1">
Laurent@1383:                   <position x="216" y="103"/>
Laurent@1383:                   <inputVariables>
Laurent@1383:                     <variable formalParameter="IN">
Laurent@1383:                       <connectionPointIn>
Laurent@1383:                         <relPosition x="0" y="40"/>
Laurent@1383:                         <connection refLocalId="2">
Laurent@1383:                           <position x="216" y="143"/>
Laurent@1383:                           <position x="142" y="143"/>
Laurent@1383:                         </connection>
Laurent@1383:                       </connectionPointIn>
Laurent@1383:                     </variable>
Laurent@1383:                     <variable formalParameter="PT">
Laurent@1383:                       <connectionPointIn>
Laurent@1383:                         <relPosition x="0" y="81"/>
Laurent@1383:                         <connection refLocalId="4">
Laurent@1383:                           <position x="216" y="184"/>
Laurent@1383:                           <position x="151" y="184"/>
Laurent@1383:                         </connection>
Laurent@1383:                       </connectionPointIn>
Laurent@1383:                     </variable>
Laurent@1383:                   </inputVariables>
Laurent@1383:                   <inOutVariables/>
Laurent@1383:                   <outputVariables>
Laurent@1383:                     <variable formalParameter="Q">
Laurent@1383:                       <connectionPointOut>
Laurent@1383:                         <relPosition x="97" y="40"/>
Laurent@1383:                       </connectionPointOut>
Laurent@1383:                     </variable>
Laurent@1383:                     <variable formalParameter="ET">
Laurent@1383:                       <connectionPointOut>
Laurent@1383:                         <relPosition x="97" y="81"/>
Laurent@1383:                       </connectionPointOut>
Laurent@1383:                     </variable>
Laurent@1383:                   </outputVariables>
Laurent@1383:                 </block>
Laurent@1383:                 <inVariable localId="4" height="27" width="72">
Laurent@1383:                   <position x="79" y="171"/>
Laurent@1383:                   <connectionPointOut>
Laurent@1383:                     <relPosition x="72" y="13"/>
Laurent@1383:                   </connectionPointOut>
Laurent@1383:                   <expression>T#500ms</expression>
Laurent@1383:                 </inVariable>
Laurent@1383:                 <block localId="5" width="97" height="106" typeName="TON" instanceName="TON2">
Laurent@1383:                   <position x="216" y="251"/>
Laurent@1383:                   <inputVariables>
Laurent@1383:                     <variable formalParameter="IN">
Laurent@1383:                       <connectionPointIn>
Laurent@1383:                         <relPosition x="0" y="41"/>
Laurent@1383:                         <connection refLocalId="14">
Laurent@1383:                           <position x="216" y="292"/>
Laurent@1383:                           <position x="155" y="292"/>
Laurent@1383:                         </connection>
Laurent@1383:                       </connectionPointIn>
Laurent@1383:                     </variable>
Laurent@1383:                     <variable formalParameter="PT">
Laurent@1383:                       <connectionPointIn>
Laurent@1383:                         <relPosition x="0" y="84"/>
Laurent@1383:                         <connection refLocalId="15">
Laurent@1383:                           <position x="216" y="335"/>
Laurent@1383:                           <position x="162" y="335"/>
Laurent@1383:                         </connection>
Laurent@1383:                       </connectionPointIn>
Laurent@1383:                     </variable>
Laurent@1383:                   </inputVariables>
Laurent@1383:                   <inOutVariables/>
Laurent@1383:                   <outputVariables>
Laurent@1383:                     <variable formalParameter="Q">
Laurent@1383:                       <connectionPointOut>
Laurent@1383:                         <relPosition x="97" y="41"/>
Laurent@1383:                       </connectionPointOut>
Laurent@1383:                     </variable>
Laurent@1383:                     <variable formalParameter="ET">
Laurent@1383:                       <connectionPointOut>
Laurent@1383:                         <relPosition x="97" y="84"/>
Laurent@1383:                       </connectionPointOut>
Laurent@1383:                     </variable>
Laurent@1383:                   </outputVariables>
Laurent@1383:                 </block>
Laurent@1383:                 <coil localId="6" height="15" width="21" storage="reset">
Laurent@1383:                   <position x="517" y="284"/>
Laurent@1383:                   <connectionPointIn>
Laurent@1383:                     <relPosition x="0" y="8"/>
Laurent@1383:                     <connection refLocalId="10" formalParameter="Q">
Laurent@1383:                       <position x="517" y="292"/>
Laurent@1383:                       <position x="427" y="292"/>
Laurent@1383:                     </connection>
Laurent@1383:                   </connectionPointIn>
Laurent@1383:                   <connectionPointOut>
Laurent@1383:                     <relPosition x="21" y="8"/>
Laurent@1383:                   </connectionPointOut>
Laurent@1383:                   <variable>ORANGE_LIGHT</variable>
Laurent@1383:                 </coil>
Laurent@1383:                 <rightPowerRail localId="7" height="40" width="2">
Laurent@1383:                   <position x="598" y="123"/>
Laurent@1383:                   <connectionPointIn>
Laurent@1383:                     <relPosition x="0" y="20"/>
Laurent@1383:                     <connection refLocalId="8">
Laurent@1383:                       <position x="598" y="143"/>
Laurent@1383:                       <position x="530" y="143"/>
Laurent@1383:                     </connection>
Laurent@1383:                   </connectionPointIn>
Laurent@1383:                 </rightPowerRail>
Laurent@1383:                 <coil localId="8" height="15" width="21" storage="set">
Laurent@1383:                   <position x="509" y="135"/>
Laurent@1383:                   <connectionPointIn>
Laurent@1383:                     <relPosition x="0" y="8"/>
Laurent@1383:                     <connection refLocalId="11" formalParameter="Q">
Laurent@1383:                       <position x="509" y="143"/>
Laurent@1383:                       <position x="428" y="143"/>
Laurent@1383:                     </connection>
Laurent@1383:                   </connectionPointIn>
Laurent@1383:                   <connectionPointOut>
Laurent@1383:                     <relPosition x="21" y="8"/>
Laurent@1383:                   </connectionPointOut>
Laurent@1383:                   <variable>ORANGE_LIGHT</variable>
Laurent@1383:                 </coil>
Laurent@1383:                 <comment localId="9" height="39" width="308">
Laurent@1383:                   <position x="54" y="26"/>
Laurent@1383:                   <content>
Laurent@1383:                     <xhtml:p><![CDATA[This action makes the orange light blink]]></xhtml:p>
Laurent@1383:                   </content>
Laurent@1383:                 </comment>
Laurent@1383:                 <block localId="10" width="57" height="40" typeName="R_TRIG" instanceName="R_TRIG0">
Laurent@1383:                   <position x="370" y="262"/>
Laurent@1383:                   <inputVariables>
Laurent@1383:                     <variable formalParameter="CLK">
Laurent@1383:                       <connectionPointIn>
Laurent@1383:                         <relPosition x="0" y="30"/>
Laurent@1383:                         <connection refLocalId="5" formalParameter="Q">
Laurent@1383:                           <position x="370" y="292"/>
Laurent@1383:                           <position x="313" y="292"/>
Laurent@1383:                         </connection>
Laurent@1383:                       </connectionPointIn>
Laurent@1383:                     </variable>
Laurent@1383:                   </inputVariables>
Laurent@1383:                   <inOutVariables/>
Laurent@1383:                   <outputVariables>
Laurent@1383:                     <variable formalParameter="Q">
Laurent@1383:                       <connectionPointOut>
Laurent@1383:                         <relPosition x="57" y="30"/>
Laurent@1383:                       </connectionPointOut>
Laurent@1383:                     </variable>
Laurent@1383:                   </outputVariables>
Laurent@1383:                 </block>
Laurent@1383:                 <block localId="11" width="57" height="40" typeName="R_TRIG" instanceName="R_TRIG1">
Laurent@1383:                   <position x="371" y="113"/>
Laurent@1383:                   <inputVariables>
Laurent@1383:                     <variable formalParameter="CLK">
Laurent@1383:                       <connectionPointIn>
Laurent@1383:                         <relPosition x="0" y="30"/>
Laurent@1383:                         <connection refLocalId="3" formalParameter="Q">
Laurent@1383:                           <position x="371" y="143"/>
Laurent@1383:                           <position x="313" y="143"/>
Laurent@1383:                         </connection>
Laurent@1383:                       </connectionPointIn>
Laurent@1383:                     </variable>
Laurent@1383:                   </inputVariables>
Laurent@1383:                   <inOutVariables/>
Laurent@1383:                   <outputVariables>
Laurent@1383:                     <variable formalParameter="Q">
Laurent@1383:                       <connectionPointOut>
Laurent@1383:                         <relPosition x="57" y="30"/>
Laurent@1383:                       </connectionPointOut>
Laurent@1383:                     </variable>
Laurent@1383:                   </outputVariables>
Laurent@1383:                 </block>
Laurent@1383:                 <rightPowerRail localId="12" height="40" width="2">
Laurent@1383:                   <position x="597" y="272"/>
Laurent@1383:                   <connectionPointIn>
Laurent@1383:                     <relPosition x="0" y="20"/>
Laurent@1383:                     <connection refLocalId="6">
Laurent@1383:                       <position x="597" y="292"/>
Laurent@1383:                       <position x="538" y="292"/>
Laurent@1383:                     </connection>
Laurent@1383:                   </connectionPointIn>
Laurent@1383:                 </rightPowerRail>
Laurent@1383:                 <leftPowerRail localId="13" height="40" width="2">
Laurent@1383:                   <position x="67" y="272"/>
Laurent@1383:                   <connectionPointOut formalParameter="">
Laurent@1383:                     <relPosition x="2" y="20"/>
Laurent@1383:                   </connectionPointOut>
Laurent@1383:                 </leftPowerRail>
Laurent@1383:                 <contact localId="14" height="15" width="21">
Laurent@1383:                   <position x="134" y="284"/>
Laurent@1383:                   <connectionPointIn>
Laurent@1383:                     <relPosition x="0" y="8"/>
Laurent@1383:                     <connection refLocalId="13">
Laurent@1383:                       <position x="134" y="292"/>
Laurent@1383:                       <position x="69" y="292"/>
Laurent@1383:                     </connection>
Laurent@1383:                   </connectionPointIn>
Laurent@1383:                   <connectionPointOut>
Laurent@1383:                     <relPosition x="21" y="8"/>
Laurent@1383:                   </connectionPointOut>
Laurent@1383:                   <variable>ORANGE_LIGHT</variable>
Laurent@1383:                 </contact>
Laurent@1383:                 <inVariable localId="15" height="27" width="72">
Laurent@1383:                   <position x="90" y="322"/>
Laurent@1383:                   <connectionPointOut>
Laurent@1383:                     <relPosition x="72" y="13"/>
Laurent@1383:                   </connectionPointOut>
Laurent@1383:                   <expression>T#500ms</expression>
Laurent@1383:                 </inVariable>
Laurent@1383:               </LD>
Laurent@1383:             </body>
Laurent@1383:           </action>
Laurent@1383:         </actions>
Laurent@1383:         <transitions>
Laurent@1383:           <transition name="STOP">
Laurent@1383:             <body>
Laurent@1383:               <FBD>
Laurent@1383:                 <block localId="42" width="59" height="40" typeName="NOT">
Laurent@1383:                   <position x="230" y="40"/>
Laurent@1383:                   <inputVariables>
Laurent@1383:                     <variable formalParameter="IN">
Laurent@1383:                       <connectionPointIn>
Laurent@1383:                         <relPosition x="0" y="30"/>
Laurent@1383:                         <connection refLocalId="43">
Laurent@1383:                           <position x="230" y="70"/>
Laurent@1383:                           <position x="202" y="70"/>
Laurent@1383:                         </connection>
Laurent@1383:                       </connectionPointIn>
Laurent@1383:                     </variable>
Laurent@1383:                   </inputVariables>
Laurent@1383:                   <inOutVariables/>
Laurent@1383:                   <outputVariables>
Laurent@1383:                     <variable formalParameter="OUT">
Laurent@1383:                       <connectionPointOut>
Laurent@1383:                         <relPosition x="59" y="30"/>
Laurent@1383:                       </connectionPointOut>
Laurent@1383:                     </variable>
Laurent@1383:                   </outputVariables>
Laurent@1383:                 </block>
Laurent@1383:                 <inVariable localId="43" height="27" width="156">
Laurent@1383:                   <position x="46" y="57"/>
Laurent@1383:                   <connectionPointOut>
Laurent@1383:                     <relPosition x="156" y="13"/>
Laurent@1383:                   </connectionPointOut>
Laurent@1383:                   <expression>SWITCH_BUTTON</expression>
Laurent@1383:                 </inVariable>
Laurent@1383:                 <outVariable localId="44" height="27" width="46">
Laurent@1383:                   <position x="351" y="57"/>
Laurent@1383:                   <connectionPointIn>
Laurent@1383:                     <relPosition x="0" y="13"/>
Laurent@1383:                     <connection refLocalId="42" formalParameter="OUT">
Laurent@1383:                       <position x="351" y="70"/>
Laurent@1383:                       <position x="289" y="70"/>
Laurent@1383:                     </connection>
Laurent@1383:                   </connectionPointIn>
Laurent@1383:                   <expression>STOP</expression>
Laurent@1383:                 </outVariable>
Laurent@1383:               </FBD>
Laurent@1383:             </body>
Laurent@1383:           </transition>
Laurent@1383:         </transitions>
Laurent@1383:         <body>
Laurent@1383:           <SFC>
Laurent@1383:             <step localId="1" height="37" width="78" name="Standstill" initialStep="true">
Laurent@1383:               <position x="530" y="31"/>
Laurent@1383:               <connectionPointIn>
Laurent@1383:                 <relPosition x="39" y="0"/>
Laurent@1383:                 <connection refLocalId="39">
Laurent@1383:                   <position x="569" y="31"/>
Laurent@1383:                   <position x="569" y="11"/>
andrej@1546:                   <position x="980" y="11"/>
andrej@1546:                   <position x="980" y="1151"/>
Laurent@1383:                   <position x="776" y="1151"/>
Laurent@1383:                   <position x="776" y="1097"/>
Laurent@1383:                 </connection>
Laurent@1383:               </connectionPointIn>
Laurent@1383:               <connectionPointOut formalParameter="">
Laurent@1383:                 <relPosition x="39" y="37"/>
Laurent@1383:               </connectionPointOut>
Laurent@1383:               <connectionPointOutAction formalParameter="">
Laurent@1383:                 <relPosition x="78" y="18"/>
Laurent@1383:               </connectionPointOutAction>
Laurent@1383:             </step>
Laurent@1383:             <transition localId="2" height="2" width="20">
Laurent@1383:               <position x="559" y="225"/>
Laurent@1383:               <connectionPointIn>
Laurent@1383:                 <relPosition x="10" y="0"/>
Laurent@1383:                 <connection refLocalId="1">
Laurent@1383:                   <position x="569" y="225"/>
Laurent@1383:                   <position x="569" y="68"/>
Laurent@1383:                 </connection>
Laurent@1383:               </connectionPointIn>
Laurent@1383:               <connectionPointOut>
Laurent@1383:                 <relPosition x="10" y="2"/>
Laurent@1383:               </connectionPointOut>
Laurent@1383:               <condition>
Laurent@1383:                 <inline name="">
Laurent@1383:                   <ST>
Laurent@1383:                     <xhtml:p><![CDATA[SWITCH_BUTTON]]></xhtml:p>
Laurent@1383:                   </ST>
Laurent@1383:                 </inline>
Laurent@1383:               </condition>
Laurent@1383:             </transition>
Laurent@1383:             <step localId="3" height="27" width="69" name="ORANGE">
Laurent@1383:               <position x="535" y="252"/>
Laurent@1383:               <connectionPointIn>
Laurent@1383:                 <relPosition x="34" y="0"/>
Laurent@1383:                 <connection refLocalId="2">
Laurent@1383:                   <position x="569" y="252"/>
Laurent@1383:                   <position x="569" y="227"/>
Laurent@1383:                 </connection>
Laurent@1383:               </connectionPointIn>
Laurent@1383:               <connectionPointOut formalParameter="">
Laurent@1383:                 <relPosition x="34" y="27"/>
Laurent@1383:               </connectionPointOut>
Laurent@1383:               <connectionPointOutAction formalParameter="">
Laurent@1383:                 <relPosition x="69" y="13"/>
Laurent@1383:               </connectionPointOutAction>
Laurent@1383:             </step>
Laurent@1383:             <transition localId="6" height="2" width="20">
Laurent@1383:               <position x="559" y="376"/>
Laurent@1383:               <connectionPointIn>
Laurent@1383:                 <relPosition x="10" y="0"/>
Laurent@1383:                 <connection refLocalId="15">
Laurent@1383:                   <position x="569" y="376"/>
Laurent@1383:                   <position x="569" y="336"/>
Laurent@1383:                 </connection>
Laurent@1383:               </connectionPointIn>
Laurent@1383:               <connectionPointOut>
Laurent@1383:                 <relPosition x="10" y="2"/>
Laurent@1383:               </connectionPointOut>
Laurent@1383:               <condition>
Laurent@1383:                 <inline name="">
Laurent@1383:                   <ST>
Laurent@1383:                     <xhtml:p><![CDATA[STOP_CARS]]></xhtml:p>
Laurent@1383:                   </ST>
Laurent@1383:                 </inline>
Laurent@1383:               </condition>
Laurent@1383:             </transition>
Laurent@1383:             <actionBlock localId="8" width="231" height="162">
Laurent@1383:               <position x="711" y="34"/>
Laurent@1383:               <connectionPointIn>
Laurent@1383:                 <relPosition x="0" y="15"/>
Laurent@1383:                 <connection refLocalId="1">
Laurent@1383:                   <position x="711" y="49"/>
Laurent@1383:                   <position x="608" y="49"/>
Laurent@1383:                 </connection>
Laurent@1383:               </connectionPointIn>
Laurent@1383:               <action localId="0" qualifier="P">
Laurent@1383:                 <relPosition x="0" y="0"/>
Laurent@1383:                 <inline>
Laurent@1383:                   <ST>
Laurent@1383:                     <xhtml:p><![CDATA[ORANGE_LIGHT := 1;]]></xhtml:p>
Laurent@1383:                   </ST>
Laurent@1383:                 </inline>
Laurent@1383:               </action>
Laurent@1383:               <action localId="0">
Laurent@1383:                 <relPosition x="0" y="0"/>
Laurent@1383:                 <reference name="BLINK_ORANGE_LIGHT"/>
Laurent@1383:               </action>
Laurent@1383:               <action localId="0" qualifier="R">
Laurent@1383:                 <relPosition x="0" y="0"/>
Laurent@1383:                 <reference name="PEDESTRIAN_RED_LIGHT"/>
Laurent@1383:               </action>
Laurent@1383:               <action localId="0" qualifier="R">
Laurent@1383:                 <relPosition x="0" y="0"/>
Laurent@1383:                 <reference name="PEDESTRIAN_GREEN_LIGHT"/>
Laurent@1383:               </action>
Laurent@1383:               <action localId="0" qualifier="R">
Laurent@1383:                 <relPosition x="0" y="0"/>
Laurent@1383:                 <reference name="RED_LIGHT"/>
Laurent@1383:               </action>
Laurent@1383:               <action localId="0" qualifier="R">
Laurent@1383:                 <relPosition x="0" y="0"/>
Laurent@1383:                 <reference name="GREEN_LIGHT"/>
Laurent@1383:               </action>
Laurent@1383:             </actionBlock>
andrej@1546:             <actionBlock localId="9" width="232" height="125">
Laurent@1383:               <position x="711" y="250"/>
Laurent@1383:               <connectionPointIn>
Laurent@1383:                 <relPosition x="0" y="15"/>
Laurent@1383:                 <connection refLocalId="3">
Laurent@1383:                   <position x="711" y="265"/>
Laurent@1383:                   <position x="604" y="265"/>
Laurent@1383:                 </connection>
Laurent@1383:               </connectionPointIn>
Laurent@1383:               <action localId="0" qualifier="R">
Laurent@1383:                 <relPosition x="0" y="0"/>
Laurent@1383:                 <reference name="GREEN_LIGHT"/>
Laurent@1383:               </action>
Laurent@1383:               <action localId="0" qualifier="S">
Laurent@1383:                 <relPosition x="0" y="0"/>
Laurent@1383:                 <reference name="ORANGE_LIGHT"/>
Laurent@1383:               </action>
Laurent@1383:               <action localId="0" qualifier="S">
Laurent@1383:                 <relPosition x="0" y="0"/>
Laurent@1383:                 <reference name="PEDESTRIAN_RED_LIGHT"/>
Laurent@1383:               </action>
Laurent@1383:               <action localId="0" qualifier="D" duration="T#2s">
Laurent@1383:                 <relPosition x="0" y="0"/>
Laurent@1383:                 <reference name="STOP_CARS"/>
Laurent@1383:               </action>
Laurent@1383:             </actionBlock>
Laurent@1383:             <step localId="10" height="34" width="37" name="RED">
Laurent@1383:               <position x="551" y="411"/>
Laurent@1383:               <connectionPointIn>
Laurent@1383:                 <relPosition x="18" y="0"/>
Laurent@1383:                 <connection refLocalId="6">
Laurent@1383:                   <position x="569" y="411"/>
Laurent@1383:                   <position x="569" y="378"/>
Laurent@1383:                 </connection>
Laurent@1383:               </connectionPointIn>
Laurent@1383:               <connectionPointOut formalParameter="">
Laurent@1383:                 <relPosition x="18" y="34"/>
Laurent@1383:               </connectionPointOut>
Laurent@1383:               <connectionPointOutAction formalParameter="">
Laurent@1383:                 <relPosition x="37" y="17"/>
Laurent@1383:               </connectionPointOutAction>
Laurent@1383:             </step>
andrej@1546:             <actionBlock localId="11" width="235" height="103">
Laurent@1383:               <position x="710" y="413"/>
Laurent@1383:               <connectionPointIn>
Laurent@1383:                 <relPosition x="0" y="15"/>
Laurent@1383:                 <connection refLocalId="10">
Laurent@1383:                   <position x="710" y="428"/>
Laurent@1383:                   <position x="588" y="428"/>
Laurent@1383:                 </connection>
Laurent@1383:               </connectionPointIn>
Laurent@1383:               <action localId="0" qualifier="R">
Laurent@1383:                 <relPosition x="0" y="0"/>
Laurent@1383:                 <reference name="ORANGE_LIGHT"/>
Laurent@1383:               </action>
Laurent@1383:               <action localId="0" qualifier="S">
Laurent@1383:                 <relPosition x="0" y="0"/>
Laurent@1383:                 <reference name="RED_LIGHT"/>
Laurent@1383:               </action>
Laurent@1383:               <action localId="0" qualifier="D" duration="T#2s">
Laurent@1383:                 <relPosition x="0" y="0"/>
Laurent@1383:                 <reference name="ALLOW_PEDESTRIANS"/>
Laurent@1383:               </action>
Laurent@1383:             </actionBlock>
Laurent@1383:             <transition localId="12" height="2" width="20">
Laurent@1383:               <position x="559" y="533"/>
Laurent@1383:               <connectionPointIn>
Laurent@1383:                 <relPosition x="10" y="0"/>
Laurent@1383:                 <connection refLocalId="7">
Laurent@1383:                   <position x="569" y="533"/>
Laurent@1383:                   <position x="569" y="487"/>
Laurent@1383:                 </connection>
Laurent@1383:               </connectionPointIn>
Laurent@1383:               <connectionPointOut>
Laurent@1383:                 <relPosition x="10" y="2"/>
Laurent@1383:               </connectionPointOut>
Laurent@1383:               <condition>
Laurent@1383:                 <inline name="">
Laurent@1383:                   <ST>
Laurent@1383:                     <xhtml:p><![CDATA[ALLOW_PEDESTRIANS]]></xhtml:p>
Laurent@1383:                   </ST>
Laurent@1383:                 </inline>
Laurent@1383:               </condition>
Laurent@1383:             </transition>
Laurent@1383:             <selectionDivergence localId="15" height="1" width="154">
Laurent@1383:               <position x="415" y="335"/>
Laurent@1383:               <connectionPointIn>
Laurent@1383:                 <relPosition x="154" y="0"/>
Laurent@1383:                 <connection refLocalId="3">
Laurent@1383:                   <position x="569" y="335"/>
Laurent@1383:                   <position x="569" y="279"/>
Laurent@1383:                 </connection>
Laurent@1383:               </connectionPointIn>
Laurent@1383:               <connectionPointOut formalParameter="">
Laurent@1383:                 <relPosition x="0" y="1"/>
Laurent@1383:               </connectionPointOut>
Laurent@1383:               <connectionPointOut formalParameter="">
Laurent@1383:                 <relPosition x="154" y="1"/>
Laurent@1383:               </connectionPointOut>
Laurent@1383:             </selectionDivergence>
Laurent@1383:             <transition localId="16" height="2" width="20">
Laurent@1383:               <position x="405" y="377"/>
Laurent@1383:               <connectionPointIn>
Laurent@1383:                 <relPosition x="10" y="0"/>
Laurent@1383:                 <connection refLocalId="15">
Laurent@1383:                   <position x="415" y="377"/>
Laurent@1383:                   <position x="415" y="336"/>
Laurent@1383:                 </connection>
Laurent@1383:               </connectionPointIn>
Laurent@1383:               <connectionPointOut>
Laurent@1383:                 <relPosition x="10" y="2"/>
Laurent@1383:               </connectionPointOut>
Laurent@1383:               <condition>
Laurent@1383:                 <reference name="STOP"/>
Laurent@1383:               </condition>
Laurent@1383:             </transition>
Laurent@1383:             <jumpStep localId="17" height="13" width="12" targetName="Standstill">
Laurent@1383:               <position x="409" y="418"/>
Laurent@1383:               <connectionPointIn>
Laurent@1383:                 <relPosition x="6" y="0"/>
Laurent@1383:                 <connection refLocalId="16">
Laurent@1383:                   <position x="415" y="418"/>
Laurent@1383:                   <position x="415" y="379"/>
Laurent@1383:                 </connection>
Laurent@1383:               </connectionPointIn>
Laurent@1383:             </jumpStep>
Laurent@1383:             <transition localId="4" height="2" width="20">
Laurent@1383:               <position x="400" y="528"/>
Laurent@1383:               <connectionPointIn>
Laurent@1383:                 <relPosition x="10" y="0"/>
Laurent@1383:                 <connection refLocalId="7">
Laurent@1383:                   <position x="410" y="528"/>
Laurent@1383:                   <position x="410" y="487"/>
Laurent@1383:                 </connection>
Laurent@1383:               </connectionPointIn>
Laurent@1383:               <connectionPointOut>
Laurent@1383:                 <relPosition x="10" y="2"/>
Laurent@1383:               </connectionPointOut>
Laurent@1383:               <condition>
Laurent@1383:                 <reference name="STOP"/>
Laurent@1383:               </condition>
Laurent@1383:             </transition>
Laurent@1383:             <jumpStep localId="5" height="13" width="12" targetName="Standstill">
Laurent@1383:               <position x="404" y="569"/>
Laurent@1383:               <connectionPointIn>
Laurent@1383:                 <relPosition x="6" y="0"/>
Laurent@1383:                 <connection refLocalId="4">
Laurent@1383:                   <position x="410" y="569"/>
Laurent@1383:                   <position x="410" y="530"/>
Laurent@1383:                 </connection>
Laurent@1383:               </connectionPointIn>
Laurent@1383:             </jumpStep>
Laurent@1383:             <selectionDivergence localId="7" height="1" width="159">
Laurent@1383:               <position x="410" y="486"/>
Laurent@1383:               <connectionPointIn>
Laurent@1383:                 <relPosition x="159" y="0"/>
Laurent@1383:                 <connection refLocalId="10">
Laurent@1383:                   <position x="569" y="486"/>
Laurent@1383:                   <position x="569" y="445"/>
Laurent@1383:                 </connection>
Laurent@1383:               </connectionPointIn>
Laurent@1383:               <connectionPointOut formalParameter="">
Laurent@1383:                 <relPosition x="0" y="1"/>
Laurent@1383:               </connectionPointOut>
Laurent@1383:               <connectionPointOut formalParameter="">
Laurent@1383:                 <relPosition x="159" y="1"/>
Laurent@1383:               </connectionPointOut>
Laurent@1383:             </selectionDivergence>
Laurent@1383:             <step localId="18" height="27" width="148" name="PEDESTRIAN_GREEN">
Laurent@1383:               <position x="495" y="575"/>
Laurent@1383:               <connectionPointIn>
Laurent@1383:                 <relPosition x="74" y="0"/>
Laurent@1383:                 <connection refLocalId="12">
Laurent@1383:                   <position x="569" y="575"/>
Laurent@1383:                   <position x="569" y="535"/>
Laurent@1383:                 </connection>
Laurent@1383:               </connectionPointIn>
Laurent@1383:               <connectionPointOut formalParameter="">
Laurent@1383:                 <relPosition x="74" y="27"/>
Laurent@1383:               </connectionPointOut>
Laurent@1383:               <connectionPointOutAction formalParameter="">
Laurent@1383:                 <relPosition x="148" y="13"/>
Laurent@1383:               </connectionPointOutAction>
Laurent@1383:             </step>
andrej@1546:             <actionBlock localId="19" width="236" height="110">
Laurent@1383:               <position x="708" y="573"/>
Laurent@1383:               <connectionPointIn>
Laurent@1383:                 <relPosition x="0" y="15"/>
Laurent@1383:                 <connection refLocalId="18">
Laurent@1383:                   <position x="708" y="588"/>
Laurent@1383:                   <position x="643" y="588"/>
Laurent@1383:                 </connection>
Laurent@1383:               </connectionPointIn>
Laurent@1383:               <action localId="0" qualifier="S">
Laurent@1383:                 <relPosition x="0" y="0"/>
Laurent@1383:                 <reference name="PEDESTRIAN_GREEN_LIGHT"/>
Laurent@1383:               </action>
Laurent@1383:               <action localId="0" qualifier="R">
Laurent@1383:                 <relPosition x="0" y="0"/>
Laurent@1383:                 <reference name="PEDESTRIAN_RED_LIGHT"/>
Laurent@1383:               </action>
Laurent@1383:               <action localId="0" qualifier="D" duration="T#10s">
Laurent@1383:                 <relPosition x="0" y="0"/>
Laurent@1383:                 <reference name="STOP_PEDESTRIANS"/>
Laurent@1383:               </action>
Laurent@1383:             </actionBlock>
Laurent@1383:             <transition localId="20" height="2" width="20">
Laurent@1383:               <position x="400" y="653"/>
Laurent@1383:               <connectionPointIn>
Laurent@1383:                 <relPosition x="10" y="0"/>
Laurent@1383:                 <connection refLocalId="22">
Laurent@1383:                   <position x="410" y="653"/>
Laurent@1383:                   <position x="410" y="626"/>
Laurent@1383:                 </connection>
Laurent@1383:               </connectionPointIn>
Laurent@1383:               <connectionPointOut>
Laurent@1383:                 <relPosition x="10" y="2"/>
Laurent@1383:               </connectionPointOut>
Laurent@1383:               <condition>
andrej@1546:                 <inline name="">
andrej@1546:                   <ST>
andrej@1546:                     <xhtml:p><![CDATA[NOT SWITCH_BUTTON]]></xhtml:p>
andrej@1546:                   </ST>
andrej@1546:                 </inline>
Laurent@1383:               </condition>
Laurent@1383:             </transition>
Laurent@1383:             <jumpStep localId="21" height="13" width="12" targetName="Standstill">
Laurent@1383:               <position x="404" y="694"/>
Laurent@1383:               <connectionPointIn>
Laurent@1383:                 <relPosition x="6" y="0"/>
Laurent@1383:                 <connection refLocalId="20">
Laurent@1383:                   <position x="410" y="694"/>
Laurent@1383:                   <position x="410" y="655"/>
Laurent@1383:                 </connection>
Laurent@1383:               </connectionPointIn>
Laurent@1383:             </jumpStep>
Laurent@1383:             <selectionDivergence localId="22" height="1" width="159">
Laurent@1383:               <position x="410" y="625"/>
Laurent@1383:               <connectionPointIn>
Laurent@1383:                 <relPosition x="159" y="0"/>
Laurent@1383:                 <connection refLocalId="18">
Laurent@1383:                   <position x="569" y="625"/>
Laurent@1383:                   <position x="569" y="602"/>
Laurent@1383:                 </connection>
Laurent@1383:               </connectionPointIn>
Laurent@1383:               <connectionPointOut formalParameter="">
Laurent@1383:                 <relPosition x="0" y="1"/>
Laurent@1383:               </connectionPointOut>
Laurent@1383:               <connectionPointOut formalParameter="">
Laurent@1383:                 <relPosition x="159" y="1"/>
Laurent@1383:               </connectionPointOut>
Laurent@1383:             </selectionDivergence>
Laurent@1383:             <transition localId="23" height="2" width="20">
Laurent@1383:               <position x="559" y="709"/>
Laurent@1383:               <connectionPointIn>
Laurent@1383:                 <relPosition x="10" y="0"/>
Laurent@1383:                 <connection refLocalId="22">
Laurent@1383:                   <position x="569" y="709"/>
Laurent@1383:                   <position x="569" y="626"/>
Laurent@1383:                 </connection>
Laurent@1383:               </connectionPointIn>
Laurent@1383:               <connectionPointOut>
Laurent@1383:                 <relPosition x="10" y="2"/>
Laurent@1383:               </connectionPointOut>
Laurent@1383:               <condition>
Laurent@1383:                 <inline name="">
Laurent@1383:                   <ST>
Laurent@1383:                     <xhtml:p><![CDATA[STOP_PEDESTRIANS]]></xhtml:p>
Laurent@1383:                   </ST>
Laurent@1383:                 </inline>
Laurent@1383:               </condition>
Laurent@1383:             </transition>
Laurent@1383:             <step localId="24" height="27" width="148" name="PEDESTRIAN_RED">
Laurent@1383:               <position x="495" y="750"/>
Laurent@1383:               <connectionPointIn>
Laurent@1383:                 <relPosition x="74" y="0"/>
Laurent@1383:                 <connection refLocalId="23">
Laurent@1383:                   <position x="569" y="750"/>
Laurent@1383:                   <position x="569" y="711"/>
Laurent@1383:                 </connection>
Laurent@1383:               </connectionPointIn>
Laurent@1383:               <connectionPointOut formalParameter="">
Laurent@1383:                 <relPosition x="74" y="27"/>
Laurent@1383:               </connectionPointOut>
Laurent@1383:               <connectionPointOutAction formalParameter="">
Laurent@1383:                 <relPosition x="148" y="13"/>
Laurent@1383:               </connectionPointOutAction>
Laurent@1383:             </step>
andrej@1546:             <actionBlock localId="25" width="233" height="110">
Laurent@1383:               <position x="708" y="748"/>
Laurent@1383:               <connectionPointIn>
Laurent@1383:                 <relPosition x="0" y="15"/>
Laurent@1383:                 <connection refLocalId="24">
Laurent@1383:                   <position x="708" y="763"/>
Laurent@1383:                   <position x="643" y="763"/>
Laurent@1383:                 </connection>
Laurent@1383:               </connectionPointIn>
Laurent@1383:               <action localId="0" qualifier="S">
Laurent@1383:                 <relPosition x="0" y="0"/>
Laurent@1383:                 <reference name="PEDESTRIAN_RED_LIGHT"/>
Laurent@1383:               </action>
Laurent@1383:               <action localId="0" qualifier="R">
Laurent@1383:                 <relPosition x="0" y="0"/>
Laurent@1383:                 <reference name="PEDESTRIAN_GREEN_LIGHT"/>
Laurent@1383:               </action>
Laurent@1383:               <action localId="0" qualifier="D" duration="T#2s">
Laurent@1383:                 <relPosition x="0" y="0"/>
Laurent@1383:                 <reference name="ALLOW_CARS"/>
Laurent@1383:               </action>
Laurent@1383:             </actionBlock>
Laurent@1383:             <transition localId="26" height="2" width="20">
Laurent@1383:               <position x="400" y="857"/>
Laurent@1383:               <connectionPointIn>
Laurent@1383:                 <relPosition x="10" y="0"/>
Laurent@1383:                 <connection refLocalId="28">
Laurent@1383:                   <position x="410" y="857"/>
Laurent@1383:                   <position x="410" y="816"/>
Laurent@1383:                 </connection>
Laurent@1383:               </connectionPointIn>
Laurent@1383:               <connectionPointOut>
Laurent@1383:                 <relPosition x="10" y="2"/>
Laurent@1383:               </connectionPointOut>
Laurent@1383:               <condition>
andrej@1546:                 <connectionPointIn>
andrej@1546:                   <connection refLocalId="48">
andrej@1546:                     <position x="400" y="858"/>
andrej@1546:                     <position x="290" y="858"/>
andrej@1546:                   </connection>
andrej@1546:                 </connectionPointIn>
Laurent@1383:               </condition>
Laurent@1383:             </transition>
Laurent@1383:             <jumpStep localId="27" height="13" width="12" targetName="Standstill">
Laurent@1383:               <position x="404" y="898"/>
Laurent@1383:               <connectionPointIn>
Laurent@1383:                 <relPosition x="6" y="0"/>
Laurent@1383:                 <connection refLocalId="26">
Laurent@1383:                   <position x="410" y="898"/>
Laurent@1383:                   <position x="410" y="859"/>
Laurent@1383:                 </connection>
Laurent@1383:               </connectionPointIn>
Laurent@1383:             </jumpStep>
Laurent@1383:             <selectionDivergence localId="28" height="1" width="159">
Laurent@1383:               <position x="410" y="815"/>
Laurent@1383:               <connectionPointIn>
Laurent@1383:                 <relPosition x="159" y="0"/>
Laurent@1383:                 <connection refLocalId="24">
Laurent@1383:                   <position x="569" y="815"/>
Laurent@1383:                   <position x="569" y="777"/>
Laurent@1383:                 </connection>
Laurent@1383:               </connectionPointIn>
Laurent@1383:               <connectionPointOut formalParameter="">
Laurent@1383:                 <relPosition x="0" y="1"/>
Laurent@1383:               </connectionPointOut>
Laurent@1383:               <connectionPointOut formalParameter="">
Laurent@1383:                 <relPosition x="159" y="1"/>
Laurent@1383:               </connectionPointOut>
Laurent@1383:             </selectionDivergence>
Laurent@1383:             <transition localId="29" height="2" width="20">
Laurent@1383:               <position x="559" y="879"/>
Laurent@1383:               <connectionPointIn>
Laurent@1383:                 <relPosition x="10" y="0"/>
Laurent@1383:                 <connection refLocalId="28">
Laurent@1383:                   <position x="569" y="879"/>
Laurent@1383:                   <position x="569" y="816"/>
Laurent@1383:                 </connection>
Laurent@1383:               </connectionPointIn>
Laurent@1383:               <connectionPointOut>
Laurent@1383:                 <relPosition x="10" y="2"/>
Laurent@1383:               </connectionPointOut>
Laurent@1383:               <condition>
Laurent@1383:                 <inline name="">
Laurent@1383:                   <ST>
Laurent@1383:                     <xhtml:p><![CDATA[ALLOW_CARS]]></xhtml:p>
Laurent@1383:                   </ST>
Laurent@1383:                 </inline>
Laurent@1383:               </condition>
Laurent@1383:             </transition>
Laurent@1383:             <step localId="30" height="27" width="56" name="GREEN">
Laurent@1383:               <position x="541" y="933"/>
Laurent@1383:               <connectionPointIn>
Laurent@1383:                 <relPosition x="28" y="0"/>
Laurent@1383:                 <connection refLocalId="29">
Laurent@1383:                   <position x="569" y="933"/>
Laurent@1383:                   <position x="569" y="881"/>
Laurent@1383:                 </connection>
Laurent@1383:               </connectionPointIn>
Laurent@1383:               <connectionPointOut formalParameter="">
Laurent@1383:                 <relPosition x="28" y="27"/>
Laurent@1383:               </connectionPointOut>
Laurent@1383:               <connectionPointOutAction formalParameter="">
Laurent@1383:                 <relPosition x="56" y="13"/>
Laurent@1383:               </connectionPointOutAction>
Laurent@1383:             </step>
andrej@1546:             <actionBlock localId="31" width="227" height="110">
Laurent@1383:               <position x="709" y="931"/>
Laurent@1383:               <connectionPointIn>
Laurent@1383:                 <relPosition x="0" y="15"/>
Laurent@1383:                 <connection refLocalId="30">
Laurent@1383:                   <position x="709" y="946"/>
Laurent@1383:                   <position x="597" y="946"/>
Laurent@1383:                 </connection>
Laurent@1383:               </connectionPointIn>
Laurent@1383:               <action localId="0" qualifier="S">
Laurent@1383:                 <relPosition x="0" y="0"/>
Laurent@1383:                 <reference name="GREEN_LIGHT"/>
Laurent@1383:               </action>
Laurent@1383:               <action localId="0" qualifier="R">
Laurent@1383:                 <relPosition x="0" y="0"/>
Laurent@1383:                 <reference name="RED_LIGHT"/>
Laurent@1383:               </action>
Laurent@1383:               <action localId="0" qualifier="D" duration="T#20s">
Laurent@1383:                 <relPosition x="0" y="0"/>
Laurent@1383:                 <reference name="WARN_CARS"/>
Laurent@1383:               </action>
Laurent@1383:             </actionBlock>
Laurent@1383:             <block localId="32" width="89" height="94" typeName="TON" instanceName="TON3">
Laurent@1383:               <position x="308" y="1053"/>
Laurent@1383:               <inputVariables>
Laurent@1383:                 <variable formalParameter="IN">
Laurent@1383:                   <connectionPointIn>
Laurent@1383:                     <relPosition x="0" y="38"/>
Laurent@1383:                     <connection refLocalId="44" formalParameter="Q1">
Laurent@1383:                       <position x="308" y="1091"/>
Laurent@1383:                       <position x="291" y="1091"/>
Laurent@1383:                       <position x="291" y="1065"/>
Laurent@1383:                       <position x="274" y="1065"/>
Laurent@1383:                     </connection>
Laurent@1383:                   </connectionPointIn>
Laurent@1383:                 </variable>
Laurent@1383:                 <variable formalParameter="PT">
Laurent@1383:                   <connectionPointIn>
Laurent@1383:                     <relPosition x="0" y="75"/>
Laurent@1383:                     <connection refLocalId="34">
Laurent@1383:                       <position x="308" y="1128"/>
Laurent@1383:                       <position x="270" y="1128"/>
Laurent@1383:                     </connection>
Laurent@1383:                   </connectionPointIn>
Laurent@1383:                 </variable>
Laurent@1383:               </inputVariables>
Laurent@1383:               <inOutVariables/>
Laurent@1383:               <outputVariables>
Laurent@1383:                 <variable formalParameter="Q">
Laurent@1383:                   <connectionPointOut>
Laurent@1383:                     <relPosition x="89" y="38"/>
Laurent@1383:                   </connectionPointOut>
Laurent@1383:                 </variable>
Laurent@1383:                 <variable formalParameter="ET">
Laurent@1383:                   <connectionPointOut>
Laurent@1383:                     <relPosition x="89" y="75"/>
Laurent@1383:                   </connectionPointOut>
Laurent@1383:                 </variable>
Laurent@1383:               </outputVariables>
Laurent@1383:             </block>
Laurent@1383:             <inVariable localId="33" height="27" width="159">
Laurent@1383:               <position x="24" y="1052"/>
Laurent@1383:               <connectionPointOut>
Laurent@1383:                 <relPosition x="159" y="13"/>
Laurent@1383:               </connectionPointOut>
Laurent@1383:               <expression>PEDESTRIAN_BUTTON</expression>
Laurent@1383:             </inVariable>
Laurent@1383:             <inVariable localId="34" height="27" width="43">
Laurent@1383:               <position x="227" y="1115"/>
Laurent@1383:               <connectionPointOut>
Laurent@1383:                 <relPosition x="43" y="13"/>
Laurent@1383:               </connectionPointOut>
Laurent@1383:               <expression>T#2s</expression>
Laurent@1383:             </inVariable>
Laurent@1383:             <block localId="35" width="67" height="60" typeName="OR">
Laurent@1383:               <position x="459" y="1061"/>
Laurent@1383:               <inputVariables>
Laurent@1383:                 <variable formalParameter="IN1">
Laurent@1383:                   <connectionPointIn>
Laurent@1383:                     <relPosition x="0" y="30"/>
Laurent@1383:                     <connection refLocalId="32" formalParameter="Q">
Laurent@1383:                       <position x="459" y="1091"/>
Laurent@1383:                       <position x="397" y="1091"/>
Laurent@1383:                     </connection>
Laurent@1383:                   </connectionPointIn>
Laurent@1383:                 </variable>
Laurent@1383:                 <variable formalParameter="IN2">
Laurent@1383:                   <connectionPointIn>
Laurent@1383:                     <relPosition x="0" y="50"/>
Laurent@1383:                     <connection refLocalId="36">
Laurent@1383:                       <position x="459" y="1111"/>
Laurent@1383:                       <position x="427" y="1111"/>
Laurent@1383:                       <position x="427" y="1195"/>
Laurent@1383:                       <position x="260" y="1195"/>
Laurent@1383:                     </connection>
Laurent@1383:                   </connectionPointIn>
Laurent@1383:                 </variable>
Laurent@1383:               </inputVariables>
Laurent@1383:               <inOutVariables/>
Laurent@1383:               <outputVariables>
Laurent@1383:                 <variable formalParameter="OUT">
Laurent@1383:                   <connectionPointOut>
Laurent@1383:                     <relPosition x="67" y="30"/>
Laurent@1383:                   </connectionPointOut>
Laurent@1383:                 </variable>
Laurent@1383:               </outputVariables>
Laurent@1383:             </block>
Laurent@1383:             <inVariable localId="36" height="27" width="97">
Laurent@1383:               <position x="163" y="1182"/>
Laurent@1383:               <connectionPointOut>
Laurent@1383:                 <relPosition x="97" y="13"/>
Laurent@1383:               </connectionPointOut>
Laurent@1383:               <expression>WARN_CARS</expression>
Laurent@1383:             </inVariable>
Laurent@1383:             <transition localId="37" height="2" width="20">
Laurent@1383:               <position x="559" y="1090"/>
Laurent@1383:               <connectionPointIn>
Laurent@1383:                 <relPosition x="10" y="0"/>
Laurent@1383:                 <connection refLocalId="38">
Laurent@1383:                   <position x="569" y="1090"/>
Laurent@1383:                   <position x="569" y="1060"/>
Laurent@1383:                 </connection>
Laurent@1383:               </connectionPointIn>
Laurent@1383:               <connectionPointOut>
Laurent@1383:                 <relPosition x="10" y="2"/>
Laurent@1383:               </connectionPointOut>
Laurent@1383:               <condition>
Laurent@1383:                 <connectionPointIn>
Laurent@1383:                   <connection refLocalId="35" formalParameter="OUT">
Laurent@1383:                     <position x="559" y="1091"/>
Laurent@1383:                     <position x="526" y="1091"/>
Laurent@1383:                   </connection>
Laurent@1383:                 </connectionPointIn>
Laurent@1383:               </condition>
Laurent@1383:             </transition>
Laurent@1383:             <selectionDivergence localId="38" height="1" width="207">
Laurent@1383:               <position x="569" y="1059"/>
Laurent@1383:               <connectionPointIn>
Laurent@1383:                 <relPosition x="0" y="0"/>
Laurent@1383:                 <connection refLocalId="30">
Laurent@1383:                   <position x="569" y="1059"/>
Laurent@1383:                   <position x="569" y="960"/>
Laurent@1383:                 </connection>
Laurent@1383:               </connectionPointIn>
Laurent@1383:               <connectionPointOut formalParameter="">
Laurent@1383:                 <relPosition x="0" y="1"/>
Laurent@1383:               </connectionPointOut>
Laurent@1383:               <connectionPointOut formalParameter="">
Laurent@1383:                 <relPosition x="207" y="1"/>
Laurent@1383:               </connectionPointOut>
Laurent@1383:             </selectionDivergence>
Laurent@1383:             <transition localId="39" height="2" width="20">
Laurent@1383:               <position x="766" y="1095"/>
Laurent@1383:               <connectionPointIn>
Laurent@1383:                 <relPosition x="10" y="0"/>
Laurent@1383:                 <connection refLocalId="38">
Laurent@1383:                   <position x="776" y="1095"/>
Laurent@1383:                   <position x="776" y="1060"/>
Laurent@1383:                 </connection>
Laurent@1383:               </connectionPointIn>
Laurent@1383:               <connectionPointOut>
Laurent@1383:                 <relPosition x="10" y="2"/>
Laurent@1383:               </connectionPointOut>
Laurent@1383:               <condition>
Laurent@1383:                 <inline name="">
Laurent@1383:                   <ST>
Laurent@1383:                     <xhtml:p><![CDATA[NOT SWITCH_BUTTON]]></xhtml:p>
Laurent@1383:                   </ST>
Laurent@1383:                 </inline>
Laurent@1383:               </condition>
Laurent@1383:             </transition>
Laurent@1383:             <jumpStep localId="41" height="13" width="12" targetName="ORANGE">
Laurent@1383:               <position x="563" y="1137"/>
Laurent@1383:               <connectionPointIn>
Laurent@1383:                 <relPosition x="6" y="0"/>
Laurent@1383:                 <connection refLocalId="37">
Laurent@1383:                   <position x="569" y="1137"/>
Laurent@1383:                   <position x="569" y="1092"/>
Laurent@1383:                 </connection>
Laurent@1383:               </connectionPointIn>
Laurent@1383:             </jumpStep>
Laurent@1383:             <block localId="44" width="50" height="60" typeName="SR" instanceName="SR0">
Laurent@1383:               <position x="224" y="1035"/>
Laurent@1383:               <inputVariables>
Laurent@1383:                 <variable formalParameter="S1">
Laurent@1383:                   <connectionPointIn>
Laurent@1383:                     <relPosition x="0" y="30"/>
Laurent@1383:                     <connection refLocalId="33">
Laurent@1383:                       <position x="224" y="1065"/>
Laurent@1383:                       <position x="183" y="1065"/>
Laurent@1383:                     </connection>
Laurent@1383:                   </connectionPointIn>
Laurent@1383:                 </variable>
Laurent@1383:                 <variable formalParameter="R">
Laurent@1383:                   <connectionPointIn>
Laurent@1383:                     <relPosition x="0" y="50"/>
Laurent@1383:                     <connection refLocalId="32" formalParameter="Q">
Laurent@1383:                       <position x="224" y="1085"/>
Laurent@1383:                       <position x="203" y="1085"/>
Laurent@1383:                       <position x="203" y="1167"/>
Laurent@1383:                       <position x="416" y="1167"/>
Laurent@1383:                       <position x="416" y="1091"/>
Laurent@1383:                       <position x="397" y="1091"/>
Laurent@1383:                     </connection>
Laurent@1383:                   </connectionPointIn>
Laurent@1383:                 </variable>
Laurent@1383:               </inputVariables>
Laurent@1383:               <inOutVariables/>
Laurent@1383:               <outputVariables>
Laurent@1383:                 <variable formalParameter="Q1">
Laurent@1383:                   <connectionPointOut>
Laurent@1383:                     <relPosition x="50" y="30"/>
Laurent@1383:                   </connectionPointOut>
Laurent@1383:                 </variable>
Laurent@1383:               </outputVariables>
Laurent@1383:             </block>
andrej@1546:             <comment localId="45" height="681" width="645">
andrej@1546:               <position x="1021" y="21"/>
andrej@1546:               <content>
andrej@1546:                 <xhtml:p><![CDATA[*** Description of SFC action qualifiers ***
andrej@1546: 
andrej@1546: N : non-stored - The action code body is executed or the Boolean variable is set as
andrej@1546: long as the step is active.
andrej@1546: 
andrej@1546: R : overriding reset &#8211; When the step has previously been executed with the S
andrej@1546: (including DS, DS, and SL) qualifier, the R qualifier will stop the execution of the
andrej@1546: code or reset the Boolean variable.
andrej@1546: 
andrej@1546: S : set (stored) - The action code body is executed or the Boolean variable is set.
andrej@1546: This state is stored as soon as the step becomes active. It can only be reset
andrej@1546: explicitly by associating the same action to a different step using the qualifier 'R'.
andrej@1546: 
andrej@1546: L : time limited - The action code body is executed or the Boolean variable is set as
andrej@1546: long as the step is active but maximal for the fixed time interval.
andrej@1546: 
andrej@1546: D : time delayed - The action code body is executed or the Boolean variable is set
andrej@1546: after the fixed delay time has elapsed. The action remains active as long as the step
andrej@1546: is active. If the step is active shorter than the fixed delay time the action does not
andrej@1546: become active.
andrej@1546: 
andrej@1546: P : pulse - As soon as the step is active the action code body is executed or the
andrej@1546: Boolean variable is set for one operating cycle. (Note: The code body will then
andrej@1546: execute for one additional operating cycle with the Step.X variable FALSE.)
andrej@1546: 
andrej@1546: SD : stored and time delayed - the action code body is executed or the Boolean
andrej@1546: variable is stored and set when the fixed delay time has elapsed after the step
andrej@1546: activation, even if the step becomes inactive. The action remains active until it is
andrej@1546: reset. If the step is active shorter than the fixed delay time the action becomes active
andrej@1546: anyway.
andrej@1546: 
andrej@1546: DS : delayed and stored - The action code body is executed or the Boolean variable
andrej@1546: is set when the fixed delay time has elapsed after the step activation. The action
andrej@1546: remains active until it is reset. If the step is active shorter than the fixed delay time
andrej@1546: the action does not become active.
andrej@1546: 
andrej@1546: SL : stored and time limited - The action code body is executed or the Boolean
andrej@1546: variable is set and stored for a fixed time interval as soon as the step is active. If the
andrej@1546: step is active shorter than the time interval the action is active for the whole time
andrej@1546: interval anyway. If the action is reset during the time interval the action becomes
andrej@1546: inactive as soon as the action is reset.
andrej@1546: ]]></xhtml:p>
andrej@1546:               </content>
andrej@1546:             </comment>
andrej@1546:             <comment localId="46" height="160" width="375">
andrej@1546:               <position x="8" y="326"/>
andrej@1546:               <content>
andrej@1546:                 <xhtml:p><![CDATA[Conditions can be written in any IEC 61131-3 language.
andrej@1546: They can be implemented in defferent ways:
andrej@1546: - reference to external implementation;
andrej@1546: - inline implementation;
andrej@1546: - written in FBD or LD on SFC diagram and connected to the condition.
andrej@1546: 
andrej@1546: See below examples of all these types.]]></xhtml:p>
andrej@1546:               </content>
andrej@1546:             </comment>
andrej@1546:             <leftPowerRail localId="47" height="40" width="3">
andrej@1546:               <position x="189" y="838"/>
andrej@1546:               <connectionPointOut formalParameter="">
andrej@1546:                 <relPosition x="3" y="20"/>
andrej@1546:               </connectionPointOut>
andrej@1546:             </leftPowerRail>
andrej@1546:             <contact localId="48" height="15" width="21" negated="true">
andrej@1546:               <position x="269" y="850"/>
andrej@1546:               <connectionPointIn>
andrej@1546:                 <relPosition x="0" y="8"/>
andrej@1546:                 <connection refLocalId="47">
andrej@1546:                   <position x="269" y="858"/>
andrej@1546:                   <position x="192" y="858"/>
andrej@1546:                 </connection>
andrej@1546:               </connectionPointIn>
andrej@1546:               <connectionPointOut>
andrej@1546:                 <relPosition x="21" y="8"/>
andrej@1546:               </connectionPointOut>
andrej@1546:               <variable>SWITCH_BUTTON</variable>
andrej@1546:             </contact>
andrej@1546:             <comment localId="13" height="66" width="375">
andrej@1546:               <position x="9" y="28"/>
andrej@1546:               <content>
andrej@1546:                 <xhtml:p><![CDATA[
andrej@1546: Sequential function chart (SFC) is commonly used to describe state machines.]]></xhtml:p>
andrej@1546:               </content>
andrej@1546:             </comment>
Laurent@1383:           </SFC>
Laurent@1383:         </body>
Laurent@1383:       </pou>
Laurent@1383:       <pou name="main_program" pouType="program">
Laurent@1383:         <interface>
Laurent@1383:           <localVars>
Laurent@1383:             <variable name="trafic_light_sequence0">
Laurent@1383:               <type>
Laurent@1383:                 <derived name="traffic_light_sequence"/>
Laurent@1383:               </type>
Laurent@1383:             </variable>
Laurent@1383:             <variable name="SwitchButton">
Laurent@1383:               <type>
Laurent@1383:                 <derived name="Button"/>
Laurent@1383:               </type>
Laurent@1383:             </variable>
Laurent@1383:             <variable name="PedestrianButton">
Laurent@1383:               <type>
Laurent@1383:                 <derived name="Button"/>
Laurent@1383:               </type>
Laurent@1383:             </variable>
Laurent@1383:             <variable name="RedLight">
Laurent@1383:               <type>
Laurent@1383:                 <derived name="Led"/>
Laurent@1383:               </type>
Laurent@1383:             </variable>
Laurent@1383:             <variable name="OrangeLight">
Laurent@1383:               <type>
Laurent@1383:                 <derived name="Led"/>
Laurent@1383:               </type>
Laurent@1383:             </variable>
Laurent@1383:             <variable name="GreenLight">
Laurent@1383:               <type>
Laurent@1383:                 <derived name="Led"/>
Laurent@1383:               </type>
Laurent@1383:             </variable>
Laurent@1383:             <variable name="PedestrianRedLight">
Laurent@1383:               <type>
Laurent@1383:                 <derived name="Led"/>
Laurent@1383:               </type>
Laurent@1383:             </variable>
Laurent@1383:             <variable name="PedestrianGreenLight">
Laurent@1383:               <type>
Laurent@1383:                 <derived name="Led"/>
Laurent@1383:               </type>
Laurent@1383:             </variable>
Laurent@1383:           </localVars>
Laurent@1383:         </interface>
Laurent@1383:         <body>
Laurent@1383:           <FBD>
andrej@1546:             <block localId="1" width="349" height="836" typeName="traffic_light_sequence" instanceName="trafic_light_sequence0" executionOrderId="0">
andrej@1546:               <position x="470" y="406"/>
Laurent@1383:               <inputVariables>
Laurent@1383:                 <variable formalParameter="SWITCH_BUTTON">
Laurent@1383:                   <connectionPointIn>
Laurent@1383:                     <relPosition x="0" y="101"/>
Laurent@1383:                     <connection refLocalId="2" formalParameter="state_out">
andrej@1546:                       <position x="470" y="507"/>
andrej@1546:                       <position x="333" y="507"/>
Laurent@1383:                     </connection>
Laurent@1383:                   </connectionPointIn>
Laurent@1383:                 </variable>
Laurent@1383:                 <variable formalParameter="PEDESTRIAN_BUTTON">
Laurent@1383:                   <connectionPointIn>
Laurent@1383:                     <relPosition x="0" y="264"/>
Laurent@1383:                     <connection refLocalId="3" formalParameter="state_out">
andrej@1546:                       <position x="470" y="670"/>
andrej@1546:                       <position x="402" y="670"/>
andrej@1546:                       <position x="402" y="721"/>
andrej@1546:                       <position x="335" y="721"/>
Laurent@1383:                     </connection>
Laurent@1383:                   </connectionPointIn>
Laurent@1383:                 </variable>
Laurent@1383:               </inputVariables>
Laurent@1383:               <inOutVariables/>
Laurent@1383:               <outputVariables>
Laurent@1383:                 <variable formalParameter="RED_LIGHT">
Laurent@1383:                   <connectionPointOut>
Laurent@1383:                     <relPosition x="349" y="101"/>
Laurent@1383:                   </connectionPointOut>
Laurent@1383:                 </variable>
Laurent@1383:                 <variable formalParameter="ORANGE_LIGHT">
Laurent@1383:                   <connectionPointOut>
Laurent@1383:                     <relPosition x="349" y="264"/>
Laurent@1383:                   </connectionPointOut>
Laurent@1383:                 </variable>
Laurent@1383:                 <variable formalParameter="GREEN_LIGHT">
Laurent@1383:                   <connectionPointOut>
Laurent@1383:                     <relPosition x="349" y="427"/>
Laurent@1383:                   </connectionPointOut>
Laurent@1383:                 </variable>
Laurent@1383:                 <variable formalParameter="PEDESTRIAN_RED_LIGHT">
Laurent@1383:                   <connectionPointOut>
Laurent@1383:                     <relPosition x="349" y="590"/>
Laurent@1383:                   </connectionPointOut>
Laurent@1383:                 </variable>
Laurent@1383:                 <variable formalParameter="PEDESTRIAN_GREEN_LIGHT">
Laurent@1383:                   <connectionPointOut>
Laurent@1383:                     <relPosition x="349" y="753"/>
Laurent@1383:                   </connectionPointOut>
Laurent@1383:                 </variable>
Laurent@1383:               </outputVariables>
Laurent@1383:             </block>
andrej@1546:             <block localId="2" width="143" height="183" typeName="Button" instanceName="SwitchButton" executionOrderId="0">
andrej@1546:               <position x="190" y="471"/>
Laurent@1383:               <inputVariables>
Laurent@1383:                 <variable formalParameter="back_id">
Laurent@1383:                   <connectionPointIn>
Laurent@1383:                     <relPosition x="0" y="36"/>
Laurent@1383:                     <connection refLocalId="5">
andrej@1546:                       <position x="190" y="507"/>
andrej@1546:                       <position x="136" y="507"/>
Laurent@1383:                     </connection>
Laurent@1383:                   </connectionPointIn>
Laurent@1383:                 </variable>
Laurent@1383:                 <variable formalParameter="sele_id">
Laurent@1383:                   <connectionPointIn>
Laurent@1383:                     <relPosition x="0" y="68"/>
Laurent@1383:                     <connection refLocalId="6">
andrej@1546:                       <position x="190" y="539"/>
andrej@1546:                       <position x="136" y="539"/>
Laurent@1383:                     </connection>
Laurent@1383:                   </connectionPointIn>
Laurent@1383:                 </variable>
Laurent@1383:                 <variable formalParameter="toggle">
Laurent@1383:                   <connectionPointIn>
Laurent@1383:                     <relPosition x="0" y="100"/>
Laurent@1383:                     <connection refLocalId="4">
andrej@1546:                       <position x="190" y="571"/>
andrej@1546:                       <position x="136" y="571"/>
Laurent@1383:                     </connection>
Laurent@1383:                   </connectionPointIn>
Laurent@1383:                 </variable>
Laurent@1383:                 <variable formalParameter="set_state">
Laurent@1383:                   <connectionPointIn>
Laurent@1383:                     <relPosition x="0" y="132"/>
Laurent@1383:                   </connectionPointIn>
Laurent@1383:                 </variable>
Laurent@1383:                 <variable formalParameter="state_in">
Laurent@1383:                   <connectionPointIn>
Laurent@1383:                     <relPosition x="0" y="164"/>
Laurent@1383:                   </connectionPointIn>
Laurent@1383:                 </variable>
Laurent@1383:               </inputVariables>
Laurent@1383:               <inOutVariables/>
Laurent@1383:               <outputVariables>
Laurent@1383:                 <variable formalParameter="state_out">
Laurent@1383:                   <connectionPointOut>
Laurent@1383:                     <relPosition x="143" y="36"/>
Laurent@1383:                   </connectionPointOut>
Laurent@1383:                 </variable>
Laurent@1383:               </outputVariables>
Laurent@1383:             </block>
andrej@1546:             <block localId="3" width="143" height="198" typeName="Button" instanceName="PedestrianButton" executionOrderId="0">
andrej@1546:               <position x="192" y="684"/>
Laurent@1383:               <inputVariables>
Laurent@1383:                 <variable formalParameter="back_id">
Laurent@1383:                   <connectionPointIn>
Laurent@1383:                     <relPosition x="0" y="37"/>
Laurent@1383:                     <connection refLocalId="7">
andrej@1546:                       <position x="192" y="721"/>
andrej@1546:                       <position x="159" y="721"/>
Laurent@1383:                     </connection>
Laurent@1383:                   </connectionPointIn>
Laurent@1383:                 </variable>
Laurent@1383:                 <variable formalParameter="sele_id">
Laurent@1383:                   <connectionPointIn>
Laurent@1383:                     <relPosition x="0" y="72"/>
Laurent@1383:                     <connection refLocalId="8">
andrej@1546:                       <position x="192" y="756"/>
andrej@1546:                       <position x="159" y="756"/>
Laurent@1383:                     </connection>
Laurent@1383:                   </connectionPointIn>
Laurent@1383:                 </variable>
Laurent@1383:                 <variable formalParameter="toggle">
Laurent@1383:                   <connectionPointIn>
Laurent@1383:                     <relPosition x="0" y="107"/>
Laurent@1383:                   </connectionPointIn>
Laurent@1383:                 </variable>
Laurent@1383:                 <variable formalParameter="set_state">
Laurent@1383:                   <connectionPointIn>
Laurent@1383:                     <relPosition x="0" y="142"/>
Laurent@1383:                   </connectionPointIn>
Laurent@1383:                 </variable>
Laurent@1383:                 <variable formalParameter="state_in">
Laurent@1383:                   <connectionPointIn>
Laurent@1383:                     <relPosition x="0" y="177"/>
Laurent@1383:                   </connectionPointIn>
Laurent@1383:                 </variable>
Laurent@1383:               </inputVariables>
Laurent@1383:               <inOutVariables/>
Laurent@1383:               <outputVariables>
Laurent@1383:                 <variable formalParameter="state_out">
Laurent@1383:                   <connectionPointOut>
Laurent@1383:                     <relPosition x="143" y="37"/>
Laurent@1383:                   </connectionPointOut>
Laurent@1383:                 </variable>
Laurent@1383:               </outputVariables>
Laurent@1383:             </block>
andrej@1546:             <inVariable localId="4" height="27" width="18" executionOrderId="0" negated="false">
andrej@1546:               <position x="118" y="558"/>
Laurent@1383:               <connectionPointOut>
Laurent@1383:                 <relPosition x="18" y="13"/>
Laurent@1383:               </connectionPointOut>
Laurent@1383:               <expression>1</expression>
Laurent@1383:             </inVariable>
andrej@1546:             <inVariable localId="5" height="27" width="105" executionOrderId="0" negated="false">
andrej@1546:               <position x="31" y="494"/>
Laurent@1383:               <connectionPointOut>
Laurent@1383:                 <relPosition x="105" y="13"/>
Laurent@1383:               </connectionPointOut>
Laurent@1383:               <expression>'SWITCH_OFF'</expression>
Laurent@1383:             </inVariable>
andrej@1546:             <inVariable localId="6" height="27" width="105" executionOrderId="0" negated="false">
andrej@1546:               <position x="31" y="526"/>
Laurent@1383:               <connectionPointOut>
Laurent@1383:                 <relPosition x="105" y="13"/>
Laurent@1383:               </connectionPointOut>
Laurent@1383:               <expression>'SWITCH_ON'</expression>
Laurent@1383:             </inVariable>
andrej@1546:             <inVariable localId="7" height="27" width="137" executionOrderId="0" negated="false">
andrej@1546:               <position x="22" y="708"/>
Laurent@1383:               <connectionPointOut>
Laurent@1383:                 <relPosition x="137" y="13"/>
Laurent@1383:               </connectionPointOut>
Laurent@1383:               <expression>'PEDESTRIAN_OFF'</expression>
Laurent@1383:             </inVariable>
andrej@1546:             <inVariable localId="8" height="27" width="137" executionOrderId="0" negated="false">
andrej@1546:               <position x="22" y="743"/>
Laurent@1383:               <connectionPointOut>
Laurent@1383:                 <relPosition x="137" y="13"/>
Laurent@1383:               </connectionPointOut>
Laurent@1383:               <expression>'PEDESTRIAN_ON'</expression>
Laurent@1383:             </inVariable>
andrej@1546:             <block localId="9" width="115" height="133" typeName="Led" instanceName="RedLight" executionOrderId="0">
andrej@1546:               <position x="1057" y="395"/>
Laurent@1383:               <inputVariables>
Laurent@1383:                 <variable formalParameter="back_id">
Laurent@1383:                   <connectionPointIn>
Laurent@1383:                     <relPosition x="0" y="38"/>
Laurent@1383:                     <connection refLocalId="10">
andrej@1546:                       <position x="1057" y="433"/>
andrej@1546:                       <position x="1010" y="433"/>
Laurent@1383:                     </connection>
Laurent@1383:                   </connectionPointIn>
Laurent@1383:                 </variable>
Laurent@1383:                 <variable formalParameter="sele_id">
Laurent@1383:                   <connectionPointIn>
Laurent@1383:                     <relPosition x="0" y="75"/>
Laurent@1383:                     <connection refLocalId="11">
andrej@1546:                       <position x="1057" y="470"/>
andrej@1546:                       <position x="1010" y="470"/>
Laurent@1383:                     </connection>
Laurent@1383:                   </connectionPointIn>
Laurent@1383:                 </variable>
Laurent@1383:                 <variable formalParameter="state_in">
Laurent@1383:                   <connectionPointIn>
Laurent@1383:                     <relPosition x="0" y="112"/>
Laurent@1383:                     <connection refLocalId="1" formalParameter="RED_LIGHT">
andrej@1546:                       <position x="1057" y="507"/>
andrej@1546:                       <position x="819" y="507"/>
Laurent@1383:                     </connection>
Laurent@1383:                   </connectionPointIn>
Laurent@1383:                 </variable>
Laurent@1383:               </inputVariables>
Laurent@1383:               <inOutVariables/>
Laurent@1383:               <outputVariables/>
Laurent@1383:             </block>
andrej@1546:             <inVariable localId="10" height="27" width="79" executionOrderId="0" negated="false">
andrej@1546:               <position x="931" y="420"/>
Laurent@1383:               <connectionPointOut>
Laurent@1383:                 <relPosition x="79" y="13"/>
Laurent@1383:               </connectionPointOut>
Laurent@1383:               <expression>'RED_OFF'</expression>
Laurent@1383:             </inVariable>
andrej@1546:             <inVariable localId="11" height="27" width="79" executionOrderId="0" negated="false">
andrej@1546:               <position x="931" y="457"/>
Laurent@1383:               <connectionPointOut>
Laurent@1383:                 <relPosition x="79" y="13"/>
Laurent@1383:               </connectionPointOut>
Laurent@1383:               <expression>'RED_ON'</expression>
Laurent@1383:             </inVariable>
andrej@1546:             <block localId="12" width="115" height="133" typeName="Led" instanceName="OrangeLight" executionOrderId="0">
andrej@1546:               <position x="1058" y="558"/>
Laurent@1383:               <inputVariables>
Laurent@1383:                 <variable formalParameter="back_id">
Laurent@1383:                   <connectionPointIn>
Laurent@1383:                     <relPosition x="0" y="38"/>
Laurent@1383:                     <connection refLocalId="13">
andrej@1546:                       <position x="1058" y="596"/>
andrej@1546:                       <position x="1010" y="596"/>
Laurent@1383:                     </connection>
Laurent@1383:                   </connectionPointIn>
Laurent@1383:                 </variable>
Laurent@1383:                 <variable formalParameter="sele_id">
Laurent@1383:                   <connectionPointIn>
Laurent@1383:                     <relPosition x="0" y="75"/>
Laurent@1383:                     <connection refLocalId="14">
andrej@1546:                       <position x="1058" y="633"/>
andrej@1546:                       <position x="1010" y="633"/>
Laurent@1383:                     </connection>
Laurent@1383:                   </connectionPointIn>
Laurent@1383:                 </variable>
Laurent@1383:                 <variable formalParameter="state_in">
Laurent@1383:                   <connectionPointIn>
Laurent@1383:                     <relPosition x="0" y="112"/>
Laurent@1383:                     <connection refLocalId="1" formalParameter="ORANGE_LIGHT">
andrej@1546:                       <position x="1058" y="670"/>
andrej@1546:                       <position x="819" y="670"/>
Laurent@1383:                     </connection>
Laurent@1383:                   </connectionPointIn>
Laurent@1383:                 </variable>
Laurent@1383:               </inputVariables>
Laurent@1383:               <inOutVariables/>
Laurent@1383:               <outputVariables/>
Laurent@1383:             </block>
andrej@1546:             <inVariable localId="13" height="27" width="111" executionOrderId="0" negated="false">
andrej@1546:               <position x="899" y="583"/>
Laurent@1383:               <connectionPointOut>
Laurent@1383:                 <relPosition x="111" y="13"/>
Laurent@1383:               </connectionPointOut>
Laurent@1383:               <expression>'ORANGE_OFF'</expression>
Laurent@1383:             </inVariable>
andrej@1546:             <inVariable localId="14" height="27" width="106" executionOrderId="0" negated="false">
andrej@1546:               <position x="904" y="620"/>
Laurent@1383:               <connectionPointOut>
Laurent@1383:                 <relPosition x="106" y="13"/>
Laurent@1383:               </connectionPointOut>
Laurent@1383:               <expression>'ORANGE_ON'</expression>
Laurent@1383:             </inVariable>
andrej@1546:             <block localId="15" width="115" height="133" typeName="Led" instanceName="GreenLight" executionOrderId="0">
andrej@1546:               <position x="1058" y="721"/>
Laurent@1383:               <inputVariables>
Laurent@1383:                 <variable formalParameter="back_id">
Laurent@1383:                   <connectionPointIn>
Laurent@1383:                     <relPosition x="0" y="38"/>
Laurent@1383:                     <connection refLocalId="16">
andrej@1546:                       <position x="1058" y="759"/>
andrej@1546:                       <position x="1010" y="759"/>
Laurent@1383:                     </connection>
Laurent@1383:                   </connectionPointIn>
Laurent@1383:                 </variable>
Laurent@1383:                 <variable formalParameter="sele_id">
Laurent@1383:                   <connectionPointIn>
Laurent@1383:                     <relPosition x="0" y="75"/>
Laurent@1383:                     <connection refLocalId="17">
andrej@1546:                       <position x="1058" y="796"/>
andrej@1546:                       <position x="1010" y="796"/>
Laurent@1383:                     </connection>
Laurent@1383:                   </connectionPointIn>
Laurent@1383:                 </variable>
Laurent@1383:                 <variable formalParameter="state_in">
Laurent@1383:                   <connectionPointIn>
Laurent@1383:                     <relPosition x="0" y="112"/>
Laurent@1383:                     <connection refLocalId="1" formalParameter="GREEN_LIGHT">
andrej@1546:                       <position x="1058" y="833"/>
andrej@1546:                       <position x="819" y="833"/>
Laurent@1383:                     </connection>
Laurent@1383:                   </connectionPointIn>
Laurent@1383:                 </variable>
Laurent@1383:               </inputVariables>
Laurent@1383:               <inOutVariables/>
Laurent@1383:               <outputVariables/>
Laurent@1383:             </block>
andrej@1546:             <inVariable localId="16" height="27" width="111" executionOrderId="0" negated="false">
andrej@1546:               <position x="899" y="746"/>
Laurent@1383:               <connectionPointOut>
Laurent@1383:                 <relPosition x="111" y="13"/>
Laurent@1383:               </connectionPointOut>
Laurent@1383:               <expression>'GREEN_OFF'</expression>
Laurent@1383:             </inVariable>
andrej@1546:             <inVariable localId="17" height="27" width="106" executionOrderId="0" negated="false">
andrej@1546:               <position x="904" y="783"/>
Laurent@1383:               <connectionPointOut>
Laurent@1383:                 <relPosition x="106" y="13"/>
Laurent@1383:               </connectionPointOut>
Laurent@1383:               <expression>'GREEN_ON'</expression>
Laurent@1383:             </inVariable>
andrej@1546:             <block localId="18" width="115" height="133" typeName="Led" instanceName="PedestrianRedLight" executionOrderId="0">
andrej@1546:               <position x="1059" y="884"/>
Laurent@1383:               <inputVariables>
Laurent@1383:                 <variable formalParameter="back_id">
Laurent@1383:                   <connectionPointIn>
Laurent@1383:                     <relPosition x="0" y="38"/>
Laurent@1383:                     <connection refLocalId="19">
andrej@1546:                       <position x="1059" y="922"/>
andrej@1546:                       <position x="1020" y="922"/>
Laurent@1383:                     </connection>
Laurent@1383:                   </connectionPointIn>
Laurent@1383:                 </variable>
Laurent@1383:                 <variable formalParameter="sele_id">
Laurent@1383:                   <connectionPointIn>
Laurent@1383:                     <relPosition x="0" y="75"/>
Laurent@1383:                     <connection refLocalId="20">
andrej@1546:                       <position x="1059" y="959"/>
andrej@1546:                       <position x="1020" y="959"/>
Laurent@1383:                     </connection>
Laurent@1383:                   </connectionPointIn>
Laurent@1383:                 </variable>
Laurent@1383:                 <variable formalParameter="state_in">
Laurent@1383:                   <connectionPointIn>
Laurent@1383:                     <relPosition x="0" y="112"/>
Laurent@1383:                     <connection refLocalId="1" formalParameter="PEDESTRIAN_RED_LIGHT">
andrej@1546:                       <position x="1059" y="996"/>
andrej@1546:                       <position x="819" y="996"/>
Laurent@1383:                     </connection>
Laurent@1383:                   </connectionPointIn>
Laurent@1383:                 </variable>
Laurent@1383:               </inputVariables>
Laurent@1383:               <inOutVariables/>
Laurent@1383:               <outputVariables/>
Laurent@1383:             </block>
andrej@1546:             <inVariable localId="19" height="27" width="171" executionOrderId="0" negated="false">
andrej@1546:               <position x="849" y="909"/>
Laurent@1383:               <connectionPointOut>
Laurent@1383:                 <relPosition x="171" y="13"/>
Laurent@1383:               </connectionPointOut>
Laurent@1383:               <expression>'PEDESTRIAN_RED_OFF'</expression>
Laurent@1383:             </inVariable>
andrej@1546:             <inVariable localId="20" height="27" width="166" executionOrderId="0" negated="false">
andrej@1546:               <position x="854" y="946"/>
Laurent@1383:               <connectionPointOut>
Laurent@1383:                 <relPosition x="166" y="13"/>
Laurent@1383:               </connectionPointOut>
Laurent@1383:               <expression>'PEDESTRIAN_RED_ON'</expression>
Laurent@1383:             </inVariable>
andrej@1546:             <block localId="21" width="115" height="133" typeName="Led" instanceName="PedestrianGreenLight" executionOrderId="0">
andrej@1546:               <position x="1059" y="1047"/>
Laurent@1383:               <inputVariables>
Laurent@1383:                 <variable formalParameter="back_id">
Laurent@1383:                   <connectionPointIn>
Laurent@1383:                     <relPosition x="0" y="38"/>
Laurent@1383:                     <connection refLocalId="22">
andrej@1546:                       <position x="1059" y="1085"/>
andrej@1546:                       <position x="1035" y="1085"/>
Laurent@1383:                     </connection>
Laurent@1383:                   </connectionPointIn>
Laurent@1383:                 </variable>
Laurent@1383:                 <variable formalParameter="sele_id">
Laurent@1383:                   <connectionPointIn>
Laurent@1383:                     <relPosition x="0" y="75"/>
Laurent@1383:                     <connection refLocalId="23">
andrej@1546:                       <position x="1059" y="1122"/>
andrej@1546:                       <position x="1035" y="1122"/>
Laurent@1383:                     </connection>
Laurent@1383:                   </connectionPointIn>
Laurent@1383:                 </variable>
Laurent@1383:                 <variable formalParameter="state_in">
Laurent@1383:                   <connectionPointIn>
Laurent@1383:                     <relPosition x="0" y="112"/>
Laurent@1383:                     <connection refLocalId="1" formalParameter="PEDESTRIAN_GREEN_LIGHT">
andrej@1546:                       <position x="1059" y="1159"/>
andrej@1546:                       <position x="819" y="1159"/>
Laurent@1383:                     </connection>
Laurent@1383:                   </connectionPointIn>
Laurent@1383:                 </variable>
Laurent@1383:               </inputVariables>
Laurent@1383:               <inOutVariables/>
Laurent@1383:               <outputVariables/>
Laurent@1383:             </block>
andrej@1546:             <inVariable localId="22" height="27" width="190" executionOrderId="0" negated="false">
andrej@1546:               <position x="845" y="1072"/>
Laurent@1383:               <connectionPointOut>
Laurent@1383:                 <relPosition x="190" y="13"/>
Laurent@1383:               </connectionPointOut>
Laurent@1383:               <expression>'PEDESTRIAN_GREEN_OFF'</expression>
Laurent@1383:             </inVariable>
andrej@1546:             <inVariable localId="23" height="27" width="185" executionOrderId="0" negated="false">
andrej@1546:               <position x="850" y="1109"/>
Laurent@1383:               <connectionPointOut>
Laurent@1383:                 <relPosition x="185" y="13"/>
Laurent@1383:               </connectionPointOut>
Laurent@1383:               <expression>'PEDESTRIAN_GREEN_ON'</expression>
Laurent@1383:             </inVariable>
andrej@1546:             <comment localId="24" height="262" width="804">
andrej@1546:               <position x="22" y="13"/>
andrej@1546:               <content>
andrej@1546:                 <xhtml:p><![CDATA[This example implements control of traffic lights.
andrej@1546: 
andrej@1546: Basically it shows following features of Beremiz:
andrej@1546: - web interface (SCADA) using integrated web server in svgui extension;
andrej@1546: - interaction with web UI;
andrej@1546: - functional blocks in SFC language.
andrej@1546: 
andrej@1546: 
andrej@1546: 
andrej@1546: 
andrej@1546: 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!!!
andrej@1546: 
andrej@1546: As the program is running in PLC, web UI will be available at http://localhost:8009/.
andrej@1546: 
andrej@1546: Web interface is build as SVG file in Inkscape. To edit SVG file click 'Inkscape' button in 0x: svgui extension. 
andrej@1546: Inkscape is a free and open-source vector graphics editor. It's not part of Beremiz and needs to be installed separately.
andrej@1546: ]]></xhtml:p>
andrej@1546:               </content>
andrej@1546:             </comment>
andrej@1546:             <comment localId="102" height="126" width="411">
andrej@1546:               <position x="20" y="319"/>
andrej@1546:               <content>
andrej@1546:                 <xhtml:p><![CDATA[In this example FB like 'Button', 'Led' and 'Text' are used. 
andrej@1546: Back_id and sele_id inputs of these blocks are IDs  of 
andrej@1546: graphic primitives in SVG file. 
andrej@1546: This is the way how elements in SVG are bound to elements 
andrej@1546: in PLC program.  You can find out or edit these IDs in Inkscape.]]></xhtml:p>
andrej@1546:               </content>
andrej@1546:             </comment>
Laurent@1383:           </FBD>
Laurent@1383:         </body>
Laurent@1383:       </pou>
Laurent@1383:     </pous>
Laurent@1383:   </types>
Laurent@1383:   <instances>
Laurent@1383:     <configurations>
Laurent@1383:       <configuration name="config">
Laurent@1383:         <resource name="resource1">
Laurent@1383:           <task name="test_task" interval="T#100ms" priority="0">
Laurent@1383:             <pouInstance name="main_instance" typeName="main_program"/>
Laurent@1383:           </task>
Laurent@1383:         </resource>
Laurent@1383:       </configuration>
Laurent@1383:     </configurations>
Laurent@1383:   </instances>
Laurent@1383: </project>