andrej@1545: <?xml version='1.0' encoding='utf-8'?> andrej@1545: <project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.plcopen.org/xml/tc6_0201" xmlns:xhtml="http://www.w3.org/1999/xhtml" xsi:schemaLocation="http://www.plcopen.org/xml/tc6_0201"> andrej@1545: <fileHeader companyName="beremiz" productName="Beremiz" productVersion="0.0" creationDateTime="2008-12-14T16:21:19"/> andrej@1547: <contentHeader name="Beremiz SVGUI Test" modificationDateTime="2016-10-20T12:38:31"> laurent@411: <coordinateInfo> laurent@411: <pageSize x="1024" y="1024"/> laurent@411: <fbd> laurent@411: <scaling x="0" y="0"/> laurent@411: </fbd> laurent@411: <ld> laurent@411: <scaling x="5" y="5"/> laurent@411: </ld> laurent@411: <sfc> laurent@411: <scaling x="5" y="5"/> laurent@411: </sfc> laurent@411: </coordinateInfo> laurent@411: </contentHeader> laurent@411: <types> laurent@411: <dataTypes/> laurent@411: <pous> laurent@411: <pou name="main_pytest" pouType="program"> laurent@411: <interface> laurent@411: <localVars> laurent@411: <variable name="counter"> laurent@411: <type> laurent@411: <INT/> laurent@411: </type> laurent@411: </variable> laurent@411: <variable name="Start_Stop"> laurent@411: <type> laurent@411: <derived name="Button"/> laurent@411: </type> laurent@411: </variable> andrej@1545: <variable name="Counter_TextCtrl"> laurent@411: <type> laurent@411: <derived name="TextCtrl"/> laurent@411: </type> laurent@411: </variable> andrej@1545: <variable name="State_LedCtrl"> laurent@411: <type> laurent@411: <derived name="Led"/> laurent@411: </type> laurent@411: </variable> laurent@411: </localVars> laurent@411: </interface> laurent@411: <body> laurent@411: <FBD> andrej@1545: <block localId="32" width="80" height="110" typeName="ADD" executionOrderId="0"> andrej@1545: <position x="649" y="241"/> laurent@411: <inputVariables> laurent@411: <variable formalParameter="EN"> laurent@411: <connectionPointIn> laurent@411: <relPosition x="0" y="35"/> laurent@411: <connection refLocalId="5"> andrej@1545: <position x="649" y="276"/> andrej@1545: <position x="594" y="276"/> laurent@411: </connection> laurent@411: </connectionPointIn> laurent@411: </variable> laurent@411: <variable formalParameter="IN1"> laurent@411: <connectionPointIn> laurent@411: <relPosition x="0" y="65"/> laurent@411: <connection refLocalId="100" formalParameter="OUT"> andrej@1545: <position x="649" y="306"/> andrej@1545: <position x="474" y="306"/> laurent@411: </connection> laurent@411: </connectionPointIn> laurent@411: </variable> laurent@411: <variable formalParameter="IN2"> laurent@411: <connectionPointIn> laurent@411: <relPosition x="0" y="95"/> laurent@411: <connection refLocalId="33"> andrej@1545: <position x="649" y="336"/> andrej@1545: <position x="629" y="336"/> andrej@1545: <position x="629" y="374"/> andrej@1545: <position x="854" y="374"/> andrej@1545: <position x="854" y="306"/> andrej@1545: <position x="839" y="306"/> laurent@411: </connection> laurent@411: </connectionPointIn> laurent@411: </variable> laurent@411: </inputVariables> laurent@411: <inOutVariables/> laurent@411: <outputVariables> laurent@411: <variable formalParameter="ENO"> laurent@411: <connectionPointOut> laurent@411: <relPosition x="80" y="35"/> laurent@411: </connectionPointOut> laurent@411: </variable> laurent@411: <variable formalParameter="OUT"> laurent@411: <connectionPointOut> laurent@411: <relPosition x="80" y="65"/> laurent@411: </connectionPointOut> laurent@411: </variable> laurent@411: </outputVariables> laurent@411: </block> andrej@1545: <inOutVariable localId="33" height="35" width="85" executionOrderId="0" negatedOut="false" negatedIn="false"> andrej@1545: <position x="754" y="289"/> laurent@411: <connectionPointIn> andrej@1545: <relPosition x="0" y="17"/> laurent@411: <connection refLocalId="32" formalParameter="OUT"> andrej@1545: <position x="754" y="306"/> andrej@1545: <position x="729" y="306"/> laurent@411: </connection> laurent@411: </connectionPointIn> laurent@411: <connectionPointOut> andrej@1545: <relPosition x="85" y="17"/> laurent@411: </connectionPointOut> laurent@411: <expression>counter</expression> laurent@411: </inOutVariable> andrej@1545: <inVariable localId="39" height="35" width="89" executionOrderId="0" negated="false"> andrej@1545: <position x="55" y="289"/> andrej@1545: <connectionPointOut> andrej@1545: <relPosition x="89" y="17"/> laurent@411: </connectionPointOut> laurent@411: <expression>BOOL#1</expression> laurent@411: </inVariable> andrej@1545: <inVariable localId="41" height="30" width="120" executionOrderId="0" negated="false"> andrej@1545: <position x="21" y="575"/> laurent@411: <connectionPointOut> laurent@411: <relPosition x="120" y="15"/> laurent@411: </connectionPointOut> laurent@411: <expression>'stop_back'</expression> laurent@411: </inVariable> andrej@1545: <inVariable localId="42" height="30" width="120" executionOrderId="0" negated="false"> andrej@1545: <position x="21" y="617"/> laurent@411: <connectionPointOut> laurent@411: <relPosition x="120" y="15"/> laurent@411: </connectionPointOut> laurent@411: <expression>'stop_sele'</expression> laurent@411: </inVariable> andrej@1545: <inVariable localId="46" height="30" width="121" executionOrderId="0" negated="false"> andrej@1545: <position x="694" y="755"/> andrej@1545: <connectionPointOut> andrej@1545: <relPosition x="121" y="15"/> andrej@1545: </connectionPointOut> andrej@1545: <expression>'text_counter'</expression> andrej@1545: </inVariable> andrej@1545: <inVariable localId="51" height="30" width="119" executionOrderId="0" negated="false"> andrej@1545: <position x="692" y="568"/> andrej@1545: <connectionPointOut> andrej@1545: <relPosition x="119" y="15"/> laurent@411: </connectionPointOut> laurent@411: <expression>'led_stop'</expression> laurent@411: </inVariable> andrej@1545: <inVariable localId="52" height="30" width="120" executionOrderId="0" negated="false"> andrej@1545: <position x="691" y="604"/> laurent@411: <connectionPointOut> laurent@411: <relPosition x="120" y="15"/> laurent@411: </connectionPointOut> laurent@411: <expression>'led_start'</expression> laurent@411: </inVariable> andrej@1545: <block localId="83" width="145" height="60" typeName="INT_TO_STRING" executionOrderId="0"> andrej@1545: <position x="537" y="812"/> laurent@411: <inputVariables> laurent@411: <variable formalParameter="IN"> laurent@411: <connectionPointIn> laurent@411: <relPosition x="0" y="40"/> laurent@411: <connection refLocalId="4"> andrej@1545: <position x="537" y="852"/> andrej@1545: <position x="504" y="852"/> laurent@411: </connection> laurent@411: </connectionPointIn> laurent@411: </variable> laurent@411: </inputVariables> laurent@411: <inOutVariables/> laurent@411: <outputVariables> laurent@411: <variable formalParameter="OUT"> laurent@411: <connectionPointOut> laurent@411: <relPosition x="145" y="40"/> laurent@411: </connectionPointOut> laurent@411: </variable> laurent@411: </outputVariables> laurent@411: </block> andrej@1545: <block localId="92" width="187" height="230" typeName="Button" instanceName="Start_Stop" executionOrderId="0"> andrej@1545: <position x="201" y="549"/> laurent@411: <inputVariables> laurent@411: <variable formalParameter="back_id"> laurent@411: <connectionPointIn> andrej@1545: <relPosition x="0" y="41"/> laurent@411: <connection refLocalId="41"> andrej@1545: <position x="201" y="590"/> andrej@1545: <position x="141" y="590"/> laurent@411: </connection> laurent@411: </connectionPointIn> laurent@411: </variable> laurent@411: <variable formalParameter="sele_id"> laurent@411: <connectionPointIn> andrej@1545: <relPosition x="0" y="83"/> laurent@411: <connection refLocalId="42"> andrej@1545: <position x="201" y="632"/> andrej@1545: <position x="141" y="632"/> laurent@411: </connection> laurent@411: </connectionPointIn> laurent@411: </variable> laurent@411: <variable formalParameter="toggle"> laurent@411: <connectionPointIn> laurent@411: <relPosition x="0" y="125"/> laurent@411: <connection refLocalId="93"> andrej@1545: <position x="201" y="674"/> andrej@1545: <position x="141" y="674"/> laurent@411: </connection> laurent@411: </connectionPointIn> laurent@411: </variable> laurent@411: <variable formalParameter="set_state"> laurent@411: <connectionPointIn> andrej@1545: <relPosition x="0" y="167"/> laurent@411: </connectionPointIn> laurent@411: </variable> laurent@411: <variable formalParameter="state_in"> laurent@411: <connectionPointIn> andrej@1545: <relPosition x="0" y="209"/> laurent@411: </connectionPointIn> laurent@411: </variable> laurent@411: </inputVariables> laurent@411: <inOutVariables/> laurent@411: <outputVariables> laurent@411: <variable formalParameter="state_out"> laurent@411: <connectionPointOut> andrej@1545: <relPosition x="187" y="41"/> andrej@1545: </connectionPointOut> andrej@1545: </variable> andrej@1545: </outputVariables> andrej@1545: </block> andrej@1545: <inVariable localId="93" height="30" width="120" executionOrderId="0" negated="false"> andrej@1545: <position x="21" y="659"/> andrej@1545: <connectionPointOut> andrej@1545: <relPosition x="120" y="15"/> laurent@411: </connectionPointOut> laurent@411: <expression>BOOL#1</expression> laurent@411: </inVariable> andrej@1545: <block localId="94" width="100" height="145" typeName="TextCtrl" instanceName="Counter_TextCtrl" executionOrderId="0"> andrej@1545: <position x="876" y="730"/> laurent@411: <inputVariables> laurent@411: <variable formalParameter="back_id"> laurent@411: <connectionPointIn> laurent@411: <relPosition x="0" y="40"/> laurent@411: <connection refLocalId="46"> andrej@1545: <position x="876" y="770"/> andrej@1545: <position x="815" y="770"/> laurent@411: </connection> laurent@411: </connectionPointIn> laurent@411: </variable> laurent@411: <variable formalParameter="set_text"> laurent@411: <connectionPointIn> andrej@1545: <relPosition x="0" y="81"/> laurent@411: <connection refLocalId="3"> andrej@1545: <position x="876" y="811"/> andrej@1545: <position x="815" y="811"/> laurent@411: </connection> laurent@411: </connectionPointIn> laurent@411: </variable> laurent@411: <variable formalParameter="text"> laurent@411: <connectionPointIn> andrej@1545: <relPosition x="0" y="122"/> laurent@411: <connection refLocalId="83" formalParameter="OUT"> andrej@1545: <position x="876" y="852"/> andrej@1545: <position x="682" y="852"/> laurent@411: </connection> laurent@411: </connectionPointIn> laurent@411: </variable> laurent@411: </inputVariables> laurent@411: <inOutVariables/> laurent@411: <outputVariables/> laurent@411: </block> andrej@1545: <inVariable localId="1" height="30" width="88" executionOrderId="0" negated="false"> andrej@1545: <position x="59" y="220"/> andrej@1545: <connectionPointOut> andrej@1545: <relPosition x="88" y="15"/> laurent@411: </connectionPointOut> laurent@411: <expression>BOOL#1</expression> laurent@411: </inVariable> andrej@1545: <block localId="95" width="100" height="130" typeName="Led" instanceName="State_LedCtrl" executionOrderId="0"> andrej@1545: <position x="876" y="545"/> laurent@411: <inputVariables> laurent@411: <variable formalParameter="back_id"> laurent@411: <connectionPointIn> andrej@1545: <relPosition x="0" y="38"/> laurent@411: <connection refLocalId="51"> andrej@1545: <position x="876" y="583"/> andrej@1545: <position x="811" y="583"/> laurent@411: </connection> laurent@411: </connectionPointIn> laurent@411: </variable> laurent@411: <variable formalParameter="sele_id"> laurent@411: <connectionPointIn> andrej@1545: <relPosition x="0" y="74"/> laurent@411: <connection refLocalId="52"> andrej@1545: <position x="876" y="619"/> andrej@1545: <position x="811" y="619"/> laurent@411: </connection> laurent@411: </connectionPointIn> laurent@411: </variable> laurent@411: <variable formalParameter="state_in"> laurent@411: <connectionPointIn> laurent@411: <relPosition x="0" y="110"/> laurent@411: <connection refLocalId="2"> andrej@1545: <position x="876" y="655"/> andrej@1545: <position x="811" y="655"/> laurent@411: </connection> laurent@411: </connectionPointIn> laurent@411: </variable> laurent@411: </inputVariables> laurent@411: <inOutVariables/> laurent@411: <outputVariables/> laurent@411: </block> andrej@1545: <block localId="96" width="80" height="65" typeName="AND" executionOrderId="0"> andrej@1545: <position x="200" y="182"/> laurent@411: <inputVariables> laurent@411: <variable formalParameter="IN1" negated="true"> laurent@411: <connectionPointIn> andrej@1545: <relPosition x="0" y="31"/> laurent@411: <connection refLocalId="96" formalParameter="OUT"> andrej@1545: <position x="200" y="213"/> andrej@1545: <position x="175" y="213"/> andrej@1545: <position x="175" y="167"/> andrej@1545: <position x="305" y="167"/> andrej@1545: <position x="305" y="213"/> andrej@1545: <position x="280" y="213"/> laurent@411: </connection> laurent@411: </connectionPointIn> laurent@411: </variable> laurent@411: <variable formalParameter="IN2"> laurent@411: <connectionPointIn> andrej@1545: <relPosition x="0" y="53"/> laurent@411: <connection refLocalId="1"> andrej@1545: <position x="200" y="235"/> andrej@1545: <position x="147" y="235"/> laurent@411: </connection> laurent@411: </connectionPointIn> laurent@411: </variable> laurent@411: </inputVariables> laurent@411: <inOutVariables/> laurent@411: <outputVariables> laurent@411: <variable formalParameter="OUT"> laurent@411: <connectionPointOut> andrej@1545: <relPosition x="80" y="31"/> laurent@411: </connectionPointOut> laurent@411: </variable> laurent@411: </outputVariables> laurent@411: </block> laurent@411: <connector name="CLOCK" localId="97" height="30" width="90"> andrej@1545: <position x="345" y="198"/> laurent@411: <connectionPointIn> laurent@411: <relPosition x="0" y="15"/> laurent@411: <connection refLocalId="96" formalParameter="OUT"> andrej@1545: <position x="345" y="213"/> andrej@1545: <position x="280" y="213"/> laurent@411: </connection> laurent@411: </connectionPointIn> laurent@411: </connector> laurent@411: <connector name="COUNT" localId="98" height="30" width="90"> andrej@1545: <position x="461" y="575"/> laurent@411: <connectionPointIn> laurent@411: <relPosition x="0" y="15"/> laurent@411: <connection refLocalId="92" formalParameter="state_out"> andrej@1545: <position x="461" y="590"/> andrej@1545: <position x="388" y="590"/> laurent@411: </connection> laurent@411: </connectionPointIn> laurent@411: </connector> andrej@1545: <continuation name="COUNT" localId="2" height="30" width="120"> andrej@1545: <position x="691" y="640"/> andrej@1545: <connectionPointOut> andrej@1545: <relPosition x="120" y="15"/> andrej@1545: </connectionPointOut> andrej@1545: </continuation> andrej@1545: <inVariable localId="4" height="35" width="85" executionOrderId="0" negated="false"> andrej@1545: <position x="419" y="835"/> andrej@1545: <connectionPointOut> andrej@1545: <relPosition x="85" y="17"/> andrej@1545: </connectionPointOut> andrej@1545: <expression>counter</expression> andrej@1545: </inVariable> andrej@1545: <continuation name="COUNT" localId="5" height="30" width="90"> andrej@1545: <position x="504" y="261"/> laurent@411: <connectionPointOut> laurent@411: <relPosition x="90" y="15"/> laurent@411: </connectionPointOut> laurent@411: </continuation> andrej@1545: <block localId="99" width="80" height="110" typeName="AND" executionOrderId="0"> andrej@1545: <position x="199" y="264"/> andrej@1545: <inputVariables> andrej@1545: <variable formalParameter="IN1"> andrej@1545: <connectionPointIn> andrej@1545: <relPosition x="0" y="42"/> andrej@1545: <connection refLocalId="39"> andrej@1545: <position x="199" y="306"/> andrej@1545: <position x="144" y="306"/> andrej@1545: </connection> andrej@1545: </connectionPointIn> andrej@1545: </variable> andrej@1545: <variable formalParameter="IN2"> andrej@1545: <connectionPointIn> andrej@1545: <relPosition x="0" y="87"/> andrej@1545: <connection refLocalId="6"> andrej@1545: <position x="199" y="351"/> andrej@1545: <position x="144" y="351"/> andrej@1545: </connection> andrej@1545: </connectionPointIn> andrej@1545: </variable> andrej@1545: </inputVariables> andrej@1545: <inOutVariables/> andrej@1545: <outputVariables> andrej@1545: <variable formalParameter="OUT"> andrej@1545: <connectionPointOut> andrej@1545: <relPosition x="80" y="42"/> andrej@1545: </connectionPointOut> andrej@1545: </variable> andrej@1545: </outputVariables> andrej@1545: </block> andrej@1545: <continuation name="CLOCK" localId="6" height="30" width="90"> andrej@1545: <position x="54" y="336"/> laurent@411: <connectionPointOut> laurent@411: <relPosition x="90" y="15"/> laurent@411: </connectionPointOut> laurent@411: </continuation> andrej@1545: <block localId="100" width="125" height="45" typeName="BOOL_TO_INT" executionOrderId="0"> andrej@1545: <position x="349" y="274"/> andrej@1545: <inputVariables> andrej@1545: <variable formalParameter="IN"> andrej@1545: <connectionPointIn> andrej@1545: <relPosition x="0" y="32"/> andrej@1545: <connection refLocalId="99" formalParameter="OUT"> andrej@1545: <position x="349" y="306"/> andrej@1545: <position x="279" y="306"/> laurent@411: </connection> laurent@411: </connectionPointIn> laurent@411: </variable> laurent@411: </inputVariables> laurent@411: <inOutVariables/> laurent@411: <outputVariables> laurent@411: <variable formalParameter="OUT"> laurent@411: <connectionPointOut> andrej@1545: <relPosition x="125" y="32"/> andrej@1545: </connectionPointOut> andrej@1545: </variable> andrej@1545: </outputVariables> andrej@1545: </block> andrej@1545: <continuation name="CLOCK" localId="3" height="30" width="122"> andrej@1545: <position x="693" y="796"/> andrej@1545: <connectionPointOut> andrej@1545: <relPosition x="122" y="15"/> laurent@411: </connectionPointOut> laurent@411: </continuation> andrej@1547: <comment localId="101" height="152" width="816"> andrej@1545: <position x="27" y="8"/> andrej@1545: <content> andrej@1545: <xhtml:p><![CDATA[This example shows how IEC program in PLC can interact with web interface. andrej@1545: andrej@1545: 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@1545: andrej@1545: As the program is running in PLC, web UI will be available at http://localhost:8009/. andrej@1545: andrej@1545: andrej@1545: Web interface is build as SVG file in Inkscape. To edit SVG file click 'Inkscape' button in 0x: svgui extension. andrej@1545: Inkscape is a free and open-source vector graphics editor. It's not part of Beremiz and needs to be installed separately. andrej@1545: ]]></xhtml:p> andrej@1545: </content> andrej@1545: </comment> andrej@1545: <comment localId="102" height="101" width="544"> andrej@1545: <position x="17" y="409"/> andrej@1545: <content> andrej@1545: <xhtml:p><![CDATA[In this example basic elements like 'Button', 'Led' and 'Text' are used. andrej@1545: Back_id and sele_id inputs of these blocks are IDs of graphic primitives in SVG file. andrej@1545: This is the way how elements in SVG are bound to elements in PLC program. andrej@1545: You can find out or edit these IDs in Inkscape.]]></xhtml:p> andrej@1545: </content> andrej@1545: </comment> laurent@411: </FBD> laurent@411: </body> laurent@411: </pou> laurent@411: </pous> laurent@411: </types> laurent@411: <instances> laurent@411: <configurations> Edouard@1454: <configuration name="config"> laurent@411: <resource name="res_pytest"> laurent@411: <task name="pytest_task" interval="t#100ms" priority="0"/> laurent@411: <pouInstance name="pytest_instance" typeName="main_pytest"/> laurent@411: </resource> laurent@411: </configuration> laurent@411: </configurations> laurent@411: </instances> laurent@411: </project>