Moved DS401 Slave Gui based demo to test_master_DS401GUI. test_master is now a pure simple master, supposed to work with test_slave.
--- a/tests/linux/test_master/beremiz.xml Wed Jun 25 17:09:24 2008 +0200
+++ b/tests/linux/test_master/beremiz.xml Wed Jun 25 17:11:47 2008 +0200
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<BeremizRoot CFLAGS="-g" Linker="g++" LDFLAGS="-g">
+<BeremizRoot CFLAGS="-g" Linker="g++" LDFLAGS=""> --- a/tests/linux/test_master/plc.xml Wed Jun 25 17:09:24 2008 +0200
+++ b/tests/linux/test_master/plc.xml Wed Jun 25 17:11:47 2008 +0200
@@ -3,1196 +3,87 @@
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 http://www.plcopen.org/xml/tc6.xsd">
- <fileHeader companyName="LOLITECH"
- companyURL="www.lolitech.com"
+ <fileHeader companyName="lolitech"
- creationDateTime="2007-07-07 11:58:26"
- contentDescription="This tests as most as possible IEC standard library"/>
- <contentHeader name="STD_TEST"
- modificationDateTime="2008-06-24 17:46:11">
+ creationDateTime="2008-06-24 18:44:00"/> + <contentHeader name="test_slave" + modificationDateTime="2008-06-25 16:42:30"
- <dataType name="MYTYPE">
- <range lower="0" upper="1000"/>
- <dataType name="MYTYPE2">
- <simpleValue value="CLOSED"/>
- <dataType name="MYTYPE3">
- <dimension lower="1" upper="8"/>
- <dimension lower="1" upper="8"/>
- <derived name="MYTYPE5"/>
- <value repetitionValue="32">
- <simpleValue value="0"/>
- <value repetitionValue="30">
- <simpleValue value="1"/>
- <dataType name="MYTYPE4">
- <range lower="1" upper="100"/>
- <dataType name="MYTYPE5">
- <derived name="MYTYPE4"/>
- <simpleValue value="10"/>
- <pou name="MAIN_TEST" pouType="program">
+ <pou name="test_main" pouType="program"> - <variable name="DigitalOut" address="%QB0.0.16.25088.1">
- <variable name="DigitalIn" address="%IB0.0.32.24576.1">
- <variable name="AnalogOut1" address="%QW0.0.16.25617.1">
- <derived name="MYTYPE"/>
- <variable name="AnalogOut2" address="%QW0.0.16.25617.2">
- <derived name="MYTYPE"/>
- <variable name="AnalogOut3" address="%QW0.0.16.25617.3">
+ <variable name="PLC_OUT" address="%QW0.0.3.8193.0"> - <variable name="AnalogOut4" address="%QW0.0.16.25617.4">
- <variable name="AnalogIn1" address="%IW0.0.32.25601.1">
- <variable name="AnalogIn2" address="%IW0.0.32.25601.2">
+ <variable name="PLC_IN" address="%IW0.0.3.8192.0"> - <variable name="DeviceType" address="%ID0.0.4096.0">
- <derived name="Bitwise_Block"/>
- <variable name="Test2">
- <derived name="Test_SFC"/>
- <variable name="latch">
- <comment localId="26" height="80" width="475">
- <position x="25" y="5"/>
-<![CDATA[Main program]]>
- <inVariable localId="34" height="30" width="95">
- <position x="40" y="535"/>
- <relPosition x="95" y="15"/>
- <expression>DigitalIn</expression>
- <outVariable localId="36" height="30" width="100">
- <position x="915" y="450"/>
+ <outVariable localId="1" height="29" width="80"> + <position x="362" y="140"/> - <relPosition x="0" y="15"/>
- <connection refLocalId="39">
- <position x="915" y="465"/>
- <position x="885" y="465"/>
- <position x="885" y="465"/>
- <position x="925" y="465"/>
- <position x="925" y="465"/>
- <position x="865" y="465"/>
- <expression>DigitalOut</expression>
- <block localId="37" width="107" height="60" typeName="GETBIT">
- <position x="195" y="520"/>
- <variable formalParameter="INPUT_BYTE">
- <relPosition x="0" y="30"/>
- <connection refLocalId="34">
- <position x="195" y="550"/>
- <position x="135" y="550"/>
- <variable formalParameter="NUM_BIT">
- <relPosition x="0" y="50"/>
- <connection refLocalId="38">
- <position x="195" y="570"/>
- <position x="165" y="570"/>
- <position x="165" y="585"/>
- <position x="105" y="585"/>
- <variable formalParameter="">
- <relPosition x="107" y="30"/>
- <inVariable localId="38" height="30" width="65">
- <position x="40" y="570"/>
- <relPosition x="65" y="15"/>
- <expression>UINT#0</expression>
- <block localId="39" width="120" height="80" typeName="SETBIT">
- <position x="745" y="435"/>
- <variable formalParameter="INPUT_BYTE">
- <relPosition x="0" y="30"/>
- <connection refLocalId="95">
- <position x="745" y="465"/>
- <position x="695" y="465"/>
- <variable formalParameter="INPUT_BIT">
- <relPosition x="0" y="50"/>
- <connection refLocalId="52" formalParameter="OUT_AND">
- <position x="745" y="485"/>
- <position x="569" y="485"/>
- <position x="569" y="550"/>
- <position x="513" y="550"/>
- <variable formalParameter="NUM_BIT">
- <relPosition x="0" y="70"/>
- <connection refLocalId="96">
- <position x="745" y="505"/>
- <position x="690" y="505"/>
- <variable formalParameter="">
- <relPosition x="120" y="30"/>
- <inVariable localId="40" height="30" width="100">
- <position x="25" y="155"/>
- <relPosition x="100" y="15"/>
- <expression>DigitalOut</expression>
- <block localId="42" width="120" height="85" typeName="SETBIT">
- <position x="745" y="530"/>
- <variable formalParameter="INPUT_BYTE">
- <relPosition x="0" y="30"/>
- <connection refLocalId="94">
- <position x="745" y="560"/>
- <position x="690" y="560"/>
- <variable formalParameter="INPUT_BIT">
- <relPosition x="0" y="50"/>
- <connection refLocalId="52" formalParameter="OUT_OR">
- <position x="745" y="580"/>
- <position x="513" y="580"/>
- <variable formalParameter="NUM_BIT">
- <relPosition x="0" y="70"/>
- <connection refLocalId="93">
- <position x="745" y="600"/>
- <position x="690" y="600"/>
- <variable formalParameter="">
- <relPosition x="120" y="30"/>
- <outVariable localId="43" height="30" width="100">
- <position x="910" y="545"/>
- <relPosition x="0" y="15"/>
- <connection refLocalId="42">
- <position x="910" y="560"/>
- <position x="865" y="560"/>
- <expression>DigitalOut</expression>
- <block localId="44" width="115" height="60" typeName="GETBIT">
- <position x="195" y="595"/>
- <variable formalParameter="INPUT_BYTE">
- <relPosition x="0" y="30"/>
- <connection refLocalId="97">
- <position x="195" y="625"/>
- <position x="135" y="625"/>
- <variable formalParameter="NUM_BIT">
- <relPosition x="0" y="50"/>
- <connection refLocalId="45">
- <position x="195" y="645"/>
- <position x="154" y="645"/>
- <position x="154" y="660"/>
- <position x="105" y="660"/>
- <variable formalParameter="">
- <relPosition x="115" y="30"/>
- <inVariable localId="45" height="30" width="65">
- <position x="40" y="645"/>
- <relPosition x="65" y="15"/>
- <expression>UINT#1</expression>
- <block localId="46" width="120" height="80" typeName="SETBIT">
- <position x="745" y="630"/>
- <variable formalParameter="INPUT_BYTE">
- <relPosition x="0" y="30"/>
- <connection refLocalId="92">
- <position x="745" y="660"/>
- <position x="690" y="660"/>
- <variable formalParameter="INPUT_BIT">
- <relPosition x="0" y="50"/>
- <connection refLocalId="52" formalParameter="OUT_XOR">
- <position x="745" y="680"/>
- <position x="555" y="680"/>
- <position x="555" y="610"/>
- <position x="513" y="610"/>
- <variable formalParameter="NUM_BIT">
- <relPosition x="0" y="70"/>
- <connection refLocalId="49">
- <position x="745" y="700"/>
- <position x="690" y="700"/>
- <variable formalParameter="">
- <relPosition x="120" y="30"/>
- <outVariable localId="47" height="30" width="105">
- <position x="910" y="645"/>
- <relPosition x="0" y="15"/>
- <connection refLocalId="46">
- <position x="910" y="660"/>
- <position x="865" y="660"/>
- <expression>DigitalOut</expression>
- <inVariable localId="49" height="30" width="65">
- <position x="625" y="685"/>
- <relPosition x="65" y="15"/>
- <expression>UINT#2</expression>
- <block localId="50" width="120" height="80" typeName="SETBIT">
- <position x="745" y="725"/>
- <variable formalParameter="INPUT_BYTE">
- <relPosition x="0" y="30"/>
- <connection refLocalId="91">
- <position x="745" y="755"/>
- <position x="690" y="755"/>
- <variable formalParameter="INPUT_BIT">
- <relPosition x="0" y="50"/>
- <connection refLocalId="52" formalParameter="OUT_SR">
- <position x="745" y="775"/>
- <position x="525" y="775"/>
- <position x="525" y="640"/>
- <position x="513" y="640"/>
- <variable formalParameter="NUM_BIT">
- <relPosition x="0" y="70"/>
- <connection refLocalId="53">
- <position x="745" y="795"/>
- <position x="692" y="795"/>
- <variable formalParameter="">
- <relPosition x="120" y="30"/>
- <outVariable localId="51" height="30" width="100">
- <position x="910" y="740"/>
- <relPosition x="0" y="15"/>
- <connection refLocalId="50">
- <position x="910" y="755"/>
- <position x="865" y="755"/>
+ <relPosition x="0" y="14"/> + <connection refLocalId="4" formalParameter="OUT"> + <position x="362" y="154"/> + <position x="330" y="154"/> + <position x="330" y="153"/> + <position x="299" y="153"/> - <expression>DigitalOut</expression>
+ <expression>PLC_OUT</expression> - <block localId="52" width="127" height="141" typeName="Bitwise_Block" instanceName="Test">
- <position x="386" y="515"/>
- <variable formalParameter="IN1">
- <relPosition x="0" y="35"/>
- <connection refLocalId="37">
- <position x="386" y="550"/>
- <position x="302" y="550"/>
- <variable formalParameter="IN2">
- <relPosition x="0" y="65"/>
- <connection refLocalId="44">
- <position x="386" y="580"/>
- <position x="365" y="580"/>
- <position x="365" y="625"/>
- <position x="310" y="625"/>
- <variable formalParameter="OUT_AND">
- <relPosition x="127" y="35"/>
- <variable formalParameter="OUT_OR">
- <relPosition x="127" y="65"/>
- <variable formalParameter="OUT_XOR">
- <relPosition x="127" y="95"/>
- <variable formalParameter="OUT_SR">
- <relPosition x="127" y="125"/>
- <inVariable localId="53" height="30" width="67">
- <position x="625" y="780"/>
+ <inVariable localId="2" height="29" width="20"> + <position x="100" y="115"/> - <relPosition x="67" y="15"/>
- <expression>UINT#3</expression>
- <inVariable localId="59" height="30" width="100">
- <position x="45" y="910"/>
- <relPosition x="100" y="15"/>
- <expression>AnalogOut1</expression>
- <outVariable localId="60" height="30" width="100">
- <position x="910" y="840"/>
- <relPosition x="0" y="15"/>
- <connection refLocalId="69" formalParameter="OUT1">
- <position x="910" y="855"/>
- <position x="610" y="855"/>
- <expression>AnalogOut1</expression>
- <inVariable localId="64" height="30" width="95">
- <position x="45" y="980"/>
- <relPosition x="95" y="15"/>
+ <relPosition x="20" y="14"/> - <expression>AnalogIn1</expression>
- <block localId="69" width="160" height="230" typeName="Test_SFC" instanceName="Test2">
- <position x="450" y="820"/>
- <variable formalParameter="CNT1">
- <relPosition x="0" y="35"/>
- <connection refLocalId="37">
- <position x="450" y="855"/>
- <position x="340" y="855"/>
- <position x="340" y="550"/>
- <position x="302" y="550"/>
- <variable formalParameter="CNT2">
- <relPosition x="0" y="70"/>
- <connection refLocalId="44">
- <position x="450" y="890"/>
- <position x="365" y="890"/>
- <position x="365" y="625"/>
- <position x="310" y="625"/>
- <variable formalParameter="IN1">
- <relPosition x="0" y="105"/>
- <connection refLocalId="59">
- <position x="450" y="925"/>
- <position x="145" y="925"/>
- <variable formalParameter="IN2">
- <relPosition x="0" y="140"/>
- <connection refLocalId="71">
- <position x="450" y="960"/>
- <position x="145" y="960"/>
- <variable formalParameter="UPPER1">
- <relPosition x="0" y="175"/>
- <connection refLocalId="64">
- <position x="450" y="995"/>
- <position x="140" y="995"/>
- <variable formalParameter="UPPER2">
- <relPosition x="0" y="210"/>
- <connection refLocalId="72">
- <position x="450" y="1030"/>
- <position x="140" y="1030"/>
- <variable formalParameter="OUT1">
- <relPosition x="160" y="35"/>
- <variable formalParameter="OUT2">
- <relPosition x="160" y="70"/>
- <outVariable localId="70" height="30" width="100">
- <position x="910" y="875"/>
- <relPosition x="0" y="15"/>
- <connection refLocalId="69" formalParameter="OUT2">
- <position x="910" y="890"/>
- <position x="610" y="890"/>
- <expression>AnalogOut2</expression>
- <inVariable localId="71" height="30" width="100">
- <position x="45" y="945"/>
- <relPosition x="100" y="15"/>
- <expression>AnalogOut2</expression>
- <inVariable localId="72" height="35" width="95">
- <position x="45" y="1015"/>
- <relPosition x="95" y="15"/>
- <expression>AnalogIn2</expression>
+ <expression>1</expression> - <block localId="73" width="120" height="80" typeName="SETBIT">
- <position x="745" y="140"/>
- <variable formalParameter="INPUT_BYTE">
- <relPosition x="0" y="30"/>
- <connection refLocalId="40">
- <position x="745" y="170"/>
- <position x="125" y="170"/>
- <variable formalParameter="INPUT_BIT">
- <relPosition x="0" y="50"/>
- <connection refLocalId="77" formalParameter="Q">
- <position x="745" y="190"/>
- <position x="526" y="190"/>
- <position x="526" y="220"/>
- <position x="507" y="220"/>
- <variable formalParameter="NUM_BIT">
- <relPosition x="0" y="70"/>
- <connection refLocalId="74">
- <position x="745" y="210"/>
- <position x="540" y="210"/>
- <position x="540" y="295"/>
- <position x="95" y="295"/>
- <variable formalParameter="">
- <relPosition x="120" y="30"/>
- <inVariable localId="74" height="30" width="65">
- <position x="30" y="280"/>
- <relPosition x="65" y="15"/>
- <expression>UINT#7</expression>
- <block localId="75" width="120" height="60" typeName="GETBIT">
- <position x="170" y="190"/>
- <variable formalParameter="INPUT_BYTE">
- <relPosition x="0" y="30"/>
- <connection refLocalId="40">
- <position x="170" y="220"/>
- <position x="150" y="220"/>
- <position x="150" y="170"/>
- <position x="125" y="170"/>
- <variable formalParameter="NUM_BIT">
- <relPosition x="0" y="50"/>
- <connection refLocalId="74">
- <position x="170" y="240"/>
- <position x="151" y="240"/>
- <position x="151" y="295"/>
- <position x="95" y="295"/>
- <variable formalParameter="">
- <relPosition x="120" y="30"/>
- <outVariable localId="76" height="30" width="100">
- <position x="910" y="155"/>
- <relPosition x="0" y="15"/>
- <connection refLocalId="73">
- <position x="910" y="170"/>
- <position x="865" y="170"/>
- <expression>DigitalOut</expression>
- <block localId="77" width="57" height="60" typeName="TP" instanceName="t1">
- <position x="450" y="190"/>
- <variable formalParameter="IN" negated="true">
- <relPosition x="0" y="30"/>
- <connection refLocalId="85" formalParameter="Q">
- <position x="450" y="220"/>
- <position x="400" y="220"/>
- <variable formalParameter="PT">
- <relPosition x="0" y="50"/>
- <connection refLocalId="80">
- <position x="450" y="240"/>
- <position x="420" y="240"/>
- <position x="420" y="270"/>
- <position x="220" y="270"/>
- <variable formalParameter="Q">
- <relPosition x="57" y="30"/>
- <variable formalParameter="ET">
- <relPosition x="57" y="50"/>
- <inVariable localId="80" height="27" width="50">
- <position x="170" y="255"/>
- <relPosition x="50" y="15"/>
- <expression>T#1s</expression>
- <block localId="85" width="60" height="60" typeName="TOF" instanceName="t2">
- <position x="340" y="190"/>
- <variable formalParameter="IN">
- <relPosition x="0" y="30"/>
- <connection refLocalId="75">
- <position x="340" y="220"/>
- <position x="290" y="220"/>
- <variable formalParameter="PT">
- <relPosition x="0" y="50"/>
- <connection refLocalId="80">
- <position x="340" y="240"/>
- <position x="296" y="240"/>
- <position x="296" y="270"/>
- <position x="220" y="270"/>
- <variable formalParameter="Q">
- <relPosition x="60" y="30"/>
- <variable formalParameter="ET">
- <relPosition x="60" y="50"/>
- <outVariable localId="86" height="30" width="100">
- <position x="910" y="330"/>
- <relPosition x="0" y="15"/>
- <connection refLocalId="90" formalParameter="OUT">
- <position x="910" y="345"/>
- <position x="865" y="345"/>
- <expression>AnalogOut3</expression>
- <block localId="87" width="120" height="40" typeName="TIME_TO_REAL">
- <position x="455" y="315"/>
- <variable formalParameter="IN">
- <relPosition x="0" y="30"/>
- <connection refLocalId="77" formalParameter="ET">
- <position x="455" y="345"/>
- <position x="445" y="345"/>
- <position x="445" y="275"/>
- <position x="517" y="275"/>
- <position x="517" y="240"/>
- <position x="507" y="240"/>
- <variable formalParameter="OUT">
- <relPosition x="120" y="30"/>
- <block localId="88" width="80" height="60" typeName="MUL">
- <position x="630" y="315"/>
+ <block localId="4" width="75" height="60" typeName="ADD"> + <position x="224" y="123"/> <variable formalParameter="IN1">
<relPosition x="0" y="30"/>
- <connection refLocalId="87" formalParameter="OUT">
- <position x="630" y="345"/>
- <position x="575" y="345"/>
+ <connection refLocalId="2"> + <position x="224" y="153"/> + <position x="183" y="153"/> + <position x="183" y="129"/> + <position x="120" y="129"/> <variable formalParameter="IN2">
<relPosition x="0" y="50"/>
- <connection refLocalId="89">
- <position x="630" y="365"/>
- <position x="607" y="365"/>
- <position x="607" y="400"/>
- <position x="585" y="400"/>
- <variable formalParameter="OUT">
- <relPosition x="80" y="30"/>
- <inVariable localId="89" height="35" width="120">
- <position x="465" y="385"/>
- <relPosition x="120" y="15"/>
- <expression>REAL#10000.0</expression>
- <block localId="90" width="120" height="40" typeName="REAL_TO_INT">
- <position x="745" y="315"/>
- <variable formalParameter="IN">
- <relPosition x="0" y="30"/>
- <connection refLocalId="88" formalParameter="OUT">
- <position x="745" y="345"/>
- <position x="710" y="345"/>
- <variable formalParameter="OUT">
- <relPosition x="120" y="30"/>
- <inVariable localId="91" height="30" width="100">
- <position x="590" y="740"/>
- <relPosition x="100" y="15"/>
- <expression>DigitalOut</expression>
- <inVariable localId="92" height="30" width="100">
- <position x="590" y="645"/>
- <relPosition x="100" y="15"/>
- <expression>DigitalOut</expression>
- <inVariable localId="93" height="30" width="65">
- <position x="625" y="585"/>
- <relPosition x="65" y="15"/>
- <expression>UINT#1</expression>
- <inVariable localId="94" height="30" width="100">
- <position x="590" y="545"/>
- <relPosition x="100" y="15"/>
- <expression>DigitalOut</expression>
- <inVariable localId="95" height="30" width="100">
- <position x="595" y="450"/>
- <relPosition x="100" y="15"/>
- <expression>DigitalOut</expression>
- <inVariable localId="96" height="30" width="95">
- <position x="595" y="490"/>
- <relPosition x="95" y="15"/>
- <expression>UINT#0</expression>
- <inVariable localId="97" height="30" width="95">
- <position x="40" y="610"/>
- <relPosition x="95" y="15"/>
- <expression>DigitalIn</expression>
- <comment localId="100" height="40" width="400">
- <position x="25" y="100"/>
-<![CDATA[A simple blinking output (2s period)]]>
- <comment localId="102" height="40" width="430">
- <position x="580" y="255"/>
-<![CDATA[Output value of TP block as analog output #3]]>
- <comment localId="103" height="65" width="420">
- <position x="25" y="425"/>
-<![CDATA[Map input and output of bitwise_block test to bits of DigitalIn and Digital out]]>
- <comment localId="104" height="85" width="285">
- <position x="40" y="805"/>
-<![CDATA[Map AnalogIN #1 #2 and AnalogOUT #1 #2 to SFC test interface]]>
- <inVariable localId="105" height="30" width="115">
- <position x="640" y="965"/>
- <relPosition x="115" y="15"/>
- <expression>DeviceType</expression>
- <outVariable localId="106" height="30" width="115">
- <position x="1000" y="965"/>
- <relPosition x="0" y="15"/>
- <connection refLocalId="107" formalParameter="OUT">
- <position x="1000" y="980"/>
- <position x="945" y="980"/>
- <expression>AnalogOut4</expression>
- <block localId="107" width="130" height="40" typeName="UDINT_TO_INT">
- <position x="815" y="950"/>
- <variable formalParameter="IN">
- <relPosition x="0" y="30"/>
- <connection refLocalId="105">
- <position x="815" y="980"/>
- <position x="755" y="980"/>
- <variable formalParameter="OUT">
- <relPosition x="130" y="30"/>
- <pou name="GETBIT" pouType="function">
- <variable name="INPUT_BYTE">
- <variable name="NUM_BIT">
- <block localId="1" width="70" height="60" typeName="SHR">
- <position x="175" y="110"/>
- <variable formalParameter="IN">
- <relPosition x="0" y="30"/>
- <connection refLocalId="2">
- <position x="175" y="140"/>
- <position x="135" y="140"/>
- <variable formalParameter="N">
- <relPosition x="0" y="50"/>
- <connection refLocalId="3">
- <position x="175" y="160"/>
- <position x="140" y="160"/>
- <position x="140" y="180"/>
- <position x="105" y="180"/>
- <variable formalParameter="OUT">
- <relPosition x="70" y="30"/>
- <inVariable localId="2" height="30" width="105">
- <position x="30" y="125"/>
- <relPosition x="105" y="15"/>
- <expression>INPUT_BYTE</expression>
- <inVariable localId="3" height="30" width="75">
- <position x="30" y="165"/>
- <relPosition x="75" y="15"/>
- <expression>NUM_BIT</expression>
- <outVariable localId="4" height="30" width="65">
- <position x="555" y="125"/>
- <relPosition x="0" y="15"/>
- <connection refLocalId="7" formalParameter="OUT">
- <position x="555" y="140"/>
- <position x="515" y="140"/>
- <expression>GETBIT</expression>
- <block localId="5" width="85" height="60" typeName="AND">
- <position x="275" y="110"/>
- <variable formalParameter="IN1">
- <relPosition x="0" y="30"/>
- <connection refLocalId="1" formalParameter="OUT">
- <position x="275" y="140"/>
- <position x="245" y="140"/>
- <variable formalParameter="IN2">
- <relPosition x="0" y="50"/>
- <connection refLocalId="6">
- <position x="275" y="160"/>
- <position x="255" y="160"/>
- <position x="255" y="195"/>
- <position x="240" y="195"/>
- <variable formalParameter="OUT">
- <relPosition x="85" y="30"/>
- <inVariable localId="6" height="30" width="65">
- <position x="175" y="180"/>
- <relPosition x="65" y="15"/>
- <expression>BYTE#1</expression>
- <block localId="7" width="120" height="40" typeName="BYTE_TO_BOOL">
- <position x="395" y="110"/>
- <variable formalParameter="IN">
- <relPosition x="0" y="30"/>
- <connection refLocalId="5" formalParameter="OUT">
- <position x="395" y="140"/>
- <position x="360" y="140"/>
+ <connection refLocalId="5"> + <position x="224" y="173"/> + <position x="199" y="173"/> + <position x="199" y="201"/> + <position x="174" y="201"/> @@ -1201,1236 +92,29 @@
<variable formalParameter="OUT">
- <relPosition x="120" y="30"/>
- <comment localId="8" height="70" width="545">
- <position x="30" y="20"/>
-<![CDATA[Function that return NUM_BIT'th bit value of INPUT_BYTE]]>
- <pou name="SETBIT" pouType="function">
- <variable name="INPUT_BYTE">
- <variable name="INPUT_BIT">
- <variable name="NUM_BIT">
- <inVariable localId="1" height="30" width="100">
- <position x="40" y="255"/>
- <relPosition x="100" y="15"/>
- <expression>INPUT_BYTE</expression>
- <inVariable localId="2" height="30" width="95">
- <position x="40" y="125"/>
- <relPosition x="95" y="15"/>
- <expression>INPUT_BIT</expression>
- <block localId="3" width="120" height="45" typeName="BOOL_TO_BYTE">
- <position x="165" y="110"/>
- <variable formalParameter="IN">
- <relPosition x="0" y="30"/>
- <connection refLocalId="2">
- <position x="165" y="140"/>
- <position x="135" y="140"/>
- <variable formalParameter="OUT">
- <relPosition x="120" y="30"/>
- <block localId="4" width="70" height="60" typeName="SHL">
- <position x="335" y="110"/>
- <variable formalParameter="IN">
- <relPosition x="0" y="30"/>
- <connection refLocalId="3" formalParameter="OUT">
- <position x="335" y="140"/>
- <position x="285" y="140"/>
- <variable formalParameter="N">
- <relPosition x="0" y="50"/>
- <connection refLocalId="5">
- <position x="335" y="160"/>
- <position x="130" y="160"/>
- <position x="130" y="230"/>
- <position x="115" y="230"/>
- <variable formalParameter="OUT">
- <relPosition x="70" y="30"/>
- <inVariable localId="5" height="30" width="75">
- <position x="40" y="215"/>
- <relPosition x="75" y="15"/>
- <expression>NUM_BIT</expression>
- <block localId="7" width="70" height="60" typeName="SHL">
- <position x="235" y="180"/>
- <variable formalParameter="IN">
- <relPosition x="0" y="30"/>
- <connection refLocalId="8">
- <position x="235" y="210"/>
- <position x="215" y="210"/>
- <position x="220" y="210"/>
- <position x="220" y="210"/>
- <position x="220" y="210"/>
- <position x="210" y="210"/>
- <variable formalParameter="N">
- <relPosition x="0" y="50"/>
- <connection refLocalId="5">
- <position x="235" y="230"/>
- <position x="115" y="230"/>
- <variable formalParameter="OUT">
- <relPosition x="70" y="30"/>
- <inVariable localId="8" height="30" width="65">
- <position x="145" y="195"/>
- <relPosition x="65" y="15"/>
- <expression>BYTE#1</expression>
- <block localId="9" width="70" height="40" typeName="NOT">
- <position x="335" y="180"/>
- <variable formalParameter="IN">
- <relPosition x="0" y="30"/>
- <connection refLocalId="7" formalParameter="OUT">
- <position x="335" y="210"/>
- <position x="305" y="210"/>
- <variable formalParameter="OUT">
- <relPosition x="70" y="30"/>
- <block localId="10" width="80" height="60" typeName="AND">
- <position x="440" y="180"/>
- <variable formalParameter="IN1">
- <relPosition x="0" y="30"/>
- <connection refLocalId="9" formalParameter="OUT">
- <position x="440" y="210"/>
- <position x="405" y="210"/>
- <variable formalParameter="IN2">
- <relPosition x="0" y="50"/>
- <connection refLocalId="1">
- <position x="440" y="230"/>
- <position x="320" y="230"/>
- <position x="320" y="270"/>
- <position x="140" y="270"/>
- <variable formalParameter="OUT">
- <relPosition x="80" y="30"/>
- <block localId="11" width="80" height="60" typeName="OR">
- <position x="565" y="110"/>
- <variable formalParameter="IN1">
- <relPosition x="0" y="30"/>
- <connection refLocalId="4" formalParameter="OUT">
- <position x="565" y="140"/>
- <position x="405" y="140"/>
- <variable formalParameter="IN2">
- <relPosition x="0" y="50"/>
- <connection refLocalId="10" formalParameter="OUT">
- <position x="565" y="160"/>
- <position x="545" y="160"/>
- <position x="545" y="210"/>
- <position x="520" y="210"/>
- <variable formalParameter="OUT">
- <relPosition x="80" y="30"/>
- <outVariable localId="12" height="30" width="70">
- <position x="695" y="125"/>
- <relPosition x="0" y="15"/>
- <connection refLocalId="11" formalParameter="OUT">
- <position x="695" y="140"/>
- <position x="645" y="140"/>
- <expression>SETBIT</expression>
- <comment localId="13" height="75" width="435">
- <position x="35" y="15"/>
-<![CDATA[Function that return INPUT_BYTE with NUM_BIT'th bit set to INPUT_BIT value]]>
- <pou name="Bitwise_Block" pouType="functionBlock">
- <variable name="OUT_AND">
- <variable name="OUT_OR">
- <variable name="OUT_XOR">
- <variable name="OUT_SR">
- <leftPowerRail localId="1" height="80" width="3">
- <position x="40" y="180"/>
- <connectionPointOut formalParameter="">
- <relPosition x="3" y="20"/>
- <connectionPointOut formalParameter="">
- <relPosition x="3" y="55"/>
- <contact localId="2" height="15" width="25">
- <position x="90" y="190"/>
- <relPosition x="0" y="10"/>
- <connection refLocalId="1">
- <position x="90" y="200"/>
- <position x="43" y="200"/>
- <relPosition x="25" y="10"/>
- <variable>IN1</variable>
- <contact localId="3" height="20" width="25">
- <position x="90" y="225"/>
- <relPosition x="0" y="10"/>
- <connection refLocalId="1">
- <position x="90" y="235"/>
- <position x="43" y="235"/>
- <relPosition x="25" y="10"/>
- <variable>IN2</variable>
- <coil localId="4" height="20" width="25">
- <position x="225" y="190"/>
- <relPosition x="0" y="10"/>
- <connection refLocalId="2">
- <position x="225" y="200"/>
- <position x="115" y="200"/>
- <connection refLocalId="3">
- <position x="225" y="200"/>
- <position x="189" y="200"/>
- <position x="189" y="235"/>
- <position x="115" y="235"/>
- <relPosition x="25" y="10"/>
- <variable>OUT_OR</variable>
- <rightPowerRail localId="5" height="40" width="3">
- <position x="350" y="180"/>
- <relPosition x="0" y="20"/>
- <connection refLocalId="4">
- <position x="350" y="200"/>
- <position x="250" y="200"/>
- <leftPowerRail localId="6" height="40" width="3">
- <position x="40" y="315"/>
- <connectionPointOut formalParameter="">
- <relPosition x="3" y="20"/>
- <contact localId="7" height="20" width="25">
- <position x="100" y="325"/>
- <relPosition x="0" y="10"/>
- <connection refLocalId="6">
- <position x="100" y="335"/>
- <position x="43" y="335"/>
- <relPosition x="25" y="10"/>
- <variable>IN1</variable>
- <contact localId="8" height="20" width="25">
- <position x="185" y="325"/>
- <relPosition x="0" y="10"/>
- <connection refLocalId="7">
- <position x="185" y="335"/>
- <position x="125" y="335"/>
- <relPosition x="25" y="10"/>
- <variable>IN2</variable>
- <coil localId="9" height="20" width="25">
- <position x="275" y="325"/>
- <relPosition x="0" y="10"/>
- <connection refLocalId="8">
- <position x="275" y="335"/>
- <position x="210" y="335"/>
- <relPosition x="25" y="10"/>
- <variable>OUT_AND</variable>
- <rightPowerRail localId="10" height="40" width="3">
- <position x="350" y="315"/>
- <relPosition x="0" y="20"/>
- <connection refLocalId="9">
- <position x="350" y="335"/>
- <position x="300" y="335"/>
- <leftPowerRail localId="11" height="80" width="3">
- <position x="40" y="415"/>
- <connectionPointOut formalParameter="">
- <relPosition x="3" y="20"/>
- <connectionPointOut formalParameter="">
- <relPosition x="3" y="60"/>
- <contact localId="12" height="20" width="25">
- <position x="100" y="425"/>
- <relPosition x="0" y="10"/>
- <connection refLocalId="11">
- <position x="100" y="435"/>
- <position x="43" y="435"/>
- <relPosition x="25" y="10"/>
- <variable>IN1</variable>
- <contact localId="13" height="20" width="25" negated="true">
- <position x="100" y="465"/>
- <relPosition x="0" y="10"/>
- <connection refLocalId="11">
- <position x="100" y="475"/>
- <position x="43" y="475"/>
- <relPosition x="25" y="10"/>
- <variable>IN1</variable>
- <contact localId="14" height="20" width="25" negated="true">
- <position x="190" y="425"/>
- <relPosition x="0" y="10"/>
- <connection refLocalId="12">
- <position x="190" y="435"/>
- <position x="125" y="435"/>
- <relPosition x="25" y="10"/>
- <variable>IN2</variable>
- <contact localId="15" height="20" width="25">
- <position x="190" y="465"/>
- <relPosition x="0" y="10"/>
- <connection refLocalId="13">
- <position x="190" y="475"/>
- <position x="125" y="475"/>
- <relPosition x="25" y="10"/>
- <variable>IN2</variable>
- <coil localId="16" height="20" width="30">
- <position x="295" y="425"/>
- <relPosition x="0" y="10"/>
- <connection refLocalId="14">
- <position x="295" y="435"/>
- <position x="215" y="435"/>
- <connection refLocalId="15">
- <position x="295" y="435"/>
- <position x="270" y="435"/>
- <position x="270" y="475"/>
- <position x="215" y="475"/>
- <relPosition x="30" y="10"/>
- <variable>OUT_XOR</variable>
- <rightPowerRail localId="17" height="40" width="3">
- <position x="350" y="415"/>
- <relPosition x="0" y="20"/>
- <connection refLocalId="16">
- <position x="350" y="435"/>
- <position x="325" y="435"/>
- <leftPowerRail localId="18" height="80" width="3">
- <position x="40" y="550"/>
- <connectionPointOut formalParameter="">
- <relPosition x="3" y="20"/>
- <connectionPointOut formalParameter="">
- <relPosition x="3" y="60"/>
- <contact localId="19" height="20" width="25">
- <position x="100" y="560"/>
- <relPosition x="0" y="10"/>
- <connection refLocalId="18">
- <position x="100" y="570"/>
- <position x="43" y="570"/>
- <relPosition x="25" y="10"/>
- <variable>IN1</variable>
- <contact localId="21" height="20" width="25">
- <position x="100" y="600"/>
- <relPosition x="0" y="10"/>
- <connection refLocalId="18">
- <position x="100" y="610"/>
- <position x="43" y="610"/>
- <relPosition x="25" y="10"/>
- <variable>IN2</variable>
- <block localId="22" width="60" height="100" typeName="SR" instanceName="SR1">
- <position x="170" y="530"/>
- <variable formalParameter="S1">
- <relPosition x="0" y="40"/>
- <connection refLocalId="19">
- <position x="170" y="570"/>
- <position x="125" y="570"/>
- <variable formalParameter="R">
- <relPosition x="0" y="80"/>
- <connection refLocalId="21">
- <position x="170" y="610"/>
- <position x="125" y="610"/>
- <variable formalParameter="Q1">
- <relPosition x="60" y="40"/>
+ <relPosition x="75" y="30"/> - <coil localId="24" height="20" width="25">
- <position x="295" y="560"/>
- <relPosition x="0" y="10"/>
- <connection refLocalId="22" formalParameter="Q1">
- <position x="295" y="570"/>
- <position x="230" y="570"/>
+ <inVariable localId="5" height="29" width="70"> + <position x="104" y="187"/> - <relPosition x="25" y="10"/>
- <variable>OUT_SR</variable>
- <rightPowerRail localId="25" height="40" width="3">
- <position x="350" y="550"/>
- <relPosition x="0" y="20"/>
- <connection refLocalId="24">
- <position x="350" y="570"/>
- <position x="320" y="570"/>
- <comment localId="26" height="85" width="385">
- <position x="25" y="35"/>
-<![CDATA[A LD function block that embeds some FB and check basic LD]]>
- <pou name="Test_SFC" pouType="functionBlock">
- <derived name="MYTYPE"/>
- <derived name="MYTYPE"/>
- <variable name="UPPER1">
- <variable name="UPPER2">
- <derived name="MYTYPE"/>
- <derived name="MYTYPE"/>
- <variable name="TEST_ENUM">
- <derived name="MYTYPE2"/>
- <variable name="TEST_ARRAY">
- <derived name="MYTYPE3"/>
-TEST_ARRAY[0,0] := TEST_ARRAY[0,1] + 50;
- <transition name="REACH_UPPER1">
-<![CDATA[:= OUT1 >= UPPER1;]]>
- <transition name="REACH_UPPER2">
-<![CDATA[:= OUT2 >= UPPER2;]]>
- <step localId="1" height="31" width="55" name="Start" initialStep="true">
- <position x="125" y="170"/>
- <connectionPointOut formalParameter="">
- <relPosition x="25" y="31"/>
- <connectionPointOutAction formalParameter="">
- <relPosition x="55" y="15"/>
- </connectionPointOutAction>
- <step localId="4" height="30" width="55" name="Step3">
- <position x="440" y="370"/>
- <relPosition x="25" y="0"/>
- <connection refLocalId="22">
- <position x="465" y="370"/>
- <position x="465" y="348"/>
- <connectionPointOut formalParameter="">
- <relPosition x="25" y="30"/>
- <connectionPointOutAction formalParameter="">
- <relPosition x="55" y="15"/>
- </connectionPointOutAction>
- <jumpStep localId="5" height="13" width="20" targetName="Start">
- <position x="205" y="630"/>
- <relPosition x="10" y="0"/>
- <connection refLocalId="12">
- <position x="215" y="630"/>
- <position x="215" y="601"/>
- <transition localId="8" height="2" width="20">
- <position x="560" y="565"/>
- <relPosition x="10" y="0"/>
- <connection refLocalId="25">
- <position x="570" y="565"/>
- <position x="570" y="523"/>
- <relPosition x="10" y="2"/>
- <actionBlock localId="9" height="30" width="84">
- <position x="325" y="375"/>
- <relPosition x="0" y="15"/>
- <connection refLocalId="13">
- <position x="325" y="390"/>
- <position x="300" y="390"/>
- <reference name="COUNT1"/>
- <actionBlock localId="10" height="30" width="105">
- <position x="520" y="370"/>
- <relPosition x="0" y="15"/>
- <connection refLocalId="4">
- <position x="520" y="385"/>
- <position x="495" y="385"/>
- <reference name="COUNT1"/>
- <selectionDivergence localId="11" height="1" width="530">
- <position x="45" y="230"/>
- <relPosition x="105" y="0"/>
- <connection refLocalId="1">
- <position x="150" y="230"/>
- <position x="150" y="201"/>
- <connectionPointOut formalParameter="">
- <relPosition x="0" y="1"/>
- <connectionPointOut formalParameter="">
- <relPosition x="225" y="1"/>
- <connectionPointOut formalParameter="">
- <relPosition x="530" y="1"/>
- <selectionConvergence localId="12" height="1" width="525">
- <position x="45" y="600"/>
- <relPosition x="0" y="0"/>
- <connection refLocalId="38">
- <position x="45" y="600"/>
- <position x="45" y="472"/>
- <relPosition x="225" y="0"/>
- <connection refLocalId="15">
- <position x="270" y="600"/>
- <position x="270" y="472"/>
- <relPosition x="525" y="0"/>
- <connection refLocalId="8">
- <position x="570" y="600"/>
- <position x="570" y="567"/>
- <relPosition x="170" y="1"/>
- </selectionConvergence>
- <step localId="13" height="30" width="55" name="Step1">
- <position x="245" y="375"/>
- <relPosition x="25" y="0"/>
- <connection refLocalId="44">
- <position x="270" y="375"/>
- <position x="270" y="280"/>
- <connectionPointOut formalParameter="">
- <relPosition x="25" y="30"/>
- <connectionPointOutAction formalParameter="">
- <relPosition x="55" y="15"/>
- </connectionPointOutAction>
- <transition localId="15" height="2" width="20">
- <position x="260" y="470"/>
- <relPosition x="10" y="0"/>
- <connection refLocalId="13">
- <position x="270" y="470"/>
- <position x="270" y="405"/>
- <relPosition x="10" y="2"/>
- <reference name="REACH_UPPER1"/>
- <simultaneousDivergence localId="22" height="3" width="210">
- <position x="465" y="345"/>
- <relPosition x="110" y="0"/>
- <connection refLocalId="45">
- <position x="575" y="345"/>
- <position x="575" y="280"/>
- <connectionPointOut formalParameter="">
- <relPosition x="0" y="3"/>
- <connectionPointOut formalParameter="">
- <relPosition x="210" y="3"/>
+ <relPosition x="70" y="14"/> - </simultaneousDivergence>
- <transition localId="23" height="2" width="20">
- <position x="455" y="430"/>
- <relPosition x="10" y="0"/>
- <connection refLocalId="4">
- <position x="465" y="430"/>
- <position x="465" y="400"/>
- <relPosition x="10" y="2"/>
- <reference name="REACH_UPPER1"/>
- <step localId="24" height="27" width="55" name="WAIT1">
- <position x="440" y="465"/>
- <relPosition x="25" y="0"/>
- <connection refLocalId="23">
- <position x="465" y="465"/>
- <position x="465" y="432"/>
- <connectionPointOut formalParameter="">
- <relPosition x="25" y="27"/>
- <simultaneousConvergence localId="25" height="3" width="210">
- <position x="465" y="520"/>
- <relPosition x="0" y="0"/>
- <connection refLocalId="24">
- <position x="465" y="520"/>
- <position x="465" y="492"/>
- <relPosition x="210" y="0"/>
- <connection refLocalId="29">
- <position x="675" y="520"/>
- <position x="675" y="492"/>
- <relPosition x="105" y="3"/>
- </simultaneousConvergence>
- <step localId="26" height="30" width="55" name="Step4">
- <position x="650" y="370"/>
- <relPosition x="25" y="0"/>
- <connection refLocalId="22">
- <position x="675" y="370"/>
- <position x="675" y="348"/>
- <connectionPointOut formalParameter="">
- <relPosition x="25" y="30"/>
- <connectionPointOutAction formalParameter="">
- <relPosition x="55" y="15"/>
- </connectionPointOutAction>
- <transition localId="28" height="2" width="20">
- <position x="665" y="430"/>
- <relPosition x="10" y="0"/>
- <connection refLocalId="26">
- <position x="675" y="430"/>
- <position x="675" y="400"/>
- <relPosition x="10" y="2"/>
- <reference name="REACH_UPPER2"/>
- <step localId="29" height="27" width="55" name="WAIT2">
- <position x="650" y="465"/>
- <relPosition x="25" y="0"/>
- <connection refLocalId="28">
- <position x="675" y="465"/>
- <position x="675" y="432"/>
- <connectionPointOut formalParameter="">
- <relPosition x="25" y="27"/>
- <actionBlock localId="31" height="30" width="100">
- <position x="730" y="370"/>
- <relPosition x="0" y="15"/>
- <connection refLocalId="26">
- <position x="730" y="385"/>
- <position x="705" y="385"/>
- <reference name="COUNT2"/>
- <actionBlock localId="32" height="30" width="235">
- <position x="200" y="170"/>
- <relPosition x="0" y="15"/>
- <connection refLocalId="1">
- <position x="200" y="185"/>
- <position x="180" y="185"/>
-<![CDATA[OUT1 := 0;OUT2 := 0;]]>
- <transition localId="33" height="2" width="20">
- <position x="35" y="325"/>
- <relPosition x="10" y="0"/>
- <connection refLocalId="11">
- <position x="45" y="325"/>
- <position x="45" y="231"/>
- <relPosition x="10" y="2"/>
-<![CDATA[CNT2 AND NOT CNT1]]>
- <block localId="34" width="80" height="90" typeName="AND">
- <position x="435" y="240"/>
- <variable formalParameter="IN1">
- <relPosition x="0" y="35"/>
- <connection refLocalId="35">
- <position x="435" y="275"/>
- <position x="410" y="275"/>
- <variable formalParameter="IN2">
- <relPosition x="0" y="70"/>
- <connection refLocalId="39">
- <position x="435" y="310"/>
- <position x="410" y="310"/>
- <variable formalParameter="OUT">
- <relPosition x="80" y="35"/>
- <inVariable localId="35" height="30" width="50">
- <position x="360" y="260"/>
- <relPosition x="50" y="15"/>
- <expression>CNT1</expression>
+ <expression>PLC_IN</expression> - <step localId="36" height="27" width="60" name="Step2">
- <position x="15" y="375"/>
- <relPosition x="30" y="0"/>
- <connection refLocalId="33">
- <position x="45" y="375"/>
- <position x="45" y="327"/>
- <connectionPointOut formalParameter="">
- <relPosition x="30" y="27"/>
- <connectionPointOutAction formalParameter="">
- <relPosition x="60" y="15"/>
- </connectionPointOutAction>
- <actionBlock localId="37" height="30" width="84">
- <position x="100" y="375"/>
- <relPosition x="0" y="15"/>
- <connection refLocalId="36">
- <position x="100" y="390"/>
- <position x="75" y="390"/>
- <reference name="COUNT2"/>
- <transition localId="38" height="2" width="20">
- <position x="35" y="470"/>
- <relPosition x="10" y="0"/>
- <connection refLocalId="36">
- <position x="45" y="470"/>
- <position x="45" y="402"/>
- <relPosition x="10" y="2"/>
- <reference name="REACH_UPPER2"/>
- <inVariable localId="39" height="30" width="50">
- <position x="360" y="295"/>
- <relPosition x="50" y="15"/>
- <expression>CNT2</expression>
- <leftPowerRail localId="40" height="40" width="3">
- <position x="70" y="255"/>
- <connectionPointOut formalParameter="">
- <relPosition x="3" y="20"/>
- <contact localId="41" height="20" width="25">
- <position x="110" y="265"/>
- <relPosition x="0" y="10"/>
- <connection refLocalId="40">
- <position x="110" y="275"/>
- <position x="73" y="275"/>
- <relPosition x="25" y="10"/>
- <variable>CNT1</variable>
- <contact localId="42" height="20" width="25" negated="true">
- <position x="190" y="265"/>
- <relPosition x="0" y="10"/>
- <connection refLocalId="41">
- <position x="190" y="275"/>
- <position x="135" y="275"/>
- <relPosition x="25" y="10"/>
- <variable>CNT2</variable>
- <transition localId="44" height="10" width="20">
- <position x="260" y="270"/>
- <relPosition x="10" y="0"/>
- <connection refLocalId="11">
- <position x="270" y="270"/>
- <position x="270" y="231"/>
- <relPosition x="10" y="10"/>
- <connection refLocalId="42">
- <position x="260" y="275"/>
- <position x="215" y="275"/>
- <transition localId="45" height="10" width="20">
- <position x="565" y="270"/>
- <relPosition x="10" y="0"/>
- <connection refLocalId="11">
- <position x="575" y="270"/>
- <position x="575" y="231"/>
- <relPosition x="10" y="10"/>
- <connection refLocalId="34" formalParameter="OUT">
- <position x="565" y="275"/>
- <position x="515" y="275"/>
- <comment localId="46" height="120" width="785">
- <position x="15" y="25"/>
-<![CDATA[A SFC that make use of different kinds of divergences, and mix LD and FBD and inline transitions.
-It is supposed to increment OUT1 and OUT2 according CNT1 and CNT2, and untill UPPER1 and UPPER2 limits are reached.]]>
- <configuration name="STD_CONF">
- <resource name="STD_RESSOURCE">
- <task name="STD_TASK" interval="00:00:00.100000" priority="0">
- <pouInstance name="MAIN_INSTANCE" type="MAIN_TEST"/>
+ <configuration name="conf"> + <task name="tache" interval="00:00:00.100000" priority="0"> + <pouInstance name="toto" type="test_main"/> --- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/linux/test_master_DS401GUI/.cvsignore Wed Jun 25 17:11:47 2008 +0200
@@ -0,0 +1,1 @@
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/linux/test_master_DS401GUI/CANopen@canfestival/Master@CanOpenNode/baseplugin.xml Wed Jun 25 17:11:47 2008 +0200
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?> +<BaseParams Name="Master" IEC_Channel="0"/> --- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/linux/test_master_DS401GUI/CANopen@canfestival/Master@CanOpenNode/eds/DS401_Slave_Gui.eds Wed Jun 25 17:11:47 2008 +0200
@@ -0,0 +1,1142 @@
+FileName=DS401_Slave_Gui.eds +ModificationTime=05:58PM +ModificationDate=10-02-2007 +ProductNumber=0x00100000 +RevisionNumber=0x00010001 +DynamicChannelsSupported=0 +ParameterName=Device Type +ParameterName=Error Register +ParameterName=Number of Entries +ParameterName=Product Code +ParameterName=Revision Number +ParameterName=Manufacturer Status Register +ParameterName=SYNC COB ID +ParameterName=Manufacturer Device Name +ParameterName=Manufacturer Hardware Version +ParameterName=Manufacturer Software Version +ParameterName=Guard Time +ParameterName=Life Time Factor +ParameterName=Store parameters +ParameterName=Number of Entries +ParameterName=Save All Parameters +ParameterName=Restore Default Parameters +ParameterName=Number of Entries +ParameterName=Restore All Default Parameters +ParameterName=Consumer Heartbeat Time +ParameterName=Number of Entries +ParameterName=Consumer Heartbeat Time +ParameterName=Consumer Heartbeat Time +ParameterName=Consumer Heartbeat Time +ParameterName=Producer Heartbeat Time +ParameterName=Verify Configuration +ParameterName=Number of Entries +ParameterName=Configuration Date +ParameterName=Configuration Time +ParameterName=Server SDO Parameter +ParameterName=Number of Entries +ParameterName=COB ID Client to Server (Receive SDO) +DefaultValue=$NODEID+0x600 +ParameterName=COB ID Server to Client (Transmit SDO) +DefaultValue=$NODEID+0x580 +ParameterName=Receive PDO 1 Parameter +ParameterName=Highest SubIndex Supported +ParameterName=COB ID used by PDO +DefaultValue=$NODEID+0x200 +ParameterName=Transmission Type +ParameterName=Receive PDO 2 Parameter +ParameterName=Highest SubIndex Supported +ParameterName=COB ID used by PDO +DefaultValue=$NODEID+0x300 +ParameterName=Transmission Type +ParameterName=Receive PDO 1 Mapping +ParameterName=Number of Entries +ParameterName=PDO 1 Mapping for an application object 1 +ParameterName=Receive PDO 2 Mapping +ParameterName=Number of Entries +ParameterName=PDO 2 Mapping for an application object 1 +ParameterName=PDO 2 Mapping for an application object 2 +ParameterName=PDO 2 Mapping for an application object 3 +ParameterName=PDO 2 Mapping for an application object 4 +ParameterName=Transmit PDO 1 Parameter +ParameterName=Highest SubIndex Supported +ParameterName=COB ID used by PDO +DefaultValue=$NODEID+0x180 +ParameterName=Transmission Type +ParameterName=Inhibit Time +ParameterName=Event Timer +ParameterName=Transmit PDO 2 Parameter +ParameterName=Highest SubIndex Supported +ParameterName=COB ID used by PDO +DefaultValue=$NODEID+0x280 +ParameterName=Transmission Type +ParameterName=Inhibit Time +ParameterName=Event Timer +ParameterName=Transmit PDO 3 Parameter +ParameterName=Highest SubIndex Supported +ParameterName=COB ID used by PDO +DefaultValue=$NODEID+0x380 +ParameterName=Transmission Type +ParameterName=Inhibit Time +ParameterName=Event Timer +ParameterName=Transmit PDO 1 Mapping +ParameterName=Number of Entries +ParameterName=PDO 1 Mapping for a process data variable 1 +ParameterName=Transmit PDO 2 Mapping +ParameterName=Number of Entries +ParameterName=PDO 2 Mapping for a process data variable 1 +ParameterName=PDO 2 Mapping for a process data variable 2 +ParameterName=PDO 2 Mapping for a process data variable 3 +ParameterName=PDO 2 Mapping for a process data variable 4 +ParameterName=Transmit PDO 3 Mapping +ParameterName=Number of Entries +ParameterName=PDO 3 Mapping for a process data variable 1 +ParameterName=PDO 3 Mapping for a process data variable 2 +ParameterName=PDO 3 Mapping for a process data variable 3 +ParameterName=PDO 3 Mapping for a process data variable 4 +ParameterName=Read Inputs 8 Bit +ParameterName=Number of Input 8 bit +ParameterName=Read Inputs 0x1 to 0x8 +ParameterName=Polarity Input 8 Bit +ParameterName=Number of Input 8 bit +ParameterName=Polarity Input 0x1 to 0x8 +ParameterName=Write Outputs 8 Bit +ParameterName=Number of Output 8 Bit +ParameterName=Write Outputs 0x1 to 0x8 +ParameterName=Change Polarity Outputs 8 Bit +ParameterName=Number of Output 8 Bit +ParameterName=Change Polarity Outputs 0x1 to 0x8 +ParameterName=Error Mode Outputs 8 Bit +ParameterName=Number of Output 8 Bit +ParameterName=Error Mode Outputs 0x1 to 0x8 +ParameterName=Error Value Outputs 8 Bit +ParameterName=Number of Output 8 Bit +ParameterName=Error Value Outputs 0x1 to 0x8 +ParameterName=Read Analogue Input 16 Bit +ParameterName=Number of Analogue Input 16 Bit +ParameterName=Analogue Input 1 +ParameterName=Analogue Input 2 +ParameterName=Analogue Input 3 +ParameterName=Analogue Input 4 +ParameterName=Analogue Input 5 +ParameterName=Analogue Input 6 +ParameterName=Analogue Input 7 +ParameterName=Analogue Input 8 +ParameterName=Write Analogue Output 16 Bit +ParameterName=Number of Analogue Input 16 Bit +ParameterName=Analogue Output 1 +ParameterName=Analogue Output 2 +ParameterName=Analogue Output 3 +ParameterName=Analogue Output 4 +ParameterName=Analogue Input Global Interrupt Enable +ParameterName=Analogue Input Interrupt Delta Unsigned +ParameterName=Number of Analogue Inputs +ParameterName=Analogue Input 1 +ParameterName=Analogue Input 2 +ParameterName=Analogue Input 3 +ParameterName=Analogue Input 4 +ParameterName=Analogue Input 5 +ParameterName=Analogue Input 6 +ParameterName=Analogue Input 7 +ParameterName=Analogue Input 8 +ParameterName=Analogue Output Error Mode +ParameterName=Number of Analogue Outputs +ParameterName=Error Mode Analogue Output 1 +ParameterName=Error Mode Analogue Output 2 +ParameterName=Error Mode Analogue Output 3 +ParameterName=Error Mode Analogue Output 4 +ParameterName=Analogue Output Error Value Integer +ParameterName=Number of Analogue Outputs +ParameterName=Analogue Output 1 +ParameterName=Analogue Output 2 +ParameterName=Analogue Output 3 +ParameterName=Analogue Output 4 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/linux/test_master_DS401GUI/CANopen@canfestival/Master@CanOpenNode/eds/PEAK MicroMod.eds Wed Jun 25 17:11:47 2008 +0200
@@ -0,0 +1,1289 @@
+Description=PEAK MicroMod CANopenIA Generic +ModificationTime=05:05PM +ModificationDate=03-23-2005 +FileName=C:\CANopenCT\Tests\PEAK MicroMod.eds +VendorName=PEAK System Technik +ProductName=PEAK MicroMod CANopenIA Generic +ProductNumber=0x00100000 +RevisionNumber=0x00010001 +DynamicChannelsSupported=0 +ParameterName=Device Type +ParameterName=Error Register +ParameterName=Identity Object +ParameterName=number of entries +ParameterName=Product Code +ParameterName=Revision number +ParameterName=PEAK Status Register +ParameterName=COB-ID SYNC +ParameterName=Manufacturer Device Name +ParameterName=Manufacturer Hardware Version +ParameterName=Manufacturer Software Version +ParameterName=Guard Time +ParameterName=Life Time Factor +ParameterName=Store Parameter Field +ParameterName=Number of Entries +ParameterName=Save all Parameters +ParameterName=Restore Default Parameters +ParameterName=Number of Entries +ParameterName=Restore all Default Parameters +ParameterName=Consumer Heartbeat Time +ParameterName=Number of Entries +ParameterName=Consumer Heartbeat Time +ParameterName=Consumer Heartbeat Time +ParameterName=Consumer Heartbeat Time +ParameterName=Producer Heartbeat Time +ParameterName=Verify Configuration +ParameterName=Number of entries +ParameterName=Configuration date +ParameterName=Configuration time +ParameterName=Receive PDO Communication Parameter +ParameterName=Number of Entries +DefaultValue=$NODEID+0x200 +ParameterName=Transmission Type +ParameterName=Receive PDO Communication Parameter +ParameterName=Number of Entries +DefaultValue=$NODEID+0x300 +ParameterName=Transmission Type +ParameterName=Receive PDO Communication Parameter +ParameterName=Number of Entries +DefaultValue=$NODEID+0x80000400 +ParameterName=Transmission Type +ParameterName=Receive PDO Communication Parameter +ParameterName=Number of Entries +DefaultValue=$NODEID+0x80000500 +ParameterName=Transmission Type +ParameterName=Receive PDO Mapping Parameter +ParameterName=Number of Entries +ParameterName=PDO Mapping Entry +ParameterName=Receive PDO Mapping Parameter +ParameterName=Number of Entries +ParameterName=PDO Mapping Entry +ParameterName=PDO Mapping Entry +ParameterName=PDO Mapping Entry +ParameterName=PDO Mapping Entry +ParameterName=Receive PDO Mapping Parameter +ParameterName=Number of Entries +ParameterName=Receive PDO Mapping Parameter +ParameterName=Number of Entries +ParameterName=Transmit PDO Communication Parameter +ParameterName=Number of Entries +DefaultValue=$NODEID+0x180 +ParameterName=Transmission Type +ParameterName=Inhibit Time +ParameterName=Event Timer +ParameterName=Transmit PDO Communication Parameter +ParameterName=Number of Entries +DefaultValue=$NODEID+0x280 +ParameterName=Transmission Type +ParameterName=Inhibit Time +ParameterName=Event Timer +ParameterName=Transmit PDO Communication Parameter +ParameterName=Number of Entries +DefaultValue=$NODEID+0x380 +ParameterName=Transmission Type +ParameterName=Inhibit Time +ParameterName=Event Timer +ParameterName=Transmit PDO Communication Parameter +ParameterName=Number of Entries +DefaultValue=$NODEID+0x80000480 +ParameterName=Transmission Type +ParameterName=Inhibit Time +ParameterName=Event Timer +ParameterName=Transmit PDO Mapping Parameter +ParameterName=Number of Entries +ParameterName=PDO Mapping Entry +ParameterName=Transmit PDO Mapping Parameter +ParameterName=Number of Entries +ParameterName=PDO Mapping Entry +ParameterName=PDO Mapping Entry +ParameterName=PDO Mapping Entry +ParameterName=PDO Mapping Entry +ParameterName=Transmit PDO Mapping Parameter +ParameterName=Number of Entries +ParameterName=PDO Mapping Entry +ParameterName=PDO Mapping Entry +ParameterName=PDO Mapping Entry +ParameterName=PDO Mapping Entry +ParameterName=Transmit PDO Mapping Parameter +ParameterName=Number of Entries +ParameterName=Download Program Data +ParameterName=Number of elements +ParameterName=Download Program Data - HW Settings +ParameterName=Read Digital Input 8-bit +ParameterName=Number of Elements +ParameterName=DigInput8_1 +ParameterName=Polarity Digital Input +ParameterName=Number of Elements +ParameterName=Polarity8_1 +ParameterName=Write Digital Output 8-bit +ParameterName=Number of elements +ParameterName=DigOutput8_1 +ParameterName=Polarity Digital Output +ParameterName=Number of Elements +ParameterName=Polarity8_1 +ParameterName=Error Mode Digital Output +ParameterName=Number of elements +ParameterName=Error Mode 1 +ParameterName=Error Value Digital Output +ParameterName=Number of elements +ParameterName=Error Value 1 +ParameterName=Read Analog Input 16-bit +ParameterName=Number of elements +ParameterName=AnalogInput16_1 +ParameterName=AnalogInput16_2 +ParameterName=AnalogInput16_3 +ParameterName=AnalogInput16_4 +ParameterName=AnalogInput16_5 +ParameterName=AnalogInput16_6 +ParameterName=AnalogInput16_7 +ParameterName=AnalogInput16_8 +ParameterName=Write Analog Output 16-bit +ParameterName=Number of elements +ParameterName=AnalogOutput16_1 +ParameterName=AnalogOutput16_2 +ParameterName=AnalogOutput16_3 +ParameterName=AnalogOutput16_4 +ParameterName=Analog Input Global Interrupt +ParameterName=Analog Input Interrupt Delta +ParameterName=NrOfObjects +ParameterName=Analog Input Delta 1 +ParameterName=Analog Input Delta 2 +ParameterName=Analog Input Delta 3 +ParameterName=Analog Input Delta 4 +ParameterName=Analog Input Delta 5 +ParameterName=Analog Input Delta 6 +ParameterName=Analog Input Delta 7 +ParameterName=Analog Input Delta 8 +ParameterName=Error Mode Analog Output +ParameterName=Number of elements +ParameterName=Error Mode 1 +ParameterName=Error Mode 2 +ParameterName=Error Mode 3 +ParameterName=Error Mode 4 +ParameterName=Error Value Analog Output +ParameterName=Number of elements +ParameterName=Error Value 1 +ParameterName=Error Value 2 +ParameterName=Error Value 3 +ParameterName=Error Value 4 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/linux/test_master_DS401GUI/CANopen@canfestival/Master@CanOpenNode/master.od Wed Jun 25 17:11:47 2008 +0200
@@ -0,0 +1,224 @@
+<!DOCTYPE PyObject SYSTEM "PyObjects.dtd"> +<PyObject module="node" class="Node" id="165751532"> +<attr name="Profile" type="dict" id="165760508" > +<attr name="Description" type="string" value="" /> +<attr name="Dictionary" type="dict" id="165760236" > + <key type="numeric" value="4096" /> + <val type="numeric" value="302" /> + <key type="numeric" value="4097" /> + <val type="numeric" value="0" /> + <key type="numeric" value="4120" /> + <val type="list" id="165751756" > + <item type="numeric" value="0" /> + <item type="numeric" value="0" /> + <item type="numeric" value="0" /> + <item type="numeric" value="0" /> +<attr name="SpecificMenu" type="list" id="165751500" > +<attr name="ParamsDictionary" type="dict" id="172966748" > +<attr name="UserMapping" type="dict" id="165759556" > +<attr name="DS302" type="dict" id="164383844" > + <key type="numeric" value="7968" /> + <val type="dict" id="163170204" > + <key type="string" value="need" /> + <val type="False" value="" /> + <key type="string" value="values" /> + <val type="list" id="165751852" > + <item type="dict" id="165765300" > + <key type="string" value="access" /> + <val type="string" value="ro" /> + <key type="string" value="pdo" /> + <val type="False" value="" /> + <key type="string" value="type" /> + <val type="numeric" value="5" /> + <key type="string" value="name" /> + <val type="string" value="Number of Entries" /> + <item type="dict" id="165759692" > + <key type="string" value="access" /> + <val type="string" value="rw" /> + <key type="string" value="pdo" /> + <val type="False" value="" /> + <key type="string" value="type" /> + <val type="numeric" value="15" /> + <key type="string" value="name" /> + <val type="string" value="Store DCF for node %d[(sub)]" /> + <key type="string" value="nbmax" /> + <val type="numeric" value="127" /> + <key type="string" value="name" /> + <val type="string" value="Store DCF" /> + <key type="string" value="struct" /> + <val type="numeric" value="7" /> + <key type="numeric" value="7969" /> + <val type="dict" id="165760100" > + <key type="string" value="need" /> + <val type="False" value="" /> + <key type="string" value="values" /> + <val type="list" id="165751724" > + <item type="dict" id="165765572" > + <key type="string" value="access" /> + <val type="string" value="ro" /> + <key type="string" value="pdo" /> + <val type="False" value="" /> + <key type="string" value="type" /> + <val type="numeric" value="5" /> + <key type="string" value="name" /> + <val type="string" value="Number of Entries" /> + <item type="dict" id="165765844" > + <key type="string" value="access" /> + <val type="string" value="rw" /> + <key type="string" value="pdo" /> + <val type="False" value="" /> + <key type="string" value="type" /> + <val type="numeric" value="2" /> + <key type="string" value="name" /> + <val type="string" value="Storage Format for Node %d[(sub)]" /> + <key type="string" value="nbmax" /> + <val type="numeric" value="127" /> + <key type="string" value="name" /> + <val type="string" value="Storage Format" /> + <key type="string" value="struct" /> + <val type="numeric" value="7" /> + <key type="numeric" value="7970" /> + <val type="dict" id="165765980" > + <key type="string" value="need" /> + <val type="False" value="" /> + <key type="string" value="values" /> + <val type="list" id="165752012" > + <item type="dict" id="165760644" > + <key type="string" value="access" /> + <val type="string" value="ro" /> + <key type="string" value="pdo" /> + <val type="False" value="" /> + <key type="string" value="type" /> + <val type="numeric" value="5" /> + <key type="string" value="name" /> + <val type="string" value="Number of Entries" /> + <item type="dict" id="165766252" > + <key type="string" value="access" /> + <val type="string" value="rw" /> + <key type="string" value="pdo" /> + <val type="False" value="" /> + <key type="string" value="type" /> + <val type="numeric" value="15" /> + <key type="string" value="name" /> + <val type="string" value="Concise DCF for Node %d[(sub)]" /> + <key type="string" value="nbmax" /> + <val type="numeric" value="127" /> + <key type="string" value="name" /> + <val type="string" value="Concise DCF" /> + <key type="string" value="struct" /> + <val type="numeric" value="7" /> +<attr name="ProfileName" type="string" value="None" /> +<attr name="Type" type="string" value="master" /> +<attr name="ID" type="numeric" value="0" /> +<attr name="Name" type="string" value="MasterNode" /> --- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/linux/test_master_DS401GUI/CANopen@canfestival/Master@CanOpenNode/nodelist.cpj Wed Jun 25 17:11:47 2008 +0200
@@ -0,0 +1,10 @@
+Node16Name=DS401_Slave_GUI +Node16DCFName=DS401_Slave_Gui.eds +Node32DCFName=DS401_Slave_Gui.eds --- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/linux/test_master_DS401GUI/CANopen@canfestival/Master@CanOpenNode/plugin.xml Wed Jun 25 17:11:47 2008 +0200
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?> +<CanFestivalNode CAN_Device="vcan0" CAN_Baudrate="125K" NodeId="1"/> --- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/linux/test_master_DS401GUI/CANopen@canfestival/baseplugin.xml Wed Jun 25 17:11:47 2008 +0200
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?> +<BaseParams Name="CANopen" IEC_Channel="0"/> --- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/linux/test_master_DS401GUI/CANopen@canfestival/plugin.xml Wed Jun 25 17:11:47 2008 +0200
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?> +<CanFestivalInstance CAN_Driver="../CanFestival-3/drivers/can_socket/libcanfestival_can_socket.so"/> --- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/linux/test_master_DS401GUI/beremiz.xml Wed Jun 25 17:11:47 2008 +0200
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?> +<BeremizRoot CFLAGS="-g" Linker="g++" LDFLAGS="-g"> --- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/linux/test_master_DS401GUI/methods.py Wed Jun 25 17:11:47 2008 +0200
@@ -0,0 +1,66 @@
+logger.write_error("Welcome to the Beremiz Demo\n\n") +logger.write("This demo provides a PLC working with the CANopen plugin\n") +logger.write("""Some external programs are also provided:\n +- a CAN TCP server to simulate the CANopen network +- a virtual slave node to simulate input block +- a virtual slave node to simulate output block +logger.write("\nInfo: For this demo, %s plugin has some special methods to run external programs.\nThese methods are defined in methods.py\n" % (PlugName or "Root")) +#open_pdf(os.path.join(os.path.split(__file__)[0], "doc", "manual_beremiz.pdf"), pagenum=21) +if wx.Platform == '__WXMSW__': + self.listLaunchProg = [ + {'name' : 'Can Tcp Server', + 'command' : 'can_tcp_win32_server.exe', + {'name' : 'DS401 Slave Gui NodeId 32', + 'command' : 'DS401_Slave_Gui.exe -sI -l can_tcp_win32.dll -b 127.0.0.1 -i 20 -B 125K', + {'name' : 'DS401 Slave Gui NodeId 16', + 'command' : 'DS401_Slave_Gui.exe -sO -l can_tcp_win32.dll -b 127.0.0.1 -i 10 -B 125K', + self.listLaunchProg = [ + {'name' : 'DS401 Slave Gui NodeId 32', + 'command' : '../CanFestival-3/examples/DS401_Slave_Gui/DS401_Slave_Gui -sI -l ../CanFestival-3/drivers/can_socket/libcanfestival_can_socket.so -b vcan0 -i 20 -B 125K', + {'name' : 'DS401 Slave Gui NodeId 16', + 'command' : '../CanFestival-3/examples/DS401_Slave_Gui/DS401_Slave_Gui -sO -l ../CanFestival-3/drivers/can_socket/libcanfestival_can_socket.so -b vcan0 -i 10 -B 125K', + # External programs list + # Launch them and get their pid + for prog in self.listLaunchProg: + logger.write("Starting %s\n" % prog['name']) + prog['pid'] = ProcessLogger(logger, prog['command'], no_gui=prog['no_gui']) + keyword = prog['keyword'], + PluginsRoot._Run(self,logger) + PluginsRoot._Stop(self,logger) + for prog in self.listLaunchProg: + logger.write("Stopping %s\n" % prog['name']) +self._Run, self._Stop = my_methods(self) \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/linux/test_master_DS401GUI/plc.xml Wed Jun 25 17:11:47 2008 +0200
@@ -0,0 +1,2439 @@
+<?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 http://www.plcopen.org/xml/tc6.xsd"> + <fileHeader companyName="LOLITECH" + companyURL="www.lolitech.com" + creationDateTime="2007-07-07 11:58:26" + contentDescription="This tests as most as possible IEC standard library"/> + <contentHeader name="STD_TEST" + modificationDateTime="2008-06-24 17:46:11"> + <dataType name="MYTYPE"> + <range lower="0" upper="1000"/> + <dataType name="MYTYPE2"> + <simpleValue value="CLOSED"/> + <dataType name="MYTYPE3"> + <dimension lower="1" upper="8"/> + <dimension lower="1" upper="8"/> + <derived name="MYTYPE5"/> + <value repetitionValue="32"> + <simpleValue value="0"/> + <value repetitionValue="30"> + <simpleValue value="1"/> + <dataType name="MYTYPE4"> + <range lower="1" upper="100"/> + <dataType name="MYTYPE5"> + <derived name="MYTYPE4"/> + <simpleValue value="10"/> + <pou name="MAIN_TEST" pouType="program"> + <variable name="DigitalOut" address="%QB0.0.16.25088.1"> + <variable name="DigitalIn" address="%IB0.0.32.24576.1"> + <variable name="AnalogOut1" address="%QW0.0.16.25617.1"> + <derived name="MYTYPE"/> + <variable name="AnalogOut2" address="%QW0.0.16.25617.2"> + <derived name="MYTYPE"/> + <variable name="AnalogOut3" address="%QW0.0.16.25617.3"> + <variable name="AnalogOut4" address="%QW0.0.16.25617.4"> + <variable name="AnalogIn1" address="%IW0.0.32.25601.1"> + <variable name="AnalogIn2" address="%IW0.0.32.25601.2"> + <variable name="DeviceType" address="%ID0.0.4096.0"> + <derived name="Bitwise_Block"/> + <variable name="Test2"> + <derived name="Test_SFC"/> + <variable name="latch"> + <comment localId="26" height="80" width="475"> + <position x="25" y="5"/> +<![CDATA[Main program]]> + <inVariable localId="34" height="30" width="95"> + <position x="40" y="535"/> + <relPosition x="95" y="15"/> + <expression>DigitalIn</expression> + <outVariable localId="36" height="30" width="100"> + <position x="915" y="450"/> + <relPosition x="0" y="15"/> + <connection refLocalId="39"> + <position x="915" y="465"/> + <position x="885" y="465"/> + <position x="885" y="465"/> + <position x="925" y="465"/> + <position x="925" y="465"/> + <position x="865" y="465"/> + <expression>DigitalOut</expression> + <block localId="37" width="107" height="60" typeName="GETBIT"> + <position x="195" y="520"/> + <variable formalParameter="INPUT_BYTE"> + <relPosition x="0" y="30"/> + <connection refLocalId="34"> + <position x="195" y="550"/> + <position x="135" y="550"/> + <variable formalParameter="NUM_BIT"> + <relPosition x="0" y="50"/> + <connection refLocalId="38"> + <position x="195" y="570"/> + <position x="165" y="570"/> + <position x="165" y="585"/> + <position x="105" y="585"/> + <variable formalParameter=""> + <relPosition x="107" y="30"/> + <inVariable localId="38" height="30" width="65"> + <position x="40" y="570"/> + <relPosition x="65" y="15"/> + <expression>UINT#0</expression> + <block localId="39" width="120" height="80" typeName="SETBIT"> + <position x="745" y="435"/> + <variable formalParameter="INPUT_BYTE"> + <relPosition x="0" y="30"/> + <connection refLocalId="95"> + <position x="745" y="465"/> + <position x="695" y="465"/> + <variable formalParameter="INPUT_BIT"> + <relPosition x="0" y="50"/> + <connection refLocalId="52" formalParameter="OUT_AND"> + <position x="745" y="485"/> + <position x="569" y="485"/> + <position x="569" y="550"/> + <position x="513" y="550"/> + <variable formalParameter="NUM_BIT"> + <relPosition x="0" y="70"/> + <connection refLocalId="96"> + <position x="745" y="505"/> + <position x="690" y="505"/> + <variable formalParameter=""> + <relPosition x="120" y="30"/> + <inVariable localId="40" height="30" width="100"> + <position x="25" y="155"/> + <relPosition x="100" y="15"/> + <expression>DigitalOut</expression> + <block localId="42" width="120" height="85" typeName="SETBIT"> + <position x="745" y="530"/> + <variable formalParameter="INPUT_BYTE"> + <relPosition x="0" y="30"/> + <connection refLocalId="94"> + <position x="745" y="560"/> + <position x="690" y="560"/> + <variable formalParameter="INPUT_BIT"> + <relPosition x="0" y="50"/> + <connection refLocalId="52" formalParameter="OUT_OR"> + <position x="745" y="580"/> + <position x="513" y="580"/> + <variable formalParameter="NUM_BIT"> + <relPosition x="0" y="70"/> + <connection refLocalId="93"> + <position x="745" y="600"/> + <position x="690" y="600"/> + <variable formalParameter=""> + <relPosition x="120" y="30"/> + <outVariable localId="43" height="30" width="100"> + <position x="910" y="545"/> + <relPosition x="0" y="15"/> + <connection refLocalId="42"> + <position x="910" y="560"/> + <position x="865" y="560"/> + <expression>DigitalOut</expression> + <block localId="44" width="115" height="60" typeName="GETBIT"> + <position x="195" y="595"/> + <variable formalParameter="INPUT_BYTE"> + <relPosition x="0" y="30"/> + <connection refLocalId="97"> + <position x="195" y="625"/> + <position x="135" y="625"/> + <variable formalParameter="NUM_BIT"> + <relPosition x="0" y="50"/> + <connection refLocalId="45"> + <position x="195" y="645"/> + <position x="154" y="645"/> + <position x="154" y="660"/> + <position x="105" y="660"/> + <variable formalParameter=""> + <relPosition x="115" y="30"/> + <inVariable localId="45" height="30" width="65"> + <position x="40" y="645"/> + <relPosition x="65" y="15"/> + <expression>UINT#1</expression> + <block localId="46" width="120" height="80" typeName="SETBIT"> + <position x="745" y="630"/> + <variable formalParameter="INPUT_BYTE"> + <relPosition x="0" y="30"/> + <connection refLocalId="92"> + <position x="745" y="660"/> + <position x="690" y="660"/> + <variable formalParameter="INPUT_BIT"> + <relPosition x="0" y="50"/> + <connection refLocalId="52" formalParameter="OUT_XOR"> + <position x="745" y="680"/> + <position x="555" y="680"/> + <position x="555" y="610"/> + <position x="513" y="610"/> + <variable formalParameter="NUM_BIT"> + <relPosition x="0" y="70"/> + <connection refLocalId="49"> + <position x="745" y="700"/> + <position x="690" y="700"/> + <variable formalParameter=""> + <relPosition x="120" y="30"/> + <outVariable localId="47" height="30" width="105"> + <position x="910" y="645"/> + <relPosition x="0" y="15"/> + <connection refLocalId="46"> + <position x="910" y="660"/> + <position x="865" y="660"/> + <expression>DigitalOut</expression> + <inVariable localId="49" height="30" width="65"> + <position x="625" y="685"/> + <relPosition x="65" y="15"/> + <expression>UINT#2</expression> + <block localId="50" width="120" height="80" typeName="SETBIT"> + <position x="745" y="725"/> + <variable formalParameter="INPUT_BYTE"> + <relPosition x="0" y="30"/> + <connection refLocalId="91"> + <position x="745" y="755"/> + <position x="690" y="755"/> + <variable formalParameter="INPUT_BIT"> + <relPosition x="0" y="50"/> + <connection refLocalId="52" formalParameter="OUT_SR"> + <position x="745" y="775"/> + <position x="525" y="775"/> + <position x="525" y="640"/> + <position x="513" y="640"/> + <variable formalParameter="NUM_BIT"> + <relPosition x="0" y="70"/> + <connection refLocalId="53"> + <position x="745" y="795"/> + <position x="692" y="795"/> + <variable formalParameter=""> + <relPosition x="120" y="30"/> + <outVariable localId="51" height="30" width="100"> + <position x="910" y="740"/> + <relPosition x="0" y="15"/> + <connection refLocalId="50"> + <position x="910" y="755"/> + <position x="865" y="755"/> + <expression>DigitalOut</expression> + <block localId="52" width="127" height="141" typeName="Bitwise_Block" instanceName="Test"> + <position x="386" y="515"/> + <variable formalParameter="IN1"> + <relPosition x="0" y="35"/> + <connection refLocalId="37"> + <position x="386" y="550"/> + <position x="302" y="550"/> + <variable formalParameter="IN2"> + <relPosition x="0" y="65"/> + <connection refLocalId="44"> + <position x="386" y="580"/> + <position x="365" y="580"/> + <position x="365" y="625"/> + <position x="310" y="625"/> + <variable formalParameter="OUT_AND"> + <relPosition x="127" y="35"/> + <variable formalParameter="OUT_OR"> + <relPosition x="127" y="65"/> + <variable formalParameter="OUT_XOR"> + <relPosition x="127" y="95"/> + <variable formalParameter="OUT_SR"> + <relPosition x="127" y="125"/> + <inVariable localId="53" height="30" width="67"> + <position x="625" y="780"/> + <relPosition x="67" y="15"/> + <expression>UINT#3</expression> + <inVariable localId="59" height="30" width="100"> + <position x="45" y="910"/> + <relPosition x="100" y="15"/> + <expression>AnalogOut1</expression> + <outVariable localId="60" height="30" width="100"> + <position x="910" y="840"/> + <relPosition x="0" y="15"/> + <connection refLocalId="69" formalParameter="OUT1"> + <position x="910" y="855"/> + <position x="610" y="855"/> + <expression>AnalogOut1</expression> + <inVariable localId="64" height="30" width="95"> + <position x="45" y="980"/> + <relPosition x="95" y="15"/> + <expression>AnalogIn1</expression> + <block localId="69" width="160" height="230" typeName="Test_SFC" instanceName="Test2"> + <position x="450" y="820"/> + <variable formalParameter="CNT1"> + <relPosition x="0" y="35"/> + <connection refLocalId="37"> + <position x="450" y="855"/> + <position x="340" y="855"/> + <position x="340" y="550"/> + <position x="302" y="550"/> + <variable formalParameter="CNT2"> + <relPosition x="0" y="70"/> + <connection refLocalId="44"> + <position x="450" y="890"/> + <position x="365" y="890"/> + <position x="365" y="625"/> + <position x="310" y="625"/> + <variable formalParameter="IN1"> + <relPosition x="0" y="105"/> + <connection refLocalId="59"> + <position x="450" y="925"/> + <position x="145" y="925"/> + <variable formalParameter="IN2"> + <relPosition x="0" y="140"/> + <connection refLocalId="71"> + <position x="450" y="960"/> + <position x="145" y="960"/> + <variable formalParameter="UPPER1"> + <relPosition x="0" y="175"/> + <connection refLocalId="64"> + <position x="450" y="995"/> + <position x="140" y="995"/> + <variable formalParameter="UPPER2"> + <relPosition x="0" y="210"/> + <connection refLocalId="72"> + <position x="450" y="1030"/> + <position x="140" y="1030"/> + <variable formalParameter="OUT1"> + <relPosition x="160" y="35"/> + <variable formalParameter="OUT2"> + <relPosition x="160" y="70"/> + <outVariable localId="70" height="30" width="100"> + <position x="910" y="875"/> + <relPosition x="0" y="15"/> + <connection refLocalId="69" formalParameter="OUT2"> + <position x="910" y="890"/> + <position x="610" y="890"/> + <expression>AnalogOut2</expression> + <inVariable localId="71" height="30" width="100"> + <position x="45" y="945"/> + <relPosition x="100" y="15"/> + <expression>AnalogOut2</expression> + <inVariable localId="72" height="35" width="95"> + <position x="45" y="1015"/> + <relPosition x="95" y="15"/> + <expression>AnalogIn2</expression> + <block localId="73" width="120" height="80" typeName="SETBIT"> + <position x="745" y="140"/> + <variable formalParameter="INPUT_BYTE"> + <relPosition x="0" y="30"/> + <connection refLocalId="40"> + <position x="745" y="170"/> + <position x="125" y="170"/> + <variable formalParameter="INPUT_BIT"> + <relPosition x="0" y="50"/> + <connection refLocalId="77" formalParameter="Q"> + <position x="745" y="190"/> + <position x="526" y="190"/> + <position x="526" y="220"/> + <position x="507" y="220"/> + <variable formalParameter="NUM_BIT"> + <relPosition x="0" y="70"/> + <connection refLocalId="74"> + <position x="745" y="210"/> + <position x="540" y="210"/> + <position x="540" y="295"/> + <position x="95" y="295"/> + <variable formalParameter=""> + <relPosition x="120" y="30"/> + <inVariable localId="74" height="30" width="65"> + <position x="30" y="280"/> + <relPosition x="65" y="15"/> + <expression>UINT#7</expression> + <block localId="75" width="120" height="60" typeName="GETBIT"> + <position x="170" y="190"/> + <variable formalParameter="INPUT_BYTE"> + <relPosition x="0" y="30"/> + <connection refLocalId="40"> + <position x="170" y="220"/> + <position x="150" y="220"/> + <position x="150" y="170"/> + <position x="125" y="170"/> + <variable formalParameter="NUM_BIT"> + <relPosition x="0" y="50"/> + <connection refLocalId="74"> + <position x="170" y="240"/> + <position x="151" y="240"/> + <position x="151" y="295"/> + <position x="95" y="295"/> + <variable formalParameter=""> + <relPosition x="120" y="30"/> + <outVariable localId="76" height="30" width="100"> + <position x="910" y="155"/> + <relPosition x="0" y="15"/> + <connection refLocalId="73"> + <position x="910" y="170"/> + <position x="865" y="170"/> + <expression>DigitalOut</expression> + <block localId="77" width="57" height="60" typeName="TP" instanceName="t1"> + <position x="450" y="190"/> + <variable formalParameter="IN" negated="true"> + <relPosition x="0" y="30"/> + <connection refLocalId="85" formalParameter="Q"> + <position x="450" y="220"/> + <position x="400" y="220"/> + <variable formalParameter="PT"> + <relPosition x="0" y="50"/> + <connection refLocalId="80"> + <position x="450" y="240"/> + <position x="420" y="240"/> + <position x="420" y="270"/> + <position x="220" y="270"/> + <variable formalParameter="Q"> + <relPosition x="57" y="30"/> + <variable formalParameter="ET"> + <relPosition x="57" y="50"/> + <inVariable localId="80" height="27" width="50"> + <position x="170" y="255"/> + <relPosition x="50" y="15"/> + <expression>T#1s</expression> + <block localId="85" width="60" height="60" typeName="TOF" instanceName="t2"> + <position x="340" y="190"/> + <variable formalParameter="IN"> + <relPosition x="0" y="30"/> + <connection refLocalId="75"> + <position x="340" y="220"/> + <position x="290" y="220"/> + <variable formalParameter="PT"> + <relPosition x="0" y="50"/> + <connection refLocalId="80"> + <position x="340" y="240"/> + <position x="296" y="240"/> + <position x="296" y="270"/> + <position x="220" y="270"/> + <variable formalParameter="Q"> + <relPosition x="60" y="30"/> + <variable formalParameter="ET"> + <relPosition x="60" y="50"/> + <outVariable localId="86" height="30" width="100"> + <position x="910" y="330"/> + <relPosition x="0" y="15"/> + <connection refLocalId="90" formalParameter="OUT"> + <position x="910" y="345"/> + <position x="865" y="345"/> + <expression>AnalogOut3</expression> + <block localId="87" width="120" height="40" typeName="TIME_TO_REAL"> + <position x="455" y="315"/> + <variable formalParameter="IN"> + <relPosition x="0" y="30"/> + <connection refLocalId="77" formalParameter="ET"> + <position x="455" y="345"/> + <position x="445" y="345"/> + <position x="445" y="275"/> + <position x="517" y="275"/> + <position x="517" y="240"/> + <position x="507" y="240"/> + <variable formalParameter="OUT"> + <relPosition x="120" y="30"/> + <block localId="88" width="80" height="60" typeName="MUL"> + <position x="630" y="315"/> + <variable formalParameter="IN1"> + <relPosition x="0" y="30"/> + <connection refLocalId="87" formalParameter="OUT"> + <position x="630" y="345"/> + <position x="575" y="345"/> + <variable formalParameter="IN2"> + <relPosition x="0" y="50"/> + <connection refLocalId="89"> + <position x="630" y="365"/> + <position x="607" y="365"/> + <position x="607" y="400"/> + <position x="585" y="400"/> + <variable formalParameter="OUT"> + <relPosition x="80" y="30"/> + <inVariable localId="89" height="35" width="120"> + <position x="465" y="385"/> + <relPosition x="120" y="15"/> + <expression>REAL#10000.0</expression> + <block localId="90" width="120" height="40" typeName="REAL_TO_INT"> + <position x="745" y="315"/> + <variable formalParameter="IN"> + <relPosition x="0" y="30"/> + <connection refLocalId="88" formalParameter="OUT"> + <position x="745" y="345"/> + <position x="710" y="345"/> + <variable formalParameter="OUT"> + <relPosition x="120" y="30"/> + <inVariable localId="91" height="30" width="100"> + <position x="590" y="740"/> + <relPosition x="100" y="15"/> + <expression>DigitalOut</expression> + <inVariable localId="92" height="30" width="100"> + <position x="590" y="645"/> + <relPosition x="100" y="15"/> + <expression>DigitalOut</expression> + <inVariable localId="93" height="30" width="65"> + <position x="625" y="585"/> + <relPosition x="65" y="15"/> + <expression>UINT#1</expression> + <inVariable localId="94" height="30" width="100"> + <position x="590" y="545"/> + <relPosition x="100" y="15"/> + <expression>DigitalOut</expression> + <inVariable localId="95" height="30" width="100"> + <position x="595" y="450"/> + <relPosition x="100" y="15"/> + <expression>DigitalOut</expression> + <inVariable localId="96" height="30" width="95"> + <position x="595" y="490"/> + <relPosition x="95" y="15"/> + <expression>UINT#0</expression> + <inVariable localId="97" height="30" width="95"> + <position x="40" y="610"/> + <relPosition x="95" y="15"/> + <expression>DigitalIn</expression> + <comment localId="100" height="40" width="400"> + <position x="25" y="100"/> +<![CDATA[A simple blinking output (2s period)]]> + <comment localId="102" height="40" width="430"> + <position x="580" y="255"/> +<![CDATA[Output value of TP block as analog output #3]]> + <comment localId="103" height="65" width="420"> + <position x="25" y="425"/> +<![CDATA[Map input and output of bitwise_block test to bits of DigitalIn and Digital out]]> + <comment localId="104" height="85" width="285"> + <position x="40" y="805"/> +<![CDATA[Map AnalogIN #1 #2 and AnalogOUT #1 #2 to SFC test interface]]> + <inVariable localId="105" height="30" width="115"> + <position x="640" y="965"/> + <relPosition x="115" y="15"/> + <expression>DeviceType</expression> + <outVariable localId="106" height="30" width="115"> + <position x="1000" y="965"/> + <relPosition x="0" y="15"/> + <connection refLocalId="107" formalParameter="OUT"> + <position x="1000" y="980"/> + <position x="945" y="980"/> + <expression>AnalogOut4</expression> + <block localId="107" width="130" height="40" typeName="UDINT_TO_INT"> + <position x="815" y="950"/> + <variable formalParameter="IN"> + <relPosition x="0" y="30"/> + <connection refLocalId="105"> + <position x="815" y="980"/> + <position x="755" y="980"/> + <variable formalParameter="OUT"> + <relPosition x="130" y="30"/> + <pou name="GETBIT" pouType="function"> + <variable name="INPUT_BYTE"> + <variable name="NUM_BIT"> + <block localId="1" width="70" height="60" typeName="SHR"> + <position x="175" y="110"/> + <variable formalParameter="IN"> + <relPosition x="0" y="30"/> + <connection refLocalId="2"> + <position x="175" y="140"/> + <position x="135" y="140"/> + <variable formalParameter="N"> + <relPosition x="0" y="50"/> + <connection refLocalId="3"> + <position x="175" y="160"/> + <position x="140" y="160"/> + <position x="140" y="180"/> + <position x="105" y="180"/> + <variable formalParameter="OUT"> + <relPosition x="70" y="30"/> + <inVariable localId="2" height="30" width="105"> + <position x="30" y="125"/> + <relPosition x="105" y="15"/> + <expression>INPUT_BYTE</expression> + <inVariable localId="3" height="30" width="75"> + <position x="30" y="165"/> + <relPosition x="75" y="15"/> + <expression>NUM_BIT</expression> + <outVariable localId="4" height="30" width="65"> + <position x="555" y="125"/> + <relPosition x="0" y="15"/> + <connection refLocalId="7" formalParameter="OUT"> + <position x="555" y="140"/> + <position x="515" y="140"/> + <expression>GETBIT</expression> + <block localId="5" width="85" height="60" typeName="AND"> + <position x="275" y="110"/> + <variable formalParameter="IN1"> + <relPosition x="0" y="30"/> + <connection refLocalId="1" formalParameter="OUT"> + <position x="275" y="140"/> + <position x="245" y="140"/> + <variable formalParameter="IN2"> + <relPosition x="0" y="50"/> + <connection refLocalId="6"> + <position x="275" y="160"/> + <position x="255" y="160"/> + <position x="255" y="195"/> + <position x="240" y="195"/> + <variable formalParameter="OUT"> + <relPosition x="85" y="30"/> + <inVariable localId="6" height="30" width="65"> + <position x="175" y="180"/> + <relPosition x="65" y="15"/> + <expression>BYTE#1</expression> + <block localId="7" width="120" height="40" typeName="BYTE_TO_BOOL"> + <position x="395" y="110"/> + <variable formalParameter="IN"> + <relPosition x="0" y="30"/> + <connection refLocalId="5" formalParameter="OUT"> + <position x="395" y="140"/> + <position x="360" y="140"/> + <variable formalParameter="OUT"> + <relPosition x="120" y="30"/> + <comment localId="8" height="70" width="545"> + <position x="30" y="20"/> +<![CDATA[Function that return NUM_BIT'th bit value of INPUT_BYTE]]> + <pou name="SETBIT" pouType="function"> + <variable name="INPUT_BYTE"> + <variable name="INPUT_BIT"> + <variable name="NUM_BIT"> + <inVariable localId="1" height="30" width="100"> + <position x="40" y="255"/> + <relPosition x="100" y="15"/> + <expression>INPUT_BYTE</expression> + <inVariable localId="2" height="30" width="95"> + <position x="40" y="125"/> + <relPosition x="95" y="15"/> + <expression>INPUT_BIT</expression> + <block localId="3" width="120" height="45" typeName="BOOL_TO_BYTE"> + <position x="165" y="110"/> + <variable formalParameter="IN"> + <relPosition x="0" y="30"/> + <connection refLocalId="2"> + <position x="165" y="140"/> + <position x="135" y="140"/> + <variable formalParameter="OUT"> + <relPosition x="120" y="30"/> + <block localId="4" width="70" height="60" typeName="SHL"> + <position x="335" y="110"/> + <variable formalParameter="IN"> + <relPosition x="0" y="30"/> + <connection refLocalId="3" formalParameter="OUT"> + <position x="335" y="140"/> + <position x="285" y="140"/> + <variable formalParameter="N"> + <relPosition x="0" y="50"/> + <connection refLocalId="5"> + <position x="335" y="160"/> + <position x="130" y="160"/> + <position x="130" y="230"/> + <position x="115" y="230"/> + <variable formalParameter="OUT"> + <relPosition x="70" y="30"/> + <inVariable localId="5" height="30" width="75"> + <position x="40" y="215"/> + <relPosition x="75" y="15"/> + <expression>NUM_BIT</expression> + <block localId="7" width="70" height="60" typeName="SHL"> + <position x="235" y="180"/> + <variable formalParameter="IN"> + <relPosition x="0" y="30"/> + <connection refLocalId="8"> + <position x="235" y="210"/> + <position x="215" y="210"/> + <position x="220" y="210"/> + <position x="220" y="210"/> + <position x="220" y="210"/> + <position x="210" y="210"/> + <variable formalParameter="N"> + <relPosition x="0" y="50"/> + <connection refLocalId="5"> + <position x="235" y="230"/> + <position x="115" y="230"/> + <variable formalParameter="OUT"> + <relPosition x="70" y="30"/> + <inVariable localId="8" height="30" width="65"> + <position x="145" y="195"/> + <relPosition x="65" y="15"/> + <expression>BYTE#1</expression> + <block localId="9" width="70" height="40" typeName="NOT"> + <position x="335" y="180"/> + <variable formalParameter="IN"> + <relPosition x="0" y="30"/> + <connection refLocalId="7" formalParameter="OUT"> + <position x="335" y="210"/> + <position x="305" y="210"/> + <variable formalParameter="OUT"> + <relPosition x="70" y="30"/> + <block localId="10" width="80" height="60" typeName="AND"> + <position x="440" y="180"/> + <variable formalParameter="IN1"> + <relPosition x="0" y="30"/> + <connection refLocalId="9" formalParameter="OUT"> + <position x="440" y="210"/> + <position x="405" y="210"/> + <variable formalParameter="IN2"> + <relPosition x="0" y="50"/> + <connection refLocalId="1"> + <position x="440" y="230"/> + <position x="320" y="230"/> + <position x="320" y="270"/> + <position x="140" y="270"/> + <variable formalParameter="OUT"> + <relPosition x="80" y="30"/> + <block localId="11" width="80" height="60" typeName="OR"> + <position x="565" y="110"/> + <variable formalParameter="IN1"> + <relPosition x="0" y="30"/> + <connection refLocalId="4" formalParameter="OUT"> + <position x="565" y="140"/> + <position x="405" y="140"/> + <variable formalParameter="IN2"> + <relPosition x="0" y="50"/> + <connection refLocalId="10" formalParameter="OUT"> + <position x="565" y="160"/> + <position x="545" y="160"/> + <position x="545" y="210"/> + <position x="520" y="210"/> + <variable formalParameter="OUT"> + <relPosition x="80" y="30"/> + <outVariable localId="12" height="30" width="70"> + <position x="695" y="125"/> + <relPosition x="0" y="15"/> + <connection refLocalId="11" formalParameter="OUT"> + <position x="695" y="140"/> + <position x="645" y="140"/> + <expression>SETBIT</expression> + <comment localId="13" height="75" width="435"> + <position x="35" y="15"/> +<![CDATA[Function that return INPUT_BYTE with NUM_BIT'th bit set to INPUT_BIT value]]> + <pou name="Bitwise_Block" pouType="functionBlock"> + <variable name="OUT_AND"> + <variable name="OUT_OR"> + <variable name="OUT_XOR"> + <variable name="OUT_SR"> + <leftPowerRail localId="1" height="80" width="3"> + <position x="40" y="180"/> + <connectionPointOut formalParameter=""> + <relPosition x="3" y="20"/> + <connectionPointOut formalParameter=""> + <relPosition x="3" y="55"/> + <contact localId="2" height="15" width="25"> + <position x="90" y="190"/> + <relPosition x="0" y="10"/> + <connection refLocalId="1"> + <position x="90" y="200"/> + <position x="43" y="200"/> + <relPosition x="25" y="10"/> + <variable>IN1</variable> + <contact localId="3" height="20" width="25"> + <position x="90" y="225"/> + <relPosition x="0" y="10"/> + <connection refLocalId="1"> + <position x="90" y="235"/> + <position x="43" y="235"/> + <relPosition x="25" y="10"/> + <variable>IN2</variable> + <coil localId="4" height="20" width="25"> + <position x="225" y="190"/> + <relPosition x="0" y="10"/> + <connection refLocalId="2"> + <position x="225" y="200"/> + <position x="115" y="200"/> + <connection refLocalId="3"> + <position x="225" y="200"/> + <position x="189" y="200"/> + <position x="189" y="235"/> + <position x="115" y="235"/> + <relPosition x="25" y="10"/> + <variable>OUT_OR</variable> + <rightPowerRail localId="5" height="40" width="3"> + <position x="350" y="180"/> + <relPosition x="0" y="20"/> + <connection refLocalId="4"> + <position x="350" y="200"/> + <position x="250" y="200"/> + <leftPowerRail localId="6" height="40" width="3"> + <position x="40" y="315"/> + <connectionPointOut formalParameter=""> + <relPosition x="3" y="20"/> + <contact localId="7" height="20" width="25"> + <position x="100" y="325"/> + <relPosition x="0" y="10"/> + <connection refLocalId="6"> + <position x="100" y="335"/> + <position x="43" y="335"/> + <relPosition x="25" y="10"/> + <variable>IN1</variable> + <contact localId="8" height="20" width="25"> + <position x="185" y="325"/> + <relPosition x="0" y="10"/> + <connection refLocalId="7"> + <position x="185" y="335"/> + <position x="125" y="335"/> + <relPosition x="25" y="10"/> + <variable>IN2</variable> + <coil localId="9" height="20" width="25"> + <position x="275" y="325"/> + <relPosition x="0" y="10"/> + <connection refLocalId="8"> + <position x="275" y="335"/> + <position x="210" y="335"/> + <relPosition x="25" y="10"/> + <variable>OUT_AND</variable> + <rightPowerRail localId="10" height="40" width="3"> + <position x="350" y="315"/> + <relPosition x="0" y="20"/> + <connection refLocalId="9"> + <position x="350" y="335"/> + <position x="300" y="335"/> + <leftPowerRail localId="11" height="80" width="3"> + <position x="40" y="415"/> + <connectionPointOut formalParameter=""> + <relPosition x="3" y="20"/> + <connectionPointOut formalParameter=""> + <relPosition x="3" y="60"/> + <contact localId="12" height="20" width="25"> + <position x="100" y="425"/> + <relPosition x="0" y="10"/> + <connection refLocalId="11"> + <position x="100" y="435"/> + <position x="43" y="435"/> + <relPosition x="25" y="10"/> + <variable>IN1</variable> + <contact localId="13" height="20" width="25" negated="true"> + <position x="100" y="465"/> + <relPosition x="0" y="10"/> + <connection refLocalId="11"> + <position x="100" y="475"/> + <position x="43" y="475"/> + <relPosition x="25" y="10"/> + <variable>IN1</variable> + <contact localId="14" height="20" width="25" negated="true"> + <position x="190" y="425"/> + <relPosition x="0" y="10"/> + <connection refLocalId="12"> + <position x="190" y="435"/> + <position x="125" y="435"/> + <relPosition x="25" y="10"/> + <variable>IN2</variable> + <contact localId="15" height="20" width="25"> + <position x="190" y="465"/> + <relPosition x="0" y="10"/> + <connection refLocalId="13"> + <position x="190" y="475"/> + <position x="125" y="475"/> + <relPosition x="25" y="10"/> + <variable>IN2</variable> + <coil localId="16" height="20" width="30"> + <position x="295" y="425"/> + <relPosition x="0" y="10"/> + <connection refLocalId="14"> + <position x="295" y="435"/> + <position x="215" y="435"/> + <connection refLocalId="15"> + <position x="295" y="435"/> + <position x="270" y="435"/> + <position x="270" y="475"/> + <position x="215" y="475"/> + <relPosition x="30" y="10"/> + <variable>OUT_XOR</variable> + <rightPowerRail localId="17" height="40" width="3"> + <position x="350" y="415"/> + <relPosition x="0" y="20"/> + <connection refLocalId="16"> + <position x="350" y="435"/> + <position x="325" y="435"/> + <leftPowerRail localId="18" height="80" width="3"> + <position x="40" y="550"/> + <connectionPointOut formalParameter=""> + <relPosition x="3" y="20"/> + <connectionPointOut formalParameter=""> + <relPosition x="3" y="60"/> + <contact localId="19" height="20" width="25"> + <position x="100" y="560"/> + <relPosition x="0" y="10"/> + <connection refLocalId="18"> + <position x="100" y="570"/> + <position x="43" y="570"/> + <relPosition x="25" y="10"/> + <variable>IN1</variable> + <contact localId="21" height="20" width="25"> + <position x="100" y="600"/> + <relPosition x="0" y="10"/> + <connection refLocalId="18"> + <position x="100" y="610"/> + <position x="43" y="610"/> + <relPosition x="25" y="10"/> + <variable>IN2</variable> + <block localId="22" width="60" height="100" typeName="SR" instanceName="SR1"> + <position x="170" y="530"/> + <variable formalParameter="S1"> + <relPosition x="0" y="40"/> + <connection refLocalId="19"> + <position x="170" y="570"/> + <position x="125" y="570"/> + <variable formalParameter="R"> + <relPosition x="0" y="80"/> + <connection refLocalId="21"> + <position x="170" y="610"/> + <position x="125" y="610"/> + <variable formalParameter="Q1"> + <relPosition x="60" y="40"/> + <coil localId="24" height="20" width="25"> + <position x="295" y="560"/> + <relPosition x="0" y="10"/> + <connection refLocalId="22" formalParameter="Q1"> + <position x="295" y="570"/> + <position x="230" y="570"/> + <relPosition x="25" y="10"/> + <variable>OUT_SR</variable> + <rightPowerRail localId="25" height="40" width="3"> + <position x="350" y="550"/> + <relPosition x="0" y="20"/> + <connection refLocalId="24"> + <position x="350" y="570"/> + <position x="320" y="570"/> + <comment localId="26" height="85" width="385"> + <position x="25" y="35"/> +<![CDATA[A LD function block that embeds some FB and check basic LD]]> + <pou name="Test_SFC" pouType="functionBlock"> + <derived name="MYTYPE"/> + <derived name="MYTYPE"/> + <variable name="UPPER1"> + <variable name="UPPER2"> + <derived name="MYTYPE"/> + <derived name="MYTYPE"/> + <variable name="TEST_ENUM"> + <derived name="MYTYPE2"/> + <variable name="TEST_ARRAY"> + <derived name="MYTYPE3"/> +TEST_ARRAY[0,0] := TEST_ARRAY[0,1] + 50; + <transition name="REACH_UPPER1"> +<![CDATA[:= OUT1 >= UPPER1;]]> + <transition name="REACH_UPPER2"> +<![CDATA[:= OUT2 >= UPPER2;]]> + <step localId="1" height="31" width="55" name="Start" initialStep="true"> + <position x="125" y="170"/> + <connectionPointOut formalParameter=""> + <relPosition x="25" y="31"/> + <connectionPointOutAction formalParameter=""> + <relPosition x="55" y="15"/> + </connectionPointOutAction> + <step localId="4" height="30" width="55" name="Step3"> + <position x="440" y="370"/> + <relPosition x="25" y="0"/> + <connection refLocalId="22"> + <position x="465" y="370"/> + <position x="465" y="348"/> + <connectionPointOut formalParameter=""> + <relPosition x="25" y="30"/> + <connectionPointOutAction formalParameter=""> + <relPosition x="55" y="15"/> + </connectionPointOutAction> + <jumpStep localId="5" height="13" width="20" targetName="Start"> + <position x="205" y="630"/> + <relPosition x="10" y="0"/> + <connection refLocalId="12"> + <position x="215" y="630"/> + <position x="215" y="601"/> + <transition localId="8" height="2" width="20"> + <position x="560" y="565"/> + <relPosition x="10" y="0"/> + <connection refLocalId="25"> + <position x="570" y="565"/> + <position x="570" y="523"/> + <relPosition x="10" y="2"/> + <actionBlock localId="9" height="30" width="84"> + <position x="325" y="375"/> + <relPosition x="0" y="15"/> + <connection refLocalId="13"> + <position x="325" y="390"/> + <position x="300" y="390"/> + <reference name="COUNT1"/> + <actionBlock localId="10" height="30" width="105"> + <position x="520" y="370"/> + <relPosition x="0" y="15"/> + <connection refLocalId="4"> + <position x="520" y="385"/> + <position x="495" y="385"/> + <reference name="COUNT1"/> + <selectionDivergence localId="11" height="1" width="530"> + <position x="45" y="230"/> + <relPosition x="105" y="0"/> + <connection refLocalId="1"> + <position x="150" y="230"/> + <position x="150" y="201"/> + <connectionPointOut formalParameter=""> + <relPosition x="0" y="1"/> + <connectionPointOut formalParameter=""> + <relPosition x="225" y="1"/> + <connectionPointOut formalParameter=""> + <relPosition x="530" y="1"/> + <selectionConvergence localId="12" height="1" width="525"> + <position x="45" y="600"/> + <relPosition x="0" y="0"/> + <connection refLocalId="38"> + <position x="45" y="600"/> + <position x="45" y="472"/> + <relPosition x="225" y="0"/> + <connection refLocalId="15"> + <position x="270" y="600"/> + <position x="270" y="472"/> + <relPosition x="525" y="0"/> + <connection refLocalId="8"> + <position x="570" y="600"/> + <position x="570" y="567"/> + <relPosition x="170" y="1"/> + </selectionConvergence> + <step localId="13" height="30" width="55" name="Step1"> + <position x="245" y="375"/> + <relPosition x="25" y="0"/> + <connection refLocalId="44"> + <position x="270" y="375"/> + <position x="270" y="280"/> + <connectionPointOut formalParameter=""> + <relPosition x="25" y="30"/> + <connectionPointOutAction formalParameter=""> + <relPosition x="55" y="15"/> + </connectionPointOutAction> + <transition localId="15" height="2" width="20"> + <position x="260" y="470"/> + <relPosition x="10" y="0"/> + <connection refLocalId="13"> + <position x="270" y="470"/> + <position x="270" y="405"/> + <relPosition x="10" y="2"/> + <reference name="REACH_UPPER1"/> + <simultaneousDivergence localId="22" height="3" width="210"> + <position x="465" y="345"/> + <relPosition x="110" y="0"/> + <connection refLocalId="45"> + <position x="575" y="345"/> + <position x="575" y="280"/> + <connectionPointOut formalParameter=""> + <relPosition x="0" y="3"/> + <connectionPointOut formalParameter=""> + <relPosition x="210" y="3"/> + </simultaneousDivergence> + <transition localId="23" height="2" width="20"> + <position x="455" y="430"/> + <relPosition x="10" y="0"/> + <connection refLocalId="4"> + <position x="465" y="430"/> + <position x="465" y="400"/> + <relPosition x="10" y="2"/> + <reference name="REACH_UPPER1"/> + <step localId="24" height="27" width="55" name="WAIT1"> + <position x="440" y="465"/> + <relPosition x="25" y="0"/> + <connection refLocalId="23"> + <position x="465" y="465"/> + <position x="465" y="432"/> + <connectionPointOut formalParameter=""> + <relPosition x="25" y="27"/> + <simultaneousConvergence localId="25" height="3" width="210"> + <position x="465" y="520"/> + <relPosition x="0" y="0"/> + <connection refLocalId="24"> + <position x="465" y="520"/> + <position x="465" y="492"/> + <relPosition x="210" y="0"/> + <connection refLocalId="29"> + <position x="675" y="520"/> + <position x="675" y="492"/> + <relPosition x="105" y="3"/> + </simultaneousConvergence> + <step localId="26" height="30" width="55" name="Step4"> + <position x="650" y="370"/> + <relPosition x="25" y="0"/> + <connection refLocalId="22"> + <position x="675" y="370"/> + <position x="675" y="348"/> + <connectionPointOut formalParameter=""> + <relPosition x="25" y="30"/> + <connectionPointOutAction formalParameter=""> + <relPosition x="55" y="15"/> + </connectionPointOutAction> + <transition localId="28" height="2" width="20"> + <position x="665" y="430"/> + <relPosition x="10" y="0"/> + <connection refLocalId="26"> + <position x="675" y="430"/> + <position x="675" y="400"/> + <relPosition x="10" y="2"/> + <reference name="REACH_UPPER2"/> + <step localId="29" height="27" width="55" name="WAIT2"> + <position x="650" y="465"/> + <relPosition x="25" y="0"/> + <connection refLocalId="28"> + <position x="675" y="465"/> + <position x="675" y="432"/> + <connectionPointOut formalParameter=""> + <relPosition x="25" y="27"/> + <actionBlock localId="31" height="30" width="100"> + <position x="730" y="370"/> + <relPosition x="0" y="15"/> + <connection refLocalId="26"> + <position x="730" y="385"/> + <position x="705" y="385"/> + <reference name="COUNT2"/> + <actionBlock localId="32" height="30" width="235"> + <position x="200" y="170"/> + <relPosition x="0" y="15"/> + <connection refLocalId="1"> + <position x="200" y="185"/> + <position x="180" y="185"/> +<![CDATA[OUT1 := 0;OUT2 := 0;]]> + <transition localId="33" height="2" width="20"> + <position x="35" y="325"/> + <relPosition x="10" y="0"/> + <connection refLocalId="11"> + <position x="45" y="325"/> + <position x="45" y="231"/> + <relPosition x="10" y="2"/> +<![CDATA[CNT2 AND NOT CNT1]]> + <block localId="34" width="80" height="90" typeName="AND"> + <position x="435" y="240"/> + <variable formalParameter="IN1"> + <relPosition x="0" y="35"/> + <connection refLocalId="35"> + <position x="435" y="275"/> + <position x="410" y="275"/> + <variable formalParameter="IN2"> + <relPosition x="0" y="70"/> + <connection refLocalId="39"> + <position x="435" y="310"/> + <position x="410" y="310"/> + <variable formalParameter="OUT"> + <relPosition x="80" y="35"/> + <inVariable localId="35" height="30" width="50"> + <position x="360" y="260"/> + <relPosition x="50" y="15"/> + <expression>CNT1</expression> + <step localId="36" height="27" width="60" name="Step2"> + <position x="15" y="375"/> + <relPosition x="30" y="0"/> + <connection refLocalId="33"> + <position x="45" y="375"/> + <position x="45" y="327"/> + <connectionPointOut formalParameter=""> + <relPosition x="30" y="27"/> + <connectionPointOutAction formalParameter=""> + <relPosition x="60" y="15"/> + </connectionPointOutAction> + <actionBlock localId="37" height="30" width="84"> + <position x="100" y="375"/> + <relPosition x="0" y="15"/> + <connection refLocalId="36"> + <position x="100" y="390"/> + <position x="75" y="390"/> + <reference name="COUNT2"/> + <transition localId="38" height="2" width="20"> + <position x="35" y="470"/> + <relPosition x="10" y="0"/> + <connection refLocalId="36"> + <position x="45" y="470"/> + <position x="45" y="402"/> + <relPosition x="10" y="2"/> + <reference name="REACH_UPPER2"/> + <inVariable localId="39" height="30" width="50"> + <position x="360" y="295"/> + <relPosition x="50" y="15"/> + <expression>CNT2</expression> + <leftPowerRail localId="40" height="40" width="3"> + <position x="70" y="255"/> + <connectionPointOut formalParameter=""> + <relPosition x="3" y="20"/> + <contact localId="41" height="20" width="25"> + <position x="110" y="265"/> + <relPosition x="0" y="10"/> + <connection refLocalId="40"> + <position x="110" y="275"/> + <position x="73" y="275"/> + <relPosition x="25" y="10"/> + <variable>CNT1</variable> + <contact localId="42" height="20" width="25" negated="true"> + <position x="190" y="265"/> + <relPosition x="0" y="10"/> + <connection refLocalId="41"> + <position x="190" y="275"/> + <position x="135" y="275"/> + <relPosition x="25" y="10"/> + <variable>CNT2</variable> + <transition localId="44" height="10" width="20"> + <position x="260" y="270"/> + <relPosition x="10" y="0"/> + <connection refLocalId="11"> + <position x="270" y="270"/> + <position x="270" y="231"/> + <relPosition x="10" y="10"/> + <connection refLocalId="42"> + <position x="260" y="275"/> + <position x="215" y="275"/> + <transition localId="45" height="10" width="20"> + <position x="565" y="270"/> + <relPosition x="10" y="0"/> + <connection refLocalId="11"> + <position x="575" y="270"/> + <position x="575" y="231"/> + <relPosition x="10" y="10"/> + <connection refLocalId="34" formalParameter="OUT"> + <position x="565" y="275"/> + <position x="515" y="275"/> + <comment localId="46" height="120" width="785"> + <position x="15" y="25"/> +<![CDATA[A SFC that make use of different kinds of divergences, and mix LD and FBD and inline transitions. +It is supposed to increment OUT1 and OUT2 according CNT1 and CNT2, and untill UPPER1 and UPPER2 limits are reached.]]> + <configuration name="STD_CONF"> + <resource name="STD_RESSOURCE"> + <task name="STD_TASK" interval="00:00:00.100000" priority="0"> + <pouInstance name="MAIN_INSTANCE" type="MAIN_TEST"/> --- a/tests/linux/test_slave/canopen@canfestival/slave@CanOpenSlave/baseplugin.xml Wed Jun 25 17:09:24 2008 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,2 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<BaseParams Name="slave" IEC_Channel="0"/>
--- a/tests/linux/test_slave/canopen@canfestival/slave@CanOpenSlave/plugin.xml Wed Jun 25 17:09:24 2008 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,2 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<CanFestivalSlaveNode CAN_Device="vcan0" CAN_Baudrate="125K" NodeId="3"/>
--- a/tests/linux/test_slave/canopen@canfestival/slave@CanOpenSlave/slave.od Wed Jun 25 17:09:24 2008 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,38 +0,0 @@
-<!DOCTYPE PyObject SYSTEM "PyObjects.dtd">
-<PyObject module="node" class="Node" id="156683980">
-<attr name="Profile" type="dict" id="156696060" >
-<attr name="Description" type="string" value="" />
-<attr name="Dictionary" type="dict" id="156695788" >
- <key type="numeric" value="4096" />
- <val type="numeric" value="0" />
- <key type="numeric" value="4097" />
- <val type="numeric" value="0" />
- <key type="numeric" value="4120" />
- <val type="list" id="155064396" >
- <item type="numeric" value="0" />
- <item type="numeric" value="0" />
- <item type="numeric" value="0" />
- <item type="numeric" value="0" />
-<attr name="SpecificMenu" type="list" id="156683948" >
-<attr name="ParamsDictionary" type="dict" id="152882820" >
-<attr name="UserMapping" type="dict" id="155061620" >
-<attr name="DS302" type="dict" id="155049332" >
-<attr name="ProfileName" type="string" value="None" />
-<attr name="Type" type="string" value="slave" />
-<attr name="ID" type="numeric" value="0" />
-<attr name="Name" type="string" value="SlaveNode" />
--- a/tests/linux/test_slave/plc.xml Wed Jun 25 17:09:24 2008 +0200
+++ b/tests/linux/test_slave/plc.xml Wed Jun 25 17:11:47 2008 +0200
@@ -8,7 +8,7 @@
creationDateTime="2008-06-24 18:44:00"/>
<contentHeader name="test_slave"
- modificationDateTime="2008-06-24 19:15:12"
+ modificationDateTime="2008-06-25 16:43:20" @@ -28,7 +28,12 @@
<pou name="test_main" pouType="program">
- <variable name="testvar">
+ <variable name="outvar" address="%QW0.0.8192.0"> + <variable name="invar" address="%IW0.0.8193.0"> @@ -48,22 +53,15 @@
<position x="299" y="153"/>
- <expression>testvar</expression>
+ <expression>outvar</expression> <inVariable localId="2" height="29" width="20">
- <position x="123" y="110"/>
+ <position x="100" y="115"/> <relPosition x="20" y="14"/>
<expression>1</expression>
- <inVariable localId="3" height="29" width="20">
- <position x="122" y="173"/>
- <relPosition x="20" y="14"/>
- <expression>2</expression>
<block localId="4" width="75" height="60" typeName="ADD">
<position x="224" y="123"/>
@@ -73,19 +71,19 @@
<connection refLocalId="2">
<position x="224" y="153"/>
<position x="183" y="153"/>
- <position x="183" y="124"/>
- <position x="143" y="124"/>
+ <position x="183" y="129"/> + <position x="120" y="129"/> <variable formalParameter="IN2">
<relPosition x="0" y="50"/>
- <connection refLocalId="3">
+ <connection refLocalId="5"> <position x="224" y="173"/>
- <position x="183" y="173"/>
- <position x="183" y="187"/>
- <position x="142" y="187"/>
+ <position x="187" y="173"/> + <position x="187" y="187"/> + <position x="150" y="187"/> @@ -99,6 +97,13 @@
+ <inVariable localId="5" height="29" width="60"> + <position x="90" y="173"/> + <relPosition x="60" y="14"/> + <expression>invar</expression>