--- a/pous.xml Tue Dec 23 23:56:29 2008 +0100
+++ b/pous.xml Wed Dec 24 00:02:12 2008 +0100
@@ -8,7 +8,7 @@
creationDateTime="2008-12-14T16:53:26"/>
<contentHeader name="Beremiz non-standard POUs library"
- modificationDateTime="2008-12-18T18:41:34">
+ modificationDateTime="2008-12-23T22:35:46"> @@ -61,11 +61,21 @@
+ <variable name="PREBUFFER"> + <variable name="TRIGGED"> --- a/tests/python/plc.xml Tue Dec 23 23:56:29 2008 +0100
+++ b/tests/python/plc.xml Wed Dec 24 00:02:12 2008 +0100
@@ -8,7 +8,7 @@
creationDateTime="2008-12-14T16:21:19"/>
<contentHeader name="Beremiz Python Support Tests"
- modificationDateTime="2008-12-22T23:58:02">
+ modificationDateTime="2008-12-24T00:54:43"> <pageSize x="1024" y="1024"/>
@@ -32,63 +32,54 @@
- <simpleValue value="time.sleep(1)"/>
<variable name="pytest_var2">
- <variable name="pytest_var3">
- <variable name="pytest_var4">
<derived name="python_eval"/>
+ <variable name="Block1"> + <derived name="python_eval"/> + <variable name="Block2"> + <derived name="python_eval"/> + <variable name="Block3"> + <derived name="python_eval"/> - <outVariable localId="2" height="30" width="120">
- <position x="760" y="150"/>
- <relPosition x="0" y="15"/>
- <connection refLocalId="5" formalParameter="RESULT">
- <position x="760" y="165"/>
- <position x="515" y="165"/>
- <expression>pytest_var3</expression>
- <inVariable localId="4" height="30" width="120">
- <position x="35" y="150"/>
+ <inVariable localId="4" height="30" width="160"> + <position x="295" y="235"/> - <relPosition x="120" y="15"/>
+ <relPosition x="160" y="15"/> - <expression>pytest_var1</expression>
+ <expression>'time.sleep(1)'</expression> <block localId="5" width="125" height="80" typeName="python_eval" instanceName="py1">
- <position x="390" y="100"/>
+ <position x="650" y="185"/> <variable formalParameter="TRIG">
<relPosition x="0" y="35"/>
<connection refLocalId="7" formalParameter="OUT">
- <position x="390" y="135"/>
- <position x="190" y="135"/>
- <position x="190" y="55"/>
- <position x="130" y="55"/>
+ <position x="650" y="220"/> + <position x="285" y="220"/> + <position x="285" y="260"/> + <position x="250" y="260"/> @@ -96,8 +87,8 @@
<relPosition x="0" y="65"/>
<connection refLocalId="4">
- <position x="390" y="165"/>
- <position x="155" y="165"/>
+ <position x="650" y="250"/> + <position x="455" y="250"/> @@ -116,30 +107,15 @@
- <outVariable localId="6" height="30" width="120">
- <position x="760" y="120"/>
- <relPosition x="0" y="15"/>
- <connection refLocalId="5" formalParameter="ACK">
- <position x="760" y="135"/>
- <position x="515" y="135"/>
- <expression>pytest_var4</expression>
<block localId="7" width="70" height="45" typeName="NOT">
- <position x="60" y="25"/>
+ <position x="180" y="230"/> <variable formalParameter="IN">
<relPosition x="0" y="30"/>
<connection refLocalId="3">
- <position x="60" y="55"/>
- <position x="45" y="55"/>
- <position x="45" y="85"/>
- <position x="165" y="85"/>
- <position x="165" y="120"/>
- <position x="155" y="120"/>
+ <position x="180" y="260"/> + <position x="155" y="260"/> @@ -154,16 +130,16 @@
<inOutVariable localId="3" height="30" width="120">
- <position x="35" y="105"/>
+ <position x="35" y="245"/> <relPosition x="0" y="15"/>
<connection refLocalId="7" formalParameter="OUT">
- <position x="35" y="120"/>
- <position x="25" y="120"/>
- <position x="25" y="15"/>
- <position x="210" y="15"/>
- <position x="210" y="55"/>
- <position x="130" y="55"/>
+ <position x="35" y="260"/> + <position x="25" y="260"/> + <position x="25" y="220"/> + <position x="270" y="220"/> + <position x="270" y="260"/> + <position x="250" y="260"/> @@ -171,6 +147,147 @@
<expression>pytest_var2</expression>
+ <block localId="8" width="125" height="80" typeName="python_eval" instanceName="Block1"> + <position x="650" y="295"/> + <variable formalParameter="TRIG"> + <relPosition x="0" y="35"/> + <connection refLocalId="7" formalParameter="OUT"> + <position x="650" y="330"/> + <position x="285" y="330"/> + <position x="285" y="260"/> + <position x="250" y="260"/> + <variable formalParameter="CODE"> + <relPosition x="0" y="65"/> + <connection refLocalId="9"> + <position x="650" y="360"/> + <position x="585" y="360"/> + <variable formalParameter="ACK"> + <relPosition x="125" y="35"/> + <variable formalParameter="RESULT"> + <relPosition x="125" y="65"/> + <inVariable localId="9" height="30" width="290"> + <position x="295" y="345"/> + <relPosition x="290" y="15"/> + <expression>'sys.stdout.write("1234\n")'</expression> + <inVariable localId="11" height="30" width="290"> + <position x="290" y="465"/> + <relPosition x="290" y="15"/> + <expression>'sys.stdout.write("5678\n")'</expression> + <block localId="12" width="125" height="80" typeName="python_eval" instanceName="Block2"> + <position x="650" y="417"/> + <variable formalParameter="TRIG"> + <relPosition x="0" y="33"/> + <connection refLocalId="7" formalParameter="OUT"> + <position x="650" y="450"/> + <position x="285" y="450"/> + <position x="285" y="260"/> + <position x="250" y="260"/> + <variable formalParameter="CODE"> + <relPosition x="0" y="63"/> + <connection refLocalId="11"> + <position x="650" y="480"/> + <position x="580" y="480"/> + <variable formalParameter="ACK"> + <relPosition x="125" y="33"/> + <variable formalParameter="RESULT"> + <relPosition x="125" y="63"/> + <inVariable localId="14" height="30" width="290"> + <position x="290" y="590"/> + <relPosition x="290" y="15"/> + <expression>'sys.stdout.write("90AB\n")'</expression> + <block localId="15" width="125" height="80" typeName="python_eval" instanceName="Block3"> + <position x="650" y="542"/> + <variable formalParameter="TRIG"> + <relPosition x="0" y="33"/> + <connection refLocalId="7" formalParameter="OUT"> + <position x="650" y="575"/> + <position x="285" y="575"/> + <position x="285" y="260"/> + <position x="250" y="260"/> + <variable formalParameter="CODE"> + <relPosition x="0" y="63"/> + <connection refLocalId="14"> + <position x="650" y="605"/> + <position x="580" y="605"/> + <variable formalParameter="ACK"> + <relPosition x="125" y="33"/> + <variable formalParameter="RESULT"> + <relPosition x="125" y="63"/> + <comment localId="16" height="90" width="680"> + <position x="50" y="25"/> +<![CDATA[This example test that, despite of 2T period clock stimulating TRIG pin of pyth_eval blocks, blocks keep executing one after the other, in respect of execution order.]]>