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@2346: <contentHeader name="Beremiz SVGUI Test" modificationDateTime="2018-09-26T13:18:53"> 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@2346: <position x="649" y="285"/> laurent@411: <inputVariables> laurent@411: <variable formalParameter="EN"> laurent@411: <connectionPointIn> laurent@411: <relPosition x="0" y="35"/> laurent@411: <connection refLocalId="5"> andrej@2346: <position x="649" y="320"/> andrej@2346: <position x="594" y="320"/> 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@2346: <position x="649" y="350"/> andrej@2346: <position x="474" y="350"/> 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@2346: <position x="649" y="380"/> andrej@2346: <position x="629" y="380"/> andrej@2346: <position x="629" y="418"/> andrej@2346: <position x="854" y="418"/> andrej@2346: <position x="854" y="350"/> andrej@2346: <position x="839" y="350"/> 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@2346: <position x="754" y="333"/> laurent@411: <connectionPointIn> andrej@1545: <relPosition x="0" y="17"/> laurent@411: <connection refLocalId="32" formalParameter="OUT"> andrej@2346: <position x="754" y="350"/> andrej@2346: <position x="729" y="350"/> 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@2346: <position x="55" y="333"/> 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@2346: <position x="21" y="619"/> 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@2346: <position x="21" y="661"/> laurent@411: <connectionPointOut> laurent@411: <relPosition x="120" y="15"/> laurent@411: </connectionPointOut> laurent@411: <expression>'stop_sele'</expression> laurent@411: </inVariable> andrej@2346: <inVariable localId="46" height="30" width="122" executionOrderId="0" negated="false"> andrej@2346: <position x="694" y="799"/> andrej@2346: <connectionPointOut> andrej@2346: <relPosition x="122" 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@2346: <position x="692" y="612"/> 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@2346: <position x="691" y="648"/> 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@2346: <position x="537" y="856"/> laurent@411: <inputVariables> laurent@411: <variable formalParameter="IN"> laurent@411: <connectionPointIn> laurent@411: <relPosition x="0" y="40"/> laurent@411: <connection refLocalId="4"> andrej@2346: <position x="537" y="896"/> andrej@2346: <position x="504" y="896"/> 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@2346: <position x="201" y="593"/> 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@2346: <position x="201" y="634"/> andrej@2346: <position x="141" y="634"/> 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@2346: <position x="201" y="676"/> andrej@2346: <position x="141" y="676"/> 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@2346: <position x="201" y="718"/> andrej@2346: <position x="141" y="718"/> 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@2346: <position x="21" y="703"/> 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@2346: <position x="876" y="774"/> 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@2346: <position x="876" y="814"/> andrej@2346: <position x="816" y="814"/> 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@2346: <position x="876" y="855"/> andrej@2346: <position x="815" y="855"/> 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@2346: <position x="876" y="896"/> andrej@2346: <position x="682" y="896"/> 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@2346: <position x="59" y="272"/> 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@2346: <position x="876" y="589"/> 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@2346: <position x="876" y="627"/> andrej@2346: <position x="811" y="627"/> 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@2346: <position x="876" y="663"/> andrej@2346: <position x="811" y="663"/> 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@2346: <position x="876" y="699"/> andrej@2346: <position x="811" y="699"/> 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@2346: <position x="200" y="234"/> 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@2346: <position x="200" y="265"/> andrej@2346: <position x="175" y="265"/> andrej@2346: <position x="175" y="219"/> andrej@2346: <position x="305" y="219"/> andrej@2346: <position x="305" y="265"/> andrej@2346: <position x="280" y="265"/> 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@2346: <position x="200" y="287"/> andrej@2346: <position x="147" y="287"/> 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@2346: <position x="345" y="250"/> laurent@411: <connectionPointIn> laurent@411: <relPosition x="0" y="15"/> laurent@411: <connection refLocalId="96" formalParameter="OUT"> andrej@2346: <position x="345" y="265"/> andrej@2346: <position x="280" y="265"/> laurent@411: </connection> laurent@411: </connectionPointIn> laurent@411: </connector> laurent@411: <connector name="COUNT" localId="98" height="30" width="90"> andrej@2346: <position x="461" y="619"/> laurent@411: <connectionPointIn> laurent@411: <relPosition x="0" y="15"/> laurent@411: <connection refLocalId="92" formalParameter="state_out"> andrej@2346: <position x="461" y="634"/> andrej@2346: <position x="388" y="634"/> laurent@411: </connection> laurent@411: </connectionPointIn> laurent@411: </connector> andrej@1545: <continuation name="COUNT" localId="2" height="30" width="120"> andrej@2346: <position x="691" y="684"/> 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@2346: <position x="419" y="879"/> 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@2346: <position x="504" y="305"/> 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@2346: <position x="199" y="308"/> andrej@1545: <inputVariables> andrej@1545: <variable formalParameter="IN1"> andrej@1545: <connectionPointIn> andrej@1545: <relPosition x="0" y="42"/> andrej@1545: <connection refLocalId="39"> andrej@2346: <position x="199" y="350"/> andrej@2346: <position x="144" y="350"/> 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@2346: <position x="199" y="395"/> andrej@2346: <position x="144" y="395"/> 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@2346: <position x="54" y="380"/> 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@2346: <position x="349" y="318"/> 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@2346: <position x="349" y="350"/> andrej@2346: <position x="279" y="350"/> 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@2346: <position x="693" y="840"/> andrej@1545: <connectionPointOut> andrej@1545: <relPosition x="122" y="15"/> laurent@411: </connectionPointOut> laurent@411: </continuation> andrej@2346: <comment localId="101" height="197" width="1001"> andrej@2346: <position x="11" y="12"/> 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@2296: <comment localId="102" height="126" width="641"> andrej@2346: <position x="17" y="441"/> 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>