Adding example of path generator program
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/motion/beremiz.xml Wed Jan 14 19:50:09 2009 +0100
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?> +<BeremizRoot URI_location="LOCAL://"> + <Linux CFLAGS="-g -fPIC" LDFLAGS="-g -fPIC"/> --- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/motion/plc.xml Wed Jan 14 19:50:09 2009 +0100
@@ -0,0 +1,585 @@
+<?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="Lolitech" + creationDateTime="2009-01-13T12:15:00"/> + <contentHeader name="GenTraj" + modificationDateTime="2009-01-14T20:10:13"> + <pou name="GenTraj" pouType="functionBlock"> + <variable name="Period"> + <variable name="delta"> +<![CDATA[IF Period <> P THEN + delta := Pf - P0 - V0 * P; + Va := SQRT(ABS(2.0 * Gmvt * delta) + Vf * Vf); + Vb := Vf + delta * Fs3; + Vaut := MIN(ABS(Vb), Vmvt); + Gn := MIN(ABS((Vaut - V0) * F), Gmvt); +Pn := P0 + (Vn + V0) * Ps2; +IF (P0 >= Pf) <> (Pn >= Pf) AND Vf <> 0.0 THEN + <pou name="TestMotion" pouType="program"> + <simpleValue value="TRUE"/> + <variable name="GenTraj1"> + <derived name="GenTraj"/> + <variable name="py_eval"> + <derived name="python_eval"/> + <inVariable localId="2" height="25" width="63"> + <position x="203" y="208"/> + <relPosition x="63" y="12"/> + <expression>GO</expression> + <inVariable localId="4" height="25" width="100"> + <position x="295" y="312"/> + <relPosition x="100" y="12"/> + <expression>REAL#0.1</expression> + <inVariable localId="6" height="25" width="100"> + <position x="294" y="345"/> + <relPosition x="100" y="12"/> + <expression>REAL#1.0</expression> + <inVariable localId="7" height="25" width="99"> + <position x="294" y="378"/> + <relPosition x="99" y="12"/> + <expression>REAL#1.0</expression> + <inVariable localId="8" height="25" width="100"> + <position x="292" y="477"/> + <relPosition x="100" y="12"/> + <expression>REAL#10.0</expression> + <block localId="9" width="178" height="290" typeName="GenTraj" instanceName="GenTraj1"> + <position x="488" y="255"/> + <variable formalParameter="EN"> + <relPosition x="0" y="36"/> + <connection refLocalId="13" formalParameter="Q1"> + <position x="488" y="291"/> + <position x="442" y="291"/> + <position x="442" y="259"/> + <position x="396" y="259"/> + <variable formalParameter="Period"> + <relPosition x="0" y="69"/> + <connection refLocalId="4"> + <position x="488" y="324"/> + <position x="395" y="324"/> + <variable formalParameter="Gmvt"> + <relPosition x="0" y="102"/> + <connection refLocalId="6"> + <position x="488" y="357"/> + <position x="394" y="357"/> + <variable formalParameter="Vmvt"> + <relPosition x="0" y="135"/> + <connection refLocalId="7"> + <position x="488" y="390"/> + <position x="393" y="390"/> + <variable formalParameter="P0"> + <relPosition x="0" y="168"/> + <connection refLocalId="9" formalParameter="Pn"> + <position x="488" y="423"/> + <position x="430" y="423"/> + <position x="430" y="607"/> + <position x="724" y="607"/> + <position x="724" y="324"/> + <position x="666" y="324"/> + <variable formalParameter="V0"> + <relPosition x="0" y="201"/> + <connection refLocalId="9" formalParameter="Vn"> + <position x="488" y="456"/> + <position x="453" y="456"/> + <position x="453" y="577"/> + <position x="696" y="577"/> + <position x="696" y="357"/> + <position x="666" y="357"/> + <variable formalParameter="Pf"> + <relPosition x="0" y="234"/> + <connection refLocalId="8"> + <position x="488" y="489"/> + <position x="392" y="489"/> + <variable formalParameter="Vf"> + <relPosition x="0" y="267"/> + <connection refLocalId="10"> + <position x="488" y="522"/> + <position x="392" y="522"/> + <variable formalParameter="ENO"> + <relPosition x="178" y="36"/> + <variable formalParameter="Pn"> + <relPosition x="178" y="69"/> + <variable formalParameter="Vn"> + <relPosition x="178" y="102"/> + <variable formalParameter="Gn"> + <relPosition x="178" y="135"/> + <inVariable localId="10" height="25" width="99"> + <position x="293" y="510"/> + <relPosition x="99" y="12"/> + <expression>REAL#0.0</expression> + <block localId="11" width="75" height="70" typeName="EQ"> + <position x="197" y="247"/> + <variable formalParameter="IN1"> + <relPosition x="0" y="32"/> + <connection refLocalId="9" formalParameter="Pn"> + <position x="197" y="279"/> + <position x="145" y="279"/> + <position x="145" y="629"/> + <position x="724" y="629"/> + <position x="724" y="324"/> + <position x="666" y="324"/> + <variable formalParameter="IN2"> + <relPosition x="0" y="57"/> + <connection refLocalId="8"> + <position x="197" y="304"/> + <position x="176" y="304"/> + <position x="176" y="433"/> + <position x="409" y="433"/> + <position x="409" y="489"/> + <position x="392" y="489"/> + <variable formalParameter="OUT"> + <relPosition x="75" y="32"/> + <block localId="12" width="120" height="87" typeName="python_eval" instanceName="py_eval"> + <position x="318" y="73"/> + <variable formalParameter="TRIG"> + <relPosition x="0" y="36"/> + <connection refLocalId="15" formalParameter="OUT"> + <position x="318" y="109"/> + <position x="225" y="109"/> + <variable formalParameter="CODE"> + <relPosition x="0" y="69"/> + <connection refLocalId="14"> + <position x="318" y="142"/> + <position x="280" y="142"/> + <variable formalParameter="ACK"> + <relPosition x="120" y="36"/> + <variable formalParameter="RESULT"> + <relPosition x="120" y="69"/> + <block localId="13" width="55" height="60" typeName="RS" instanceName="RS1"> + <position x="341" y="229"/> + <variable formalParameter="S"> + <relPosition x="0" y="30"/> + <connection refLocalId="2"> + <position x="341" y="259"/> + <position x="303" y="259"/> + <position x="303" y="220"/> + <position x="266" y="220"/> + <variable formalParameter="R1"> + <relPosition x="0" y="50"/> + <connection refLocalId="11" formalParameter="OUT"> + <position x="341" y="279"/> + <position x="272" y="279"/> + <variable formalParameter="Q1"> + <relPosition x="55" y="30"/> + <inVariable localId="14" height="25" width="50"> + <position x="230" y="130"/> + <relPosition x="50" y="12"/> + <expression>'GO'</expression> + <block localId="15" width="65" height="40" typeName="NOT"> + <position x="160" y="79"/> + <variable formalParameter="IN"> + <relPosition x="0" y="30"/> + <connection refLocalId="16"> + <position x="160" y="109"/> + <position x="118" y="109"/> + <variable formalParameter="OUT"> + <relPosition x="65" y="30"/> + <inOutVariable localId="16" height="25" width="50"> + <position x="68" y="97"/> + <relPosition x="0" y="12"/> + <connection refLocalId="15" formalParameter="OUT"> + <position x="68" y="109"/> + <position x="42" y="109"/> + <position x="42" y="50"/> + <position x="262" y="50"/> + <position x="262" y="109"/> + <position x="225" y="109"/> + <relPosition x="50" y="12"/> + <expression>TRIG</expression> + <block localId="17" width="140" height="40" typeName="STRING_TO_INT"> + <position x="486" y="112"/> + <variable formalParameter="IN"> + <relPosition x="0" y="30"/> + <connection refLocalId="12" formalParameter="RESULT"> + <position x="486" y="142"/> + <position x="438" y="142"/> + <variable formalParameter="OUT"> + <relPosition x="140" y="30"/> + <block localId="18" width="120" height="40" typeName="INT_TO_BOOL"> + <position x="671" y="112"/> + <variable formalParameter="IN"> + <relPosition x="0" y="30"/> + <connection refLocalId="17" formalParameter="OUT"> + <position x="671" y="142"/> + <position x="626" y="142"/> + <variable formalParameter="OUT"> + <relPosition x="120" y="30"/> + <outVariable localId="19" height="25" width="63"> + <position x="826" y="130"/> + <relPosition x="0" y="12"/> + <connection refLocalId="18" formalParameter="OUT"> + <position x="826" y="142"/> + <position x="791" y="142"/> + <expression>GO</expression> + <configuration name="config"> + <task name="MAIN_TASK" interval="00:00:00.100000" priority="0"> + <pouInstance name="MAIN_INSTANCE" type="TestMotion"/> --- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/motion/runtime.py Wed Jan 14 19:50:09 2009 +0100
@@ -0,0 +1,1 @@
\ No newline at end of file