--- a/tests/svgui/plc.xml Tue Oct 18 17:44:08 2016 +0300
+++ b/tests/svgui/plc.xml Wed Oct 19 16:32:10 2016 +0300
@@ -1,14 +1,7 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns="http://www.plcopen.org/xml/tc6.xsd"
- xmlns:xhtml="http://www.w3.org/1999/xhtml"
- xsi:schemaLocation="http://www.plcopen.org/xml/tc6.xsd">
- <fileHeader companyName="beremiz"
- creationDateTime="2008-12-14T16:21:19"/>
- <contentHeader name="Beremiz Python Support Tests"
- modificationDateTime="2009-09-26T18:14:56">
+<?xml version='1.0' encoding='utf-8'?> +<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"> + <fileHeader companyName="beremiz" productName="Beremiz" productVersion="0.0" creationDateTime="2008-12-14T16:21:19"/> + <contentHeader name="Beremiz SVGUI Test" modificationDateTime="2016-10-19T14:46:29"> <pageSize x="1024" y="1024"/>
@@ -33,57 +26,17 @@
- <variable name="DigitalBit0">
- <variable name="DigitalBit1">
- <variable name="DigitalBit2">
- <variable name="DigitalBit3">
- <variable name="DigitalBit4">
- <variable name="DigitalBit5">
- <variable name="DigitalBit6">
- <variable name="DigitalBit7">
<variable name="Start_Stop">
- <variable name="Compteur">
+ <variable name="Counter_TextCtrl"> <derived name="TextCtrl"/>
- <variable name="Temoin">
+ <variable name="State_LedCtrl"> @@ -92,15 +45,15 @@
- <block localId="32" width="80" height="110" typeName="ADD">
- <position x="665" y="420"/>
+ <block localId="32" width="80" height="110" typeName="ADD" executionOrderId="0"> + <position x="649" y="241"/> <variable formalParameter="EN">
<relPosition x="0" y="35"/>
<connection refLocalId="5">
- <position x="665" y="455"/>
- <position x="610" y="455"/>
+ <position x="649" y="276"/> + <position x="594" y="276"/> @@ -108,8 +61,8 @@
<relPosition x="0" y="65"/>
<connection refLocalId="100" formalParameter="OUT">
- <position x="665" y="485"/>
- <position x="490" y="485"/>
+ <position x="649" y="306"/> + <position x="474" y="306"/> @@ -117,12 +70,12 @@
<relPosition x="0" y="95"/>
<connection refLocalId="33">
- <position x="665" y="515"/>
- <position x="645" y="515"/>
- <position x="645" y="555"/>
- <position x="870" y="555"/>
- <position x="870" y="485"/>
- <position x="855" y="485"/>
+ <position x="649" y="336"/> + <position x="629" y="336"/> + <position x="629" y="374"/> + <position x="854" y="374"/> + <position x="854" y="306"/> + <position x="839" y="306"/> @@ -141,71 +94,71 @@
- <inOutVariable localId="33" height="35" width="85">
- <position x="770" y="470"/>
+ <inOutVariable localId="33" height="35" width="85" executionOrderId="0" negatedOut="false" negatedIn="false"> + <position x="754" y="289"/> - <relPosition x="0" y="15"/>
+ <relPosition x="0" y="17"/> <connection refLocalId="32" formalParameter="OUT">
- <position x="770" y="485"/>
- <position x="745" y="485"/>
+ <position x="754" y="306"/> + <position x="729" y="306"/> - <relPosition x="85" y="15"/>
+ <relPosition x="85" y="17"/> <expression>counter</expression>
- <inVariable localId="39" height="35" width="70">
- <position x="90" y="470"/>
+ <inVariable localId="39" height="35" width="89" executionOrderId="0" negated="false"> + <position x="55" y="289"/> - <relPosition x="70" y="15"/>
+ <relPosition x="89" y="17"/> <expression>BOOL#1</expression>
- <inVariable localId="41" height="30" width="120">
- <position x="45" y="180"/>
+ <inVariable localId="41" height="30" width="120" executionOrderId="0" negated="false"> + <position x="21" y="575"/> <relPosition x="120" y="15"/>
<expression>'stop_back'</expression>
- <inVariable localId="42" height="30" width="120">
- <position x="45" y="225"/>
+ <inVariable localId="42" height="30" width="120" executionOrderId="0" negated="false"> + <position x="21" y="617"/> <relPosition x="120" y="15"/>
<expression>'stop_sele'</expression>
- <inVariable localId="46" height="30" width="180">
- <position x="675" y="265"/>
+ <inVariable localId="46" height="30" width="121" executionOrderId="0" negated="false"> + <position x="694" y="755"/> - <relPosition x="180" y="15"/>
+ <relPosition x="121" y="15"/> - <expression>'text_compteur'</expression>
+ <expression>'text_counter'</expression> - <inVariable localId="51" height="30" width="110">
- <position x="725" y="80"/>
+ <inVariable localId="51" height="30" width="119" executionOrderId="0" negated="false"> + <position x="692" y="568"/> - <relPosition x="110" y="15"/>
+ <relPosition x="119" y="15"/> <expression>'led_stop'</expression>
- <inVariable localId="52" height="30" width="120">
- <position x="715" y="115"/>
+ <inVariable localId="52" height="30" width="120" executionOrderId="0" negated="false"> + <position x="691" y="604"/> <relPosition x="120" y="15"/>
<expression>'led_start'</expression>
- <block localId="83" width="145" height="60" typeName="INT_TO_STRING">
- <position x="600" y="320"/>
+ <block localId="83" width="145" height="60" typeName="INT_TO_STRING" executionOrderId="0"> + <position x="537" y="812"/> <variable formalParameter="IN">
<relPosition x="0" y="40"/>
<connection refLocalId="4">
- <position x="600" y="360"/>
- <position x="555" y="360"/>
+ <position x="537" y="852"/> + <position x="504" y="852"/> @@ -219,24 +172,24 @@
- <block localId="92" width="200" height="230" typeName="Button" instanceName="Start_Stop">
- <position x="225" y="155"/>
+ <block localId="92" width="187" height="230" typeName="Button" instanceName="Start_Stop" executionOrderId="0"> + <position x="201" y="549"/> <variable formalParameter="back_id">
- <relPosition x="0" y="40"/>
+ <relPosition x="0" y="41"/> <connection refLocalId="41">
- <position x="225" y="195"/>
- <position x="165" y="195"/>
+ <position x="201" y="590"/> + <position x="141" y="590"/> <variable formalParameter="sele_id">
- <relPosition x="0" y="85"/>
+ <relPosition x="0" y="83"/> <connection refLocalId="42">
- <position x="225" y="240"/>
- <position x="165" y="240"/>
+ <position x="201" y="632"/> + <position x="141" y="632"/> @@ -244,19 +197,19 @@
<relPosition x="0" y="125"/>
<connection refLocalId="93">
- <position x="225" y="280"/>
- <position x="165" y="280"/>
+ <position x="201" y="674"/> + <position x="141" y="674"/> <variable formalParameter="set_state">
- <relPosition x="0" y="165"/>
+ <relPosition x="0" y="167"/> <variable formalParameter="state_in">
- <relPosition x="0" y="210"/>
+ <relPosition x="0" y="209"/> @@ -264,45 +217,45 @@
<variable formalParameter="state_out">
- <relPosition x="200" y="40"/>
+ <relPosition x="187" y="41"/> - <inVariable localId="93" height="30" width="70">
- <position x="95" y="265"/>
+ <inVariable localId="93" height="30" width="120" executionOrderId="0" negated="false"> + <position x="21" y="659"/> - <relPosition x="70" y="15"/>
+ <relPosition x="120" y="15"/> <expression>BOOL#1</expression>
- <block localId="94" width="100" height="145" typeName="TextCtrl" instanceName="Compteur">
- <position x="900" y="240"/>
+ <block localId="94" width="100" height="145" typeName="TextCtrl" instanceName="Counter_TextCtrl" executionOrderId="0"> + <position x="876" y="730"/> <variable formalParameter="back_id">
<relPosition x="0" y="40"/>
<connection refLocalId="46">
- <position x="900" y="280"/>
- <position x="855" y="280"/>
+ <position x="876" y="770"/> + <position x="815" y="770"/> <variable formalParameter="set_text">
- <relPosition x="0" y="80"/>
+ <relPosition x="0" y="81"/> <connection refLocalId="3">
- <position x="900" y="320"/>
- <position x="855" y="320"/>
+ <position x="876" y="811"/> + <position x="815" y="811"/> <variable formalParameter="text">
- <relPosition x="0" y="120"/>
+ <relPosition x="0" y="122"/> <connection refLocalId="83" formalParameter="OUT">
- <position x="900" y="360"/>
- <position x="745" y="360"/>
+ <position x="876" y="852"/> + <position x="682" y="852"/> @@ -310,31 +263,31 @@
- <inVariable localId="1" height="30" width="70">
- <position x="80" y="85"/>
+ <inVariable localId="1" height="30" width="88" executionOrderId="0" negated="false"> + <position x="59" y="220"/> - <relPosition x="70" y="15"/>
+ <relPosition x="88" y="15"/> <expression>BOOL#1</expression>
- <block localId="95" width="100" height="130" typeName="Led" instanceName="Temoin">
- <position x="900" y="55"/>
+ <block localId="95" width="100" height="130" typeName="Led" instanceName="State_LedCtrl" executionOrderId="0"> + <position x="876" y="545"/> <variable formalParameter="back_id">
- <relPosition x="0" y="40"/>
+ <relPosition x="0" y="38"/> <connection refLocalId="51">
- <position x="900" y="95"/>
- <position x="835" y="95"/>
+ <position x="876" y="583"/> + <position x="811" y="583"/> <variable formalParameter="sele_id">
- <relPosition x="0" y="75"/>
+ <relPosition x="0" y="74"/> <connection refLocalId="52">
- <position x="900" y="130"/>
- <position x="835" y="130"/>
+ <position x="876" y="619"/> + <position x="811" y="619"/> @@ -342,8 +295,8 @@
<relPosition x="0" y="110"/>
<connection refLocalId="2">
- <position x="900" y="165"/>
- <position x="835" y="165"/>
+ <position x="876" y="655"/> + <position x="811" y="655"/> @@ -351,28 +304,28 @@
- <block localId="96" width="80" height="65" typeName="AND">
- <position x="200" y="45"/>
+ <block localId="96" width="80" height="65" typeName="AND" executionOrderId="0"> + <position x="200" y="182"/> <variable formalParameter="IN1" negated="true">
- <relPosition x="0" y="30"/>
+ <relPosition x="0" y="31"/> <connection refLocalId="96" formalParameter="OUT">
- <position x="200" y="75"/>
- <position x="175" y="75"/>
- <position x="175" y="30"/>
- <position x="305" y="30"/>
- <position x="305" y="75"/>
- <position x="280" y="75"/>
+ <position x="200" y="213"/> + <position x="175" y="213"/> + <position x="175" y="167"/> + <position x="305" y="167"/> + <position x="305" y="213"/> + <position x="280" y="213"/> <variable formalParameter="IN2">
- <relPosition x="0" y="55"/>
+ <relPosition x="0" y="53"/> <connection refLocalId="1">
- <position x="200" y="100"/>
- <position x="150" y="100"/>
+ <position x="200" y="235"/> + <position x="147" y="235"/> @@ -381,68 +334,68 @@
<variable formalParameter="OUT">
- <relPosition x="80" y="30"/>
+ <relPosition x="80" y="31"/> <connector name="CLOCK" localId="97" height="30" width="90">
- <position x="345" y="60"/>
+ <position x="345" y="198"/> <relPosition x="0" y="15"/>
<connection refLocalId="96" formalParameter="OUT">
- <position x="345" y="75"/>
- <position x="280" y="75"/>
+ <position x="345" y="213"/> + <position x="280" y="213"/> <connector name="COUNT" localId="98" height="30" width="90">
- <position x="485" y="180"/>
+ <position x="461" y="575"/> <relPosition x="0" y="15"/>
<connection refLocalId="92" formalParameter="state_out">
- <position x="485" y="195"/>
- <position x="425" y="195"/>
+ <position x="461" y="590"/> + <position x="388" y="590"/> - <continuation name="COUNT" localId="2" height="30" width="90">
- <position x="745" y="150"/>
+ <continuation name="COUNT" localId="2" height="30" width="120"> + <position x="691" y="640"/> + <relPosition x="120" y="15"/> + <inVariable localId="4" height="35" width="85" executionOrderId="0" negated="false"> + <position x="419" y="835"/> + <relPosition x="85" y="17"/> + <expression>counter</expression> + <continuation name="COUNT" localId="5" height="30" width="90"> + <position x="504" y="261"/> <relPosition x="90" y="15"/>
- <inVariable localId="4" height="35" width="85">
- <position x="470" y="345"/>
- <relPosition x="85" y="15"/>
- <expression>counter</expression>
- <continuation name="COUNT" localId="5" height="30" width="90">
- <position x="520" y="440"/>
- <relPosition x="90" y="15"/>
- <block localId="99" width="80" height="110" typeName="AND">
- <position x="215" y="445"/>
+ <block localId="99" width="80" height="110" typeName="AND" executionOrderId="0"> + <position x="199" y="264"/> <variable formalParameter="IN1">
- <relPosition x="0" y="40"/>
+ <relPosition x="0" y="42"/> <connection refLocalId="39">
- <position x="215" y="485"/>
- <position x="160" y="485"/>
+ <position x="199" y="306"/> + <position x="144" y="306"/> <variable formalParameter="IN2">
- <relPosition x="0" y="85"/>
+ <relPosition x="0" y="87"/> <connection refLocalId="6">
- <position x="215" y="530"/>
- <position x="160" y="530"/>
+ <position x="199" y="351"/> + <position x="144" y="351"/> @@ -451,26 +404,26 @@
<variable formalParameter="OUT">
- <relPosition x="80" y="40"/>
+ <relPosition x="80" y="42"/> <continuation name="CLOCK" localId="6" height="30" width="90">
- <position x="70" y="515"/>
+ <position x="54" y="336"/> <relPosition x="90" y="15"/>
- <block localId="100" width="125" height="45" typeName="BOOL_TO_INT">
- <position x="365" y="455"/>
+ <block localId="100" width="125" height="45" typeName="BOOL_TO_INT" executionOrderId="0"> + <position x="349" y="274"/> <variable formalParameter="IN">
- <relPosition x="0" y="30"/>
+ <relPosition x="0" y="32"/> <connection refLocalId="99" formalParameter="OUT">
- <position x="365" y="485"/>
- <position x="295" y="485"/>
+ <position x="349" y="306"/> + <position x="279" y="306"/> @@ -479,17 +432,41 @@
<variable formalParameter="OUT">
- <relPosition x="125" y="30"/>
+ <relPosition x="125" y="32"/> - <continuation name="CLOCK" localId="3" height="30" width="90">
- <position x="765" y="305"/>
+ <continuation name="CLOCK" localId="3" height="30" width="122"> + <position x="693" y="796"/> - <relPosition x="90" y="15"/>
+ <relPosition x="122" y="15"/> + <comment localId="101" height="147" width="718"> + <position x="27" y="8"/> + <xhtml:p><![CDATA[This example shows how IEC program in PLC can interact with web interface. +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!!! +As the program is running in PLC, web UI will be available at http://localhost:8009/. +Web interface is build as SVG file in Inkscape. To edit SVG file click 'Inkscape' button in 0x: svgui extension. +Inkscape is a free and open-source vector graphics editor. It's not part of Beremiz and needs to be installed separately. + <comment localId="102" height="101" width="544"> + <position x="17" y="409"/> + <xhtml:p><![CDATA[In this example basic elements like 'Button', 'Led' and 'Text' are used. +Back_id and sele_id inputs of these blocks are IDs of graphic primitives in SVG file. +This is the way how elements in SVG are bound to elements in PLC program. +You can find out or edit these IDs in Inkscape.]]></xhtml:p>