--- a/plugins/python/modules/svgui/livesvg.js Thu Aug 13 11:48:55 2009 +0200
+++ b/plugins/python/modules/svgui/livesvg.js Fri Aug 14 16:26:19 2009 +0200
@@ -1,14 +1,11 @@
- Nevow.Athena.Widget.fromAthenaID(1).callRemote('HMIexec', 'initClient');
function updateAttr(id, param, value) {
Nevow.Athena.Widget.fromAthenaID(1).callRemote('HMIexec', 'setattr', id, param, value);
+var svguiWidgets = new Array(); var currentObject = null;
function setCurrentObject(obj) {
@@ -28,6 +25,7 @@
LiveSVGPage.LiveSVGWidget = Nevow.Athena.Widget.subclass('LiveSVGPage.LiveSVGWidget');
LiveSVGPage.LiveSVGWidget.methods(
function handleEvent(self, evt) {
if (currentObject != null) {
currentObject.handleEvent(evt);
@@ -36,28 +34,20 @@
function receiveData(self, data){
dataReceived = json_parse(data);
- newState = json_parse(dataReceived.kwargs).state
- svguiWidgets[dataReceived.back_id].updateState(newState);
+ gadget = svguiWidgets[dataReceived.id] + gadget.updateValues(json_parse(dataReceived.kwargs)); //console.log("OBJET : " + dataReceived.back_id + " STATE : " + newState);
- function SvguiButton(self,elt_back, args){
- var btn = new svguilib.button(self, elt_back, args.sele_id, args.toggle, args.state, args.active);
- function SvguiTextCtrl(self, elt_back, args){
- var txtCtrl = new svguilib.textControl(self, elt_back, args.state);
function init(self, arg1){
//console.log("Object received : " + arg1);
gad = json_parse(arg1[ind]);
args = json_parse(gad.kwargs);
- gadget = self[gad.__class__](gad.back_id, args);
- svguiWidgets[gadget.back_elt.id]=gadget;
+ gadget = new svguilib[gad.__class__](self, gad.id, args); + svguiWidgets[gadget.id]=gadget; //console.log('GADGET :' + gadget);
var elements = document.getElementsByTagName("svg");
@@ -67,5 +57,3 @@
//console.log("SVGUIWIDGETS : " + svguiWidgets);
-Divmod.Base.addLoadEvent(init);
\ No newline at end of file
--- a/plugins/python/modules/svgui/pous.xml Thu Aug 13 11:48:55 2009 +0200
+++ b/plugins/python/modules/svgui/pous.xml Fri Aug 14 16:26:19 2009 +0200
@@ -8,7 +8,7 @@
creationDateTime="2008-12-14T16:53:26"/>
<contentHeader name="Beremiz non-standard POUs library"
- modificationDateTime="2009-07-15T17:13:23">
+ modificationDateTime="2009-08-12T15:35:33"> @@ -51,12 +51,12 @@
- <pou name="Button_toggle" pouType="functionBlock">
+ <pou name="TextCtrl" pouType="functionBlock"> - <variable name="SVGUI_Command">
- <derived name="python_poll"/>
@@ -66,135 +66,59 @@
- <variable name="sele_id">
- <variable name="set_state">
+ <variable name="set_text">
- <variable name="current_state">
- <variable name="GetButtonState">
+ <variable name="SVGUI_TEXTCTRL"> - <derived name="GetBoolString"/>
+ <derived name="python_eval"/> + <variable name="setstate_Command"> + <derived name="python_eval"/> - <block localId="1" width="125" height="140" typeName="python_poll" instanceName="SVGUI_Command">
- <position x="872" y="137"/>
- <variable formalParameter="TRIG">
- <relPosition x="0" y="50"/>
- <connection refLocalId="10">
- <position x="872" y="187"/>
- <position x="795" y="187"/>
- <variable formalParameter="CODE">
- <relPosition x="0" y="110"/>
- <connection refLocalId="2" formalParameter="OUT">
- <position x="872" y="247"/>
- <position x="678" y="247"/>
- <position x="678" y="80"/>
- <position x="636" y="80"/>
- <variable formalParameter="ACK">
- <relPosition x="125" y="50"/>
- <variable formalParameter="RESULT">
- <relPosition x="125" y="110"/>
- <block localId="2" width="150" height="485" typeName="CONCAT">
- <position x="486" y="25"/>
+ <block localId="1" width="193" height="160" typeName="CONCAT"> + <position x="626" y="122"/> <variable formalParameter="IN1">
- <relPosition x="0" y="55"/>
- <connection refLocalId="3">
- <position x="486" y="80"/>
- <position x="380" y="80"/>
+ <relPosition x="0" y="43"/> + <connection refLocalId="2"> + <position x="626" y="165"/> + <position x="535" y="165"/> <variable formalParameter="IN2">
- <relPosition x="0" y="120"/>
- <connection refLocalId="11">
- <position x="486" y="145"/>
- <position x="170" y="145"/>
+ <relPosition x="0" y="89"/> + <connection refLocalId="3"> + <position x="626" y="211"/> + <position x="535" y="211"/> <variable formalParameter="IN3">
- <relPosition x="0" y="185"/>
- <connection refLocalId="5">
- <position x="486" y="210"/>
- <position x="380" y="210"/>
- <variable formalParameter="IN4">
- <relPosition x="0" y="250"/>
- <connection refLocalId="12">
- <position x="486" y="275"/>
- <position x="205" y="275"/>
- <variable formalParameter="IN5">
- <relPosition x="0" y="315"/>
- <connection refLocalId="7">
- <position x="486" y="340"/>
- <position x="350" y="340"/>
- <variable formalParameter="IN6">
- <relPosition x="0" y="385"/>
- <connection refLocalId="28" formalParameter="CODE">
- <position x="486" y="410"/>
- <position x="389" y="410"/>
- <variable formalParameter="IN7">
- <relPosition x="0" y="450"/>
- <connection refLocalId="9">
- <position x="486" y="475"/>
- <position x="389" y="475"/>
+ <relPosition x="0" y="135"/> + <connection refLocalId="6"> + <position x="626" y="257"/> + <position x="532" y="257"/> @@ -203,272 +127,33 @@
<variable formalParameter="OUT">
- <relPosition x="150" y="55"/>
+ <relPosition x="193" y="43"/> - <inVariable localId="3" height="30" width="291">
- <position x="89" y="65"/>
+ <inVariable localId="2" height="30" width="460"> + <position x="75" y="150"/> - <relPosition x="291" y="15"/>
- <expression>'int(SVGUI("SvguiButton","'</expression>
- <inVariable localId="5" height="30" width="140">
- <position x="240" y="195"/>
- <relPosition x="140" y="15"/>
- <expression>'",sele_id="'</expression>
- <inVariable localId="7" height="30" width="110">
- <position x="240" y="325"/>
- <relPosition x="110" y="15"/>
+ <relPosition x="460" y="15"/> - <expression>'",state='</expression>
- <inVariable localId="9" height="30" width="290">
- <position x="99" y="460"/>
- <relPosition x="290" y="15"/>
- <expression>',toggle=True,active=True))'</expression>
+ <expression>'createSVGUIControl("textControl", back_id="'</expression> - <inVariable localId="10" height="30" width="70">
- <position x="725" y="172"/>
- <relPosition x="70" y="15"/>
- <expression>BOOL#1</expression>
- <inVariable localId="11" height="35" width="85">
- <position x="85" y="130"/>
+ <inVariable localId="3" height="35" width="85"> + <position x="450" y="196"/> <relPosition x="85" y="15"/>
<expression>back_id</expression>
- <inVariable localId="12" height="35" width="85">
- <position x="120" y="260"/>
- <relPosition x="85" y="15"/>
- <expression>sele_id</expression>
- <inVariable localId="13" height="35" width="100">
- <position x="109" y="395"/>
- <relPosition x="100" y="15"/>
- <expression>set_state</expression>
- <block localId="25" width="145" height="45" typeName="STRING_TO_INT">
- <position x="1052" y="217"/>
- <variable formalParameter="IN">
- <relPosition x="0" y="30"/>
- <connection refLocalId="1" formalParameter="RESULT">
- <position x="1052" y="247"/>
- <position x="997" y="247"/>
- <variable formalParameter="OUT">
- <relPosition x="145" y="30"/>
- <block localId="26" width="125" height="45" typeName="INT_TO_BOOL">
- <position x="1247" y="217"/>
- <variable formalParameter="IN">
- <relPosition x="0" y="30"/>
- <connection refLocalId="25" formalParameter="OUT">
- <position x="1247" y="247"/>
- <position x="1197" y="247"/>
- <variable formalParameter="OUT">
- <relPosition x="125" y="30"/>
- <outVariable localId="27" height="35" width="145">
- <position x="1402" y="232"/>
- <relPosition x="0" y="15"/>
- <connection refLocalId="26" formalParameter="OUT">
- <position x="1402" y="247"/>
- <position x="1372" y="247"/>
- <expression>current_state</expression>
- <block localId="28" width="140" height="40" typeName="GetBoolString" instanceName="GetButtonState">
- <position x="249" y="380"/>
- <variable formalParameter="VALUE">
- <relPosition x="0" y="30"/>
- <connection refLocalId="13">
- <position x="249" y="410"/>
- <position x="209" y="410"/>
- <variable formalParameter="CODE">
- <relPosition x="140" y="30"/>
- <pou name="TextCtrl" pouType="functionBlock">
- <variable name="back_id">
- <variable name="state">
- <variable name="SVGUI_TEXTCTRL">
- <derived name="python_poll"/>
- <block localId="1" width="265" height="230" typeName="CONCAT">
- <position x="549" y="125"/>
- <variable formalParameter="IN1">
- <relPosition x="0" y="40"/>
- <connection refLocalId="2">
- <position x="549" y="165"/>
- <position x="361" y="165"/>
- <variable formalParameter="IN2">
- <relPosition x="0" y="85"/>
- <connection refLocalId="3">
- <position x="549" y="210"/>
- <position x="160" y="210"/>
- <variable formalParameter="IN3">
- <relPosition x="0" y="125"/>
- <connection refLocalId="5">
- <position x="549" y="250"/>
- <position x="195" y="250"/>
- <variable formalParameter="IN4">
- <relPosition x="0" y="165"/>
- <connection refLocalId="4">
- <position x="549" y="290"/>
- <position x="140" y="290"/>
- <variable formalParameter="IN5">
- <relPosition x="0" y="210"/>
- <connection refLocalId="6">
- <position x="549" y="335"/>
- <position x="125" y="335"/>
- <variable formalParameter="OUT">
- <relPosition x="265" y="40"/>
- <inVariable localId="2" height="30" width="286">
- <position x="75" y="150"/>
- <relPosition x="286" y="15"/>
- <expression>'SVGUI("SvguiTextCtrl","'</expression>
- <inVariable localId="3" height="35" width="85">
- <position x="75" y="195"/>
- <relPosition x="85" y="15"/>
- <expression>back_id</expression>
- <inVariable localId="4" height="35" width="65">
- <position x="75" y="275"/>
- <relPosition x="65" y="15"/>
- <expression>state</expression>
- <inVariable localId="5" height="30" width="120">
- <position x="75" y="235"/>
- <relPosition x="120" y="15"/>
- <expression>'",state="'</expression>
<inVariable localId="6" height="30" width="50">
- <position x="75" y="320"/>
+ <position x="482" y="242"/> <relPosition x="50" y="15"/>
<expression>'")'</expression>
- <block localId="7" width="125" height="115" typeName="python_poll" instanceName="SVGUI_TEXTCTRL">
+ <block localId="7" width="125" height="115" typeName="python_eval" instanceName="SVGUI_TEXTCTRL"> <position x="909" y="75"/>
<variable formalParameter="TRIG">
@@ -487,7 +172,7 @@
<relPosition x="0" y="90"/>
<connection refLocalId="1" formalParameter="OUT">
<position x="909" y="165"/>
- <position x="814" y="165"/>
+ <position x="819" y="165"/> @@ -506,17 +191,6 @@
- <outVariable localId="8" height="35" width="55">
- <position x="1084" y="150"/>
- <relPosition x="0" y="15"/>
- <connection refLocalId="7" formalParameter="RESULT">
- <position x="1084" y="165"/>
- <position x="1034" y="165"/>
- <expression>code</expression>
<inVariable localId="9" height="30" width="70">
<position x="799" y="70"/>
@@ -524,15 +198,211 @@
<expression>BOOL#1</expression>
+ <outVariable localId="10" height="30" width="30"> + <position x="1094" y="150"/> + <relPosition x="0" y="15"/> + <connection refLocalId="7" formalParameter="RESULT"> + <position x="1094" y="165"/> + <position x="1034" y="165"/> + <expression>ID</expression> + <connector name="CREATED" localId="11" height="30" width="110"> + <position x="1096" y="105"/> + <relPosition x="0" y="15"/> + <connection refLocalId="7" formalParameter="ACK"> + <position x="1096" y="120"/> + <position x="1034" y="120"/> + <block localId="4" width="125" height="140" typeName="python_eval" instanceName="setstate_Command"> + <position x="957" y="472"/> + <variable formalParameter="TRIG"> + <relPosition x="0" y="50"/> + <connection refLocalId="31" formalParameter="OUT"> + <position x="957" y="522"/> + <position x="909" y="522"/> + <position x="909" y="444"/> + <position x="857" y="444"/> + <variable formalParameter="CODE"> + <relPosition x="0" y="110"/> + <connection refLocalId="12" formalParameter="OUT"> + <position x="957" y="582"/> + <position x="822" y="582"/> + <variable formalParameter="ACK"> + <relPosition x="125" y="50"/> + <variable formalParameter="RESULT"> + <relPosition x="125" y="110"/> + <continuation name="CREATED" localId="5" height="30" width="110"> + <position x="589" y="429"/> + <relPosition x="110" y="15"/> + <block localId="12" width="186" height="288" typeName="CONCAT"> + <position x="636" y="536"/> + <variable formalParameter="IN1"> + <relPosition x="0" y="46"/> + <connection refLocalId="14"> + <position x="636" y="582"/> + <position x="526" y="582"/> + <variable formalParameter="IN2"> + <relPosition x="0" y="99"/> + <connection refLocalId="8"> + <position x="636" y="635"/> + <position x="526" y="635"/> + <variable formalParameter="IN3"> + <relPosition x="0" y="152"/> + <connection refLocalId="15"> + <position x="636" y="688"/> + <position x="527" y="688"/> + <variable formalParameter="IN4"> + <relPosition x="0" y="205"/> + <connection refLocalId="32"> + <position x="636" y="741"/> + <position x="528" y="741"/> + <variable formalParameter="IN5"> + <relPosition x="0" y="258"/> + <connection refLocalId="16"> + <position x="636" y="794"/> + <position x="528" y="794"/> + <variable formalParameter="OUT"> + <relPosition x="186" y="46"/> + <inVariable localId="8" height="30" width="53"> + <position x="473" y="620"/> + <relPosition x="53" y="15"/> + <expression>ID</expression> + <inVariable localId="13" height="35" width="100"> + <position x="599" y="469"/> + <relPosition x="100" y="17"/> + <expression>set_text</expression> + <inVariable localId="14" height="30" width="120"> + <position x="406" y="567"/> + <relPosition x="120" y="15"/> + <expression>'setAttr('</expression> + <inVariable localId="15" height="30" width="122"> + <position x="405" y="673"/> + <relPosition x="122" y="15"/> + <expression>',"text","'</expression> + <inVariable localId="16" height="30" width="50"> + <position x="478" y="779"/> + <relPosition x="50" y="15"/> + <expression>'")'</expression> + <block localId="31" width="75" height="105" typeName="AND"> + <position x="782" y="403"/> + <variable formalParameter="IN1"> + <relPosition x="0" y="41"/> + <connection refLocalId="5"> + <position x="782" y="444"/> + <position x="699" y="444"/> + <variable formalParameter="IN2"> + <relPosition x="0" y="83"/> + <connection refLocalId="13"> + <position x="782" y="486"/> + <position x="699" y="486"/> + <variable formalParameter="OUT"> + <relPosition x="75" y="41"/> + <inVariable localId="32" height="30" width="90"> + <position x="438" y="726"/> + <relPosition x="90" y="15"/> + <expression>text</expression> <pou name="Button" pouType="functionBlock">
- <variable name="SVGUI_Command">
- <derived name="python_poll"/>
@@ -547,38 +417,68 @@
+ <variable name="toggle"> <variable name="set_state">
+ <variable name="state_in"> - <variable name="current_state">
+ <variable name="state_out"> + <variable name="init_Command"> + <derived name="python_eval"/> <variable name="GetButtonState">
<derived name="GetBoolString"/>
+ <variable name="setstate_Command"> + <derived name="python_eval"/> + <variable name="getstate_Command"> + <derived name="python_poll"/> + <variable name="GetButtonToggle"> + <derived name="GetBoolString"/> - <block localId="1" width="125" height="140" typeName="python_poll" instanceName="SVGUI_Command">
- <position x="827" y="168"/>
+ <block localId="1" width="125" height="140" typeName="python_eval" instanceName="init_Command"> + <position x="838" y="32"/> <variable formalParameter="TRIG">
<relPosition x="0" y="50"/>
<connection refLocalId="10">
- <position x="827" y="218"/>
- <position x="766" y="218"/>
+ <position x="838" y="82"/> + <position x="781" y="82"/> @@ -586,10 +486,206 @@
<relPosition x="0" y="110"/>
<connection refLocalId="2" formalParameter="OUT">
- <position x="827" y="278"/>
- <position x="679" y="278"/>
- <position x="679" y="80"/>
- <position x="649" y="80"/>
+ <position x="838" y="142"/> + <position x="641" y="142"/> + <variable formalParameter="ACK"> + <relPosition x="125" y="50"/> + <variable formalParameter="RESULT"> + <relPosition x="125" y="110"/> + <block localId="2" width="150" height="442" typeName="CONCAT"> + <position x="491" y="92"/> + <variable formalParameter="IN1"> + <relPosition x="0" y="50"/> + <connection refLocalId="3"> + <position x="491" y="142"/> + <position x="433" y="142"/> + <variable formalParameter="IN2"> + <relPosition x="0" y="110"/> + <connection refLocalId="11"> + <position x="491" y="202"/> + <position x="431" y="202"/> + <variable formalParameter="IN3"> + <relPosition x="0" y="170"/> + <connection refLocalId="5"> + <position x="491" y="262"/> + <position x="431" y="262"/> + <variable formalParameter="IN4"> + <relPosition x="0" y="230"/> + <connection refLocalId="12"> + <position x="491" y="322"/> + <position x="430" y="322"/> + <variable formalParameter="IN5"> + <relPosition x="0" y="290"/> + <connection refLocalId="23"> + <position x="491" y="382"/> + <position x="463" y="382"/> + <position x="463" y="370"/> + <position x="430" y="370"/> + <variable formalParameter="IN6"> + <relPosition x="0" y="350"/> + <connection refLocalId="24" formalParameter="CODE"> + <position x="491" y="442"/> + <position x="429" y="442"/> + <variable formalParameter="IN7"> + <relPosition x="0" y="410"/> + <connection refLocalId="9"> + <position x="491" y="502"/> + <position x="430" y="502"/> + <variable formalParameter="OUT"> + <relPosition x="150" y="50"/> + <inVariable localId="3" height="30" width="400"> + <position x="33" y="127"/> + <relPosition x="400" y="15"/> + <expression>'createSVGUIControl("button",back_id="'</expression> + <inVariable localId="5" height="30" width="140"> + <position x="291" y="247"/> + <relPosition x="140" y="15"/> + <expression>'",sele_id="'</expression> + <inVariable localId="9" height="30" width="180"> + <position x="250" y="487"/> + <relPosition x="180" y="15"/> + <expression>',active=True)'</expression> + <inVariable localId="10" height="30" width="70"> + <position x="711" y="67"/> + <relPosition x="70" y="15"/> + <expression>BOOL#1</expression> + <inVariable localId="11" height="35" width="85"> + <position x="346" y="187"/> + <relPosition x="85" y="15"/> + <expression>back_id</expression> + <inVariable localId="12" height="35" width="85"> + <position x="345" y="307"/> + <relPosition x="85" y="15"/> + <expression>sele_id</expression> + <inVariable localId="13" height="35" width="100"> + <position x="452" y="639"/> + <relPosition x="100" y="15"/> + <expression>set_state</expression> + <block localId="28" width="140" height="40" typeName="GetBoolString" instanceName="GetButtonState"> + <position x="239" y="897"/> + <variable formalParameter="VALUE"> + <relPosition x="0" y="30"/> + <connection refLocalId="32"> + <position x="239" y="927"/> + <position x="181" y="927"/> + <variable formalParameter="CODE"> + <relPosition x="140" y="30"/> + <outVariable localId="29" height="30" width="53"> + <position x="1015" y="127"/> + <relPosition x="0" y="15"/> + <connection refLocalId="1" formalParameter="RESULT"> + <position x="1015" y="142"/> + <position x="963" y="142"/> + <expression>ID</expression> + <block localId="4" width="125" height="140" typeName="python_eval" instanceName="setstate_Command"> + <position x="810" y="640"/> + <variable formalParameter="TRIG"> + <relPosition x="0" y="50"/> + <connection refLocalId="31" formalParameter="OUT"> + <position x="810" y="690"/> + <position x="762" y="690"/> + <position x="762" y="612"/> + <position x="710" y="612"/> + <variable formalParameter="CODE"> + <relPosition x="0" y="110"/> + <connection refLocalId="7" formalParameter="OUT"> + <position x="810" y="750"/> + <position x="643" y="750"/> @@ -608,69 +704,40 @@
- <block localId="2" width="150" height="485" typeName="CONCAT">
- <position x="499" y="25"/>
+ <connector name="CREATED" localId="30" height="30" width="110"> + <position x="1014" y="67"/> + <relPosition x="0" y="15"/> + <connection refLocalId="1" formalParameter="ACK"> + <position x="1014" y="82"/> + <position x="963" y="82"/> + <continuation name="CREATED" localId="6" height="30" width="110"> + <position x="442" y="597"/> + <relPosition x="110" y="15"/> + <block localId="31" width="75" height="105" typeName="AND"> + <position x="635" y="571"/> <variable formalParameter="IN1">
- <relPosition x="0" y="55"/>
- <connection refLocalId="3">
- <position x="499" y="80"/>
- <position x="378" y="80"/>
+ <relPosition x="0" y="41"/> + <connection refLocalId="6"> + <position x="635" y="612"/> + <position x="552" y="612"/> <variable formalParameter="IN2">
- <relPosition x="0" y="120"/>
- <connection refLocalId="11">
- <position x="499" y="145"/>
- <position x="170" y="145"/>
- <variable formalParameter="IN3">
- <relPosition x="0" y="185"/>
- <connection refLocalId="5">
- <position x="499" y="210"/>
- <position x="380" y="210"/>
- <variable formalParameter="IN4">
- <relPosition x="0" y="250"/>
- <connection refLocalId="12">
- <position x="499" y="275"/>
- <position x="205" y="275"/>
- <variable formalParameter="IN5">
- <relPosition x="0" y="315"/>
- <connection refLocalId="7">
- <position x="499" y="340"/>
- <position x="348" y="340"/>
- <variable formalParameter="IN6">
- <relPosition x="0" y="385"/>
- <connection refLocalId="28" formalParameter="CODE">
- <position x="499" y="410"/>
- <position x="369" y="410"/>
- <variable formalParameter="IN7">
- <relPosition x="0" y="450"/>
- <connection refLocalId="9">
- <position x="499" y="475"/>
- <position x="275" y="475"/>
+ <relPosition x="0" y="83"/> + <connection refLocalId="13"> + <position x="635" y="654"/> + <position x="552" y="654"/> @@ -679,76 +746,166 @@
<variable formalParameter="OUT">
- <relPosition x="150" y="55"/>
+ <relPosition x="75" y="41"/> - <inVariable localId="3" height="30" width="290">
- <position x="88" y="65"/>
+ <inVariable localId="32" height="30" width="90"> + <position x="91" y="912"/> - <relPosition x="290" y="15"/>
- <expression>'int(SVGUI("SvguiButton","'</expression>
- <inVariable localId="5" height="30" width="140">
- <position x="240" y="195"/>
- <relPosition x="140" y="15"/>
+ <relPosition x="90" y="15"/> - <expression>'",sele_id="'</expression>
- <inVariable localId="7" height="30" width="110">
- <position x="238" y="325"/>
- <relPosition x="110" y="15"/>
- <expression>'",state='</expression>
- <inVariable localId="9" height="30" width="180">
- <position x="225" y="460"/>
- <relPosition x="180" y="15"/>
- <expression>',active=True))'</expression>
+ <expression>state_in</expression> - <inVariable localId="10" height="30" width="70">
- <position x="696" y="203"/>
+ <outVariable localId="33" height="30" width="100"> + <position x="1334" y="1184"/> + <relPosition x="0" y="15"/> + <connection refLocalId="26" formalParameter="OUT"> + <position x="1334" y="1199"/> + <position x="1286" y="1199"/> + <expression>state_out</expression> + <block localId="7" width="150" height="319" typeName="CONCAT"> + <position x="493" y="701"/> + <variable formalParameter="IN1"> + <relPosition x="0" y="49"/> + <connection refLocalId="14"> + <position x="493" y="750"/> + <position x="379" y="750"/> + <variable formalParameter="IN2"> + <relPosition x="0" y="108"/> + <connection refLocalId="8"> + <position x="493" y="809"/> + <position x="435" y="809"/> + <position x="435" y="803"/> + <position x="379" y="803"/> + <variable formalParameter="IN3"> + <relPosition x="0" y="167"/> + <connection refLocalId="15"> + <position x="493" y="868"/> + <position x="435" y="868"/> + <position x="435" y="855"/> + <position x="379" y="855"/> + <variable formalParameter="IN4"> + <relPosition x="0" y="226"/> + <connection refLocalId="28" formalParameter="CODE"> + <position x="493" y="927"/> + <position x="379" y="927"/> + <variable formalParameter="IN5"> + <relPosition x="0" y="285"/> + <connection refLocalId="16"> + <position x="493" y="986"/> + <position x="377" y="986"/> + <variable formalParameter="OUT"> + <relPosition x="150" y="49"/> + <inVariable localId="8" height="30" width="53"> + <position x="326" y="788"/> - <relPosition x="70" y="15"/>
+ <relPosition x="53" y="15"/> - <expression>BOOL#1</expression>
- <inVariable localId="11" height="35" width="85">
- <position x="85" y="130"/>
- <relPosition x="85" y="15"/>
- <expression>back_id</expression>
+ <expression>ID</expression> - <inVariable localId="12" height="35" width="85">
- <position x="120" y="260"/>
+ <inVariable localId="14" height="30" width="120"> + <position x="259" y="735"/> + <relPosition x="120" y="15"/> + <expression>'setAttr('</expression> + <inVariable localId="15" height="30" width="122"> + <position x="257" y="840"/> - <relPosition x="85" y="15"/>
+ <relPosition x="122" y="15"/> - <expression>sele_id</expression>
+ <expression>',"state",'</expression> + <inVariable localId="16" height="30" width="41"> + <position x="336" y="971"/> + <relPosition x="41" y="15"/> + <expression>')'</expression> - <inVariable localId="13" height="35" width="100">
- <position x="62" y="395"/>
- <relPosition x="100" y="15"/>
- <expression>set_state</expression>
+ <block localId="17" width="125" height="140" typeName="python_poll" instanceName="getstate_Command"> + <position x="801" y="1089"/> + <variable formalParameter="TRIG"> + <relPosition x="0" y="50"/> + <connection refLocalId="18"> + <position x="801" y="1139"/> + <position x="763" y="1139"/> + <position x="763" y="1099"/> + <position x="720" y="1099"/> + <variable formalParameter="CODE"> + <relPosition x="0" y="110"/> + <connection refLocalId="22" formalParameter="OUT"> + <position x="801" y="1199"/> + <position x="643" y="1199"/> + <variable formalParameter="ACK"> + <relPosition x="125" y="50"/> + <variable formalParameter="RESULT"> + <relPosition x="125" y="110"/> <block localId="25" width="145" height="45" typeName="STRING_TO_INT">
- <position x="1014" y="248"/>
+ <position x="966" y="1169"/> <variable formalParameter="IN">
<relPosition x="0" y="30"/>
- <connection refLocalId="1" formalParameter="RESULT">
- <position x="1014" y="278"/>
- <position x="952" y="278"/>
+ <connection refLocalId="17" formalParameter="RESULT"> + <position x="966" y="1199"/> + <position x="926" y="1199"/> @@ -763,14 +920,14 @@
<block localId="26" width="125" height="45" typeName="INT_TO_BOOL">
- <position x="1209" y="248"/>
+ <position x="1161" y="1169"/> <variable formalParameter="IN">
<relPosition x="0" y="30"/>
<connection refLocalId="25" formalParameter="OUT">
- <position x="1209" y="278"/>
- <position x="1159" y="278"/>
+ <position x="1161" y="1199"/> + <position x="1111" y="1199"/> @@ -784,26 +941,91 @@
- <outVariable localId="27" height="35" width="145">
- <position x="1364" y="263"/>
- <relPosition x="0" y="15"/>
- <connection refLocalId="26" formalParameter="OUT">
- <position x="1364" y="278"/>
- <position x="1334" y="278"/>
- <expression>current_state</expression>
- <block localId="28" width="140" height="40" typeName="GetBoolString" instanceName="GetButtonState">
- <position x="229" y="380"/>
+ <continuation name="CREATED" localId="18" height="30" width="110"> + <position x="610" y="1084"/> + <relPosition x="110" y="15"/> + <inVariable localId="19" height="30" width="53"> + <position x="383" y="1238"/> + <relPosition x="53" y="15"/> + <expression>ID</expression> + <inVariable localId="20" height="30" width="150"> + <position x="286" y="1184"/> + <relPosition x="150" y="15"/> + <expression>'int(getAttr('</expression> + <inVariable localId="21" height="30" width="190"> + <position x="246" y="1292"/> + <relPosition x="190" y="15"/> + <expression>',"state",False))'</expression> + <block localId="22" width="150" height="183" typeName="CONCAT"> + <position x="493" y="1152"/> + <variable formalParameter="IN1"> + <relPosition x="0" y="47"/> + <connection refLocalId="20"> + <position x="493" y="1199"/> + <position x="436" y="1199"/> + <variable formalParameter="IN2"> + <relPosition x="0" y="101"/> + <connection refLocalId="19"> + <position x="493" y="1253"/> + <position x="436" y="1253"/> + <variable formalParameter="IN3"> + <relPosition x="0" y="155"/> + <connection refLocalId="21"> + <position x="493" y="1307"/> + <position x="483" y="1307"/> + <position x="483" y="1307"/> + <position x="436" y="1307"/> + <variable formalParameter="OUT"> + <relPosition x="150" y="47"/> + <inVariable localId="23" height="30" width="130"> + <position x="300" y="355"/> + <relPosition x="130" y="15"/> + <expression>'",toggle='</expression> + <block localId="24" width="140" height="40" typeName="GetBoolString" instanceName="GetButtonToggle"> + <position x="289" y="412"/> <variable formalParameter="VALUE">
<relPosition x="0" y="30"/>
- <connection refLocalId="13">
- <position x="229" y="410"/>
- <position x="162" y="410"/>
+ <connection refLocalId="27"> + <position x="289" y="442"/> + <position x="220" y="442"/> @@ -817,11 +1039,25 @@
+ <inVariable localId="27" height="30" width="90"> + <position x="130" y="427"/> + <relPosition x="90" y="15"/> + <expression>toggle</expression> - <pou name="Button_led" pouType="functionBlock">
+ <pou name="Led" pouType="functionBlock"> <variable name="back_id">
@@ -833,21 +1069,24 @@
- <variable name="state">
+ <variable name="state_in"> - <variable name="SVGUI_Command_LED">
+ <variable name="init_Command"> + <derived name="python_eval"/> + <variable name="setstate_Command"> <derived name="python_poll"/>
- <variable name="GetLEDState">
+ <variable name="GetLedState"> <derived name="GetBoolString"/>
@@ -856,118 +1095,87 @@
- <inVariable localId="1" height="30" width="244">
- <position x="51" y="110"/>
- <relPosition x="244" y="15"/>
- <expression>'SVGUI("SvguiButton","'</expression>
- <inVariable localId="2" height="30" width="140">
- <position x="50" y="255"/>
- <relPosition x="140" y="15"/>
- <expression>'",sele_id="'</expression>
- <inVariable localId="3" height="35" width="85">
- <position x="50" y="185"/>
- <relPosition x="85" y="15"/>
- <expression>back_id</expression>
- <inVariable localId="4" height="35" width="85">
- <position x="50" y="325"/>
- <relPosition x="85" y="15"/>
- <expression>sele_id</expression>
- <inVariable localId="5" height="30" width="165">
- <position x="50" y="545"/>
- <relPosition x="165" y="15"/>
- <expression>',toggle=True)'</expression>
- <inVariable localId="6" height="30" width="120">
- <position x="50" y="400"/>
- <relPosition x="120" y="15"/>
- <expression>'", state='</expression>
- <inVariable localId="9" height="35" width="65">
- <position x="52" y="470"/>
- <relPosition x="65" y="15"/>
- <expression>state</expression>
- <block localId="10" width="80" height="530" typeName="CONCAT">
- <position x="503" y="70"/>
+ <block localId="1" width="125" height="140" typeName="python_eval" instanceName="init_Command"> + <position x="810" y="30"/> + <variable formalParameter="TRIG"> + <relPosition x="0" y="50"/> + <connection refLocalId="10"> + <position x="810" y="80"/> + <position x="753" y="80"/> + <variable formalParameter="CODE"> + <relPosition x="0" y="110"/> + <connection refLocalId="2" formalParameter="OUT"> + <position x="810" y="140"/> + <position x="640" y="140"/> + <variable formalParameter="ACK"> + <relPosition x="125" y="50"/> + <variable formalParameter="RESULT"> + <relPosition x="125" y="110"/> + <block localId="2" width="150" height="322" typeName="CONCAT"> + <position x="490" y="90"/> <variable formalParameter="IN1">
- <relPosition x="0" y="55"/>
- <connection refLocalId="1">
- <position x="503" y="125"/>
- <position x="295" y="125"/>
+ <relPosition x="0" y="50"/> + <connection refLocalId="3"> + <position x="490" y="140"/> + <position x="415" y="140"/> <variable formalParameter="IN2">
- <relPosition x="0" y="130"/>
- <connection refLocalId="3">
- <position x="503" y="200"/>
- <position x="135" y="200"/>
+ <relPosition x="0" y="110"/> + <connection refLocalId="11"> + <position x="490" y="200"/> + <position x="415" y="200"/> <variable formalParameter="IN3">
- <relPosition x="0" y="200"/>
- <connection refLocalId="2">
- <position x="503" y="270"/>
- <position x="190" y="270"/>
+ <relPosition x="0" y="170"/> + <connection refLocalId="5"> + <position x="490" y="260"/> + <position x="415" y="260"/> <variable formalParameter="IN4">
- <relPosition x="0" y="270"/>
- <connection refLocalId="4">
- <position x="503" y="340"/>
- <position x="135" y="340"/>
+ <relPosition x="0" y="230"/> + <connection refLocalId="12"> + <position x="490" y="320"/> + <position x="414" y="320"/> <variable formalParameter="IN5">
- <relPosition x="0" y="345"/>
- <connection refLocalId="6">
- <position x="503" y="415"/>
- <position x="170" y="415"/>
- <variable formalParameter="IN6">
- <relPosition x="0" y="415"/>
- <connection refLocalId="28" formalParameter="CODE">
- <position x="503" y="485"/>
- <position x="368" y="485"/>
- <variable formalParameter="IN7">
- <relPosition x="0" y="490"/>
- <connection refLocalId="5">
- <position x="503" y="560"/>
- <position x="215" y="560"/>
+ <relPosition x="0" y="290"/> + <connection refLocalId="9"> + <position x="490" y="380"/> + <position x="414" y="380"/> @@ -976,33 +1184,38 @@
<variable formalParameter="OUT">
- <relPosition x="80" y="55"/>
+ <relPosition x="150" y="50"/> - <block localId="11" width="125" height="65" typeName="python_poll" instanceName="SVGUI_Command_LED">
- <position x="753" y="135"/>
+ <inVariable localId="3" height="30" width="400"> + <position x="15" y="125"/> + <relPosition x="400" y="15"/> + <expression>'createSVGUIControl("button",back_id="'</expression> + <block localId="4" width="125" height="140" typeName="python_poll" instanceName="setstate_Command"> + <position x="782" y="536"/> <variable formalParameter="TRIG">
- <relPosition x="0" y="30"/>
- <connection refLocalId="12">
- <position x="753" y="165"/>
- <position x="715" y="165"/>
- <position x="715" y="90"/>
- <position x="698" y="90"/>
+ <relPosition x="0" y="50"/> + <connection refLocalId="6"> + <position x="782" y="586"/> + <position x="653" y="586"/> + <position x="653" y="552"/> + <position x="602" y="552"/> <variable formalParameter="CODE">
- <relPosition x="0" y="55"/>
- <connection refLocalId="10" formalParameter="OUT">
- <position x="753" y="190"/>
- <position x="658" y="190"/>
- <position x="658" y="125"/>
- <position x="583" y="125"/>
+ <relPosition x="0" y="110"/> + <connection refLocalId="7" formalParameter="OUT"> + <position x="782" y="646"/> + <position x="615" y="646"/> @@ -1011,32 +1224,158 @@
<variable formalParameter="ACK">
- <relPosition x="125" y="30"/>
+ <relPosition x="125" y="50"/> <variable formalParameter="RESULT">
- <relPosition x="125" y="55"/>
+ <relPosition x="125" y="110"/> - <inVariable localId="12" height="30" width="70">
- <position x="628" y="75"/>
+ <inVariable localId="5" height="30" width="140"> + <position x="275" y="245"/> + <relPosition x="140" y="15"/> + <expression>'",sele_id="'</expression> + <continuation name="CREATED" localId="6" height="30" width="110"> + <position x="492" y="537"/> + <relPosition x="110" y="15"/> + <block localId="7" width="150" height="319" typeName="CONCAT"> + <position x="465" y="597"/> + <variable formalParameter="IN1"> + <relPosition x="0" y="49"/> + <connection refLocalId="14"> + <position x="465" y="646"/> + <position x="351" y="646"/> + <variable formalParameter="IN2"> + <relPosition x="0" y="108"/> + <connection refLocalId="8"> + <position x="465" y="705"/> + <position x="407" y="705"/> + <position x="407" y="699"/> + <position x="351" y="699"/> + <variable formalParameter="IN3"> + <relPosition x="0" y="167"/> + <connection refLocalId="15"> + <position x="465" y="764"/> + <position x="407" y="764"/> + <position x="407" y="751"/> + <position x="351" y="751"/> + <variable formalParameter="IN4"> + <relPosition x="0" y="226"/> + <connection refLocalId="28" formalParameter="CODE"> + <position x="465" y="823"/> + <position x="351" y="823"/> + <variable formalParameter="IN5"> + <relPosition x="0" y="285"/> + <connection refLocalId="16"> + <position x="465" y="882"/> + <position x="407" y="882"/> + <position x="407" y="883"/> + <position x="351" y="883"/> + <variable formalParameter="OUT"> + <relPosition x="150" y="49"/> + <inVariable localId="8" height="30" width="53"> + <position x="298" y="684"/> + <relPosition x="53" y="15"/> + <expression>ID</expression> + <inVariable localId="9" height="30" width="300"> + <position x="124" y="365"/> + <relPosition x="300" y="15"/> + <expression>'",toggle=True,active=False)'</expression> + <inVariable localId="10" height="30" width="70"> + <position x="683" y="65"/> <relPosition x="70" y="15"/>
<expression>BOOL#1</expression>
- <block localId="28" width="140" height="40" typeName="GetBoolString" instanceName="GetLEDState">
- <position x="228" y="455"/>
+ <inVariable localId="11" height="35" width="85"> + <position x="330" y="185"/> + <relPosition x="85" y="15"/> + <expression>back_id</expression> + <inVariable localId="12" height="35" width="85"> + <position x="329" y="305"/> + <relPosition x="85" y="15"/> + <expression>sele_id</expression> + <inVariable localId="14" height="30" width="120"> + <position x="231" y="631"/> + <relPosition x="120" y="15"/> + <expression>'setAttr('</expression> + <inVariable localId="15" height="30" width="122"> + <position x="229" y="736"/> + <relPosition x="122" y="15"/> + <expression>',"state",'</expression> + <inVariable localId="16" height="30" width="41"> + <position x="310" y="868"/> + <relPosition x="41" y="15"/> + <expression>')'</expression> + <block localId="28" width="140" height="40" typeName="GetBoolString" instanceName="GetLedState"> + <position x="211" y="793"/> <variable formalParameter="VALUE">
<relPosition x="0" y="30"/>
- <connection refLocalId="9">
- <position x="228" y="485"/>
- <position x="117" y="485"/>
+ <connection refLocalId="32"> + <position x="211" y="823"/> + <position x="153" y="823"/> @@ -1050,6 +1389,34 @@
+ <outVariable localId="29" height="30" width="53"> + <position x="987" y="125"/> + <relPosition x="0" y="15"/> + <connection refLocalId="1" formalParameter="RESULT"> + <position x="987" y="140"/> + <position x="935" y="140"/> + <expression>ID</expression> + <connector name="CREATED" localId="30" height="30" width="110"> + <position x="986" y="65"/> + <relPosition x="0" y="15"/> + <connection refLocalId="1" formalParameter="ACK"> + <position x="986" y="80"/> + <position x="935" y="80"/> + <inVariable localId="32" height="30" width="90"> + <position x="63" y="808"/> + <relPosition x="90" y="15"/> + <expression>state_in</expression> --- a/tests/linux/test_svgui/plc.xml Thu Aug 13 11:48:55 2009 +0200
+++ b/tests/linux/test_svgui/plc.xml Fri Aug 14 16:26:19 2009 +0200
@@ -8,7 +8,7 @@
creationDateTime="2008-12-14T16:21:19"/>
<contentHeader name="Beremiz Python Support Tests"
- modificationDateTime="2009-08-10T16:18:56">
+ modificationDateTime="2009-08-14T16:13:40"> <pageSize x="1024" y="1024"/>
@@ -73,21 +73,6 @@
- <variable name="Texte_compteur">
- <derived name="TextCtrl"/>
- <variable name="Start_Stop">
- <derived name="Button_toggle"/>
- <variable name="Temoin">
- <derived name="Button_led"/>
@@ -128,45 +113,56 @@
+ <variable name="Start_Stop"> + <derived name="Button"/> + <variable name="Compteur"> + <derived name="TextCtrl"/> + <variable name="Temoin"> - <block localId="32" width="80" height="80" typeName="ADD">
- <position x="150" y="400"/>
+ <block localId="32" width="80" height="110" typeName="ADD"> + <position x="665" y="420"/> <variable formalParameter="EN">
- <relPosition x="0" y="30"/>
- <connection refLocalId="49" formalParameter="current_state">
- <position x="150" y="430"/>
- <position x="140" y="430"/>
- <position x="140" y="272"/>
- <position x="485" y="272"/>
- <position x="485" y="150"/>
- <position x="425" y="150"/>
+ <relPosition x="0" y="35"/> + <connection refLocalId="5"> + <position x="665" y="455"/> + <position x="610" y="455"/> <variable formalParameter="IN1">
- <relPosition x="0" y="50"/>
- <connection refLocalId="39">
- <position x="150" y="450"/>
- <position x="105" y="450"/>
+ <relPosition x="0" y="65"/> + <connection refLocalId="100" formalParameter="OUT"> + <position x="665" y="485"/> + <position x="490" y="485"/> <variable formalParameter="IN2">
- <relPosition x="0" y="70"/>
+ <relPosition x="0" y="95"/> <connection refLocalId="33">
- <position x="150" y="470"/>
- <position x="140" y="470"/>
- <position x="140" y="500"/>
- <position x="345" y="500"/>
- <position x="345" y="530"/>
- <position x="335" y="530"/>
+ <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"/> @@ -175,25 +171,23 @@
<variable formalParameter="ENO">
- <relPosition x="80" y="30"/>
+ <relPosition x="80" y="35"/> <variable formalParameter="OUT">
- <relPosition x="80" y="50"/>
+ <relPosition x="80" y="65"/> <inOutVariable localId="33" height="35" width="85">
- <position x="250" y="515"/>
+ <position x="770" y="470"/> <relPosition x="0" y="15"/>
<connection refLocalId="32" formalParameter="OUT">
- <position x="250" y="530"/>
- <position x="240" y="530"/>
- <position x="240" y="450"/>
- <position x="230" y="450"/>
+ <position x="770" y="485"/> + <position x="745" y="485"/> @@ -201,158 +195,49 @@
<expression>counter</expression>
- <inVariable localId="39" height="30" width="60">
- <position x="45" y="435"/>
+ <inVariable localId="39" height="35" width="70"> + <position x="90" y="470"/> - <relPosition x="60" y="15"/>
+ <relPosition x="70" y="15"/> - <expression>INT#1</expression>
+ <expression>BOOL#1</expression> <inVariable localId="41" height="30" width="120">
- <position x="20" y="120"/>
+ <position x="45" y="180"/> <relPosition x="120" y="15"/>
<expression>'stop_back'</expression>
<inVariable localId="42" height="30" width="120">
- <position x="20" y="170"/>
+ <position x="45" y="225"/> <relPosition x="120" y="15"/>
<expression>'stop_sele'</expression>
<inVariable localId="46" height="30" width="180">
- <position x="385" y="340"/>
+ <position x="675" y="265"/> <relPosition x="180" y="15"/>
<expression>'text_compteur'</expression>
- <block localId="47" width="130" height="65" typeName="TextCtrl" instanceName="Texte_compteur">
- <position x="715" y="395"/>
- <variable formalParameter="back_id">
- <relPosition x="0" y="30"/>
- <connection refLocalId="46">
- <position x="715" y="425"/>
- <position x="630" y="425"/>
- <position x="630" y="355"/>
- <position x="565" y="355"/>
- <variable formalParameter="state">
- <relPosition x="0" y="55"/>
- <connection refLocalId="83" formalParameter="OUT">
- <position x="715" y="450"/>
- <position x="540" y="450"/>
- <variable formalParameter="code">
- <relPosition x="130" y="30"/>
- <block localId="49" width="240" height="125" typeName="Button_toggle" instanceName="Start_Stop">
- <position x="185" y="115"/>
- <variable formalParameter="back_id">
- <relPosition x="0" y="35"/>
- <connection refLocalId="41">
- <position x="185" y="150"/>
- <position x="160" y="150"/>
- <position x="160" y="135"/>
- <position x="140" y="135"/>
- <variable formalParameter="sele_id">
- <relPosition x="0" y="70"/>
- <connection refLocalId="42">
- <position x="185" y="185"/>
- <position x="140" y="185"/>
- <variable formalParameter="set_state">
- <relPosition x="0" y="105"/>
- <variable formalParameter="current_state">
- <relPosition x="240" y="35"/>
- <block localId="50" width="115" height="135" typeName="Button_led" instanceName="Temoin">
- <position x="660" y="20"/>
- <variable formalParameter="back_id">
- <relPosition x="0" y="40"/>
- <connection refLocalId="51">
- <position x="660" y="60"/>
- <position x="632" y="60"/>
- <position x="632" y="55"/>
- <position x="615" y="55"/>
- <variable formalParameter="sele_id">
- <relPosition x="0" y="75"/>
- <connection refLocalId="52">
- <position x="660" y="95"/>
- <position x="625" y="95"/>
- <variable formalParameter="state">
- <relPosition x="0" y="115"/>
- <connection refLocalId="49" formalParameter="current_state">
- <position x="660" y="135"/>
- <position x="545" y="135"/>
- <position x="545" y="150"/>
- <position x="425" y="150"/>
<inVariable localId="51" height="30" width="110">
- <position x="505" y="40"/>
+ <position x="725" y="80"/> <relPosition x="110" y="15"/>
<expression>'led_stop'</expression>
<inVariable localId="52" height="30" width="120">
- <position x="505" y="80"/>
+ <position x="715" y="115"/> <relPosition x="120" y="15"/>
<expression>'led_start'</expression>
- <block localId="53" width="235" height="135" typeName="Button" instanceName="Btn1">
+ <block localId="53" width="235" height="200" typeName="Button" instanceName="Btn1"> <position x="180" y="620"/>
<variable formalParameter="back_id">
@@ -373,15 +258,25 @@
+ <variable formalParameter="toggle"> + <relPosition x="0" y="110"/> <variable formalParameter="set_state">
- <relPosition x="0" y="115"/>
+ <relPosition x="0" y="145"/> + <variable formalParameter="state_in"> + <relPosition x="0" y="180"/> - <variable formalParameter="current_state">
+ <variable formalParameter="state_out"> <relPosition x="235" y="40"/>
@@ -402,408 +297,444 @@
<expression>'btn1_sele'</expression>
- <block localId="56" width="240" height="85" typeName="Button" instanceName="Btn2">
- <position x="180" y="785"/>
+ <block localId="56" width="240" height="210" typeName="Button" instanceName="Btn2"> + <position x="175" y="855"/> <variable formalParameter="back_id">
- <relPosition x="0" y="30"/>
+ <relPosition x="0" y="40"/> <connection refLocalId="63">
- <position x="180" y="815"/>
- <position x="130" y="815"/>
+ <position x="175" y="895"/> + <position x="125" y="895"/> <variable formalParameter="sele_id">
- <relPosition x="0" y="50"/>
+ <relPosition x="0" y="75"/> <connection refLocalId="67">
- <position x="180" y="835"/>
- <position x="155" y="835"/>
- <position x="155" y="855"/>
- <position x="130" y="855"/>
+ <position x="175" y="930"/> + <position x="125" y="930"/> + <variable formalParameter="toggle"> + <relPosition x="0" y="115"/> <variable formalParameter="set_state">
- <relPosition x="0" y="70"/>
+ <relPosition x="0" y="155"/> + <variable formalParameter="state_in"> + <relPosition x="0" y="190"/> - <variable formalParameter="current_state">
+ <variable formalParameter="state_out"> - <relPosition x="240" y="30"/>
+ <relPosition x="240" y="40"/> - <block localId="57" width="240" height="85" typeName="Button" instanceName="Btn3">
- <position x="180" y="895"/>
+ <block localId="57" width="240" height="225" typeName="Button" instanceName="Btn3"> + <position x="175" y="1100"/> <variable formalParameter="back_id">
- <relPosition x="0" y="30"/>
+ <relPosition x="0" y="40"/> <connection refLocalId="66">
- <position x="180" y="925"/>
- <position x="140" y="925"/>
+ <position x="175" y="1140"/> + <position x="135" y="1140"/> <variable formalParameter="sele_id">
- <relPosition x="0" y="50"/>
+ <relPosition x="0" y="80"/> <connection refLocalId="65">
- <position x="180" y="945"/>
- <position x="157" y="945"/>
- <position x="157" y="965"/>
- <position x="140" y="965"/>
+ <position x="175" y="1180"/> + <position x="135" y="1180"/> + <variable formalParameter="toggle"> + <relPosition x="0" y="120"/> <variable formalParameter="set_state">
- <relPosition x="0" y="70"/>
+ <relPosition x="0" y="165"/> + <variable formalParameter="state_in"> + <relPosition x="0" y="205"/> - <variable formalParameter="current_state">
+ <variable formalParameter="state_out"> - <relPosition x="240" y="30"/>
+ <relPosition x="240" y="40"/> - <block localId="58" width="240" height="85" typeName="Button" instanceName="Btn4">
- <position x="180" y="1005"/>
+ <block localId="58" width="240" height="225" typeName="Button" instanceName="Btn4"> + <position x="175" y="1355"/> <variable formalParameter="back_id">
- <relPosition x="0" y="30"/>
+ <relPosition x="0" y="40"/> <connection refLocalId="69">
- <position x="180" y="1035"/>
- <position x="140" y="1035"/>
+ <position x="175" y="1395"/> + <position x="135" y="1395"/> <variable formalParameter="sele_id">
- <relPosition x="0" y="50"/>
+ <relPosition x="0" y="80"/> <connection refLocalId="70">
- <position x="180" y="1055"/>
- <position x="160" y="1055"/>
- <position x="160" y="1075"/>
- <position x="140" y="1075"/>
+ <position x="175" y="1435"/> + <position x="135" y="1435"/> + <variable formalParameter="toggle"> + <relPosition x="0" y="120"/> <variable formalParameter="set_state">
- <relPosition x="0" y="70"/>
+ <relPosition x="0" y="165"/> + <variable formalParameter="state_in"> + <relPosition x="0" y="205"/> - <variable formalParameter="current_state">
+ <variable formalParameter="state_out"> - <relPosition x="240" y="30"/>
+ <relPosition x="240" y="40"/> - <block localId="59" width="240" height="85" typeName="Button" instanceName="Btn5">
- <position x="180" y="1115"/>
+ <block localId="59" width="240" height="215" typeName="Button" instanceName="Btn5"> + <position x="900" y="615"/> <variable formalParameter="back_id">
- <relPosition x="0" y="30"/>
+ <relPosition x="0" y="40"/> <connection refLocalId="72">
- <position x="180" y="1145"/>
- <position x="140" y="1145"/>
+ <position x="900" y="655"/> + <position x="860" y="655"/> <variable formalParameter="sele_id">
- <relPosition x="0" y="50"/>
+ <relPosition x="0" y="80"/> <connection refLocalId="73">
- <position x="180" y="1165"/>
- <position x="160" y="1165"/>
- <position x="160" y="1185"/>
- <position x="140" y="1185"/>
+ <position x="900" y="695"/> + <position x="860" y="695"/> + <variable formalParameter="toggle"> + <relPosition x="0" y="115"/> <variable formalParameter="set_state">
- <relPosition x="0" y="70"/>
+ <relPosition x="0" y="155"/> + <variable formalParameter="state_in"> + <relPosition x="0" y="195"/> - <variable formalParameter="current_state">
+ <variable formalParameter="state_out"> - <relPosition x="240" y="30"/>
+ <relPosition x="240" y="40"/> - <block localId="60" width="240" height="85" typeName="Button" instanceName="Btn6">
- <position x="180" y="1230"/>
+ <block localId="60" width="240" height="230" typeName="Button" instanceName="Btn6"> + <position x="900" y="855"/> <variable formalParameter="back_id">
- <relPosition x="0" y="30"/>
+ <relPosition x="0" y="40"/> <connection refLocalId="75">
- <position x="180" y="1260"/>
- <position x="160" y="1260"/>
- <position x="160" y="1255"/>
- <position x="140" y="1255"/>
+ <position x="900" y="895"/> + <position x="860" y="895"/> <variable formalParameter="sele_id">
- <relPosition x="0" y="50"/>
+ <relPosition x="0" y="85"/> <connection refLocalId="76">
- <position x="180" y="1280"/>
- <position x="160" y="1280"/>
- <position x="160" y="1300"/>
- <position x="140" y="1300"/>
+ <position x="900" y="940"/> + <position x="860" y="940"/> + <variable formalParameter="toggle"> + <relPosition x="0" y="125"/> <variable formalParameter="set_state">
- <relPosition x="0" y="70"/>
+ <relPosition x="0" y="165"/> + <variable formalParameter="state_in"> + <relPosition x="0" y="210"/> - <variable formalParameter="current_state">
+ <variable formalParameter="state_out"> - <relPosition x="240" y="30"/>
+ <relPosition x="240" y="40"/> - <block localId="61" width="240" height="85" typeName="Button" instanceName="Btn7">
- <position x="180" y="1345"/>
+ <block localId="61" width="240" height="230" typeName="Button" instanceName="Btn7"> + <position x="900" y="1105"/> <variable formalParameter="back_id">
- <relPosition x="0" y="30"/>
+ <relPosition x="0" y="40"/> <connection refLocalId="78">
- <position x="180" y="1375"/>
- <position x="160" y="1375"/>
- <position x="160" y="1370"/>
- <position x="140" y="1370"/>
+ <position x="900" y="1145"/> + <position x="860" y="1145"/> <variable formalParameter="sele_id">
- <relPosition x="0" y="50"/>
+ <relPosition x="0" y="85"/> <connection refLocalId="79">
- <position x="180" y="1395"/>
- <position x="160" y="1395"/>
- <position x="160" y="1415"/>
- <position x="140" y="1415"/>
+ <position x="900" y="1190"/> + <position x="860" y="1190"/> + <variable formalParameter="toggle"> + <relPosition x="0" y="125"/> <variable formalParameter="set_state">
- <relPosition x="0" y="70"/>
+ <relPosition x="0" y="165"/> + <variable formalParameter="state_in"> + <relPosition x="0" y="210"/> - <variable formalParameter="current_state">
+ <variable formalParameter="state_out"> - <relPosition x="240" y="30"/>
+ <relPosition x="240" y="40"/> - <block localId="62" width="240" height="85" typeName="Button" instanceName="Btn8">
- <position x="180" y="1455"/>
+ <block localId="62" width="240" height="220" typeName="Button" instanceName="Btn8"> + <position x="900" y="1355"/> <variable formalParameter="back_id">
- <relPosition x="0" y="30"/>
+ <relPosition x="0" y="40"/> <connection refLocalId="81">
- <position x="180" y="1485"/>
- <position x="140" y="1485"/>
+ <position x="900" y="1395"/> + <position x="860" y="1395"/> <variable formalParameter="sele_id">
- <relPosition x="0" y="50"/>
+ <relPosition x="0" y="80"/> <connection refLocalId="82">
- <position x="180" y="1505"/>
- <position x="160" y="1505"/>
- <position x="160" y="1525"/>
- <position x="140" y="1525"/>
+ <position x="900" y="1435"/> + <position x="860" y="1435"/> + <variable formalParameter="toggle"> + <relPosition x="0" y="120"/> <variable formalParameter="set_state">
- <relPosition x="0" y="70"/>
+ <relPosition x="0" y="160"/> + <variable formalParameter="state_in"> + <relPosition x="0" y="200"/> - <variable formalParameter="current_state">
+ <variable formalParameter="state_out"> - <relPosition x="240" y="30"/>
+ <relPosition x="240" y="40"/> <inVariable localId="63" height="30" width="120">
- <position x="10" y="800"/>
+ <position x="5" y="880"/> <relPosition x="120" y="15"/>
<expression>'btn2_back'</expression>
<inVariable localId="65" height="35" width="125">
- <position x="15" y="950"/>
+ <position x="10" y="1165"/> <relPosition x="125" y="15"/>
<expression>'btn3_sele'</expression>
<inVariable localId="66" height="35" width="125">
- <position x="15" y="910"/>
+ <position x="10" y="1125"/> <relPosition x="125" y="15"/>
<expression>'btn3_back'</expression>
<inVariable localId="67" height="30" width="120">
- <position x="10" y="840"/>
+ <position x="5" y="915"/> <relPosition x="120" y="15"/>
<expression>'btn2_sele'</expression>
<inVariable localId="69" height="35" width="125">
- <position x="15" y="1020"/>
+ <position x="10" y="1380"/> <relPosition x="125" y="15"/>
<expression>'btn4_back'</expression>
<inVariable localId="70" height="35" width="125">
- <position x="15" y="1060"/>
+ <position x="10" y="1420"/> <relPosition x="125" y="15"/>
<expression>'btn4_sele'</expression>
<inVariable localId="72" height="35" width="125">
- <position x="15" y="1130"/>
+ <position x="735" y="640"/> <relPosition x="125" y="15"/>
<expression>'btn5_back'</expression>
<inVariable localId="73" height="35" width="125">
- <position x="15" y="1170"/>
+ <position x="735" y="680"/> <relPosition x="125" y="15"/>
<expression>'btn5_sele'</expression>
<inVariable localId="75" height="35" width="125">
- <position x="15" y="1240"/>
+ <position x="735" y="880"/> <relPosition x="125" y="15"/>
<expression>'btn6_back'</expression>
<inVariable localId="76" height="35" width="125">
- <position x="15" y="1285"/>
+ <position x="735" y="925"/> <relPosition x="125" y="15"/>
<expression>'btn6_sele'</expression>
<inVariable localId="78" height="35" width="125">
- <position x="15" y="1355"/>
+ <position x="735" y="1130"/> <relPosition x="125" y="15"/>
<expression>'btn7_back'</expression>
<inVariable localId="79" height="35" width="125">
- <position x="15" y="1400"/>
+ <position x="735" y="1175"/> <relPosition x="125" y="15"/>
<expression>'btn7_sele'</expression>
<inVariable localId="81" height="35" width="125">
- <position x="15" y="1470"/>
+ <position x="735" y="1380"/> <relPosition x="125" y="15"/>
<expression>'btn8_back'</expression>
<inVariable localId="82" height="35" width="125">
- <position x="15" y="1510"/>
+ <position x="735" y="1420"/> <relPosition x="125" y="15"/>
<expression>'btn8_sele'</expression>
<block localId="83" width="145" height="60" typeName="INT_TO_STRING">
- <position x="395" y="400"/>
+ <position x="600" y="320"/> - <variable formalParameter="EN">
- <relPosition x="0" y="30"/>
- <connection refLocalId="32" formalParameter="ENO">
- <position x="395" y="430"/>
- <position x="230" y="430"/>
<variable formalParameter="IN">
- <relPosition x="0" y="50"/>
- <connection refLocalId="33">
- <position x="395" y="450"/>
- <position x="365" y="450"/>
- <position x="365" y="530"/>
- <position x="335" y="530"/>
+ <relPosition x="0" y="40"/> + <connection refLocalId="4"> + <position x="600" y="360"/> + <position x="555" y="360"/> - <variable formalParameter="ENO">
- <relPosition x="145" y="30"/>
<variable formalParameter="OUT">
- <relPosition x="145" y="50"/>
+ <relPosition x="145" y="40"/> @@ -812,7 +743,7 @@
<position x="505" y="645"/>
<relPosition x="0" y="15"/>
- <connection refLocalId="53" formalParameter="current_state">
+ <connection refLocalId="53" formalParameter="state_out"> <position x="505" y="660"/>
<position x="415" y="660"/>
@@ -820,82 +751,353 @@
<expression>DigitalBit0</expression>
<outVariable localId="85" height="35" width="125">
- <position x="505" y="800"/>
+ <position x="500" y="880"/> <relPosition x="0" y="15"/>
- <connection refLocalId="56" formalParameter="current_state">
- <position x="505" y="815"/>
- <position x="420" y="815"/>
+ <connection refLocalId="56" formalParameter="state_out"> + <position x="500" y="895"/> + <position x="415" y="895"/> <expression>DigitalBit1</expression>
<outVariable localId="91" height="35" width="125">
- <position x="515" y="1470"/>
+ <position x="1230" y="1380"/> <relPosition x="0" y="15"/>
- <connection refLocalId="62" formalParameter="current_state">
- <position x="515" y="1485"/>
- <position x="420" y="1485"/>
+ <connection refLocalId="62" formalParameter="state_out"> + <position x="1230" y="1395"/> + <position x="1140" y="1395"/> <expression>DigitalBit7</expression>
<outVariable localId="90" height="35" width="125">
- <position x="515" y="1360"/>
+ <position x="1235" y="1130"/> <relPosition x="0" y="15"/>
- <connection refLocalId="61" formalParameter="current_state">
- <position x="515" y="1375"/>
- <position x="420" y="1375"/>
+ <connection refLocalId="61" formalParameter="state_out"> + <position x="1235" y="1145"/> + <position x="1140" y="1145"/> <expression>DigitalBit6</expression>
<outVariable localId="89" height="35" width="125">
- <position x="510" y="1245"/>
+ <position x="1230" y="880"/> <relPosition x="0" y="15"/>
- <connection refLocalId="60" formalParameter="current_state">
- <position x="510" y="1260"/>
- <position x="420" y="1260"/>
+ <connection refLocalId="60" formalParameter="state_out"> + <position x="1230" y="895"/> + <position x="1140" y="895"/> <expression>DigitalBit5</expression>
<outVariable localId="88" height="35" width="125">
- <position x="510" y="1130"/>
+ <position x="1230" y="640"/> <relPosition x="0" y="15"/>
- <connection refLocalId="59" formalParameter="current_state">
- <position x="510" y="1145"/>
- <position x="420" y="1145"/>
+ <connection refLocalId="59" formalParameter="state_out"> + <position x="1230" y="655"/> + <position x="1140" y="655"/> <expression>DigitalBit4</expression>
<outVariable localId="87" height="35" width="125">
- <position x="505" y="1020"/>
+ <position x="500" y="1380"/> <relPosition x="0" y="15"/>
- <connection refLocalId="58" formalParameter="current_state">
- <position x="505" y="1035"/>
- <position x="420" y="1035"/>
+ <connection refLocalId="58" formalParameter="state_out"> + <position x="500" y="1395"/> + <position x="415" y="1395"/> <expression>DigitalBit3</expression>
<outVariable localId="86" height="35" width="125">
- <position x="505" y="910"/>
+ <position x="500" y="1125"/> <relPosition x="0" y="15"/>
- <connection refLocalId="57" formalParameter="current_state">
- <position x="505" y="925"/>
- <position x="420" y="925"/>
+ <connection refLocalId="57" formalParameter="state_out"> + <position x="500" y="1140"/> + <position x="415" y="1140"/> <expression>DigitalBit2</expression>
+ <block localId="92" width="200" height="230" typeName="Button" instanceName="Start_Stop"> + <position x="225" y="155"/> + <variable formalParameter="back_id"> + <relPosition x="0" y="40"/> + <connection refLocalId="41"> + <position x="225" y="195"/> + <position x="165" y="195"/> + <variable formalParameter="sele_id"> + <relPosition x="0" y="85"/> + <connection refLocalId="42"> + <position x="225" y="240"/> + <position x="165" y="240"/> + <variable formalParameter="toggle"> + <relPosition x="0" y="125"/> + <connection refLocalId="93"> + <position x="225" y="280"/> + <position x="165" y="280"/> + <variable formalParameter="set_state"> + <relPosition x="0" y="165"/> + <variable formalParameter="state_in"> + <relPosition x="0" y="210"/> + <variable formalParameter="state_out"> + <relPosition x="200" y="40"/> + <inVariable localId="93" height="30" width="70"> + <position x="95" y="265"/> + <relPosition x="70" y="15"/> + <expression>BOOL#1</expression> + <block localId="94" width="100" height="145" typeName="TextCtrl" instanceName="Compteur"> + <position x="900" y="240"/> + <variable formalParameter="back_id"> + <relPosition x="0" y="40"/> + <connection refLocalId="46"> + <position x="900" y="280"/> + <position x="855" y="280"/> + <variable formalParameter="set_text"> + <relPosition x="0" y="80"/> + <connection refLocalId="3"> + <position x="900" y="320"/> + <position x="855" y="320"/> + <variable formalParameter="text"> + <relPosition x="0" y="120"/> + <connection refLocalId="83" formalParameter="OUT"> + <position x="900" y="360"/> + <position x="745" y="360"/> + <inVariable localId="1" height="30" width="70"> + <position x="80" y="85"/> + <relPosition x="70" y="15"/> + <expression>BOOL#1</expression> + <block localId="95" width="100" height="130" typeName="Led" instanceName="Temoin"> + <position x="900" y="55"/> + <variable formalParameter="back_id"> + <relPosition x="0" y="40"/> + <connection refLocalId="51"> + <position x="900" y="95"/> + <position x="835" y="95"/> + <variable formalParameter="sele_id"> + <relPosition x="0" y="75"/> + <connection refLocalId="52"> + <position x="900" y="130"/> + <position x="835" y="130"/> + <variable formalParameter="state_in"> + <relPosition x="0" y="110"/> + <connection refLocalId="2"> + <position x="900" y="165"/> + <position x="835" y="165"/> + <block localId="96" width="80" height="65" typeName="AND"> + <position x="200" y="45"/> + <variable formalParameter="IN1" negated="true"> + <relPosition x="0" y="30"/> + <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"/> + <variable formalParameter="IN2"> + <relPosition x="0" y="55"/> + <connection refLocalId="1"> + <position x="200" y="100"/> + <position x="150" y="100"/> + <variable formalParameter="OUT"> + <relPosition x="80" y="30"/> + <connector name="CLOCK" localId="97" height="30" width="90"> + <position x="345" y="60"/> + <relPosition x="0" y="15"/> + <connection refLocalId="96" formalParameter="OUT"> + <position x="345" y="75"/> + <position x="280" y="75"/> + <connector name="COUNT" localId="98" height="30" width="90"> + <position x="485" y="180"/> + <relPosition x="0" y="15"/> + <connection refLocalId="92" formalParameter="state_out"> + <position x="485" y="195"/> + <position x="425" y="195"/> + <continuation name="COUNT" localId="2" height="30" width="90"> + <position x="745" y="150"/> + <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"/> + <variable formalParameter="IN1"> + <relPosition x="0" y="40"/> + <connection refLocalId="39"> + <position x="215" y="485"/> + <position x="160" y="485"/> + <variable formalParameter="IN2"> + <relPosition x="0" y="85"/> + <connection refLocalId="6"> + <position x="215" y="530"/> + <position x="160" y="530"/> + <variable formalParameter="OUT"> + <relPosition x="80" y="40"/> + <continuation name="CLOCK" localId="6" height="30" width="90"> + <position x="70" y="515"/> + <relPosition x="90" y="15"/> + <block localId="100" width="125" height="45" typeName="BOOL_TO_INT"> + <position x="365" y="455"/> + <variable formalParameter="IN"> + <relPosition x="0" y="30"/> + <connection refLocalId="99" formalParameter="OUT"> + <position x="365" y="485"/> + <position x="295" y="485"/> + <variable formalParameter="OUT"> + <relPosition x="125" y="30"/> + <continuation name="CLOCK" localId="3" height="30" width="90"> + <position x="765" y="305"/> + <relPosition x="90" y="15"/>