Replaced location for axis ref from %IW(location).0 to %IW(location).402. Added location for network position at %IW(location).
authorLaurent Bessard
Mon, 24 Jun 2013 21:03:22 +0200
changeset 2154 6bbe93799956
parent 2153 91c10856adaa
child 2155 d63541200d8e
Replaced location for axis ref from %IW(location).0 to %IW(location).402. Added location for network position at %IW(location).
ethercat_tests/wago_higen/ethercat@etherlab/master@EthercatNode/config.xml
ethercat_tests/wago_higen/ethercat@etherlab/master@EthercatNode/higen@EthercatCIA402Slave/confnode.xml
ethercat_tests/wago_higen/ethercat@etherlab/master@EthercatNode/process_variables.xml
ethercat_tests/wago_higen/plc.xml
etherlab/EthercatCIA402Slave.py
etherlab/images/CIA402NetPos.png
etherlab/images/icons.svg
etherlab/plc_cia402node.c
--- a/ethercat_tests/wago_higen/ethercat@etherlab/master@EthercatNode/config.xml	Mon Jun 24 09:23:28 2013 +0200
+++ b/ethercat_tests/wago_higen/ethercat@etherlab/master@EthercatNode/config.xml	Mon Jun 24 21:03:22 2013 +0200
@@ -1,127 +1,127 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<EtherCATConfig xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="EtherCATInfo.xsd">
-  <Config>
-    <Master>
-      <Info>
-        <Name></Name>
-        <Destination>00</Destination>
-        <Source>00</Source>
-      </Info>
-    </Master>
-    <Slave>
-      <Info>
-        <Name>EK1100</Name>
-        <PhysAddr>0</PhysAddr>
-        <AutoIncAddr>0</AutoIncAddr>
-        <Physics></Physics>
-        <VendorId>2</VendorId>
-        <ProductCode>72100946</ProductCode>
-        <RevisionNo>65536</RevisionNo>
-        <SerialNo>0</SerialNo>
-      </Info>
-      <Mailbox>
-        <Send>
-          <Start>0</Start>
-          <Length>0</Length>
-        </Send>
-        <Recv>
-          <Start>0</Start>
-          <Length>0</Length>
-        </Recv>
-        <CoE>
-          <InitCmds/>
-        </CoE>
-      </Mailbox>
-    </Slave>
-    <Slave>
-      <Info>
-        <Name>EL1088</Name>
-        <PhysAddr>1</PhysAddr>
-        <AutoIncAddr>0</AutoIncAddr>
-        <Physics></Physics>
-        <VendorId>2</VendorId>
-        <ProductCode>71315538</ProductCode>
-        <RevisionNo>1048576</RevisionNo>
-        <SerialNo>0</SerialNo>
-      </Info>
-      <Mailbox>
-        <Send>
-          <Start>0</Start>
-          <Length>0</Length>
-        </Send>
-        <Recv>
-          <Start>0</Start>
-          <Length>0</Length>
-        </Recv>
-        <CoE>
-          <InitCmds/>
-        </CoE>
-      </Mailbox>
-    </Slave>
-    <Slave>
-      <Info>
-        <Name>EL2088</Name>
-        <PhysAddr>2</PhysAddr>
-        <AutoIncAddr>0</AutoIncAddr>
-        <Physics></Physics>
-        <VendorId>2</VendorId>
-        <ProductCode>136851538</ProductCode>
-        <RevisionNo>1048576</RevisionNo>
-        <SerialNo>0</SerialNo>
-      </Info>
-    </Slave>
-    <Slave>
-      <Info>
-        <Name>EDA7000 CoE Drive</Name>
-        <PhysAddr>3</PhysAddr>
-        <AutoIncAddr>0</AutoIncAddr>
-        <Physics></Physics>
-        <VendorId>1573</VendorId>
-        <ProductCode>1768449365</ProductCode>
-        <RevisionNo>3</RevisionNo>
-        <SerialNo>0</SerialNo>
-      </Info>
-      <Mailbox>
-        <Send>
-          <Start>0</Start>
-          <Length>0</Length>
-        </Send>
-        <Recv>
-          <Start>0</Start>
-          <Length>0</Length>
-        </Recv>
-        <CoE>
-          <InitCmds>
-            <InitCmd>
-              <Transition>II</Transition>
-              <Comment>Configure limit switches signal</Comment>
-              <Timeout>0</Timeout>
-              <Ccs>0</Ccs>
-              <Index>8229</Index>
-              <SubIndex>0</SubIndex>
-              <Data>07</Data>
-            </InitCmd>
-            <InitCmd>
-              <Transition>II</Transition>
-              <Comment></Comment>
-              <Timeout>0</Timeout>
-              <Ccs>0</Ccs>
-              <Index>24800</Index>
-              <SubIndex>0</SubIndex>
-              <Data>05DC</Data>
-            </InitCmd>
-            <InitCmd>
-              <Transition>II</Transition>
-              <Comment></Comment>
-              <Timeout>0</Timeout>
-              <Ccs>0</Ccs>
-              <Index>24801</Index>
-              <SubIndex>0</SubIndex>
-              <Data>05DC</Data>
-            </InitCmd>
-          </InitCmds>
-        </CoE>
-      </Mailbox>
-    </Slave>
-  </Config>
-</EtherCATConfig>
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<EtherCATConfig xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="EtherCATInfo.xsd">
+  <Config>
+    <Master>
+      <Info>
+        <Name></Name>
+        <Destination>00</Destination>
+        <Source>00</Source>
+      </Info>
+    </Master>
+    <Slave>
+      <Info>
+        <Name>EK1100</Name>
+        <PhysAddr>0</PhysAddr>
+        <AutoIncAddr>0</AutoIncAddr>
+        <Physics></Physics>
+        <VendorId>2</VendorId>
+        <ProductCode>72100946</ProductCode>
+        <RevisionNo>65536</RevisionNo>
+        <SerialNo>0</SerialNo>
+      </Info>
+      <Mailbox>
+        <Send>
+          <Start>0</Start>
+          <Length>0</Length>
+        </Send>
+        <Recv>
+          <Start>0</Start>
+          <Length>0</Length>
+        </Recv>
+        <CoE>
+          <InitCmds/>
+        </CoE>
+      </Mailbox>
+    </Slave>
+    <Slave>
+      <Info>
+        <Name>EL1088</Name>
+        <PhysAddr>1</PhysAddr>
+        <AutoIncAddr>0</AutoIncAddr>
+        <Physics></Physics>
+        <VendorId>2</VendorId>
+        <ProductCode>71315538</ProductCode>
+        <RevisionNo>1048576</RevisionNo>
+        <SerialNo>0</SerialNo>
+      </Info>
+      <Mailbox>
+        <Send>
+          <Start>0</Start>
+          <Length>0</Length>
+        </Send>
+        <Recv>
+          <Start>0</Start>
+          <Length>0</Length>
+        </Recv>
+        <CoE>
+          <InitCmds/>
+        </CoE>
+      </Mailbox>
+    </Slave>
+    <Slave>
+      <Info>
+        <Name>EL2088</Name>
+        <PhysAddr>2</PhysAddr>
+        <AutoIncAddr>0</AutoIncAddr>
+        <Physics></Physics>
+        <VendorId>2</VendorId>
+        <ProductCode>136851538</ProductCode>
+        <RevisionNo>1048576</RevisionNo>
+        <SerialNo>0</SerialNo>
+      </Info>
+    </Slave>
+    <Slave>
+      <Info>
+        <Name>EDA7000 CoE Drive</Name>
+        <PhysAddr>3</PhysAddr>
+        <AutoIncAddr>0</AutoIncAddr>
+        <Physics></Physics>
+        <VendorId>1573</VendorId>
+        <ProductCode>1768449365</ProductCode>
+        <RevisionNo>3</RevisionNo>
+        <SerialNo>0</SerialNo>
+      </Info>
+      <Mailbox>
+        <Send>
+          <Start>0</Start>
+          <Length>0</Length>
+        </Send>
+        <Recv>
+          <Start>0</Start>
+          <Length>0</Length>
+        </Recv>
+        <CoE>
+          <InitCmds>
+            <InitCmd>
+              <Transition>II</Transition>
+              <Comment>Configure limit switches signal</Comment>
+              <Timeout>0</Timeout>
+              <Ccs>0</Ccs>
+              <Index>8229</Index>
+              <SubIndex>0</SubIndex>
+              <Data>07</Data>
+            </InitCmd>
+            <InitCmd>
+              <Transition>II</Transition>
+              <Comment></Comment>
+              <Timeout>0</Timeout>
+              <Ccs>0</Ccs>
+              <Index>24800</Index>
+              <SubIndex>0</SubIndex>
+              <Data>05DC</Data>
+            </InitCmd>
+            <InitCmd>
+              <Transition>II</Transition>
+              <Comment></Comment>
+              <Timeout>0</Timeout>
+              <Ccs>0</Ccs>
+              <Index>24801</Index>
+              <SubIndex>0</SubIndex>
+              <Data>05DC</Data>
+            </InitCmd>
+          </InitCmds>
+        </CoE>
+      </Mailbox>
+    </Slave>
+  </Config>
+</EtherCATConfig>
--- a/ethercat_tests/wago_higen/ethercat@etherlab/master@EthercatNode/higen@EthercatCIA402Slave/confnode.xml	Mon Jun 24 09:23:28 2013 +0200
+++ b/ethercat_tests/wago_higen/ethercat@etherlab/master@EthercatNode/higen@EthercatCIA402Slave/confnode.xml	Mon Jun 24 21:03:22 2013 +0200
@@ -1,2 +1,2 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<CIA402SlaveParams HomingMaxTorque="100" DynamicPDOs="false" EnableDigitalInputs="true" RatioNumerator="65536" RatioDenominator="360" PositionOffset="0" HomingTorqueLimit="500" HomingVelocity="360" TorqueRatioNumerator="10" TorqueRatioDenominator="1"/>
+<?xml version="1.0" encoding="UTF-8"?>
+<CIA402SlaveParams HomingMaxTorque="100" DynamicPDOs="false" HomingTorqueLimit="500" EnableDigitalInputs="true" RatioNumerator="65536" RatioDenominator="360" PositionOffset="0" LimitSwitchNC="false" HomingLimitWindow="10" HomingVelocity="360" TorqueRatioNumerator="10" TorqueRatioDenominator="1"/>
--- a/ethercat_tests/wago_higen/ethercat@etherlab/master@EthercatNode/process_variables.xml	Mon Jun 24 09:23:28 2013 +0200
+++ b/ethercat_tests/wago_higen/ethercat@etherlab/master@EthercatNode/process_variables.xml	Mon Jun 24 21:03:22 2013 +0200
@@ -1,2 +1,2 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<ProcessVariables xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<ProcessVariables xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
--- a/ethercat_tests/wago_higen/plc.xml	Mon Jun 24 09:23:28 2013 +0200
+++ b/ethercat_tests/wago_higen/plc.xml	Mon Jun 24 21:03:22 2013 +0200
@@ -1,1049 +1,1049 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://www.plcopen.org/xml/tc6.xsd"
-         xsi:schemaLocation="http://www.plcopen.org/xml/tc6.xsd"
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xmlns:xhtml="http://www.w3.org/1999/xhtml">
-  <fileHeader companyName="Laurent BESSARD"
-              productName="test_ethercat"
-              productVersion="1.0"
-              creationDateTime="2011-10-20T19:01:52"/>
-  <contentHeader name="test_ethercat"
-                 modificationDateTime="2013-04-30T00:35:53">
-    <coordinateInfo>
-      <fbd>
-        <scaling x="0" y="0"/>
-      </fbd>
-      <ld>
-        <scaling x="0" y="0"/>
-      </ld>
-      <sfc>
-        <scaling x="0" y="0"/>
-      </sfc>
-    </coordinateInfo>
-  </contentHeader>
-  <types>
-    <dataTypes/>
-    <pous>
-      <pou name="Prog" pouType="program">
-        <interface>
-          <localVars>
-            <variable name="CLOCK" address="%QX0.0.2.28672.1">
-              <type>
-                <BOOL/>
-              </type>
-            </variable>
-            <variable name="GREENLED" address="%QX0.0.2.28688.1">
-              <type>
-                <BOOL/>
-              </type>
-              <initialValue>
-                <simpleValue value="TRUE"/>
-              </initialValue>
-            </variable>
-            <variable name="ControlWord" address="%QW0.0.3.24640.0">
-              <type>
-                <UINT/>
-              </type>
-            </variable>
-            <variable name="StatusWord" address="%IW0.0.3.24641.0">
-              <type>
-                <UINT/>
-              </type>
-            </variable>
-            <variable name="Mode" address="%QB0.0.3.24672.0">
-              <type>
-                <SINT/>
-              </type>
-            </variable>
-            <variable name="ModeDisplay" address="%IB0.0.3.24673.0">
-              <type>
-                <SINT/>
-              </type>
-            </variable>
-            <variable name="ActualPosition" address="%ID0.0.3.24676.0">
-              <type>
-                <DINT/>
-              </type>
-            </variable>
-            <variable name="ActualVelocity" address="%ID0.0.3.24684.0">
-              <type>
-                <DINT/>
-              </type>
-            </variable>
-            <variable name="TargetPosition" address="%QD0.0.3.24698.0">
-              <type>
-                <DINT/>
-              </type>
-            </variable>
-            <variable name="TargetVelocity" address="%QD0.0.3.24831.0">
-              <type>
-                <DINT/>
-              </type>
-            </variable>
-            <variable name="DigitalInputs" address="%ID0.0.3.24829.0">
-              <type>
-                <UDINT/>
-              </type>
-            </variable>
-          </localVars>
-        </interface>
-        <body>
-          <ST>
-<![CDATA[CLOCK := NOT CLOCK;]]>
-          </ST>
-        </body>
-      </pou>
-      <pou name="test_MCL" pouType="program">
-        <interface>
-          <localVars>
-            <variable name="CLOCK">
-              <type>
-                <UDINT/>
-              </type>
-            </variable>
-          </localVars>
-          <localVars>
-            <variable name="Axis" address="%IW0.0.3.0">
-              <type>
-                <derived name="AXIS_REF"/>
-              </type>
-            </variable>
-          </localVars>
-          <localVars>
-            <variable name="switch">
-              <type>
-                <derived name="MC_Power"/>
-              </type>
-            </variable>
-            <variable name="move1">
-              <type>
-                <derived name="MC_MoveAbsolute"/>
-              </type>
-            </variable>
-            <variable name="ActualPosition">
-              <type>
-                <DINT/>
-              </type>
-            </variable>
-            <variable name="Valid">
-              <type>
-                <BOOL/>
-              </type>
-            </variable>
-            <variable name="Pn">
-              <type>
-                <LREAL/>
-              </type>
-            </variable>
-            <variable name="Vn">
-              <type>
-                <LREAL/>
-              </type>
-            </variable>
-            <variable name="MC_MoveVelocity0">
-              <type>
-                <derived name="MC_MoveVelocity"/>
-              </type>
-            </variable>
-            <variable name="MC_MoveAbsolute0">
-              <type>
-                <derived name="MC_MoveAbsolute"/>
-              </type>
-            </variable>
-            <variable name="readpos">
-              <type>
-                <derived name="MC_ReadActualPosition"/>
-              </type>
-            </variable>
-            <variable name="readspeed">
-              <type>
-                <derived name="MC_ReadParameter"/>
-              </type>
-            </variable>
-            <variable name="MC_SetPosition0">
-              <type>
-                <derived name="MC_SetPosition"/>
-              </type>
-            </variable>
-          </localVars>
-        </interface>
-        <body>
-          <FBD>
-            <inVariable localId="1" height="27" width="53">
-              <position x="45" y="36"/>
-              <connectionPointOut>
-                <relPosition x="53" y="13"/>
-              </connectionPointOut>
-              <expression>CLOCK</expression>
-            </inVariable>
-            <block localId="2" width="111" height="116" typeName="ADD">
-              <position x="149" y="5"/>
-              <inputVariables>
-                <variable formalParameter="IN1">
-                  <connectionPointIn>
-                    <relPosition x="0" y="44"/>
-                    <connection refLocalId="1">
-                      <position x="149" y="49"/>
-                      <position x="98" y="49"/>
-                    </connection>
-                  </connectionPointIn>
-                </variable>
-                <variable formalParameter="IN2">
-                  <connectionPointIn>
-                    <relPosition x="0" y="92"/>
-                    <connection refLocalId="3">
-                      <position x="149" y="97"/>
-                      <position x="98" y="97"/>
-                    </connection>
-                  </connectionPointIn>
-                </variable>
-              </inputVariables>
-              <inOutVariables/>
-              <outputVariables>
-                <variable formalParameter="OUT">
-                  <connectionPointOut>
-                    <relPosition x="111" y="44"/>
-                  </connectionPointOut>
-                </variable>
-              </outputVariables>
-            </block>
-            <inVariable localId="3" height="27" width="18">
-              <position x="80" y="84"/>
-              <connectionPointOut>
-                <relPosition x="18" y="13"/>
-              </connectionPointOut>
-              <expression>1</expression>
-            </inVariable>
-            <outVariable localId="4" height="27" width="53">
-              <position x="302" y="36"/>
-              <connectionPointIn>
-                <relPosition x="0" y="13"/>
-                <connection refLocalId="2" formalParameter="OUT">
-                  <position x="302" y="49"/>
-                  <position x="260" y="49"/>
-                </connection>
-              </connectionPointIn>
-              <expression>CLOCK</expression>
-            </outVariable>
-            <inVariable localId="5" height="27" width="53">
-              <position x="46" y="234"/>
-              <connectionPointOut>
-                <relPosition x="53" y="13"/>
-              </connectionPointOut>
-              <expression>CLOCK</expression>
-            </inVariable>
-            <inVariable localId="6" height="27" width="50">
-              <position x="49" y="268"/>
-              <connectionPointOut>
-                <relPosition x="50" y="13"/>
-              </connectionPointOut>
-              <expression>4000</expression>
-            </inVariable>
-            <block localId="7" width="99" height="89" typeName="GT">
-              <position x="155" y="210"/>
-              <inputVariables>
-                <variable formalParameter="IN1">
-                  <connectionPointIn>
-                    <relPosition x="0" y="37"/>
-                    <connection refLocalId="5">
-                      <position x="155" y="247"/>
-                      <position x="99" y="247"/>
-                    </connection>
-                  </connectionPointIn>
-                </variable>
-                <variable formalParameter="IN2">
-                  <connectionPointIn>
-                    <relPosition x="0" y="71"/>
-                    <connection refLocalId="6">
-                      <position x="155" y="281"/>
-                      <position x="99" y="281"/>
-                    </connection>
-                  </connectionPointIn>
-                </variable>
-              </inputVariables>
-              <inOutVariables/>
-              <outputVariables>
-                <variable formalParameter="OUT">
-                  <connectionPointOut>
-                    <relPosition x="99" y="37"/>
-                  </connectionPointOut>
-                </variable>
-              </outputVariables>
-            </block>
-            <block localId="8" width="159" height="204" typeName="MC_Power" instanceName="switch">
-              <position x="356" y="173"/>
-              <inputVariables>
-                <variable formalParameter="Axis">
-                  <connectionPointIn>
-                    <relPosition x="0" y="38"/>
-                    <connection refLocalId="9">
-                      <position x="356" y="211"/>
-                      <position x="324" y="211"/>
-                    </connection>
-                  </connectionPointIn>
-                </variable>
-                <variable formalParameter="Enable">
-                  <connectionPointIn>
-                    <relPosition x="0" y="74"/>
-                    <connection refLocalId="7" formalParameter="OUT">
-                      <position x="356" y="247"/>
-                      <position x="254" y="247"/>
-                    </connection>
-                  </connectionPointIn>
-                </variable>
-                <variable formalParameter="EnablePositive">
-                  <connectionPointIn>
-                    <relPosition x="0" y="110"/>
-                  </connectionPointIn>
-                </variable>
-                <variable formalParameter="EnableNegative">
-                  <connectionPointIn>
-                    <relPosition x="0" y="146"/>
-                  </connectionPointIn>
-                </variable>
-              </inputVariables>
-              <inOutVariables/>
-              <outputVariables>
-                <variable formalParameter="Axis">
-                  <connectionPointOut>
-                    <relPosition x="159" y="38"/>
-                  </connectionPointOut>
-                </variable>
-                <variable formalParameter="Status">
-                  <connectionPointOut>
-                    <relPosition x="159" y="74"/>
-                  </connectionPointOut>
-                </variable>
-                <variable formalParameter="Valid">
-                  <connectionPointOut>
-                    <relPosition x="159" y="110"/>
-                  </connectionPointOut>
-                </variable>
-                <variable formalParameter="Error">
-                  <connectionPointOut>
-                    <relPosition x="159" y="146"/>
-                  </connectionPointOut>
-                </variable>
-                <variable formalParameter="ErrorID">
-                  <connectionPointOut>
-                    <relPosition x="159" y="182"/>
-                  </connectionPointOut>
-                </variable>
-              </outputVariables>
-            </block>
-            <inVariable localId="9" height="27" width="36">
-              <position x="288" y="198"/>
-              <connectionPointOut>
-                <relPosition x="36" y="13"/>
-              </connectionPointOut>
-              <expression>Axis</expression>
-            </inVariable>
-            <block localId="10" width="252" height="389" typeName="MC_MoveAbsolute" instanceName="move1">
-              <position x="992" y="173"/>
-              <inputVariables>
-                <variable formalParameter="Axis">
-                  <connectionPointIn>
-                    <relPosition x="0" y="38"/>
-                    <connection refLocalId="42" formalParameter="Axis">
-                      <position x="992" y="211"/>
-                      <position x="853" y="211"/>
-                    </connection>
-                  </connectionPointIn>
-                </variable>
-                <variable formalParameter="Execute">
-                  <connectionPointIn>
-                    <relPosition x="0" y="74"/>
-                    <connection refLocalId="42" formalParameter="Done">
-                      <position x="992" y="247"/>
-                      <position x="853" y="247"/>
-                    </connection>
-                  </connectionPointIn>
-                </variable>
-                <variable formalParameter="ContinuousUpdate">
-                  <connectionPointIn>
-                    <relPosition x="0" y="110"/>
-                  </connectionPointIn>
-                </variable>
-                <variable formalParameter="Position">
-                  <connectionPointIn>
-                    <relPosition x="0" y="146"/>
-                    <connection refLocalId="11">
-                      <position x="992" y="319"/>
-                      <position x="920" y="319"/>
-                    </connection>
-                  </connectionPointIn>
-                </variable>
-                <variable formalParameter="Velocity">
-                  <connectionPointIn>
-                    <relPosition x="0" y="182"/>
-                    <connection refLocalId="12">
-                      <position x="992" y="355"/>
-                      <position x="919" y="355"/>
-                    </connection>
-                  </connectionPointIn>
-                </variable>
-                <variable formalParameter="Acceleration">
-                  <connectionPointIn>
-                    <relPosition x="0" y="218"/>
-                    <connection refLocalId="12">
-                      <position x="992" y="391"/>
-                      <position x="955" y="391"/>
-                      <position x="955" y="355"/>
-                      <position x="919" y="355"/>
-                    </connection>
-                  </connectionPointIn>
-                </variable>
-                <variable formalParameter="Deceleration">
-                  <connectionPointIn>
-                    <relPosition x="0" y="254"/>
-                    <connection refLocalId="12">
-                      <position x="992" y="427"/>
-                      <position x="955" y="427"/>
-                      <position x="955" y="355"/>
-                      <position x="919" y="355"/>
-                    </connection>
-                  </connectionPointIn>
-                </variable>
-                <variable formalParameter="Jerk">
-                  <connectionPointIn>
-                    <relPosition x="0" y="290"/>
-                  </connectionPointIn>
-                </variable>
-                <variable formalParameter="Direction">
-                  <connectionPointIn>
-                    <relPosition x="0" y="326"/>
-                  </connectionPointIn>
-                </variable>
-                <variable formalParameter="BufferMode">
-                  <connectionPointIn>
-                    <relPosition x="0" y="362"/>
-                  </connectionPointIn>
-                </variable>
-              </inputVariables>
-              <inOutVariables/>
-              <outputVariables>
-                <variable formalParameter="Axis">
-                  <connectionPointOut>
-                    <relPosition x="252" y="38"/>
-                  </connectionPointOut>
-                </variable>
-                <variable formalParameter="Done">
-                  <connectionPointOut>
-                    <relPosition x="252" y="74"/>
-                  </connectionPointOut>
-                </variable>
-                <variable formalParameter="Busy">
-                  <connectionPointOut>
-                    <relPosition x="252" y="110"/>
-                  </connectionPointOut>
-                </variable>
-                <variable formalParameter="Active">
-                  <connectionPointOut>
-                    <relPosition x="252" y="146"/>
-                  </connectionPointOut>
-                </variable>
-                <variable formalParameter="CommandAborted">
-                  <connectionPointOut>
-                    <relPosition x="252" y="182"/>
-                  </connectionPointOut>
-                </variable>
-                <variable formalParameter="Error">
-                  <connectionPointOut>
-                    <relPosition x="252" y="218"/>
-                  </connectionPointOut>
-                </variable>
-                <variable formalParameter="ErrorID">
-                  <connectionPointOut>
-                    <relPosition x="252" y="254"/>
-                  </connectionPointOut>
-                </variable>
-              </outputVariables>
-            </block>
-            <inVariable localId="11" height="27" width="54">
-              <position x="878" y="306"/>
-              <connectionPointOut>
-                <relPosition x="54" y="13"/>
-              </connectionPointOut>
-              <expression>1800.0</expression>
-            </inVariable>
-            <inVariable localId="12" height="27" width="46">
-              <position x="885" y="342"/>
-              <connectionPointOut>
-                <relPosition x="46" y="13"/>
-              </connectionPointOut>
-              <expression>360.0</expression>
-            </inVariable>
-            <block localId="23" width="255" height="352" typeName="MC_MoveVelocity" instanceName="MC_MoveVelocity0">
-              <position x="1418" y="173"/>
-              <inputVariables>
-                <variable formalParameter="Axis">
-                  <connectionPointIn>
-                    <relPosition x="0" y="38"/>
-                    <connection refLocalId="10" formalParameter="Axis">
-                      <position x="1418" y="211"/>
-                      <position x="1244" y="211"/>
-                    </connection>
-                  </connectionPointIn>
-                </variable>
-                <variable formalParameter="Execute">
-                  <connectionPointIn>
-                    <relPosition x="0" y="74"/>
-                    <connection refLocalId="10" formalParameter="Done">
-                      <position x="1418" y="247"/>
-                      <position x="1244" y="247"/>
-                    </connection>
-                  </connectionPointIn>
-                </variable>
-                <variable formalParameter="ContinuousUpdate">
-                  <connectionPointIn>
-                    <relPosition x="0" y="110"/>
-                  </connectionPointIn>
-                </variable>
-                <variable formalParameter="Velocity">
-                  <connectionPointIn>
-                    <relPosition x="0" y="146"/>
-                    <connection refLocalId="24">
-                      <position x="1418" y="319"/>
-                      <position x="1349" y="319"/>
-                    </connection>
-                  </connectionPointIn>
-                </variable>
-                <variable formalParameter="Acceleration">
-                  <connectionPointIn>
-                    <relPosition x="0" y="182"/>
-                    <connection refLocalId="13">
-                      <position x="1418" y="355"/>
-                      <position x="1349" y="355"/>
-                    </connection>
-                  </connectionPointIn>
-                </variable>
-                <variable formalParameter="Deceleration">
-                  <connectionPointIn>
-                    <relPosition x="0" y="218"/>
-                    <connection refLocalId="13">
-                      <position x="1418" y="391"/>
-                      <position x="1383" y="391"/>
-                      <position x="1383" y="355"/>
-                      <position x="1349" y="355"/>
-                    </connection>
-                  </connectionPointIn>
-                </variable>
-                <variable formalParameter="Jerk">
-                  <connectionPointIn>
-                    <relPosition x="0" y="254"/>
-                  </connectionPointIn>
-                </variable>
-                <variable formalParameter="Direction">
-                  <connectionPointIn>
-                    <relPosition x="0" y="290"/>
-                  </connectionPointIn>
-                </variable>
-                <variable formalParameter="BufferMode">
-                  <connectionPointIn>
-                    <relPosition x="0" y="326"/>
-                  </connectionPointIn>
-                </variable>
-              </inputVariables>
-              <inOutVariables/>
-              <outputVariables>
-                <variable formalParameter="Axis">
-                  <connectionPointOut>
-                    <relPosition x="255" y="38"/>
-                  </connectionPointOut>
-                </variable>
-                <variable formalParameter="InVelocity">
-                  <connectionPointOut>
-                    <relPosition x="255" y="74"/>
-                  </connectionPointOut>
-                </variable>
-                <variable formalParameter="Busy">
-                  <connectionPointOut>
-                    <relPosition x="255" y="110"/>
-                  </connectionPointOut>
-                </variable>
-                <variable formalParameter="Active">
-                  <connectionPointOut>
-                    <relPosition x="255" y="146"/>
-                  </connectionPointOut>
-                </variable>
-                <variable formalParameter="CommandAborted">
-                  <connectionPointOut>
-                    <relPosition x="255" y="182"/>
-                  </connectionPointOut>
-                </variable>
-                <variable formalParameter="Error">
-                  <connectionPointOut>
-                    <relPosition x="255" y="218"/>
-                  </connectionPointOut>
-                </variable>
-                <variable formalParameter="ErrorID">
-                  <connectionPointOut>
-                    <relPosition x="255" y="254"/>
-                  </connectionPointOut>
-                </variable>
-              </outputVariables>
-            </block>
-            <inVariable localId="13" height="27" width="46">
-              <position x="1303" y="342"/>
-              <connectionPointOut>
-                <relPosition x="46" y="13"/>
-              </connectionPointOut>
-              <expression>360.0</expression>
-            </inVariable>
-            <inVariable localId="24" height="27" width="46">
-              <position x="1303" y="306"/>
-              <connectionPointOut>
-                <relPosition x="46" y="13"/>
-              </connectionPointOut>
-              <expression>-360.0</expression>
-            </inVariable>
-            <block localId="25" width="235" height="350" typeName="MC_MoveAbsolute" instanceName="MC_MoveAbsolute0">
-              <position x="1862" y="175"/>
-              <inputVariables>
-                <variable formalParameter="Axis">
-                  <connectionPointIn>
-                    <relPosition x="0" y="36"/>
-                    <connection refLocalId="23" formalParameter="Axis">
-                      <position x="1862" y="211"/>
-                      <position x="1673" y="211"/>
-                    </connection>
-                  </connectionPointIn>
-                </variable>
-                <variable formalParameter="Execute">
-                  <connectionPointIn>
-                    <relPosition x="0" y="69"/>
-                    <connection refLocalId="26" formalParameter="OUT">
-                      <position x="1862" y="244"/>
-                      <position x="1825" y="244"/>
-                    </connection>
-                  </connectionPointIn>
-                </variable>
-                <variable formalParameter="ContinuousUpdate">
-                  <connectionPointIn>
-                    <relPosition x="0" y="102"/>
-                  </connectionPointIn>
-                </variable>
-                <variable formalParameter="Position">
-                  <connectionPointIn>
-                    <relPosition x="0" y="135"/>
-                    <connection refLocalId="40">
-                      <position x="1862" y="310"/>
-                      <position x="1809" y="310"/>
-                    </connection>
-                  </connectionPointIn>
-                </variable>
-                <variable formalParameter="Velocity">
-                  <connectionPointIn>
-                    <relPosition x="0" y="168"/>
-                    <connection refLocalId="37">
-                      <position x="1862" y="343"/>
-                      <position x="1808" y="343"/>
-                    </connection>
-                  </connectionPointIn>
-                </variable>
-                <variable formalParameter="Acceleration">
-                  <connectionPointIn>
-                    <relPosition x="0" y="201"/>
-                    <connection refLocalId="37">
-                      <position x="1862" y="376"/>
-                      <position x="1818" y="376"/>
-                      <position x="1818" y="343"/>
-                      <position x="1808" y="343"/>
-                    </connection>
-                  </connectionPointIn>
-                </variable>
-                <variable formalParameter="Deceleration">
-                  <connectionPointIn>
-                    <relPosition x="0" y="234"/>
-                    <connection refLocalId="37">
-                      <position x="1862" y="409"/>
-                      <position x="1818" y="409"/>
-                      <position x="1818" y="343"/>
-                      <position x="1808" y="343"/>
-                    </connection>
-                  </connectionPointIn>
-                </variable>
-                <variable formalParameter="Jerk">
-                  <connectionPointIn>
-                    <relPosition x="0" y="267"/>
-                  </connectionPointIn>
-                </variable>
-                <variable formalParameter="Direction">
-                  <connectionPointIn>
-                    <relPosition x="0" y="300"/>
-                  </connectionPointIn>
-                </variable>
-                <variable formalParameter="BufferMode">
-                  <connectionPointIn>
-                    <relPosition x="0" y="333"/>
-                  </connectionPointIn>
-                </variable>
-              </inputVariables>
-              <inOutVariables/>
-              <outputVariables>
-                <variable formalParameter="Axis">
-                  <connectionPointOut>
-                    <relPosition x="235" y="36"/>
-                  </connectionPointOut>
-                </variable>
-                <variable formalParameter="Done">
-                  <connectionPointOut>
-                    <relPosition x="235" y="69"/>
-                  </connectionPointOut>
-                </variable>
-                <variable formalParameter="Busy">
-                  <connectionPointOut>
-                    <relPosition x="235" y="102"/>
-                  </connectionPointOut>
-                </variable>
-                <variable formalParameter="Active">
-                  <connectionPointOut>
-                    <relPosition x="235" y="135"/>
-                  </connectionPointOut>
-                </variable>
-                <variable formalParameter="CommandAborted">
-                  <connectionPointOut>
-                    <relPosition x="235" y="168"/>
-                  </connectionPointOut>
-                </variable>
-                <variable formalParameter="Error">
-                  <connectionPointOut>
-                    <relPosition x="235" y="201"/>
-                  </connectionPointOut>
-                </variable>
-                <variable formalParameter="ErrorID">
-                  <connectionPointOut>
-                    <relPosition x="235" y="234"/>
-                  </connectionPointOut>
-                </variable>
-              </outputVariables>
-            </block>
-            <block localId="26" width="53" height="63" typeName="LT">
-              <position x="1772" y="214"/>
-              <inputVariables>
-                <variable formalParameter="IN1">
-                  <connectionPointIn>
-                    <relPosition x="0" y="30"/>
-                    <connection refLocalId="36">
-                      <position x="1772" y="244"/>
-                      <position x="1752" y="244"/>
-                      <position x="1752" y="237"/>
-                      <position x="1741" y="237"/>
-                    </connection>
-                  </connectionPointIn>
-                </variable>
-                <variable formalParameter="IN2">
-                  <connectionPointIn>
-                    <relPosition x="0" y="51"/>
-                    <connection refLocalId="35">
-                      <position x="1772" y="265"/>
-                      <position x="1741" y="265"/>
-                    </connection>
-                  </connectionPointIn>
-                </variable>
-              </inputVariables>
-              <inOutVariables/>
-              <outputVariables>
-                <variable formalParameter="OUT">
-                  <connectionPointOut>
-                    <relPosition x="53" y="30"/>
-                  </connectionPointOut>
-                </variable>
-              </outputVariables>
-            </block>
-            <block localId="28" width="176" height="248" typeName="MC_ReadActualPosition" instanceName="readpos">
-              <position x="237" y="606"/>
-              <inputVariables>
-                <variable formalParameter="Axis">
-                  <connectionPointIn>
-                    <relPosition x="0" y="40"/>
-                    <connection refLocalId="31">
-                      <position x="237" y="646"/>
-                      <position x="109" y="646"/>
-                    </connection>
-                  </connectionPointIn>
-                </variable>
-                <variable formalParameter="Enable">
-                  <connectionPointIn>
-                    <relPosition x="0" y="80"/>
-                    <connection refLocalId="29">
-                      <position x="237" y="686"/>
-                      <position x="165" y="686"/>
-                    </connection>
-                  </connectionPointIn>
-                </variable>
-              </inputVariables>
-              <inOutVariables/>
-              <outputVariables>
-                <variable formalParameter="Axis">
-                  <connectionPointOut>
-                    <relPosition x="176" y="40"/>
-                  </connectionPointOut>
-                </variable>
-                <variable formalParameter="Valid">
-                  <connectionPointOut>
-                    <relPosition x="176" y="80"/>
-                  </connectionPointOut>
-                </variable>
-                <variable formalParameter="Busy">
-                  <connectionPointOut>
-                    <relPosition x="176" y="112"/>
-                  </connectionPointOut>
-                </variable>
-                <variable formalParameter="Error">
-                  <connectionPointOut>
-                    <relPosition x="176" y="152"/>
-                  </connectionPointOut>
-                </variable>
-                <variable formalParameter="ErrorID">
-                  <connectionPointOut>
-                    <relPosition x="176" y="192"/>
-                  </connectionPointOut>
-                </variable>
-                <variable formalParameter="Position">
-                  <connectionPointOut>
-                    <relPosition x="176" y="232"/>
-                  </connectionPointOut>
-                </variable>
-              </outputVariables>
-            </block>
-            <inVariable localId="29" height="32" width="96">
-              <position x="69" y="670"/>
-              <connectionPointOut>
-                <relPosition x="96" y="16"/>
-              </connectionPointOut>
-              <expression>BOOL#TRUE</expression>
-            </inVariable>
-            <outVariable localId="30" height="32" width="32">
-              <position x="437" y="822"/>
-              <connectionPointIn>
-                <relPosition x="0" y="16"/>
-                <connection refLocalId="28" formalParameter="Position">
-                  <position x="437" y="838"/>
-                  <position x="413" y="838"/>
-                </connection>
-              </connectionPointIn>
-              <expression>Pn</expression>
-            </outVariable>
-            <inVariable localId="31" height="32" width="40">
-              <position x="69" y="630"/>
-              <connectionPointOut>
-                <relPosition x="40" y="16"/>
-              </connectionPointOut>
-              <expression>Axis</expression>
-            </inVariable>
-            <block localId="32" width="192" height="248" typeName="MC_ReadParameter" instanceName="readspeed">
-              <position x="613" y="606"/>
-              <inputVariables>
-                <variable formalParameter="Axis">
-                  <connectionPointIn>
-                    <relPosition x="0" y="40"/>
-                    <connection refLocalId="28" formalParameter="Axis">
-                      <position x="613" y="646"/>
-                      <position x="413" y="646"/>
-                    </connection>
-                  </connectionPointIn>
-                </variable>
-                <variable formalParameter="Enable">
-                  <connectionPointIn>
-                    <relPosition x="0" y="80"/>
-                    <connection refLocalId="34">
-                      <position x="613" y="686"/>
-                      <position x="597" y="686"/>
-                      <position x="597" y="679"/>
-                      <position x="581" y="679"/>
-                    </connection>
-                  </connectionPointIn>
-                </variable>
-                <variable formalParameter="ParameterNumber">
-                  <connectionPointIn>
-                    <relPosition x="0" y="112"/>
-                    <connection refLocalId="33">
-                      <position x="613" y="718"/>
-                      <position x="581" y="718"/>
-                    </connection>
-                  </connectionPointIn>
-                </variable>
-              </inputVariables>
-              <inOutVariables/>
-              <outputVariables>
-                <variable formalParameter="Axis">
-                  <connectionPointOut>
-                    <relPosition x="192" y="40"/>
-                  </connectionPointOut>
-                </variable>
-                <variable formalParameter="Valid">
-                  <connectionPointOut>
-                    <relPosition x="192" y="80"/>
-                  </connectionPointOut>
-                </variable>
-                <variable formalParameter="Busy">
-                  <connectionPointOut>
-                    <relPosition x="192" y="112"/>
-                  </connectionPointOut>
-                </variable>
-                <variable formalParameter="Error">
-                  <connectionPointOut>
-                    <relPosition x="192" y="152"/>
-                  </connectionPointOut>
-                </variable>
-                <variable formalParameter="ErrorID">
-                  <connectionPointOut>
-                    <relPosition x="192" y="192"/>
-                  </connectionPointOut>
-                </variable>
-                <variable formalParameter="Value">
-                  <connectionPointOut>
-                    <relPosition x="192" y="232"/>
-                  </connectionPointOut>
-                </variable>
-              </outputVariables>
-            </block>
-            <inVariable localId="33" height="32" width="32">
-              <position x="549" y="702"/>
-              <connectionPointOut>
-                <relPosition x="32" y="16"/>
-              </connectionPointOut>
-              <expression>10</expression>
-            </inVariable>
-            <inVariable localId="34" height="32" width="96">
-              <position x="485" y="663"/>
-              <connectionPointOut>
-                <relPosition x="96" y="16"/>
-              </connectionPointOut>
-              <expression>BOOL#TRUE</expression>
-            </inVariable>
-            <outVariable localId="27" height="32" width="32">
-              <position x="837" y="822"/>
-              <connectionPointIn>
-                <relPosition x="0" y="16"/>
-                <connection refLocalId="32" formalParameter="Value">
-                  <position x="837" y="838"/>
-                  <position x="805" y="838"/>
-                </connection>
-              </connectionPointIn>
-              <expression>Vn</expression>
-            </outVariable>
-            <inVariable localId="35" height="27" width="48">
-              <position x="1693" y="252"/>
-              <connectionPointOut>
-                <relPosition x="48" y="13"/>
-              </connectionPointOut>
-              <expression>-1800.0</expression>
-            </inVariable>
-            <inVariable localId="36" height="23" width="22">
-              <position x="1719" y="226"/>
-              <connectionPointOut>
-                <relPosition x="22" y="11"/>
-              </connectionPointOut>
-              <expression>Pn</expression>
-            </inVariable>
-            <inVariable localId="37" height="27" width="46">
-              <position x="1762" y="330"/>
-              <connectionPointOut>
-                <relPosition x="46" y="13"/>
-              </connectionPointOut>
-              <expression>360.0</expression>
-            </inVariable>
-            <inVariable localId="40" height="27" width="46">
-              <position x="1763" y="297"/>
-              <connectionPointOut>
-                <relPosition x="46" y="13"/>
-              </connectionPointOut>
-              <expression>0.0</expression>
-            </inVariable>
-            <block localId="42" width="189" height="204" typeName="MC_SetPosition" instanceName="MC_SetPosition0">
-              <position x="664" y="173"/>
-              <inputVariables>
-                <variable formalParameter="Axis">
-                  <connectionPointIn>
-                    <relPosition x="0" y="38"/>
-                    <connection refLocalId="8" formalParameter="Axis">
-                      <position x="664" y="211"/>
-                      <position x="515" y="211"/>
-                    </connection>
-                  </connectionPointIn>
-                </variable>
-                <variable formalParameter="Execute">
-                  <connectionPointIn>
-                    <relPosition x="0" y="74"/>
-                    <connection refLocalId="8" formalParameter="Status">
-                      <position x="664" y="247"/>
-                      <position x="515" y="247"/>
-                    </connection>
-                  </connectionPointIn>
-                </variable>
-                <variable formalParameter="Position">
-                  <connectionPointIn>
-                    <relPosition x="0" y="110"/>
-                    <connection refLocalId="43">
-                      <position x="664" y="283"/>
-                      <position x="629" y="283"/>
-                    </connection>
-                  </connectionPointIn>
-                </variable>
-                <variable formalParameter="Relative">
-                  <connectionPointIn>
-                    <relPosition x="0" y="146"/>
-                  </connectionPointIn>
-                </variable>
-                <variable formalParameter="ExecutionMode">
-                  <connectionPointIn>
-                    <relPosition x="0" y="182"/>
-                  </connectionPointIn>
-                </variable>
-              </inputVariables>
-              <inOutVariables/>
-              <outputVariables>
-                <variable formalParameter="Axis">
-                  <connectionPointOut>
-                    <relPosition x="189" y="38"/>
-                  </connectionPointOut>
-                </variable>
-                <variable formalParameter="Done">
-                  <connectionPointOut>
-                    <relPosition x="189" y="74"/>
-                  </connectionPointOut>
-                </variable>
-                <variable formalParameter="Busy">
-                  <connectionPointOut>
-                    <relPosition x="189" y="110"/>
-                  </connectionPointOut>
-                </variable>
-                <variable formalParameter="Error">
-                  <connectionPointOut>
-                    <relPosition x="189" y="146"/>
-                  </connectionPointOut>
-                </variable>
-                <variable formalParameter="ErrorID">
-                  <connectionPointOut>
-                    <relPosition x="189" y="182"/>
-                  </connectionPointOut>
-                </variable>
-              </outputVariables>
-            </block>
-            <inVariable localId="43" height="27" width="54">
-              <position x="575" y="270"/>
-              <connectionPointOut>
-                <relPosition x="54" y="13"/>
-              </connectionPointOut>
-              <expression>0.0</expression>
-            </inVariable>
-          </FBD>
-        </body>
-      </pou>
-    </pous>
-  </types>
-  <instances>
-    <configurations>
-      <configuration name="conf">
-        <resource name="res">
-          <task name="main_task" interval="T#0.5ms" priority="0">
-            <pouInstance name="main_instance" typeName="Prog"/>
-            <pouInstance name="test_MCL_instance" typeName="test_MCL"/>
-          </task>
-        </resource>
-      </configuration>
-    </configurations>
-  </instances>
-</project>
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://www.plcopen.org/xml/tc6.xsd"
+         xsi:schemaLocation="http://www.plcopen.org/xml/tc6.xsd"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xmlns:xhtml="http://www.w3.org/1999/xhtml">
+  <fileHeader companyName="Laurent BESSARD"
+              productName="test_ethercat"
+              productVersion="1.0"
+              creationDateTime="2011-10-20T19:01:52"/>
+  <contentHeader name="test_ethercat"
+                 modificationDateTime="2013-06-24T20:55:15">
+    <coordinateInfo>
+      <fbd>
+        <scaling x="0" y="0"/>
+      </fbd>
+      <ld>
+        <scaling x="0" y="0"/>
+      </ld>
+      <sfc>
+        <scaling x="0" y="0"/>
+      </sfc>
+    </coordinateInfo>
+  </contentHeader>
+  <types>
+    <dataTypes/>
+    <pous>
+      <pou name="Prog" pouType="program">
+        <interface>
+          <localVars>
+            <variable name="CLOCK" address="%QX0.0.2.28672.1">
+              <type>
+                <BOOL/>
+              </type>
+            </variable>
+            <variable name="GREENLED" address="%QX0.0.2.28688.1">
+              <type>
+                <BOOL/>
+              </type>
+              <initialValue>
+                <simpleValue value="TRUE"/>
+              </initialValue>
+            </variable>
+            <variable name="ControlWord" address="%QW0.0.3.24640.0">
+              <type>
+                <UINT/>
+              </type>
+            </variable>
+            <variable name="StatusWord" address="%IW0.0.3.24641.0">
+              <type>
+                <UINT/>
+              </type>
+            </variable>
+            <variable name="Mode" address="%QB0.0.3.24672.0">
+              <type>
+                <SINT/>
+              </type>
+            </variable>
+            <variable name="ModeDisplay" address="%IB0.0.3.24673.0">
+              <type>
+                <SINT/>
+              </type>
+            </variable>
+            <variable name="ActualPosition" address="%ID0.0.3.24676.0">
+              <type>
+                <DINT/>
+              </type>
+            </variable>
+            <variable name="ActualVelocity" address="%ID0.0.3.24684.0">
+              <type>
+                <DINT/>
+              </type>
+            </variable>
+            <variable name="TargetPosition" address="%QD0.0.3.24698.0">
+              <type>
+                <DINT/>
+              </type>
+            </variable>
+            <variable name="TargetVelocity" address="%QD0.0.3.24831.0">
+              <type>
+                <DINT/>
+              </type>
+            </variable>
+            <variable name="DigitalInputs" address="%ID0.0.3.24829.0">
+              <type>
+                <UDINT/>
+              </type>
+            </variable>
+          </localVars>
+        </interface>
+        <body>
+          <ST>
+<![CDATA[CLOCK := NOT CLOCK;]]>
+          </ST>
+        </body>
+      </pou>
+      <pou name="test_MCL" pouType="program">
+        <interface>
+          <localVars>
+            <variable name="CLOCK">
+              <type>
+                <UDINT/>
+              </type>
+            </variable>
+          </localVars>
+          <localVars>
+            <variable name="Axis" address="%IW0.0.3.402">
+              <type>
+                <derived name="AXIS_REF"/>
+              </type>
+            </variable>
+          </localVars>
+          <localVars>
+            <variable name="switch">
+              <type>
+                <derived name="MC_Power"/>
+              </type>
+            </variable>
+            <variable name="move1">
+              <type>
+                <derived name="MC_MoveAbsolute"/>
+              </type>
+            </variable>
+            <variable name="ActualPosition">
+              <type>
+                <DINT/>
+              </type>
+            </variable>
+            <variable name="Valid">
+              <type>
+                <BOOL/>
+              </type>
+            </variable>
+            <variable name="Pn">
+              <type>
+                <LREAL/>
+              </type>
+            </variable>
+            <variable name="Vn">
+              <type>
+                <LREAL/>
+              </type>
+            </variable>
+            <variable name="MC_MoveVelocity0">
+              <type>
+                <derived name="MC_MoveVelocity"/>
+              </type>
+            </variable>
+            <variable name="MC_MoveAbsolute0">
+              <type>
+                <derived name="MC_MoveAbsolute"/>
+              </type>
+            </variable>
+            <variable name="readpos">
+              <type>
+                <derived name="MC_ReadActualPosition"/>
+              </type>
+            </variable>
+            <variable name="readspeed">
+              <type>
+                <derived name="MC_ReadParameter"/>
+              </type>
+            </variable>
+            <variable name="MC_SetPosition0">
+              <type>
+                <derived name="MC_SetPosition"/>
+              </type>
+            </variable>
+          </localVars>
+        </interface>
+        <body>
+          <FBD>
+            <inVariable localId="1" height="27" width="53">
+              <position x="45" y="36"/>
+              <connectionPointOut>
+                <relPosition x="53" y="13"/>
+              </connectionPointOut>
+              <expression>CLOCK</expression>
+            </inVariable>
+            <block localId="2" width="111" height="116" typeName="ADD">
+              <position x="149" y="5"/>
+              <inputVariables>
+                <variable formalParameter="IN1">
+                  <connectionPointIn>
+                    <relPosition x="0" y="44"/>
+                    <connection refLocalId="1">
+                      <position x="149" y="49"/>
+                      <position x="98" y="49"/>
+                    </connection>
+                  </connectionPointIn>
+                </variable>
+                <variable formalParameter="IN2">
+                  <connectionPointIn>
+                    <relPosition x="0" y="92"/>
+                    <connection refLocalId="3">
+                      <position x="149" y="97"/>
+                      <position x="98" y="97"/>
+                    </connection>
+                  </connectionPointIn>
+                </variable>
+              </inputVariables>
+              <inOutVariables/>
+              <outputVariables>
+                <variable formalParameter="OUT">
+                  <connectionPointOut>
+                    <relPosition x="111" y="44"/>
+                  </connectionPointOut>
+                </variable>
+              </outputVariables>
+            </block>
+            <inVariable localId="3" height="27" width="18">
+              <position x="80" y="84"/>
+              <connectionPointOut>
+                <relPosition x="18" y="13"/>
+              </connectionPointOut>
+              <expression>1</expression>
+            </inVariable>
+            <outVariable localId="4" height="27" width="53">
+              <position x="302" y="36"/>
+              <connectionPointIn>
+                <relPosition x="0" y="13"/>
+                <connection refLocalId="2" formalParameter="OUT">
+                  <position x="302" y="49"/>
+                  <position x="260" y="49"/>
+                </connection>
+              </connectionPointIn>
+              <expression>CLOCK</expression>
+            </outVariable>
+            <inVariable localId="5" height="27" width="53">
+              <position x="46" y="234"/>
+              <connectionPointOut>
+                <relPosition x="53" y="13"/>
+              </connectionPointOut>
+              <expression>CLOCK</expression>
+            </inVariable>
+            <inVariable localId="6" height="27" width="50">
+              <position x="49" y="268"/>
+              <connectionPointOut>
+                <relPosition x="50" y="13"/>
+              </connectionPointOut>
+              <expression>4000</expression>
+            </inVariable>
+            <block localId="7" width="99" height="89" typeName="GT">
+              <position x="155" y="210"/>
+              <inputVariables>
+                <variable formalParameter="IN1">
+                  <connectionPointIn>
+                    <relPosition x="0" y="37"/>
+                    <connection refLocalId="5">
+                      <position x="155" y="247"/>
+                      <position x="99" y="247"/>
+                    </connection>
+                  </connectionPointIn>
+                </variable>
+                <variable formalParameter="IN2">
+                  <connectionPointIn>
+                    <relPosition x="0" y="71"/>
+                    <connection refLocalId="6">
+                      <position x="155" y="281"/>
+                      <position x="99" y="281"/>
+                    </connection>
+                  </connectionPointIn>
+                </variable>
+              </inputVariables>
+              <inOutVariables/>
+              <outputVariables>
+                <variable formalParameter="OUT">
+                  <connectionPointOut>
+                    <relPosition x="99" y="37"/>
+                  </connectionPointOut>
+                </variable>
+              </outputVariables>
+            </block>
+            <block localId="8" width="159" height="204" typeName="MC_Power" instanceName="switch">
+              <position x="356" y="173"/>
+              <inputVariables>
+                <variable formalParameter="Axis">
+                  <connectionPointIn>
+                    <relPosition x="0" y="38"/>
+                    <connection refLocalId="9">
+                      <position x="356" y="211"/>
+                      <position x="324" y="211"/>
+                    </connection>
+                  </connectionPointIn>
+                </variable>
+                <variable formalParameter="Enable">
+                  <connectionPointIn>
+                    <relPosition x="0" y="74"/>
+                    <connection refLocalId="7" formalParameter="OUT">
+                      <position x="356" y="247"/>
+                      <position x="254" y="247"/>
+                    </connection>
+                  </connectionPointIn>
+                </variable>
+                <variable formalParameter="EnablePositive">
+                  <connectionPointIn>
+                    <relPosition x="0" y="110"/>
+                  </connectionPointIn>
+                </variable>
+                <variable formalParameter="EnableNegative">
+                  <connectionPointIn>
+                    <relPosition x="0" y="146"/>
+                  </connectionPointIn>
+                </variable>
+              </inputVariables>
+              <inOutVariables/>
+              <outputVariables>
+                <variable formalParameter="Axis">
+                  <connectionPointOut>
+                    <relPosition x="159" y="38"/>
+                  </connectionPointOut>
+                </variable>
+                <variable formalParameter="Status">
+                  <connectionPointOut>
+                    <relPosition x="159" y="74"/>
+                  </connectionPointOut>
+                </variable>
+                <variable formalParameter="Valid">
+                  <connectionPointOut>
+                    <relPosition x="159" y="110"/>
+                  </connectionPointOut>
+                </variable>
+                <variable formalParameter="Error">
+                  <connectionPointOut>
+                    <relPosition x="159" y="146"/>
+                  </connectionPointOut>
+                </variable>
+                <variable formalParameter="ErrorID">
+                  <connectionPointOut>
+                    <relPosition x="159" y="182"/>
+                  </connectionPointOut>
+                </variable>
+              </outputVariables>
+            </block>
+            <inVariable localId="9" height="27" width="36">
+              <position x="288" y="198"/>
+              <connectionPointOut>
+                <relPosition x="36" y="13"/>
+              </connectionPointOut>
+              <expression>Axis</expression>
+            </inVariable>
+            <block localId="10" width="252" height="389" typeName="MC_MoveAbsolute" instanceName="move1">
+              <position x="992" y="173"/>
+              <inputVariables>
+                <variable formalParameter="Axis">
+                  <connectionPointIn>
+                    <relPosition x="0" y="38"/>
+                    <connection refLocalId="42" formalParameter="Axis">
+                      <position x="992" y="211"/>
+                      <position x="853" y="211"/>
+                    </connection>
+                  </connectionPointIn>
+                </variable>
+                <variable formalParameter="Execute">
+                  <connectionPointIn>
+                    <relPosition x="0" y="74"/>
+                    <connection refLocalId="42" formalParameter="Done">
+                      <position x="992" y="247"/>
+                      <position x="853" y="247"/>
+                    </connection>
+                  </connectionPointIn>
+                </variable>
+                <variable formalParameter="ContinuousUpdate">
+                  <connectionPointIn>
+                    <relPosition x="0" y="110"/>
+                  </connectionPointIn>
+                </variable>
+                <variable formalParameter="Position">
+                  <connectionPointIn>
+                    <relPosition x="0" y="146"/>
+                    <connection refLocalId="11">
+                      <position x="992" y="319"/>
+                      <position x="920" y="319"/>
+                    </connection>
+                  </connectionPointIn>
+                </variable>
+                <variable formalParameter="Velocity">
+                  <connectionPointIn>
+                    <relPosition x="0" y="182"/>
+                    <connection refLocalId="12">
+                      <position x="992" y="355"/>
+                      <position x="919" y="355"/>
+                    </connection>
+                  </connectionPointIn>
+                </variable>
+                <variable formalParameter="Acceleration">
+                  <connectionPointIn>
+                    <relPosition x="0" y="218"/>
+                    <connection refLocalId="12">
+                      <position x="992" y="391"/>
+                      <position x="955" y="391"/>
+                      <position x="955" y="355"/>
+                      <position x="919" y="355"/>
+                    </connection>
+                  </connectionPointIn>
+                </variable>
+                <variable formalParameter="Deceleration">
+                  <connectionPointIn>
+                    <relPosition x="0" y="254"/>
+                    <connection refLocalId="12">
+                      <position x="992" y="427"/>
+                      <position x="955" y="427"/>
+                      <position x="955" y="355"/>
+                      <position x="919" y="355"/>
+                    </connection>
+                  </connectionPointIn>
+                </variable>
+                <variable formalParameter="Jerk">
+                  <connectionPointIn>
+                    <relPosition x="0" y="290"/>
+                  </connectionPointIn>
+                </variable>
+                <variable formalParameter="Direction">
+                  <connectionPointIn>
+                    <relPosition x="0" y="326"/>
+                  </connectionPointIn>
+                </variable>
+                <variable formalParameter="BufferMode">
+                  <connectionPointIn>
+                    <relPosition x="0" y="362"/>
+                  </connectionPointIn>
+                </variable>
+              </inputVariables>
+              <inOutVariables/>
+              <outputVariables>
+                <variable formalParameter="Axis">
+                  <connectionPointOut>
+                    <relPosition x="252" y="38"/>
+                  </connectionPointOut>
+                </variable>
+                <variable formalParameter="Done">
+                  <connectionPointOut>
+                    <relPosition x="252" y="74"/>
+                  </connectionPointOut>
+                </variable>
+                <variable formalParameter="Busy">
+                  <connectionPointOut>
+                    <relPosition x="252" y="110"/>
+                  </connectionPointOut>
+                </variable>
+                <variable formalParameter="Active">
+                  <connectionPointOut>
+                    <relPosition x="252" y="146"/>
+                  </connectionPointOut>
+                </variable>
+                <variable formalParameter="CommandAborted">
+                  <connectionPointOut>
+                    <relPosition x="252" y="182"/>
+                  </connectionPointOut>
+                </variable>
+                <variable formalParameter="Error">
+                  <connectionPointOut>
+                    <relPosition x="252" y="218"/>
+                  </connectionPointOut>
+                </variable>
+                <variable formalParameter="ErrorID">
+                  <connectionPointOut>
+                    <relPosition x="252" y="254"/>
+                  </connectionPointOut>
+                </variable>
+              </outputVariables>
+            </block>
+            <inVariable localId="11" height="27" width="54">
+              <position x="878" y="306"/>
+              <connectionPointOut>
+                <relPosition x="54" y="13"/>
+              </connectionPointOut>
+              <expression>1800.0</expression>
+            </inVariable>
+            <inVariable localId="12" height="27" width="46">
+              <position x="885" y="342"/>
+              <connectionPointOut>
+                <relPosition x="46" y="13"/>
+              </connectionPointOut>
+              <expression>360.0</expression>
+            </inVariable>
+            <block localId="23" width="255" height="352" typeName="MC_MoveVelocity" instanceName="MC_MoveVelocity0">
+              <position x="1418" y="173"/>
+              <inputVariables>
+                <variable formalParameter="Axis">
+                  <connectionPointIn>
+                    <relPosition x="0" y="38"/>
+                    <connection refLocalId="10" formalParameter="Axis">
+                      <position x="1418" y="211"/>
+                      <position x="1244" y="211"/>
+                    </connection>
+                  </connectionPointIn>
+                </variable>
+                <variable formalParameter="Execute">
+                  <connectionPointIn>
+                    <relPosition x="0" y="74"/>
+                    <connection refLocalId="10" formalParameter="Done">
+                      <position x="1418" y="247"/>
+                      <position x="1244" y="247"/>
+                    </connection>
+                  </connectionPointIn>
+                </variable>
+                <variable formalParameter="ContinuousUpdate">
+                  <connectionPointIn>
+                    <relPosition x="0" y="110"/>
+                  </connectionPointIn>
+                </variable>
+                <variable formalParameter="Velocity">
+                  <connectionPointIn>
+                    <relPosition x="0" y="146"/>
+                    <connection refLocalId="24">
+                      <position x="1418" y="319"/>
+                      <position x="1349" y="319"/>
+                    </connection>
+                  </connectionPointIn>
+                </variable>
+                <variable formalParameter="Acceleration">
+                  <connectionPointIn>
+                    <relPosition x="0" y="182"/>
+                    <connection refLocalId="13">
+                      <position x="1418" y="355"/>
+                      <position x="1349" y="355"/>
+                    </connection>
+                  </connectionPointIn>
+                </variable>
+                <variable formalParameter="Deceleration">
+                  <connectionPointIn>
+                    <relPosition x="0" y="218"/>
+                    <connection refLocalId="13">
+                      <position x="1418" y="391"/>
+                      <position x="1383" y="391"/>
+                      <position x="1383" y="355"/>
+                      <position x="1349" y="355"/>
+                    </connection>
+                  </connectionPointIn>
+                </variable>
+                <variable formalParameter="Jerk">
+                  <connectionPointIn>
+                    <relPosition x="0" y="254"/>
+                  </connectionPointIn>
+                </variable>
+                <variable formalParameter="Direction">
+                  <connectionPointIn>
+                    <relPosition x="0" y="290"/>
+                  </connectionPointIn>
+                </variable>
+                <variable formalParameter="BufferMode">
+                  <connectionPointIn>
+                    <relPosition x="0" y="326"/>
+                  </connectionPointIn>
+                </variable>
+              </inputVariables>
+              <inOutVariables/>
+              <outputVariables>
+                <variable formalParameter="Axis">
+                  <connectionPointOut>
+                    <relPosition x="255" y="38"/>
+                  </connectionPointOut>
+                </variable>
+                <variable formalParameter="InVelocity">
+                  <connectionPointOut>
+                    <relPosition x="255" y="74"/>
+                  </connectionPointOut>
+                </variable>
+                <variable formalParameter="Busy">
+                  <connectionPointOut>
+                    <relPosition x="255" y="110"/>
+                  </connectionPointOut>
+                </variable>
+                <variable formalParameter="Active">
+                  <connectionPointOut>
+                    <relPosition x="255" y="146"/>
+                  </connectionPointOut>
+                </variable>
+                <variable formalParameter="CommandAborted">
+                  <connectionPointOut>
+                    <relPosition x="255" y="182"/>
+                  </connectionPointOut>
+                </variable>
+                <variable formalParameter="Error">
+                  <connectionPointOut>
+                    <relPosition x="255" y="218"/>
+                  </connectionPointOut>
+                </variable>
+                <variable formalParameter="ErrorID">
+                  <connectionPointOut>
+                    <relPosition x="255" y="254"/>
+                  </connectionPointOut>
+                </variable>
+              </outputVariables>
+            </block>
+            <inVariable localId="13" height="27" width="46">
+              <position x="1303" y="342"/>
+              <connectionPointOut>
+                <relPosition x="46" y="13"/>
+              </connectionPointOut>
+              <expression>360.0</expression>
+            </inVariable>
+            <inVariable localId="24" height="27" width="46">
+              <position x="1303" y="306"/>
+              <connectionPointOut>
+                <relPosition x="46" y="13"/>
+              </connectionPointOut>
+              <expression>-360.0</expression>
+            </inVariable>
+            <block localId="25" width="235" height="350" typeName="MC_MoveAbsolute" instanceName="MC_MoveAbsolute0">
+              <position x="1862" y="175"/>
+              <inputVariables>
+                <variable formalParameter="Axis">
+                  <connectionPointIn>
+                    <relPosition x="0" y="36"/>
+                    <connection refLocalId="23" formalParameter="Axis">
+                      <position x="1862" y="211"/>
+                      <position x="1673" y="211"/>
+                    </connection>
+                  </connectionPointIn>
+                </variable>
+                <variable formalParameter="Execute">
+                  <connectionPointIn>
+                    <relPosition x="0" y="69"/>
+                    <connection refLocalId="26" formalParameter="OUT">
+                      <position x="1862" y="244"/>
+                      <position x="1825" y="244"/>
+                    </connection>
+                  </connectionPointIn>
+                </variable>
+                <variable formalParameter="ContinuousUpdate">
+                  <connectionPointIn>
+                    <relPosition x="0" y="102"/>
+                  </connectionPointIn>
+                </variable>
+                <variable formalParameter="Position">
+                  <connectionPointIn>
+                    <relPosition x="0" y="135"/>
+                    <connection refLocalId="40">
+                      <position x="1862" y="310"/>
+                      <position x="1809" y="310"/>
+                    </connection>
+                  </connectionPointIn>
+                </variable>
+                <variable formalParameter="Velocity">
+                  <connectionPointIn>
+                    <relPosition x="0" y="168"/>
+                    <connection refLocalId="37">
+                      <position x="1862" y="343"/>
+                      <position x="1808" y="343"/>
+                    </connection>
+                  </connectionPointIn>
+                </variable>
+                <variable formalParameter="Acceleration">
+                  <connectionPointIn>
+                    <relPosition x="0" y="201"/>
+                    <connection refLocalId="37">
+                      <position x="1862" y="376"/>
+                      <position x="1818" y="376"/>
+                      <position x="1818" y="343"/>
+                      <position x="1808" y="343"/>
+                    </connection>
+                  </connectionPointIn>
+                </variable>
+                <variable formalParameter="Deceleration">
+                  <connectionPointIn>
+                    <relPosition x="0" y="234"/>
+                    <connection refLocalId="37">
+                      <position x="1862" y="409"/>
+                      <position x="1818" y="409"/>
+                      <position x="1818" y="343"/>
+                      <position x="1808" y="343"/>
+                    </connection>
+                  </connectionPointIn>
+                </variable>
+                <variable formalParameter="Jerk">
+                  <connectionPointIn>
+                    <relPosition x="0" y="267"/>
+                  </connectionPointIn>
+                </variable>
+                <variable formalParameter="Direction">
+                  <connectionPointIn>
+                    <relPosition x="0" y="300"/>
+                  </connectionPointIn>
+                </variable>
+                <variable formalParameter="BufferMode">
+                  <connectionPointIn>
+                    <relPosition x="0" y="333"/>
+                  </connectionPointIn>
+                </variable>
+              </inputVariables>
+              <inOutVariables/>
+              <outputVariables>
+                <variable formalParameter="Axis">
+                  <connectionPointOut>
+                    <relPosition x="235" y="36"/>
+                  </connectionPointOut>
+                </variable>
+                <variable formalParameter="Done">
+                  <connectionPointOut>
+                    <relPosition x="235" y="69"/>
+                  </connectionPointOut>
+                </variable>
+                <variable formalParameter="Busy">
+                  <connectionPointOut>
+                    <relPosition x="235" y="102"/>
+                  </connectionPointOut>
+                </variable>
+                <variable formalParameter="Active">
+                  <connectionPointOut>
+                    <relPosition x="235" y="135"/>
+                  </connectionPointOut>
+                </variable>
+                <variable formalParameter="CommandAborted">
+                  <connectionPointOut>
+                    <relPosition x="235" y="168"/>
+                  </connectionPointOut>
+                </variable>
+                <variable formalParameter="Error">
+                  <connectionPointOut>
+                    <relPosition x="235" y="201"/>
+                  </connectionPointOut>
+                </variable>
+                <variable formalParameter="ErrorID">
+                  <connectionPointOut>
+                    <relPosition x="235" y="234"/>
+                  </connectionPointOut>
+                </variable>
+              </outputVariables>
+            </block>
+            <block localId="26" width="53" height="63" typeName="LT">
+              <position x="1772" y="214"/>
+              <inputVariables>
+                <variable formalParameter="IN1">
+                  <connectionPointIn>
+                    <relPosition x="0" y="30"/>
+                    <connection refLocalId="36">
+                      <position x="1772" y="244"/>
+                      <position x="1752" y="244"/>
+                      <position x="1752" y="237"/>
+                      <position x="1741" y="237"/>
+                    </connection>
+                  </connectionPointIn>
+                </variable>
+                <variable formalParameter="IN2">
+                  <connectionPointIn>
+                    <relPosition x="0" y="51"/>
+                    <connection refLocalId="35">
+                      <position x="1772" y="265"/>
+                      <position x="1741" y="265"/>
+                    </connection>
+                  </connectionPointIn>
+                </variable>
+              </inputVariables>
+              <inOutVariables/>
+              <outputVariables>
+                <variable formalParameter="OUT">
+                  <connectionPointOut>
+                    <relPosition x="53" y="30"/>
+                  </connectionPointOut>
+                </variable>
+              </outputVariables>
+            </block>
+            <block localId="28" width="176" height="248" typeName="MC_ReadActualPosition" instanceName="readpos">
+              <position x="237" y="606"/>
+              <inputVariables>
+                <variable formalParameter="Axis">
+                  <connectionPointIn>
+                    <relPosition x="0" y="40"/>
+                    <connection refLocalId="31">
+                      <position x="237" y="646"/>
+                      <position x="109" y="646"/>
+                    </connection>
+                  </connectionPointIn>
+                </variable>
+                <variable formalParameter="Enable">
+                  <connectionPointIn>
+                    <relPosition x="0" y="80"/>
+                    <connection refLocalId="29">
+                      <position x="237" y="686"/>
+                      <position x="165" y="686"/>
+                    </connection>
+                  </connectionPointIn>
+                </variable>
+              </inputVariables>
+              <inOutVariables/>
+              <outputVariables>
+                <variable formalParameter="Axis">
+                  <connectionPointOut>
+                    <relPosition x="176" y="40"/>
+                  </connectionPointOut>
+                </variable>
+                <variable formalParameter="Valid">
+                  <connectionPointOut>
+                    <relPosition x="176" y="80"/>
+                  </connectionPointOut>
+                </variable>
+                <variable formalParameter="Busy">
+                  <connectionPointOut>
+                    <relPosition x="176" y="112"/>
+                  </connectionPointOut>
+                </variable>
+                <variable formalParameter="Error">
+                  <connectionPointOut>
+                    <relPosition x="176" y="152"/>
+                  </connectionPointOut>
+                </variable>
+                <variable formalParameter="ErrorID">
+                  <connectionPointOut>
+                    <relPosition x="176" y="192"/>
+                  </connectionPointOut>
+                </variable>
+                <variable formalParameter="Position">
+                  <connectionPointOut>
+                    <relPosition x="176" y="232"/>
+                  </connectionPointOut>
+                </variable>
+              </outputVariables>
+            </block>
+            <inVariable localId="29" height="32" width="96">
+              <position x="69" y="670"/>
+              <connectionPointOut>
+                <relPosition x="96" y="16"/>
+              </connectionPointOut>
+              <expression>BOOL#TRUE</expression>
+            </inVariable>
+            <outVariable localId="30" height="32" width="32">
+              <position x="437" y="822"/>
+              <connectionPointIn>
+                <relPosition x="0" y="16"/>
+                <connection refLocalId="28" formalParameter="Position">
+                  <position x="437" y="838"/>
+                  <position x="413" y="838"/>
+                </connection>
+              </connectionPointIn>
+              <expression>Pn</expression>
+            </outVariable>
+            <inVariable localId="31" height="32" width="40">
+              <position x="69" y="630"/>
+              <connectionPointOut>
+                <relPosition x="40" y="16"/>
+              </connectionPointOut>
+              <expression>Axis</expression>
+            </inVariable>
+            <block localId="32" width="192" height="248" typeName="MC_ReadParameter" instanceName="readspeed">
+              <position x="613" y="606"/>
+              <inputVariables>
+                <variable formalParameter="Axis">
+                  <connectionPointIn>
+                    <relPosition x="0" y="40"/>
+                    <connection refLocalId="28" formalParameter="Axis">
+                      <position x="613" y="646"/>
+                      <position x="413" y="646"/>
+                    </connection>
+                  </connectionPointIn>
+                </variable>
+                <variable formalParameter="Enable">
+                  <connectionPointIn>
+                    <relPosition x="0" y="80"/>
+                    <connection refLocalId="34">
+                      <position x="613" y="686"/>
+                      <position x="597" y="686"/>
+                      <position x="597" y="679"/>
+                      <position x="581" y="679"/>
+                    </connection>
+                  </connectionPointIn>
+                </variable>
+                <variable formalParameter="ParameterNumber">
+                  <connectionPointIn>
+                    <relPosition x="0" y="112"/>
+                    <connection refLocalId="33">
+                      <position x="613" y="718"/>
+                      <position x="581" y="718"/>
+                    </connection>
+                  </connectionPointIn>
+                </variable>
+              </inputVariables>
+              <inOutVariables/>
+              <outputVariables>
+                <variable formalParameter="Axis">
+                  <connectionPointOut>
+                    <relPosition x="192" y="40"/>
+                  </connectionPointOut>
+                </variable>
+                <variable formalParameter="Valid">
+                  <connectionPointOut>
+                    <relPosition x="192" y="80"/>
+                  </connectionPointOut>
+                </variable>
+                <variable formalParameter="Busy">
+                  <connectionPointOut>
+                    <relPosition x="192" y="112"/>
+                  </connectionPointOut>
+                </variable>
+                <variable formalParameter="Error">
+                  <connectionPointOut>
+                    <relPosition x="192" y="152"/>
+                  </connectionPointOut>
+                </variable>
+                <variable formalParameter="ErrorID">
+                  <connectionPointOut>
+                    <relPosition x="192" y="192"/>
+                  </connectionPointOut>
+                </variable>
+                <variable formalParameter="Value">
+                  <connectionPointOut>
+                    <relPosition x="192" y="232"/>
+                  </connectionPointOut>
+                </variable>
+              </outputVariables>
+            </block>
+            <inVariable localId="33" height="32" width="32">
+              <position x="549" y="702"/>
+              <connectionPointOut>
+                <relPosition x="32" y="16"/>
+              </connectionPointOut>
+              <expression>10</expression>
+            </inVariable>
+            <inVariable localId="34" height="32" width="96">
+              <position x="485" y="663"/>
+              <connectionPointOut>
+                <relPosition x="96" y="16"/>
+              </connectionPointOut>
+              <expression>BOOL#TRUE</expression>
+            </inVariable>
+            <outVariable localId="27" height="32" width="32">
+              <position x="837" y="822"/>
+              <connectionPointIn>
+                <relPosition x="0" y="16"/>
+                <connection refLocalId="32" formalParameter="Value">
+                  <position x="837" y="838"/>
+                  <position x="805" y="838"/>
+                </connection>
+              </connectionPointIn>
+              <expression>Vn</expression>
+            </outVariable>
+            <inVariable localId="35" height="27" width="48">
+              <position x="1693" y="252"/>
+              <connectionPointOut>
+                <relPosition x="48" y="13"/>
+              </connectionPointOut>
+              <expression>-1800.0</expression>
+            </inVariable>
+            <inVariable localId="36" height="23" width="22">
+              <position x="1719" y="226"/>
+              <connectionPointOut>
+                <relPosition x="22" y="11"/>
+              </connectionPointOut>
+              <expression>Pn</expression>
+            </inVariable>
+            <inVariable localId="37" height="27" width="46">
+              <position x="1762" y="330"/>
+              <connectionPointOut>
+                <relPosition x="46" y="13"/>
+              </connectionPointOut>
+              <expression>360.0</expression>
+            </inVariable>
+            <inVariable localId="40" height="27" width="46">
+              <position x="1763" y="297"/>
+              <connectionPointOut>
+                <relPosition x="46" y="13"/>
+              </connectionPointOut>
+              <expression>0.0</expression>
+            </inVariable>
+            <block localId="42" width="189" height="204" typeName="MC_SetPosition" instanceName="MC_SetPosition0">
+              <position x="664" y="173"/>
+              <inputVariables>
+                <variable formalParameter="Axis">
+                  <connectionPointIn>
+                    <relPosition x="0" y="38"/>
+                    <connection refLocalId="8" formalParameter="Axis">
+                      <position x="664" y="211"/>
+                      <position x="515" y="211"/>
+                    </connection>
+                  </connectionPointIn>
+                </variable>
+                <variable formalParameter="Execute">
+                  <connectionPointIn>
+                    <relPosition x="0" y="74"/>
+                    <connection refLocalId="8" formalParameter="Status">
+                      <position x="664" y="247"/>
+                      <position x="515" y="247"/>
+                    </connection>
+                  </connectionPointIn>
+                </variable>
+                <variable formalParameter="Position">
+                  <connectionPointIn>
+                    <relPosition x="0" y="110"/>
+                    <connection refLocalId="43">
+                      <position x="664" y="283"/>
+                      <position x="629" y="283"/>
+                    </connection>
+                  </connectionPointIn>
+                </variable>
+                <variable formalParameter="Relative">
+                  <connectionPointIn>
+                    <relPosition x="0" y="146"/>
+                  </connectionPointIn>
+                </variable>
+                <variable formalParameter="ExecutionMode">
+                  <connectionPointIn>
+                    <relPosition x="0" y="182"/>
+                  </connectionPointIn>
+                </variable>
+              </inputVariables>
+              <inOutVariables/>
+              <outputVariables>
+                <variable formalParameter="Axis">
+                  <connectionPointOut>
+                    <relPosition x="189" y="38"/>
+                  </connectionPointOut>
+                </variable>
+                <variable formalParameter="Done">
+                  <connectionPointOut>
+                    <relPosition x="189" y="74"/>
+                  </connectionPointOut>
+                </variable>
+                <variable formalParameter="Busy">
+                  <connectionPointOut>
+                    <relPosition x="189" y="110"/>
+                  </connectionPointOut>
+                </variable>
+                <variable formalParameter="Error">
+                  <connectionPointOut>
+                    <relPosition x="189" y="146"/>
+                  </connectionPointOut>
+                </variable>
+                <variable formalParameter="ErrorID">
+                  <connectionPointOut>
+                    <relPosition x="189" y="182"/>
+                  </connectionPointOut>
+                </variable>
+              </outputVariables>
+            </block>
+            <inVariable localId="43" height="27" width="54">
+              <position x="575" y="270"/>
+              <connectionPointOut>
+                <relPosition x="54" y="13"/>
+              </connectionPointOut>
+              <expression>0.0</expression>
+            </inVariable>
+          </FBD>
+        </body>
+      </pou>
+    </pous>
+  </types>
+  <instances>
+    <configurations>
+      <configuration name="conf">
+        <resource name="res">
+          <task name="main_task" interval="T#0.5ms" priority="0">
+            <pouInstance name="main_instance" typeName="Prog"/>
+            <pouInstance name="test_MCL_instance" typeName="test_MCL"/>
+          </task>
+        </resource>
+      </configuration>
+    </configurations>
+  </instances>
+</project>
--- a/etherlab/EthercatCIA402Slave.py	Mon Jun 24 09:23:28 2013 +0200
+++ b/etherlab/EthercatCIA402Slave.py	Mon Jun 24 21:03:22 2013 +0200
@@ -105,6 +105,11 @@
          "tooltip" : _("Initiate Drag'n drop of Axis ref located variable"),
          "method" : "_getCIA402AxisRef",
          "push": True},
+        {"bitmap" : "CIA402NetPos",
+         "name" : _("Axis Pos"),
+         "tooltip" : _("Initiate Drag'n drop of Network position located variable"),
+         "method" : "_getCIA402NetworkPosition",
+         "push": True},
     ]
     
 #--------------------------------------------------
@@ -128,12 +133,20 @@
     def GetVariableLocationTree(self):
         axis_name = self.CTNName()
         current_location = self.GetCurrentLocation()
-        children = [{"name": "%s Axis Ref" % (axis_name),
+        children = [{"name": "%s Network Position" % (axis_name),
+                     "type": LOCATION_VAR_INPUT,
+                     "size": "W",
+                     "IEC_type": "UINT",
+                     "var_name": axis_name,
+                     "location": "%%IW%s" % (".".join(map(str, current_location))),
+                     "description": "",
+                     "children": []},
+                    {"name": "%s Axis Ref" % (axis_name),
                      "type": LOCATION_VAR_INPUT,
                      "size": "W",
                      "IEC_type": "AXIS_REF",
                      "var_name": axis_name,
-                     "location": "%%IW%s.0" % (".".join(map(str, current_location))),
+                     "location": "%%IW%s.402" % (".".join(map(str, current_location))),
                      "description": "",
                      "children": []}]
         children.extend(self.CTNParent.GetDeviceLocationTree(self.GetSlavePos(), current_location, axis_name))
@@ -150,14 +163,22 @@
                  "EtherLab%s" % block_infos["blocktype"], "") 
                 for block_infos in FIELDBUS_INTERFACE_GLOBAL_INSTANCES]
     
+    def StartDragNDrop(self, data):
+        data_obj = wx.TextDataObject(str(data))
+        dragSource = wx.DropSource(self.GetCTRoot().AppFrame)
+        dragSource.SetData(data_obj)
+        dragSource.DoDragDrop()
+    
+    def _getCIA402NetworkPosition(self):
+        self.StartDragNDrop(
+            ("%%IW%s" % ".".join(map(str, self.GetCurrentLocation())), 
+             "location", "UINT", self.CTNName() + "_Pos", ""))
+        
     def _getCIA402AxisRef(self):
-        data = wx.TextDataObject(str(
-            ("%%IW%s.0" % ".".join(map(str, self.GetCurrentLocation())), 
-             "location", "AXIS_REF", self.CTNName(), "")))
-        dragSource = wx.DropSource(self.GetCTRoot().AppFrame)
-        dragSource.SetData(data)
-        dragSource.DoDragDrop()
-    
+        self.StartDragNDrop(
+            ("%%IW%s.402" % ".".join(map(str, self.GetCurrentLocation())), 
+             "location", "AXIS_REF", self.CTNName(), ""))
+        
     def CTNGenerate_C(self, buildpath, locations):
         current_location = self.GetCurrentLocation()
         
Binary file etherlab/images/CIA402NetPos.png has changed
--- a/etherlab/images/icons.svg	Mon Jun 24 09:23:28 2013 +0200
+++ b/etherlab/images/icons.svg	Mon Jun 24 21:03:22 2013 +0200
@@ -43,9 +43,9 @@
      pagecolor="#ffffff"
      id="base"
      showgrid="false"
-     inkscape:zoom="8.0000002"
-     inkscape:cx="294.02018"
-     inkscape:cy="814.50324"
+     inkscape:zoom="2.8284272"
+     inkscape:cx="713.91791"
+     inkscape:cy="892.4378"
      inkscape:window-x="0"
      inkscape:window-y="24"
      inkscape:current-layer="svg2"
@@ -61601,6 +61601,344 @@
        id="linearGradient13566-2"
        xlink:href="#linearGradient5175-3-6"
        inkscape:collect="always" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient15934-1-6-6"
+       id="linearGradient15515-4-4"
+       gradientUnits="userSpaceOnUse"
+       x1="438.95389"
+       y1="493.53238"
+       x2="197.23351"
+       y2="118.20501" />
+    <linearGradient
+       id="linearGradient15934-1-6-6">
+      <stop
+         id="stop15936-4-1-9"
+         offset="0"
+         style="stop-color: rgb(77, 77, 77); stop-opacity: 1;" />
+      <stop
+         id="stop15938-9-1-0"
+         offset="1"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient15945-8-2-3"
+       id="linearGradient15517-6-6"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.996701,-0.0811618,0.0811618,0.996701,-17.9181,36.064)"
+       x1="385.11563"
+       y1="275.58682"
+       x2="452.19373"
+       y2="88.438019" />
+    <linearGradient
+       id="linearGradient15945-8-2-3">
+      <stop
+         id="stop15947-9-8-3"
+         offset="0"
+         style="stop-color: rgb(179, 179, 179); stop-opacity: 1;" />
+      <stop
+         id="stop15949-1-6-5"
+         offset="1"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient15934-1-6-6"
+       id="linearGradient15519-9-2"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="translate(-6.2575321,5.050595)"
+       x1="502.57938"
+       y1="184.1432"
+       x2="499.96594"
+       y2="179.73331" />
+    <linearGradient
+       id="linearGradient13602-1">
+      <stop
+         id="stop13604"
+         offset="0"
+         style="stop-color: rgb(77, 77, 77); stop-opacity: 1;" />
+      <stop
+         id="stop13606"
+         offset="1"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient15934-1-6-6"
+       id="linearGradient15521-8-6"
+       gradientUnits="userSpaceOnUse"
+       x1="501.00095"
+       y1="185.08093"
+       x2="502.98251"
+       y2="179.90973" />
+    <linearGradient
+       id="linearGradient13609">
+      <stop
+         id="stop13611"
+         offset="0"
+         style="stop-color: rgb(77, 77, 77); stop-opacity: 1;" />
+      <stop
+         id="stop13613"
+         offset="1"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient15934-1-9-3-8"
+       id="linearGradient15523-5-0"
+       gradientUnits="userSpaceOnUse"
+       x1="501.00095"
+       y1="185.08093"
+       x2="502.98251"
+       y2="179.90973" />
+    <linearGradient
+       id="linearGradient15934-1-9-3-8">
+      <stop
+         id="stop15936-4-3-91-3"
+         offset="0"
+         style="stop-color: rgb(77, 77, 77); stop-opacity: 1;" />
+      <stop
+         id="stop15938-9-2-9-2"
+         offset="1"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient15934-1-9-6-5-4"
+       id="linearGradient15525-5-6"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.31018135,0.06837356,-0.06837356,0.31018135,350.04365,90.753719)"
+       x1="500.08212"
+       y1="185.71164"
+       x2="496.25415"
+       y2="181.49362" />
+    <linearGradient
+       id="linearGradient15934-1-9-6-5-4">
+      <stop
+         id="stop15936-4-3-9-6-7"
+         offset="0"
+         style="stop-color: rgb(77, 77, 77); stop-opacity: 1;" />
+      <stop
+         id="stop15938-9-2-4-6-3"
+         offset="1"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient1513-2-4"
+       id="linearGradient13690-6"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.08604141,0,0,0.08604141,553.38144,142.10088)"
+       x1="131.52188"
+       y1="198.01724"
+       x2="131.52188"
+       y2="41.586746" />
+    <linearGradient
+       id="linearGradient1513-2-4">
+      <stop
+         id="stop1514-3-3"
+         style="stop-color:#ffffff;stop-opacity:1"
+         offset="0" />
+      <stop
+         id="stop1515-2-9"
+         style="stop-color:#ffffff;stop-opacity:0"
+         offset="1" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient15934-1-6-62"
+       id="linearGradient15515-4-0"
+       gradientUnits="userSpaceOnUse"
+       x1="438.95389"
+       y1="493.53238"
+       x2="197.23351"
+       y2="118.20501" />
+    <linearGradient
+       id="linearGradient15934-1-6-62">
+      <stop
+         id="stop15936-4-1-8"
+         offset="0"
+         style="stop-color: rgb(77, 77, 77); stop-opacity: 1;" />
+      <stop
+         id="stop15938-9-1-4"
+         offset="1"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient15945-8-2-1"
+       id="linearGradient15517-6-2"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.996701,-0.0811618,0.0811618,0.996701,-17.9181,36.064)"
+       x1="385.11563"
+       y1="275.58682"
+       x2="452.19373"
+       y2="88.438019" />
+    <linearGradient
+       id="linearGradient15945-8-2-1">
+      <stop
+         id="stop15947-9-8-8"
+         offset="0"
+         style="stop-color: rgb(179, 179, 179); stop-opacity: 1;" />
+      <stop
+         id="stop15949-1-6-55"
+         offset="1"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient15934-1-6-62"
+       id="linearGradient15519-9-9"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="translate(-6.2575321,5.050595)"
+       x1="502.57938"
+       y1="184.1432"
+       x2="499.96594"
+       y2="179.73331" />
+    <linearGradient
+       id="linearGradient13602-8">
+      <stop
+         id="stop13604-9"
+         offset="0"
+         style="stop-color: rgb(77, 77, 77); stop-opacity: 1;" />
+      <stop
+         id="stop13606-5"
+         offset="1"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient15934-1-6-62"
+       id="linearGradient15521-8-5"
+       gradientUnits="userSpaceOnUse"
+       x1="501.00095"
+       y1="185.08093"
+       x2="502.98251"
+       y2="179.90973" />
+    <linearGradient
+       id="linearGradient13609-2">
+      <stop
+         id="stop13611-5"
+         offset="0"
+         style="stop-color: rgb(77, 77, 77); stop-opacity: 1;" />
+      <stop
+         id="stop13613-9"
+         offset="1"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient15934-1-9-3-3"
+       id="linearGradient15523-5-9"
+       gradientUnits="userSpaceOnUse"
+       x1="501.00095"
+       y1="185.08093"
+       x2="502.98251"
+       y2="179.90973" />
+    <linearGradient
+       id="linearGradient15934-1-9-3-3">
+      <stop
+         id="stop15936-4-3-91-0"
+         offset="0"
+         style="stop-color: rgb(77, 77, 77); stop-opacity: 1;" />
+      <stop
+         id="stop15938-9-2-9-8"
+         offset="1"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient15934-1-9-6-5-7"
+       id="linearGradient15525-5-1"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.31018135,0.06837356,-0.06837356,0.31018135,350.04365,90.753719)"
+       x1="500.08212"
+       y1="185.71164"
+       x2="496.25415"
+       y2="181.49362" />
+    <linearGradient
+       id="linearGradient15934-1-9-6-5-7">
+      <stop
+         id="stop15936-4-3-9-6-6"
+         offset="0"
+         style="stop-color: rgb(77, 77, 77); stop-opacity: 1;" />
+      <stop
+         id="stop15938-9-2-4-6-34"
+         offset="1"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient1513-2-8"
+       id="linearGradient13690-8"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.08604141,0,0,0.08604141,553.38144,155.60298)"
+       x1="131.52188"
+       y1="198.01724"
+       x2="131.52188"
+       y2="41.586746" />
+    <linearGradient
+       id="linearGradient1513-2-8">
+      <stop
+         id="stop1514-3-2"
+         style="stop-color:#ffffff;stop-opacity:1"
+         offset="0" />
+      <stop
+         id="stop1515-2-7"
+         style="stop-color:#ffffff;stop-opacity:0"
+         offset="1" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient1513-2-8"
+       id="linearGradient13943"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.08604141,0,0,0.08604141,553.38144,155.60298)"
+       x1="131.52188"
+       y1="198.01724"
+       x2="131.52188"
+       y2="41.586746" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient1513-2-8"
+       id="linearGradient13953"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.08604141,0,0,0.08604141,553.38144,155.60298)"
+       x1="131.52188"
+       y1="198.01724"
+       x2="131.52188"
+       y2="41.586746" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient1513-2-8"
+       id="linearGradient13956"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.06372438,0,0,0.06372438,763.51734,146.63259)"
+       x1="131.52188"
+       y1="198.01724"
+       x2="131.52188"
+       y2="41.586746" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient1513-2-8"
+       id="linearGradient14742"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.06372438,0,0,0.06372438,763.51734,146.63259)"
+       x1="131.52188"
+       y1="198.01724"
+       x2="131.52188"
+       y2="41.586746" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient1513-2-8"
+       id="linearGradient14745"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.06372438,0,0,0.06372438,763.51734,136.63259)"
+       x1="131.52188"
+       y1="198.01724"
+       x2="131.52188"
+       y2="41.586746" />
   </defs>
   <text
      style="font-size:40.12579727px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
@@ -61634,7 +61972,7 @@
        sodipodi:role="line"
        id="tspan16268"
        x="167.20854"
-       y="120.42097">%%ImportESI ImportDatabase ScanNetwork editSlave editCIA402Slave CIA402AxisRef %%</tspan></text>
+       y="120.42097">%%ImportESI ImportDatabase ScanNetwork editSlave editCIA402Slave CIA402AxisRef CIA402NetPos%%</tspan></text>
   <g
      transform="translate(1268.5327,-372.731)"
      id="g16313">
@@ -64066,4 +64404,135 @@
        y="0"
        x="0" />
   </g>
+  <rect
+     width="24"
+     height="24"
+     x="756.3476"
+     y="130.43539"
+     id="CIA402NetPos"
+     style="fill:#000000;fill-opacity:0;fill-rule:evenodd;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+     inkscape:label="#rect16270" />
+  <g
+     transform="matrix(1.8400527,0,0,1.8400527,-158.02545,-192.90628)"
+     id="g15478-1-9">
+    <g
+       transform="matrix(-0.03037121,0,0,0.03037121,515.46377,170.91105)"
+       id="layer1-1-9-4-7"
+       inkscape:label="Calque 1">
+      <g
+         transform="translate(-48,0)"
+         id="g16056-4-2-4">
+        <path
+           style="fill:url(#linearGradient15515-4-0);fill-opacity:1;stroke:none"
+           d="m 261.23647,217.28623 175.53201,57.07437 -3.125,208.62261 -170.15701,-72.94937 z"
+           id="rect15422-9-9-3"
+           sodipodi:nodetypes="ccccc"
+           inkscape:connector-curvature="0" />
+        <path
+           style="fill:url(#linearGradient15517-6-2);fill-opacity:1;stroke:none"
+           d="M 257.63822,217.28208 452.87456,201.38389 632.56367,259.59396 436.54848,274.2032 z"
+           id="rect15942-8-8-8"
+           sodipodi:nodetypes="ccccc"
+           inkscape:connector-curvature="0" />
+        <path
+           style="fill:#333333;fill-opacity:1;stroke:none"
+           d="m 436.5,273.54968 195.5,-14.25 0.59315,205.70147 -198.84315,17.5 z"
+           id="rect15953-6-8-5"
+           sodipodi:nodetypes="ccccc"
+           inkscape:connector-curvature="0" />
+      </g>
+    </g>
+    <g
+       id="g15330-3-1"
+       transform="matrix(0.98401111,0.21690648,-0.21690648,0.98401111,54.630578,-109.30701)">
+      <path
+         sodipodi:nodetypes="scscsscccss"
+         inkscape:connector-curvature="0"
+         id="path14397-5-6"
+         d="m 494.71875,185.46875 c -0.35176,0 -0.69473,0.1022 -0.96875,0.28125 -0.10135,0.0662 -0.34443,0.21161 -0.42188,0.28906 l -0.0625,0.0625 c 0.34548,-0.16642 0.5872,-0.19531 0.82813,-0.19531 0.96372,0 1.75,0.78628 1.75,1.75 0,0.5778 -0.28613,1.08868 -0.71875,1.40625 l 0.5625,-0.40625 c 0.0312,-0.0211 0.0641,-0.0395 0.0937,-0.0625 0.41238,-0.31916 0.65625,-0.81319 0.65625,-1.375 0,-0.96372 -0.75503,-1.75 -1.71875,-1.75 z"
+         style="color:#000000;fill:url(#linearGradient15519-9-9);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.72142136px;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
+      <path
+         transform="translate(-6.874099,5.4992756)"
+         d="m 502.70795,182.15448 c 0,0.96372 -0.78125,1.74496 -1.74497,1.74496 -0.96371,0 -1.74496,-0.78124 -1.74496,-1.74496 0,-0.96372 0.78125,-1.74496 1.74496,-1.74496 0.96372,0 1.74497,0.78124 1.74497,1.74496 z"
+         sodipodi:ry="1.7449629"
+         sodipodi:rx="1.7449629"
+         sodipodi:cy="182.15448"
+         sodipodi:cx="500.96298"
+         id="path14397-8-0-6"
+         style="color:#000000;fill:url(#linearGradient15521-8-5);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.72142136px;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+         sodipodi:type="arc" />
+    </g>
+    <g
+       id="g15470-3-1"
+       transform="translate(6.9375,1.125)">
+      <path
+         sodipodi:type="arc"
+         style="color:#000000;fill:url(#linearGradient15523-5-9);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.72142136px;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+         id="path14397-8-8-6-7"
+         sodipodi:cx="500.96298"
+         sodipodi:cy="182.15448"
+         sodipodi:rx="1.7449629"
+         sodipodi:ry="1.7449629"
+         d="m 502.70795,182.15448 c 0,0.96372 -0.78125,1.74496 -1.74497,1.74496 -0.96371,0 -1.74496,-0.78124 -1.74496,-1.74496 0,-0.96372 0.78125,-1.74496 1.74496,-1.74496 0.96372,0 1.74497,0.78124 1.74497,1.74496 z"
+         transform="matrix(0.31018135,0.06837356,-0.06837356,0.31018135,347.67882,91.940035)" />
+      <path
+         id="path14397-8-8-5-0-1"
+         d="m 492.875,180.96875 c -0.046,0.009 -0.0831,0.0119 -0.125,0.0312 l -0.0625,0.0312 -2.375,1.1875 c 0.11954,-0.0764 0.25679,-0.0954 0.40625,-0.0625 0.29893,0.0659 0.50339,0.35732 0.4375,0.65625 -0.033,0.14946 -0.13046,0.26739 -0.25,0.34375 0.77078,-0.3938 1.58077,-0.78916 2.34375,-1.15625 0.13759,-0.0738 0.24501,-0.21059 0.28125,-0.375 0.0659,-0.29893 -0.13857,-0.59036 -0.4375,-0.65625 -0.0747,-0.0165 -0.14796,-0.0131 -0.21875,0 z"
+         style="color:#000000;fill:url(#linearGradient15525-5-1);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.72142136px;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+         inkscape:connector-curvature="0" />
+    </g>
+  </g>
+  <text
+     style="font-size:11.78734207px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#5d9d35;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans Mono"
+     xml:space="preserve"
+     id="text10478-2-1"
+     transform="scale(0.9460798,1.0569933)"
+     y="145.58522"
+     x="805.63269"
+     sodipodi:linespacing="125%"><tspan
+       style="fill:#5d9d35;fill-opacity:1"
+       id="tspan10480-6-6"
+       y="145.58522"
+       x="805.63269">P</tspan></text>
+  <text
+     style="font-size:11.78734207px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#5d9d35;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans Mono"
+     xml:space="preserve"
+     id="text10482-7-8"
+     transform="scale(0.9460798,1.0569933)"
+     y="145.58522"
+     x="811.7536"
+     sodipodi:linespacing="125%"><tspan
+       style="fill:#5d9d35;fill-opacity:1"
+       id="tspan10484-7-1"
+       y="145.58522"
+       x="811.7536">O</tspan></text>
+  <text
+     style="font-size:11.78734207px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#5d9d35;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans Mono"
+     xml:space="preserve"
+     id="text10486-9-1"
+     transform="scale(0.9460798,1.0569933)"
+     y="145.58522"
+     x="817.86713"
+     sodipodi:linespacing="125%"><tspan
+       style="fill:#5d9d35;fill-opacity:1"
+       id="tspan10488-4-0"
+       y="145.58522"
+       x="817.86713">S</tspan></text>
+  <path
+     style="opacity:0.31627909;fill:url(#linearGradient14745);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:13;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+     d="m 771,144.78125 c -0.81802,0.0876 -1.46833,0.46859 -1.90625,1.15625 -0.44532,0.69928 -0.70105,1.71167 -0.75,3 0.33547,0.0498 0.68443,0.0936 0.96875,0.125 0.0538,0.006 0.20377,0.0234 0.28125,0.0312 0.0312,-1.01046 0.20309,-1.79471 0.46875,-2.3125 0.29574,-0.57642 0.7025,-0.84375 1.28125,-0.84375 0.58142,0 1.00034,0.25847 1.28125,0.8125 0.26273,0.50831 0.41655,1.34853 0.4375,2.4375 0.41071,-0.0291 0.79139,-0.0736 0.96875,-0.0937 0.13552,-0.0154 0.22665,-0.0252 0.28125,-0.0312 -0.0385,-1.29724 -0.28269,-2.35062 -0.75,-3.09375 -0.44479,-0.71616 -1.0825,-1.09969 -1.875,-1.1875 l -0.6875,0 z m 6.25,0 c -0.82892,1e-5 -1.47907,0.20515 -1.96875,0.625 -0.4858,0.41555 -0.75,0.98907 -0.75,1.71875 0,0.67462 0.15854,1.22389 0.5,1.65625 l 0.0312,0 c 0.0432,0.0536 0.10675,0.10464 0.15625,0.15625 0.45646,-0.0809 1.00789,-0.18704 1.65625,-0.34375 -0.38579,-0.18339 -0.69641,-0.37661 -0.84375,-0.53125 -0.21604,-0.23023 -0.3125,-0.54117 -0.3125,-0.9375 0,-0.40297 0.13474,-0.68101 0.375,-0.875 0.24027,-0.19399 0.60678,-0.3125 1.125,-0.3125 0.58603,0 1.24517,0.1874 1.9375,0.5 l 0.0937,0.0312 0.0312,-0.0937 0.34375,-1 0.0312,-0.0937 -0.0937,-0.0312 c -0.69397,-0.3234 -1.46898,-0.46874 -2.3125,-0.46875 z m -14.1875,0.125 0,0.0937 0,2.53125 c 0.38579,0.16668 0.79056,0.29379 1.1875,0.4375 l 0,-1.90625 1,0 c 0.5984,0 1.02954,0.14825 1.3125,0.40625 0.28295,0.258 0.4375,0.6399 0.4375,1.1875 0,0.40855 -0.0853,0.74374 -0.21875,1 0.39233,0.0723 0.85752,0.15823 1.03125,0.1875 0.0399,0.007 0.16048,0.0221 0.21875,0.0312 0.14633,-0.37677 0.21874,-0.7996 0.21875,-1.28125 -10e-6,-0.88609 -0.22442,-1.57736 -0.71875,-2.03125 -0.49433,-0.4539 -1.23923,-0.65624 -2.1875,-0.65625 l -2.1875,0 -0.0937,0 z"
+     id="path40832-7-1"
+     inkscape:connector-curvature="0" />
+  <g
+     transform="scale(0.9460798,1.0569933)"
+     style="font-size:11.78734206999999934px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#5d9d35;fill-opacity:1;stroke:#000000;font-family:Bitstream Vera Sans Mono;stroke-width:0.2;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+     id="text10478-2-1-5" />
+  <g
+     transform="scale(0.9460798,1.0569933)"
+     style="font-size:11.78734207px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#5d9d35;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans Mono"
+     id="text10482-7-8-5" />
+  <g
+     transform="scale(0.9460798,1.0569933)"
+     style="font-size:11.78734207px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#5d9d35;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans Mono"
+     id="text10486-9-1-9" />
 </svg>
--- a/etherlab/plc_cia402node.c	Mon Jun 24 09:23:28 2013 +0200
+++ b/etherlab/plc_cia402node.c	Mon Jun 24 21:03:22 2013 +0200
@@ -56,8 +56,10 @@
 #define Halt            0x0100
 
 
-IEC_INT beremiz__IW%(location_str)s_0;
-IEC_INT *__IW%(location_str)s_0 = &beremiz__IW%(location_str)s_0;
+IEC_INT beremiz__IW%(location_str)s = %(slave_pos)s;
+IEC_INT *__IW%(location_str)s = &beremiz__IW%(location_str)s;
+IEC_INT beremiz__IW%(location_str)s_402;
+IEC_INT *__IW%(location_str)s_402 = &beremiz__IW%(location_str)s_402;
 
 %(MCL_headers)s
 
@@ -91,10 +93,10 @@
 void __retrieve_%(location_str)s()
 {
 	if (__FirstTick) {
-		*__IW%(location_str)s_0 = __MK_Alloc_AXIS_REF();
+		*__IW%(location_str)s_402 = __MK_Alloc_AXIS_REF();
 		AxsPub.axis = 
-            __MK_GetPublic_AXIS_REF(*__IW%(location_str)s_0);
-		AxsPub.axis->NetworkPosition = %(slave_pos)d;
+            __MK_GetPublic_AXIS_REF(*__IW%(location_str)s_402);
+		AxsPub.axis->NetworkPosition = beremiz__IW%(location_str)s;
 %(init_axis_params)s
 %(fieldbus_interface_definition)s
 		__FirstTick = 0;