Current working version (for the most part)
This commit is contained in:
parent
a8010a3dc8
commit
4c399a0be7
74
RSI Config Files/Changing Values/valuetests.rsi
Normal file
74
RSI Config Files/Changing Values/valuetests.rsi
Normal file
@ -0,0 +1,74 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<rSIModel dslVersion="1.0.0.0" name="" xmlns="http://schemas.microsoft.com/dsltools/RSIVisual">
|
||||
<rSIObjects>
|
||||
<rSIElement name="ETHERNET1" objType="ETHERNET" objTypeID="64" maxInputs="64" maxOutputs="64">
|
||||
<rSIInPorts>
|
||||
<rSIInPort name="In1" mandatory="false">
|
||||
<source>
|
||||
<rSIOutPortMoniker name="//SEN_PINT1/Out1" />
|
||||
</source>
|
||||
</rSIInPort>
|
||||
<rSIInPort name="In2" mandatory="false" />
|
||||
<rSIInPort name="In3" mandatory="false" />
|
||||
<rSIInPort name="In4" mandatory="false" />
|
||||
<rSIInPort name="In5" mandatory="false" />
|
||||
<rSIInPort name="In6" mandatory="false" />
|
||||
</rSIInPorts>
|
||||
<rSIOutPorts>
|
||||
<rSIOutPort name="Out1" />
|
||||
<rSIOutPort name="Out2" />
|
||||
<rSIOutPort name="Out3" />
|
||||
<rSIOutPort name="Out4" />
|
||||
</rSIOutPorts>
|
||||
<rSIParameters>
|
||||
<rSIParameter name="ConfigFile" value="ValueTests.xml" paramType="System.FileName" minVal="-2147483648" maxVal="2147483647" isEnum="false" isRuntime="false" index="1" />
|
||||
<rSIParameter name="Timeout" value="100" paramType="System.Int32" minVal="0" maxVal="2147483647" isEnum="false" index="1" />
|
||||
<rSIParameter name="Flag" value="-1" paramType="System.Int32" minVal="-1" maxVal="999" isEnum="false" index="4" />
|
||||
<rSIParameter name="Precision" value="1" paramType="System.Int32" minVal="1" maxVal="32" isEnum="false" index="8" />
|
||||
</rSIParameters>
|
||||
</rSIElement>
|
||||
<rSIElement name="SEN_PINT1" objType="SEN_PINT" objTypeID="57" maxInputs="0" maxOutputs="0">
|
||||
<rSIOutPorts>
|
||||
<rSIOutPort name="Out1" signalType="Int" />
|
||||
</rSIOutPorts>
|
||||
<rSIParameters>
|
||||
<rSIParameter name="Index" value="1" paramType="System.Int32" minVal="1" maxVal="20" isEnum="false" index="1" />
|
||||
</rSIParameters>
|
||||
</rSIElement>
|
||||
<rSIElement name="MONITOR1" objType="MONITOR" objTypeID="55" maxInputs="24" maxOutputs="0">
|
||||
<rSIInPorts>
|
||||
<rSIInPort name="In1">
|
||||
<source>
|
||||
<rSIOutPortMoniker name="//SEN_PINT1/Out1" />
|
||||
</source>
|
||||
</rSIInPort>
|
||||
<rSIInPort name="In2" mandatory="false">
|
||||
<source>
|
||||
<rSIOutPortMoniker name="//ETHERNET1/Out1" />
|
||||
</source>
|
||||
</rSIInPort>
|
||||
<rSIInPort name="In3" mandatory="false" />
|
||||
<rSIInPort name="In4" mandatory="false" />
|
||||
</rSIInPorts>
|
||||
<rSIParameters>
|
||||
<rSIParameter name="Refresh" value="1" paramType="System.Int32" minVal="1" maxVal="2147483647" isEnum="false" index="1" />
|
||||
<rSIParameter name="Timeout" value="50" paramType="System.Int32" minVal="0" maxVal="2147483647" isEnum="false" index="2" />
|
||||
<rSIParameter name="ReqTimeZero" value="1" paramType="System.Int32" minVal="-2147483648" maxVal="2147483647" isEnum="false" index="3" />
|
||||
<rSIParameter name="IP" value="192.168.0.1" paramType="System.IP" minVal="-2147483648" maxVal="2147483647" isEnum="false" isRuntime="false" index="1" />
|
||||
<rSIParameter name="Channel" value="1" paramType="System.Int32" minVal="1" maxVal="8" isEnum="false" isRuntime="false" index="2" />
|
||||
</rSIParameters>
|
||||
</rSIElement>
|
||||
<rSIElement name="MAP2SEN_PINT1" objType="MAP2SEN_PINT" objTypeID="16" maxInputs="0" maxOutputs="0">
|
||||
<rSIInPorts>
|
||||
<rSIInPort name="In1" signalType="Int">
|
||||
<source>
|
||||
<rSIOutPortMoniker name="//ETHERNET1/Out1" />
|
||||
</source>
|
||||
</rSIInPort>
|
||||
</rSIInPorts>
|
||||
<rSIParameters>
|
||||
<rSIParameter name="Index" value="2" paramType="System.Int32" minVal="1" maxVal="20" isEnum="false" index="1" />
|
||||
</rSIParameters>
|
||||
</rSIElement>
|
||||
</rSIObjects>
|
||||
</rSIModel>
|
||||
126
RSI Config Files/Changing Values/valuetests.rsi.diagram
Normal file
126
RSI Config Files/Changing Values/valuetests.rsi.diagram
Normal file
@ -0,0 +1,126 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<rSIObjectDiagram dslVersion="1.0.0.0" absoluteBounds="0, 0, 11.75, 8.5" name="~vs4ECB">
|
||||
<rSIModelMoniker name="/" />
|
||||
<nestedChildShapes>
|
||||
<rSIElementShape Id="d24d6168-548d-40fe-8886-d7add9c40ad9" absoluteBounds="4.5, 1.375, 1.5, 2.4750000029802322" fillColor="BlanchedAlmond">
|
||||
<rSIElementMoniker name="//ETHERNET1" />
|
||||
<relativeChildShapes>
|
||||
<rSIInPortShape Id="10322ca8-1db1-4696-9211-fb0b8d4f6cc3" absoluteBounds="4.0999999940395355, 1.625, 0.40000000596046448, 0.075000002980232239" fillColor="White">
|
||||
<rSIInPortMoniker name="//ETHERNET1/In1" />
|
||||
<relativeChildShapes />
|
||||
</rSIInPortShape>
|
||||
<rSIOutPortShape Id="e6cb448d-e8e3-443c-aa3f-a9a2d963425e" absoluteBounds="6, 1.625, 0.40000000596046448, 0.075000002980232239" fillColor="White">
|
||||
<rSIOutPortMoniker name="//ETHERNET1/Out1" />
|
||||
<relativeChildShapes />
|
||||
</rSIOutPortShape>
|
||||
<rSIInPortShape Id="5e336ab7-3cf1-4295-94f3-5320b40eb7f8" absoluteBounds="4.0999999940395355, 2.025, 0.40000000596046448, 0.075000002980232239" fillColor="White">
|
||||
<rSIInPortMoniker name="//ETHERNET1/In2" />
|
||||
<relativeChildShapes />
|
||||
</rSIInPortShape>
|
||||
<rSIInPortShape Id="52324873-ee12-4c40-96e7-21c797642dba" absoluteBounds="4.0999999940395355, 2.425, 0.40000000596046448, 0.075000002980232239" fillColor="White">
|
||||
<rSIInPortMoniker name="//ETHERNET1/In3" />
|
||||
<relativeChildShapes />
|
||||
</rSIInPortShape>
|
||||
<rSIInPortShape Id="c862bc14-a9ca-4c24-b8ba-5116371ea990" absoluteBounds="4.0999999940395355, 2.825, 0.40000000596046448, 0.075000002980232239" fillColor="White">
|
||||
<rSIInPortMoniker name="//ETHERNET1/In4" />
|
||||
<relativeChildShapes />
|
||||
</rSIInPortShape>
|
||||
<rSIInPortShape Id="dc58c689-5c46-451c-8b46-e85b8d177323" absoluteBounds="4.0999999940395355, 3.225, 0.40000000596046448, 0.075000002980232239" fillColor="White">
|
||||
<rSIInPortMoniker name="//ETHERNET1/In5" />
|
||||
<relativeChildShapes />
|
||||
</rSIInPortShape>
|
||||
<rSIInPortShape Id="035226f1-d3c5-4ab3-9c85-7f011e93ec2f" absoluteBounds="4.0999999940395355, 3.625, 0.40000000596046448, 0.075000002980232239" fillColor="White">
|
||||
<rSIInPortMoniker name="//ETHERNET1/In6" />
|
||||
<relativeChildShapes />
|
||||
</rSIInPortShape>
|
||||
<rSIOutPortShape Id="3e675302-6423-482a-864d-12537e65856e" absoluteBounds="6, 2.025, 0.40000000596046448, 0.075000002980232239" fillColor="White">
|
||||
<rSIOutPortMoniker name="//ETHERNET1/Out2" />
|
||||
<relativeChildShapes />
|
||||
</rSIOutPortShape>
|
||||
<rSIOutPortShape Id="b3fe9d46-caf8-40d5-8808-dd64a8430e02" absoluteBounds="6, 2.425, 0.40000000596046448, 0.075000002980232239" fillColor="White">
|
||||
<rSIOutPortMoniker name="//ETHERNET1/Out3" />
|
||||
<relativeChildShapes />
|
||||
</rSIOutPortShape>
|
||||
<rSIOutPortShape Id="03109992-9849-4a50-8385-459943a32e7c" absoluteBounds="6, 2.825, 0.40000000596046448, 0.075000002980232239" fillColor="White">
|
||||
<rSIOutPortMoniker name="//ETHERNET1/Out4" />
|
||||
<relativeChildShapes />
|
||||
</rSIOutPortShape>
|
||||
</relativeChildShapes>
|
||||
<nestedChildShapes>
|
||||
<elementListCompartment Id="9309591d-f633-4377-858e-139a1167db53" absoluteBounds="4.515, 1.8849999999999998, 1.4700000000000002, 1.0185953776041665" name="RSIParameters" titleTextColor="Black" itemTextColor="Black" />
|
||||
</nestedChildShapes>
|
||||
</rSIElementShape>
|
||||
<rSIElementShape Id="07a691f1-b008-4931-be43-b42b7c6265b2" absoluteBounds="1.75, 1.375, 1.5, 1.0516910807291668" fillColor="BlanchedAlmond">
|
||||
<rSIElementMoniker name="//SEN_PINT1" />
|
||||
<relativeChildShapes>
|
||||
<rSIOutPortShape Id="21053b50-ae72-4932-9819-9b554efd1940" absoluteBounds="3.25, 1.625, 0.40000000596046448, 0.075000002980232239" fillColor="White">
|
||||
<rSIOutPortMoniker name="//SEN_PINT1/Out1" />
|
||||
<relativeChildShapes />
|
||||
</rSIOutPortShape>
|
||||
</relativeChildShapes>
|
||||
<nestedChildShapes>
|
||||
<elementListCompartment Id="3b9d9de9-8211-49da-9562-04b8e58e501e" absoluteBounds="1.765, 1.885, 1.4700000000000002, 0.44169108072916663" name="RSIParameters" titleTextColor="Black" itemTextColor="Black" />
|
||||
</nestedChildShapes>
|
||||
</rSIElementShape>
|
||||
<rSISignalConnector edgePoints="[(4.09999999403954 : 1.66250000149012); (3.65000000596046 : 1.66250000149012)]" fixedFrom="Caller" fixedTo="Caller" TargetRelationshipDomainClassId="e3f2b7da-330d-4daf-bd29-4d4ed734c0af">
|
||||
<nodes>
|
||||
<rSIInPortShapeMoniker Id="10322ca8-1db1-4696-9211-fb0b8d4f6cc3" />
|
||||
<rSIOutPortShapeMoniker Id="21053b50-ae72-4932-9819-9b554efd1940" />
|
||||
</nodes>
|
||||
</rSISignalConnector>
|
||||
<rSIElementShape Id="c4408def-18d5-46e9-92f8-c175a9ee846c" absoluteBounds="10, 1.375, 1.5, 1.8208968098958334" fillColor="BlanchedAlmond">
|
||||
<rSIElementMoniker name="//MONITOR1" />
|
||||
<relativeChildShapes>
|
||||
<rSIInPortShape Id="a53bc87a-b027-4e6d-b956-df454a5eb797" absoluteBounds="9.5999999940395355, 1.625, 0.40000000596046448, 0.075000002980232239" fillColor="BlanchedAlmond">
|
||||
<rSIInPortMoniker name="//MONITOR1/In1" />
|
||||
<relativeChildShapes />
|
||||
</rSIInPortShape>
|
||||
<rSIInPortShape Id="14678744-e7e1-424c-8561-64a189f31973" absoluteBounds="9.5999999940395355, 2.025, 0.40000000596046448, 0.075000002980232239" fillColor="White">
|
||||
<rSIInPortMoniker name="//MONITOR1/In2" />
|
||||
<relativeChildShapes />
|
||||
</rSIInPortShape>
|
||||
<rSIInPortShape Id="c11ab0a3-6afa-46ca-b2ca-89864393c61e" absoluteBounds="9.5999999940395355, 2.425, 0.40000000596046448, 0.075000002980232239" fillColor="White">
|
||||
<rSIInPortMoniker name="//MONITOR1/In3" />
|
||||
<relativeChildShapes />
|
||||
</rSIInPortShape>
|
||||
<rSIInPortShape Id="ab2c525b-93e9-4d70-8a08-c1b434c20aef" absoluteBounds="9.5999999940395355, 2.825, 0.40000000596046448, 0.075000002980232239" fillColor="White">
|
||||
<rSIInPortMoniker name="//MONITOR1/In4" />
|
||||
<relativeChildShapes />
|
||||
</rSIInPortShape>
|
||||
</relativeChildShapes>
|
||||
<nestedChildShapes>
|
||||
<elementListCompartment Id="87fdf3a8-3ad3-4bc0-ac47-cdb071275348" absoluteBounds="10.015, 1.8849999999999998, 1.4700000000000002, 1.2108968098958333" name="RSIParameters" titleTextColor="Black" itemTextColor="Black" />
|
||||
</nestedChildShapes>
|
||||
</rSIElementShape>
|
||||
<rSISignalConnector edgePoints="[(9.59999999403954 : 1.66250000149012); (9.33333333333333 : 1.66250000149012 : JumpStart); (9.16666666666667 : 1.66250000149012 : JumpEnd); (9 : 1.66250000149012); (9 : 1.125); (6.8583333392938 : 1.125 : JumpStart); (6.69166667262713 : 1.125 : JumpEnd); (3.45000000298023 : 1.125); (3.45000000298023 : 1.625)]" manuallyRouted="true" fixedFrom="Caller" fixedTo="Caller" TargetRelationshipDomainClassId="e3f2b7da-330d-4daf-bd29-4d4ed734c0af">
|
||||
<nodes>
|
||||
<rSIInPortShapeMoniker Id="a53bc87a-b027-4e6d-b956-df454a5eb797" />
|
||||
<rSIOutPortShapeMoniker Id="21053b50-ae72-4932-9819-9b554efd1940" />
|
||||
</nodes>
|
||||
</rSISignalConnector>
|
||||
<rSIElementShape Id="d3b36c75-40c9-4a7c-9b60-10c712d4516c" absoluteBounds="7.25, 1.375, 1.5, 1.0516910807291668" fillColor="BlanchedAlmond">
|
||||
<rSIElementMoniker name="//MAP2SEN_PINT1" />
|
||||
<relativeChildShapes>
|
||||
<rSIInPortShape Id="9eff4bc9-92c0-43ac-8a99-1d8bf16fdf3c" absoluteBounds="6.8499999940395355, 1.625, 0.40000000596046448, 0.075000002980232239" fillColor="BlanchedAlmond">
|
||||
<rSIInPortMoniker name="//MAP2SEN_PINT1/In1" />
|
||||
<relativeChildShapes />
|
||||
</rSIInPortShape>
|
||||
</relativeChildShapes>
|
||||
<nestedChildShapes>
|
||||
<elementListCompartment Id="70dfc15f-b0e1-4090-ab94-fd3efdc1c9c2" absoluteBounds="7.265, 1.885, 1.4700000000000002, 0.44169108072916663" name="RSIParameters" titleTextColor="Black" itemTextColor="Black" />
|
||||
</nestedChildShapes>
|
||||
</rSIElementShape>
|
||||
<rSISignalConnector edgePoints="[(6.84999999403954 : 1.66250000149012); (6.40000000596046 : 1.66250000149012)]" fixedFrom="Caller" fixedTo="Caller" TargetRelationshipDomainClassId="e3f2b7da-330d-4daf-bd29-4d4ed734c0af">
|
||||
<nodes>
|
||||
<rSIInPortShapeMoniker Id="9eff4bc9-92c0-43ac-8a99-1d8bf16fdf3c" />
|
||||
<rSIOutPortShapeMoniker Id="e6cb448d-e8e3-443c-aa3f-a9a2d963425e" />
|
||||
</nodes>
|
||||
</rSISignalConnector>
|
||||
<rSISignalConnector edgePoints="[(9.59999999403954 : 2.06250000149012); (9.25 : 2.06250000149012); (9.25 : 0.875); (6.77500000596046 : 0.875); (6.77500000596046 : 1.66250000149012); (6.40000000596046 : 1.66250000149012)]" fixedFrom="Caller" fixedTo="Caller" TargetRelationshipDomainClassId="e3f2b7da-330d-4daf-bd29-4d4ed734c0af">
|
||||
<nodes>
|
||||
<rSIInPortShapeMoniker Id="14678744-e7e1-424c-8561-64a189f31973" />
|
||||
<rSIOutPortShapeMoniker Id="e6cb448d-e8e3-443c-aa3f-a9a2d963425e" />
|
||||
</nodes>
|
||||
</rSISignalConnector>
|
||||
</nestedChildShapes>
|
||||
</rSIObjectDiagram>
|
||||
40
RSI Config Files/Changing Values/valuetests.rsi.xml
Normal file
40
RSI Config Files/Changing Values/valuetests.rsi.xml
Normal file
@ -0,0 +1,40 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<RSIObjects xsi:noNamespaceSchemaLocation="/Roboter/Config/System/Common/Schemes/RSIContext.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<RSIObject ObjType="ETHERNET" ObjTypeID="64" ObjID="ETHERNET1">
|
||||
<Inputs>
|
||||
<Input InIdx="1" OutObjID="SEN_PINT1" OutIdx="1" />
|
||||
</Inputs>
|
||||
<Parameters>
|
||||
<Parameter Name="ConfigFile" ParamID="1" ParamValue="ValueTests.xml" IsRuntime="false" />
|
||||
<Parameter Name="Timeout" ParamID="1" ParamValue="100" />
|
||||
<Parameter Name="Flag" ParamID="4" ParamValue="-1" />
|
||||
<Parameter Name="Precision" ParamID="8" ParamValue="1" />
|
||||
</Parameters>
|
||||
</RSIObject>
|
||||
<RSIObject ObjType="SEN_PINT" ObjTypeID="57" ObjID="SEN_PINT1">
|
||||
<Parameters>
|
||||
<Parameter Name="Index" ParamID="1" ParamValue="1" />
|
||||
</Parameters>
|
||||
</RSIObject>
|
||||
<RSIObject ObjType="MONITOR" ObjTypeID="55" ObjID="MONITOR1">
|
||||
<Inputs>
|
||||
<Input InIdx="1" OutObjID="SEN_PINT1" OutIdx="1" />
|
||||
<Input InIdx="2" OutObjID="ETHERNET1" OutIdx="1" />
|
||||
</Inputs>
|
||||
<Parameters>
|
||||
<Parameter Name="Refresh" ParamID="1" ParamValue="1" />
|
||||
<Parameter Name="Timeout" ParamID="2" ParamValue="50" />
|
||||
<Parameter Name="ReqTimeZero" ParamID="3" ParamValue="1" />
|
||||
<Parameter Name="IP" ParamID="1" ParamValue="192.168.0.1" IsRuntime="false" />
|
||||
<Parameter Name="Channel" ParamID="2" ParamValue="1" IsRuntime="false" />
|
||||
</Parameters>
|
||||
</RSIObject>
|
||||
<RSIObject ObjType="MAP2SEN_PINT" ObjTypeID="16" ObjID="MAP2SEN_PINT1">
|
||||
<Inputs>
|
||||
<Input InIdx="1" OutObjID="ETHERNET1" OutIdx="1" />
|
||||
</Inputs>
|
||||
<Parameters>
|
||||
<Parameter Name="Index" ParamID="1" ParamValue="2" />
|
||||
</Parameters>
|
||||
</RSIObject>
|
||||
</RSIObjects>
|
||||
18
RSI Config Files/Changing Values/valuetests.xml
Normal file
18
RSI Config Files/Changing Values/valuetests.xml
Normal file
@ -0,0 +1,18 @@
|
||||
<ROOT>
|
||||
<CONFIG>
|
||||
<IP_NUMBER>10.10.10.10</IP_NUMBER>
|
||||
<PORT>64000</PORT>
|
||||
<SENTYPE>ImFree</SENTYPE>
|
||||
<ONLYSEND>FALSE</ONLYSEND>
|
||||
</CONFIG>
|
||||
<SEND>
|
||||
<ELEMENTS>
|
||||
<ELEMENT TAG="SenPintIn" TYPE="LONG" INDX="1" />
|
||||
</ELEMENTS>
|
||||
</SEND>
|
||||
<RECEIVE>
|
||||
<ELEMENTS>
|
||||
<ELEMENT TAG="SenPintOut" TYPE="LONG" INDX="1" HOLDON="1" />
|
||||
</ELEMENTS>
|
||||
</RECEIVE>
|
||||
</ROOT>
|
||||
201
RSI Config Files/RSI Network/RSI_Ethernet.rsi
Normal file
201
RSI Config Files/RSI Network/RSI_Ethernet.rsi
Normal file
@ -0,0 +1,201 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<rSIModel dslVersion="1.0.0.0" name="" xmlns="http://schemas.microsoft.com/dsltools/RSIVisual">
|
||||
<rSIObjects>
|
||||
<rSIElement name="DIGIN1" objType="DIGIN" objTypeID="29" maxInputs="0" maxOutputs="0">
|
||||
<rSIOutPorts>
|
||||
<rSIOutPort name="Out1" signalType="Int" />
|
||||
</rSIOutPorts>
|
||||
<rSIParameters>
|
||||
<rSIParameter name="Index" value="1" paramType="System.Int32" minVal="1" maxVal="4096" isEnum="false" index="1" />
|
||||
<rSIParameter name="DataSize" value="Byte" paramType="KUKA.RSIVisual.RSI_DataSize" minVal="-2147483648" maxVal="2147483647" isEnum="true" index="2" />
|
||||
</rSIParameters>
|
||||
</rSIElement>
|
||||
<rSIElement name="DIGOUT1" objType="DIGOUT" objTypeID="43" maxInputs="0" maxOutputs="0">
|
||||
<rSIOutPorts>
|
||||
<rSIOutPort name="Out1" signalType="Int" />
|
||||
</rSIOutPorts>
|
||||
<rSIParameters>
|
||||
<rSIParameter name="Index" value="1" paramType="System.Int32" minVal="1" maxVal="4096" isEnum="false" index="1" />
|
||||
<rSIParameter name="DataSize" value="Bit" paramType="KUKA.RSIVisual.RSI_DataSize" minVal="-2147483648" maxVal="2147483647" isEnum="true" index="2" />
|
||||
</rSIParameters>
|
||||
</rSIElement>
|
||||
<rSIElement name="DIGOUT2" objType="DIGOUT" objTypeID="43" maxInputs="0" maxOutputs="0">
|
||||
<rSIOutPorts>
|
||||
<rSIOutPort name="Out1" signalType="Int" />
|
||||
</rSIOutPorts>
|
||||
<rSIParameters>
|
||||
<rSIParameter name="Index" value="2" paramType="System.Int32" minVal="1" maxVal="4096" isEnum="false" index="1" />
|
||||
<rSIParameter name="DataSize" value="Bit" paramType="KUKA.RSIVisual.RSI_DataSize" minVal="-2147483648" maxVal="2147483647" isEnum="true" index="2" />
|
||||
</rSIParameters>
|
||||
</rSIElement>
|
||||
<rSIElement name="DIGOUT3" objType="DIGOUT" objTypeID="43" maxInputs="0" maxOutputs="0">
|
||||
<rSIOutPorts>
|
||||
<rSIOutPort name="Out1" signalType="Int" />
|
||||
</rSIOutPorts>
|
||||
<rSIParameters>
|
||||
<rSIParameter name="Index" value="3" paramType="System.Int32" minVal="1" maxVal="4096" isEnum="false" index="1" />
|
||||
<rSIParameter name="DataSize" value="Bit" paramType="KUKA.RSIVisual.RSI_DataSize" minVal="-2147483648" maxVal="2147483647" isEnum="true" index="2" />
|
||||
</rSIParameters>
|
||||
</rSIElement>
|
||||
<rSIElement name="SOURCE1" objType="SOURCE" objTypeID="45" maxInputs="0" maxOutputs="0">
|
||||
<rSIOutPorts>
|
||||
<rSIOutPort name="Out1" />
|
||||
</rSIOutPorts>
|
||||
<rSIParameters>
|
||||
<rSIParameter name="Type" value="Sin" paramType="KUKA.RSIVisual.RSI_SourceType" minVal="-2147483648" maxVal="2147483647" isEnum="true" index="1" />
|
||||
<rSIParameter name="Offset" value="0" paramType="System.Double" minVal="-2147483648" maxVal="2147483647" isEnum="false" index="2" />
|
||||
<rSIParameter name="Amplitude" value="50" paramType="System.Double" minVal="-2147483648" maxVal="2147483647" isEnum="false" index="3" />
|
||||
<rSIParameter name="Period" value="5" paramType="System.Double" minVal="-2147483648" maxVal="2147483647" isEnum="false" index="4" />
|
||||
</rSIParameters>
|
||||
</rSIElement>
|
||||
<rSIElement name="POSCORR1" objType="POSCORR" objTypeID="27" maxInputs="0" maxOutputs="0">
|
||||
<rSIInPorts>
|
||||
<rSIInPort name="CorrX" mandatory="false">
|
||||
<source>
|
||||
<rSIOutPortMoniker name="//ETHERNET1/Out1" />
|
||||
</source>
|
||||
</rSIInPort>
|
||||
<rSIInPort name="CorrY" mandatory="false">
|
||||
<source>
|
||||
<rSIOutPortMoniker name="//ETHERNET1/Out2" />
|
||||
</source>
|
||||
</rSIInPort>
|
||||
<rSIInPort name="CorrZ" mandatory="false">
|
||||
<source>
|
||||
<rSIOutPortMoniker name="//ETHERNET1/Out3" />
|
||||
</source>
|
||||
</rSIInPort>
|
||||
<rSIInPort name="CorrA" mandatory="false">
|
||||
<source>
|
||||
<rSIOutPortMoniker name="//ETHERNET1/Out4" />
|
||||
</source>
|
||||
</rSIInPort>
|
||||
<rSIInPort name="CorrB" mandatory="false">
|
||||
<source>
|
||||
<rSIOutPortMoniker name="//ETHERNET1/Out5" />
|
||||
</source>
|
||||
</rSIInPort>
|
||||
<rSIInPort name="CorrC" mandatory="false">
|
||||
<source>
|
||||
<rSIOutPortMoniker name="//ETHERNET1/Out6" />
|
||||
</source>
|
||||
</rSIInPort>
|
||||
</rSIInPorts>
|
||||
<rSIOutPorts>
|
||||
<rSIOutPort name="Stat" signalType="Int" />
|
||||
<rSIOutPort name="X" />
|
||||
<rSIOutPort name="Y" />
|
||||
<rSIOutPort name="Z" />
|
||||
<rSIOutPort name="A" />
|
||||
<rSIOutPort name="B" />
|
||||
<rSIOutPort name="C" />
|
||||
</rSIOutPorts>
|
||||
<rSIParameters>
|
||||
<rSIParameter name="LowerLimX" value="-50" paramType="System.Double" minVal="-2147483648" maxVal="2147483647" isEnum="false" index="1" />
|
||||
<rSIParameter name="LowerLimY" value="-50" paramType="System.Double" minVal="-2147483648" maxVal="2147483647" isEnum="false" index="2" />
|
||||
<rSIParameter name="LowerLimZ" value="-50" paramType="System.Double" minVal="-2147483648" maxVal="2147483647" isEnum="false" index="3" />
|
||||
<rSIParameter name="UpperLimX" value="50" paramType="System.Double" minVal="-2147483648" maxVal="2147483647" isEnum="false" index="4" />
|
||||
<rSIParameter name="UpperLimY" value="50" paramType="System.Double" minVal="-2147483648" maxVal="2147483647" isEnum="false" index="5" />
|
||||
<rSIParameter name="UpperLimZ" value="50" paramType="System.Double" minVal="-2147483648" maxVal="2147483647" isEnum="false" index="6" />
|
||||
<rSIParameter name="MaxRotAngle" value="50" paramType="System.Double" minVal="-2147483648" maxVal="2147483647" isEnum="false" index="7" />
|
||||
<rSIParameter name="RefCorrSys" value="Base" paramType="KUKA.RSIVisual.RSI_TrafoCosys" minVal="-2147483648" maxVal="2147483647" isEnum="true" isRuntime="false" index="1" />
|
||||
</rSIParameters>
|
||||
</rSIElement>
|
||||
<rSIElement name="MAP2DIGOUT1" objType="MAP2DIGOUT" objTypeID="14" maxInputs="0" maxOutputs="0">
|
||||
<rSIInPorts>
|
||||
<rSIInPort name="In1" signalType="Int">
|
||||
<source>
|
||||
<rSIOutPortMoniker name="//ETHERNET1/Out8" />
|
||||
</source>
|
||||
</rSIInPort>
|
||||
</rSIInPorts>
|
||||
<rSIParameters>
|
||||
<rSIParameter name="Index" value="20" paramType="System.Int32" minVal="1" maxVal="4096" isEnum="false" index="1" />
|
||||
<rSIParameter name="DataSize" value="Word" paramType="KUKA.RSIVisual.RSI_DataSizeX" minVal="-2147483648" maxVal="2147483647" isEnum="true" index="2" />
|
||||
</rSIParameters>
|
||||
</rSIElement>
|
||||
<rSIElement name="MAP2SEN_PREA1" objType="MAP2SEN_PREA" objTypeID="17" maxInputs="0" maxOutputs="0">
|
||||
<rSIInPorts>
|
||||
<rSIInPort name="In1">
|
||||
<source>
|
||||
<rSIOutPortMoniker name="//ETHERNET1/Out1" />
|
||||
</source>
|
||||
</rSIInPort>
|
||||
</rSIInPorts>
|
||||
<rSIParameters>
|
||||
<rSIParameter name="Index" value="1" paramType="System.Int32" minVal="1" maxVal="20" isEnum="false" index="1" />
|
||||
</rSIParameters>
|
||||
</rSIElement>
|
||||
<rSIElement name="MAP2SEN_PREA2" objType="MAP2SEN_PREA" objTypeID="17" maxInputs="0" maxOutputs="0">
|
||||
<rSIInPorts>
|
||||
<rSIInPort name="In1">
|
||||
<source>
|
||||
<rSIOutPortMoniker name="//ETHERNET1/Out2" />
|
||||
</source>
|
||||
</rSIInPort>
|
||||
</rSIInPorts>
|
||||
<rSIParameters>
|
||||
<rSIParameter name="Index" value="2" paramType="System.Int32" minVal="1" maxVal="20" isEnum="false" index="1" />
|
||||
</rSIParameters>
|
||||
</rSIElement>
|
||||
<rSIElement name="MAP2SEN_PREA3" objType="MAP2SEN_PREA" objTypeID="17" maxInputs="0" maxOutputs="0">
|
||||
<rSIInPorts>
|
||||
<rSIInPort name="In1">
|
||||
<source>
|
||||
<rSIOutPortMoniker name="//ETHERNET1/Out3" />
|
||||
</source>
|
||||
</rSIInPort>
|
||||
</rSIInPorts>
|
||||
<rSIParameters>
|
||||
<rSIParameter name="Index" value="3" paramType="System.Int32" minVal="1" maxVal="20" isEnum="false" index="1" />
|
||||
</rSIParameters>
|
||||
</rSIElement>
|
||||
<rSIElement name="ETHERNET1" objType="ETHERNET" objTypeID="64" maxInputs="64" maxOutputs="64">
|
||||
<rSIInPorts>
|
||||
<rSIInPort name="In1" mandatory="false">
|
||||
<source>
|
||||
<rSIOutPortMoniker name="//DIGIN1/Out1" />
|
||||
</source>
|
||||
</rSIInPort>
|
||||
<rSIInPort name="In2" mandatory="false">
|
||||
<source>
|
||||
<rSIOutPortMoniker name="//DIGOUT1/Out1" />
|
||||
</source>
|
||||
</rSIInPort>
|
||||
<rSIInPort name="In3" mandatory="false">
|
||||
<source>
|
||||
<rSIOutPortMoniker name="//DIGOUT2/Out1" />
|
||||
</source>
|
||||
</rSIInPort>
|
||||
<rSIInPort name="In4" mandatory="false">
|
||||
<source>
|
||||
<rSIOutPortMoniker name="//DIGOUT3/Out1" />
|
||||
</source>
|
||||
</rSIInPort>
|
||||
<rSIInPort name="In5" mandatory="false">
|
||||
<source>
|
||||
<rSIOutPortMoniker name="//SOURCE1/Out1" />
|
||||
</source>
|
||||
</rSIInPort>
|
||||
<rSIInPort name="In6" mandatory="false" />
|
||||
</rSIInPorts>
|
||||
<rSIOutPorts>
|
||||
<rSIOutPort name="Out1" />
|
||||
<rSIOutPort name="Out2" />
|
||||
<rSIOutPort name="Out3" />
|
||||
<rSIOutPort name="Out4" />
|
||||
<rSIOutPort name="Out5" />
|
||||
<rSIOutPort name="Out6" />
|
||||
<rSIOutPort name="Out7" />
|
||||
<rSIOutPort name="Out8" />
|
||||
<rSIOutPort name="Out9" />
|
||||
</rSIOutPorts>
|
||||
<rSIParameters>
|
||||
<rSIParameter name="ConfigFile" value="RSI_EthernetConfig.xml" paramType="System.FileName" minVal="-2147483648" maxVal="2147483647" isEnum="false" isRuntime="false" index="1" />
|
||||
<rSIParameter name="Timeout" value="100" paramType="System.Int32" minVal="0" maxVal="2147483647" isEnum="false" index="1" />
|
||||
<rSIParameter name="Flag" value="1" paramType="System.Int32" minVal="-1" maxVal="999" isEnum="false" index="4" />
|
||||
<rSIParameter name="Precision" value="1" paramType="System.Int32" minVal="1" maxVal="32" isEnum="false" index="8" />
|
||||
</rSIParameters>
|
||||
</rSIElement>
|
||||
</rSIObjects>
|
||||
</rSIModel>
|
||||
332
RSI Config Files/RSI Network/RSI_Ethernet.rsi.diagram
Normal file
332
RSI Config Files/RSI Network/RSI_Ethernet.rsi.diagram
Normal file
@ -0,0 +1,332 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<rSIObjectDiagram dslVersion="1.0.0.0" absoluteBounds="0, 0, 11, 8.625" name="~vs3">
|
||||
<rSIModelMoniker name="/" />
|
||||
<nestedChildShapes>
|
||||
<rSIElementShape Id="07fb5453-a340-4ebf-b24f-c17ef1dfd22d" absoluteBounds="0.5, 0.5, 1.5, 1.2439925130208334" fillColor="BlanchedAlmond">
|
||||
<rSIElementMoniker name="//DIGIN1" />
|
||||
<relativeChildShapes>
|
||||
<rSIOutPortShape Id="474557ab-5f7d-4a14-b0ad-c75560df9f4a" absoluteBounds="2, 0.75, 0.40000000596046448, 0.075000002980232239" fillColor="White">
|
||||
<rSIOutPortMoniker name="//DIGIN1/Out1" />
|
||||
<relativeChildShapes />
|
||||
</rSIOutPortShape>
|
||||
</relativeChildShapes>
|
||||
<nestedChildShapes>
|
||||
<elementListCompartment Id="f65a19cb-1ff1-4af3-a192-9206c04b25d1" absoluteBounds="0.515, 1.01, 1.4700000000000002, 0.63399251302083326" name="RSIParameters" titleTextColor="Black" itemTextColor="Black" />
|
||||
</nestedChildShapes>
|
||||
</rSIElementShape>
|
||||
<rSIElementShape Id="b68fde26-fb42-41d4-bf9f-dbe600e1fdad" absoluteBounds="0.5, 1.875, 1.5, 1.2439925130208329" fillColor="BlanchedAlmond">
|
||||
<rSIElementMoniker name="//DIGOUT1" />
|
||||
<relativeChildShapes>
|
||||
<rSIOutPortShape Id="8fa2fef2-6101-4922-822b-b6563509ad17" absoluteBounds="2, 2.125, 0.40000000596046448, 0.075000002980232239" fillColor="White">
|
||||
<rSIOutPortMoniker name="//DIGOUT1/Out1" />
|
||||
<relativeChildShapes />
|
||||
</rSIOutPortShape>
|
||||
</relativeChildShapes>
|
||||
<nestedChildShapes>
|
||||
<elementListCompartment Id="984d4ae9-2da5-4a4f-861e-2950298e4f74" absoluteBounds="0.515, 2.385, 1.4700000000000002, 0.63399251302083326" name="RSIParameters" titleTextColor="Black" itemTextColor="Black" />
|
||||
</nestedChildShapes>
|
||||
</rSIElementShape>
|
||||
<rSIElementShape Id="0de8b467-ec21-4e9f-ac05-ae00df8ca0a7" absoluteBounds="0.5, 3.125, 1.5, 1.2439925130208325" fillColor="BlanchedAlmond">
|
||||
<rSIElementMoniker name="//DIGOUT2" />
|
||||
<relativeChildShapes>
|
||||
<rSIOutPortShape Id="312b81f3-be26-4fb6-8fee-cdc6b01ddc3b" absoluteBounds="2, 3.375, 0.40000000596046448, 0.075000002980232239" fillColor="White">
|
||||
<rSIOutPortMoniker name="//DIGOUT2/Out1" />
|
||||
<relativeChildShapes />
|
||||
</rSIOutPortShape>
|
||||
</relativeChildShapes>
|
||||
<nestedChildShapes>
|
||||
<elementListCompartment Id="fd709d63-b3b8-4d3c-989c-7882315d9471" absoluteBounds="0.515, 3.635, 1.4700000000000002, 0.63399251302083326" name="RSIParameters" titleTextColor="Black" itemTextColor="Black" />
|
||||
</nestedChildShapes>
|
||||
</rSIElementShape>
|
||||
<rSIElementShape Id="7f0460a2-8357-49b0-940e-06d2937f4e8b" absoluteBounds="0.5, 4.375, 1.5, 1.2439925130208325" fillColor="BlanchedAlmond">
|
||||
<rSIElementMoniker name="//DIGOUT3" />
|
||||
<relativeChildShapes>
|
||||
<rSIOutPortShape Id="f1e5908a-b1f7-41e7-80fd-cc2e6aaa9f22" absoluteBounds="2, 4.625, 0.40000000596046448, 0.075000002980232239" fillColor="White">
|
||||
<rSIOutPortMoniker name="//DIGOUT3/Out1" />
|
||||
<relativeChildShapes />
|
||||
</rSIOutPortShape>
|
||||
</relativeChildShapes>
|
||||
<nestedChildShapes>
|
||||
<elementListCompartment Id="06e01483-b386-4bc9-8525-4ac3d760c8af" absoluteBounds="0.515, 4.885, 1.4700000000000002, 0.63399251302083326" name="RSIParameters" titleTextColor="Black" itemTextColor="Black" />
|
||||
</nestedChildShapes>
|
||||
</rSIElementShape>
|
||||
<rSIElementShape Id="2dedaa42-fffe-41f9-acc8-0454d9015363" absoluteBounds="0.5, 5.75, 1.5, 1.6285953776041655" fillColor="BlanchedAlmond">
|
||||
<rSIElementMoniker name="//SOURCE1" />
|
||||
<relativeChildShapes>
|
||||
<rSIOutPortShape Id="a6685103-4bbb-466a-9ec5-c74f0b2c1e2a" absoluteBounds="2, 6, 0.40000000596046448, 0.075000002980232239" fillColor="White">
|
||||
<rSIOutPortMoniker name="//SOURCE1/Out1" />
|
||||
<relativeChildShapes />
|
||||
</rSIOutPortShape>
|
||||
</relativeChildShapes>
|
||||
<nestedChildShapes>
|
||||
<elementListCompartment Id="fc3bcf8b-3410-4487-879e-98d182f98ada" absoluteBounds="0.515, 6.26, 1.4700000000000002, 1.0185953776041665" name="RSIParameters" titleTextColor="Black" itemTextColor="Black" />
|
||||
</nestedChildShapes>
|
||||
</rSIElementShape>
|
||||
<rSIElementShape Id="a895327e-9d92-4056-828e-5409d00df2f9" absoluteBounds="7.625, 0.5, 1.5, 2.8750000029802325" fillColor="BlanchedAlmond">
|
||||
<rSIElementMoniker name="//POSCORR1" />
|
||||
<relativeChildShapes>
|
||||
<rSIInPortShape Id="1de90138-4698-4dcf-ae5d-8bfd44634aa1" absoluteBounds="7.2249999940395355, 0.75, 0.40000000596046448, 0.075000002980232239" fillColor="White">
|
||||
<rSIInPortMoniker name="//POSCORR1/CorrX" />
|
||||
<relativeChildShapes />
|
||||
</rSIInPortShape>
|
||||
<rSIInPortShape Id="9329fc48-c453-4b2a-8566-b43b44a85176" absoluteBounds="7.2249999940395355, 1.15, 0.40000000596046448, 0.075000002980232239" fillColor="White">
|
||||
<rSIInPortMoniker name="//POSCORR1/CorrY" />
|
||||
<relativeChildShapes />
|
||||
</rSIInPortShape>
|
||||
<rSIInPortShape Id="61bf0fe8-2ce8-4fdc-a229-c4930e86f858" absoluteBounds="7.2249999940395355, 1.55, 0.40000000596046448, 0.075000002980232239" fillColor="White">
|
||||
<rSIInPortMoniker name="//POSCORR1/CorrZ" />
|
||||
<relativeChildShapes />
|
||||
</rSIInPortShape>
|
||||
<rSIInPortShape Id="ed64210b-8a9c-4ff9-a138-37c8ac8f3ff9" absoluteBounds="7.2249999940395355, 1.9500000000000002, 0.40000000596046448, 0.075000002980232239" fillColor="White">
|
||||
<rSIInPortMoniker name="//POSCORR1/CorrA" />
|
||||
<relativeChildShapes />
|
||||
</rSIInPortShape>
|
||||
<rSIInPortShape Id="d7a2b3a8-dcaa-4d99-9619-0f251d894e23" absoluteBounds="7.2249999940395355, 2.35, 0.40000000596046448, 0.075000002980232239" fillColor="White">
|
||||
<rSIInPortMoniker name="//POSCORR1/CorrB" />
|
||||
<relativeChildShapes />
|
||||
</rSIInPortShape>
|
||||
<rSIInPortShape Id="10f03176-0037-4a78-aa82-800f285b30e3" absoluteBounds="7.2249999940395355, 2.75, 0.40000000596046448, 0.075000002980232239" fillColor="White">
|
||||
<rSIInPortMoniker name="//POSCORR1/CorrC" />
|
||||
<relativeChildShapes />
|
||||
</rSIInPortShape>
|
||||
<rSIOutPortShape Id="827ed029-0baf-4c07-abe8-3481662c3c97" absoluteBounds="9.125, 0.75, 0.40000000596046448, 0.075000002980232239" fillColor="White">
|
||||
<rSIOutPortMoniker name="//POSCORR1/Stat" />
|
||||
<relativeChildShapes />
|
||||
</rSIOutPortShape>
|
||||
<rSIOutPortShape Id="aeb7cd0d-f4eb-4026-a0c2-08dc1519100c" absoluteBounds="9.125, 1.15, 0.40000000596046448, 0.075000002980232239" fillColor="White">
|
||||
<rSIOutPortMoniker name="//POSCORR1/X" />
|
||||
<relativeChildShapes />
|
||||
</rSIOutPortShape>
|
||||
<rSIOutPortShape Id="35a496e1-7cfe-4d35-b05e-59bc3a439de0" absoluteBounds="9.125, 1.55, 0.40000000596046448, 0.075000002980232239" fillColor="White">
|
||||
<rSIOutPortMoniker name="//POSCORR1/Y" />
|
||||
<relativeChildShapes />
|
||||
</rSIOutPortShape>
|
||||
<rSIOutPortShape Id="0f237009-3943-485c-b1d3-e0f6de61571b" absoluteBounds="9.125, 1.9500000000000002, 0.40000000596046448, 0.075000002980232239" fillColor="White">
|
||||
<rSIOutPortMoniker name="//POSCORR1/Z" />
|
||||
<relativeChildShapes />
|
||||
</rSIOutPortShape>
|
||||
<rSIOutPortShape Id="f05863d9-87b8-4ebe-8c01-320a5a1fba49" absoluteBounds="9.125, 2.35, 0.40000000596046448, 0.075000002980232239" fillColor="White">
|
||||
<rSIOutPortMoniker name="//POSCORR1/A" />
|
||||
<relativeChildShapes />
|
||||
</rSIOutPortShape>
|
||||
<rSIOutPortShape Id="a294902e-322b-4f15-9132-567adc0708e5" absoluteBounds="9.125, 2.75, 0.40000000596046448, 0.075000002980232239" fillColor="White">
|
||||
<rSIOutPortMoniker name="//POSCORR1/B" />
|
||||
<relativeChildShapes />
|
||||
</rSIOutPortShape>
|
||||
<rSIOutPortShape Id="f96c9221-1ea4-4ee6-a4e1-80be384105d6" absoluteBounds="9.125, 3.1500000000000004, 0.40000000596046448, 0.075000002980232239" fillColor="White">
|
||||
<rSIOutPortMoniker name="//POSCORR1/C" />
|
||||
<relativeChildShapes />
|
||||
</rSIOutPortShape>
|
||||
</relativeChildShapes>
|
||||
<nestedChildShapes>
|
||||
<elementListCompartment Id="f3144c01-c293-4f7c-858a-e0eb34c0519d" absoluteBounds="7.64, 1.01, 1.4700000000000002, 1.7878011067708333" name="RSIParameters" titleTextColor="Black" itemTextColor="Black" />
|
||||
</nestedChildShapes>
|
||||
</rSIElementShape>
|
||||
<rSIElementShape Id="599b9cf4-db1a-4052-ae3b-767b4bd8a3b7" absoluteBounds="7.625, 7.125, 1.5, 1.2439925130208334" fillColor="BlanchedAlmond">
|
||||
<rSIElementMoniker name="//MAP2DIGOUT1" />
|
||||
<relativeChildShapes>
|
||||
<rSIInPortShape Id="cde453ce-be8d-44b8-a671-c14010ed25c6" absoluteBounds="7.2249999940395355, 7.375, 0.40000000596046448, 0.075000002980232239" fillColor="BlanchedAlmond">
|
||||
<rSIInPortMoniker name="//MAP2DIGOUT1/In1" />
|
||||
<relativeChildShapes />
|
||||
</rSIInPortShape>
|
||||
</relativeChildShapes>
|
||||
<nestedChildShapes>
|
||||
<elementListCompartment Id="4065365e-81be-4f94-a87c-366b4c54e6f2" absoluteBounds="7.64, 7.635, 1.4700000000000002, 0.63399251302083326" name="RSIParameters" titleTextColor="Black" itemTextColor="Black" />
|
||||
</nestedChildShapes>
|
||||
</rSIElementShape>
|
||||
<rSIElementShape Id="2d061253-3ed4-417a-a465-dd27bb3c3884" absoluteBounds="7.625, 3.625, 1.5, 1.0516910807291664" fillColor="BlanchedAlmond">
|
||||
<rSIElementMoniker name="//MAP2SEN_PREA1" />
|
||||
<relativeChildShapes>
|
||||
<rSIInPortShape Id="b9db9b1d-979e-461a-bf53-f41ec267c0c8" absoluteBounds="7.2249999940395355, 3.875, 0.40000000596046448, 0.075000002980232239" fillColor="BlanchedAlmond">
|
||||
<rSIInPortMoniker name="//MAP2SEN_PREA1/In1" />
|
||||
<relativeChildShapes />
|
||||
</rSIInPortShape>
|
||||
</relativeChildShapes>
|
||||
<nestedChildShapes>
|
||||
<elementListCompartment Id="b5c6a7a8-3f08-445b-9058-9fb2e70f5d12" absoluteBounds="7.64, 4.135, 1.4700000000000002, 0.44169108072916663" name="RSIParameters" titleTextColor="Black" itemTextColor="Black" />
|
||||
</nestedChildShapes>
|
||||
</rSIElementShape>
|
||||
<rSIElementShape Id="c132a4d8-07b6-490b-a1b8-6c2637d77e76" absoluteBounds="7.625, 4.75, 1.5, 1.0516910807291664" fillColor="BlanchedAlmond">
|
||||
<rSIElementMoniker name="//MAP2SEN_PREA2" />
|
||||
<relativeChildShapes>
|
||||
<rSIInPortShape Id="aef6ce81-606b-4cda-9f28-3aa6ba3b1b84" absoluteBounds="7.2249999940395355, 5, 0.40000000596046448, 0.075000002980232239" fillColor="BlanchedAlmond">
|
||||
<rSIInPortMoniker name="//MAP2SEN_PREA2/In1" />
|
||||
<relativeChildShapes />
|
||||
</rSIInPortShape>
|
||||
</relativeChildShapes>
|
||||
<nestedChildShapes>
|
||||
<elementListCompartment Id="7d89209e-a1f3-419c-adb8-0e35873ed656" absoluteBounds="7.64, 5.26, 1.4700000000000002, 0.44169108072916663" name="RSIParameters" titleTextColor="Black" itemTextColor="Black" />
|
||||
</nestedChildShapes>
|
||||
</rSIElementShape>
|
||||
<rSIElementShape Id="5503b168-61f9-4f49-8927-96f08f1e9c41" absoluteBounds="7.625, 5.875, 1.5, 1.0516910807291664" fillColor="BlanchedAlmond">
|
||||
<rSIElementMoniker name="//MAP2SEN_PREA3" />
|
||||
<relativeChildShapes>
|
||||
<rSIInPortShape Id="7f989a9f-1089-415d-95c0-fb368c29ae62" absoluteBounds="7.2249999940395355, 6.125, 0.40000000596046448, 0.075000002980232239" fillColor="BlanchedAlmond">
|
||||
<rSIInPortMoniker name="//MAP2SEN_PREA3/In1" />
|
||||
<relativeChildShapes />
|
||||
</rSIInPortShape>
|
||||
</relativeChildShapes>
|
||||
<nestedChildShapes>
|
||||
<elementListCompartment Id="9c804fe1-3129-4d45-9c9d-1f5b2a50053f" absoluteBounds="7.64, 6.385, 1.4700000000000002, 0.44169108072916663" name="RSIParameters" titleTextColor="Black" itemTextColor="Black" />
|
||||
</nestedChildShapes>
|
||||
</rSIElementShape>
|
||||
<rSIElementShape Id="e7450d24-6af7-477a-ba73-8fe500a4a85b" absoluteBounds="3.875, 0.5, 1.5, 3.6750000029802323" fillColor="BlanchedAlmond">
|
||||
<rSIElementMoniker name="//ETHERNET1" />
|
||||
<relativeChildShapes>
|
||||
<rSIInPortShape Id="ac2744ae-aed2-4e75-a1bf-b67db46828e7" absoluteBounds="3.4749999940395355, 0.75, 0.40000000596046448, 0.075000002980232239" fillColor="White">
|
||||
<rSIInPortMoniker name="//ETHERNET1/In1" />
|
||||
<relativeChildShapes />
|
||||
</rSIInPortShape>
|
||||
<rSIOutPortShape Id="adc62a2b-f7c0-41e6-bf88-9887991ca59d" absoluteBounds="5.375, 0.75, 0.40000000596046448, 0.075000002980232239" fillColor="White">
|
||||
<rSIOutPortMoniker name="//ETHERNET1/Out1" />
|
||||
<relativeChildShapes />
|
||||
</rSIOutPortShape>
|
||||
<rSIInPortShape Id="4b4769d8-5d49-4354-94a8-60636ba6c231" absoluteBounds="3.4749999940395355, 1.15, 0.40000000596046448, 0.075000002980232239" fillColor="White">
|
||||
<rSIInPortMoniker name="//ETHERNET1/In2" />
|
||||
<relativeChildShapes />
|
||||
</rSIInPortShape>
|
||||
<rSIInPortShape Id="2c77593c-dc69-464e-96f9-6bca9c5bc821" absoluteBounds="3.4749999940395355, 1.55, 0.40000000596046448, 0.075000002980232239" fillColor="White">
|
||||
<rSIInPortMoniker name="//ETHERNET1/In3" />
|
||||
<relativeChildShapes />
|
||||
</rSIInPortShape>
|
||||
<rSIInPortShape Id="f4ee1154-9f4a-4d80-ae5a-3ba17aeb8d4c" absoluteBounds="3.4749999940395355, 1.9500000000000002, 0.40000000596046448, 0.075000002980232239" fillColor="White">
|
||||
<rSIInPortMoniker name="//ETHERNET1/In4" />
|
||||
<relativeChildShapes />
|
||||
</rSIInPortShape>
|
||||
<rSIInPortShape Id="56f5f47d-66ba-46d3-8fe0-21fbe373e7a5" absoluteBounds="3.4749999940395355, 2.35, 0.40000000596046448, 0.075000002980232239" fillColor="White">
|
||||
<rSIInPortMoniker name="//ETHERNET1/In5" />
|
||||
<relativeChildShapes />
|
||||
</rSIInPortShape>
|
||||
<rSIInPortShape Id="960dcca6-57a7-42c7-b375-d3c26de71133" absoluteBounds="3.4749999940395355, 2.75, 0.40000000596046448, 0.075000002980232239" fillColor="White">
|
||||
<rSIInPortMoniker name="//ETHERNET1/In6" />
|
||||
<relativeChildShapes />
|
||||
</rSIInPortShape>
|
||||
<rSIOutPortShape Id="875aaeb0-b602-46d7-a101-60f35a6c7169" absoluteBounds="5.375, 1.15, 0.40000000596046448, 0.075000002980232239" fillColor="White">
|
||||
<rSIOutPortMoniker name="//ETHERNET1/Out2" />
|
||||
<relativeChildShapes />
|
||||
</rSIOutPortShape>
|
||||
<rSIOutPortShape Id="5f2a1bb6-fc66-403e-9a06-c43d89c69d4f" absoluteBounds="5.375, 1.55, 0.40000000596046448, 0.075000002980232239" fillColor="White">
|
||||
<rSIOutPortMoniker name="//ETHERNET1/Out3" />
|
||||
<relativeChildShapes />
|
||||
</rSIOutPortShape>
|
||||
<rSIOutPortShape Id="ce7a4976-8bec-4a72-b34e-4ea3036ce377" absoluteBounds="5.375, 1.9500000000000002, 0.40000000596046448, 0.075000002980232239" fillColor="White">
|
||||
<rSIOutPortMoniker name="//ETHERNET1/Out4" />
|
||||
<relativeChildShapes />
|
||||
</rSIOutPortShape>
|
||||
<rSIOutPortShape Id="e74ddd91-20ff-40aa-b484-83c35d98943d" absoluteBounds="5.375, 2.35, 0.40000000596046448, 0.075000002980232239" fillColor="White">
|
||||
<rSIOutPortMoniker name="//ETHERNET1/Out5" />
|
||||
<relativeChildShapes />
|
||||
</rSIOutPortShape>
|
||||
<rSIOutPortShape Id="582de37e-8ef3-4894-af46-79c49125ae3d" absoluteBounds="5.375, 2.75, 0.40000000596046448, 0.075000002980232239" fillColor="White">
|
||||
<rSIOutPortMoniker name="//ETHERNET1/Out6" />
|
||||
<relativeChildShapes />
|
||||
</rSIOutPortShape>
|
||||
<rSIOutPortShape Id="d142aadd-5bc1-420e-973e-55ad6edc2fe4" absoluteBounds="5.375, 3.1500000000000004, 0.40000000596046448, 0.075000002980232239" fillColor="White">
|
||||
<rSIOutPortMoniker name="//ETHERNET1/Out7" />
|
||||
<relativeChildShapes />
|
||||
</rSIOutPortShape>
|
||||
<rSIOutPortShape Id="d6d6c32e-5b84-407b-8b34-dbd08ff78623" absoluteBounds="5.375, 3.5500000000000003, 0.40000000596046448, 0.075000002980232239" fillColor="White">
|
||||
<rSIOutPortMoniker name="//ETHERNET1/Out8" />
|
||||
<relativeChildShapes />
|
||||
</rSIOutPortShape>
|
||||
<rSIOutPortShape Id="bf0f5278-0013-41e0-98e5-731b3dbe4361" absoluteBounds="5.375, 3.95, 0.40000000596046448, 0.075000002980232239" fillColor="White">
|
||||
<rSIOutPortMoniker name="//ETHERNET1/Out9" />
|
||||
<relativeChildShapes />
|
||||
</rSIOutPortShape>
|
||||
</relativeChildShapes>
|
||||
<nestedChildShapes>
|
||||
<elementListCompartment Id="9e68dec1-35e2-4827-8a77-1b00acf56e99" absoluteBounds="3.89, 1.01, 1.4700000000000002, 1.0185953776041665" name="RSIParameters" titleTextColor="Black" itemTextColor="Black" />
|
||||
</nestedChildShapes>
|
||||
</rSIElementShape>
|
||||
<rSISignalConnector edgePoints="[(3.47499999403954 : 0.787500001490116); (2.40000000596046 : 0.787500001490116)]" fixedFrom="Caller" fixedTo="Caller" TargetRelationshipDomainClassId="e3f2b7da-330d-4daf-bd29-4d4ed734c0af">
|
||||
<nodes>
|
||||
<rSIInPortShapeMoniker Id="ac2744ae-aed2-4e75-a1bf-b67db46828e7" />
|
||||
<rSIOutPortShapeMoniker Id="474557ab-5f7d-4a14-b0ad-c75560df9f4a" />
|
||||
</nodes>
|
||||
</rSISignalConnector>
|
||||
<rSISignalConnector edgePoints="[(3.47499999403954 : 1.18750000149012); (2.63645832737287 : 1.18750000149012); (2.63645832737287 : 2.16250000149012); (2.40000000596046 : 2.16250000149012)]" manuallyRouted="true" fixedFrom="Caller" fixedTo="Caller" TargetRelationshipDomainClassId="e3f2b7da-330d-4daf-bd29-4d4ed734c0af">
|
||||
<nodes>
|
||||
<rSIInPortShapeMoniker Id="4b4769d8-5d49-4354-94a8-60636ba6c231" />
|
||||
<rSIOutPortShapeMoniker Id="8fa2fef2-6101-4922-822b-b6563509ad17" />
|
||||
</nodes>
|
||||
</rSISignalConnector>
|
||||
<rSISignalConnector edgePoints="[(3.47499999403954 : 1.58750000149012); (2.7510416607062 : 1.58750000149012); (2.7510416607062 : 3.41250000149012); (2.40000000596046 : 3.41250000149012)]" manuallyRouted="true" fixedFrom="Caller" fixedTo="Caller" TargetRelationshipDomainClassId="e3f2b7da-330d-4daf-bd29-4d4ed734c0af">
|
||||
<nodes>
|
||||
<rSIInPortShapeMoniker Id="2c77593c-dc69-464e-96f9-6bca9c5bc821" />
|
||||
<rSIOutPortShapeMoniker Id="312b81f3-be26-4fb6-8fee-cdc6b01ddc3b" />
|
||||
</nodes>
|
||||
</rSISignalConnector>
|
||||
<rSISignalConnector edgePoints="[(3.47499999403954 : 1.98750000149012); (2.86562499403954 : 1.98750000149012); (2.86562499403954 : 4.66250000149012); (2.40000000596046 : 4.66250000149012)]" manuallyRouted="true" fixedFrom="Caller" fixedTo="Caller" TargetRelationshipDomainClassId="e3f2b7da-330d-4daf-bd29-4d4ed734c0af">
|
||||
<nodes>
|
||||
<rSIInPortShapeMoniker Id="f4ee1154-9f4a-4d80-ae5a-3ba17aeb8d4c" />
|
||||
<rSIOutPortShapeMoniker Id="f1e5908a-b1f7-41e7-80fd-cc2e6aaa9f22" />
|
||||
</nodes>
|
||||
</rSISignalConnector>
|
||||
<rSISignalConnector edgePoints="[(3.47499999403954 : 2.38750000149012); (3.01145832737287 : 2.38750000149012); (3.01145832737287 : 6.03750000149012); (2.40000000596046 : 6.03750000149012)]" manuallyRouted="true" fixedFrom="Caller" fixedTo="Caller" TargetRelationshipDomainClassId="e3f2b7da-330d-4daf-bd29-4d4ed734c0af">
|
||||
<nodes>
|
||||
<rSIInPortShapeMoniker Id="56f5f47d-66ba-46d3-8fe0-21fbe373e7a5" />
|
||||
<rSIOutPortShapeMoniker Id="a6685103-4bbb-466a-9ec5-c74f0b2c1e2a" />
|
||||
</nodes>
|
||||
</rSISignalConnector>
|
||||
<rSISignalConnector edgePoints="[(7.22499999403954 : 0.787500001490116); (5.77500000596046 : 0.787500001490116)]" fixedFrom="Caller" fixedTo="Caller" TargetRelationshipDomainClassId="e3f2b7da-330d-4daf-bd29-4d4ed734c0af">
|
||||
<nodes>
|
||||
<rSIInPortShapeMoniker Id="1de90138-4698-4dcf-ae5d-8bfd44634aa1" />
|
||||
<rSIOutPortShapeMoniker Id="adc62a2b-f7c0-41e6-bf88-9887991ca59d" />
|
||||
</nodes>
|
||||
</rSISignalConnector>
|
||||
<rSISignalConnector edgePoints="[(7.22499999403954 : 1.18750000149012); (6.90208332737287 : 1.18750000149012 : JumpStart); (6.73541666070621 : 1.18750000149012 : JumpEnd); (5.77500000596046 : 1.18750000149012)]" fixedFrom="Caller" fixedTo="Caller" TargetRelationshipDomainClassId="e3f2b7da-330d-4daf-bd29-4d4ed734c0af">
|
||||
<nodes>
|
||||
<rSIInPortShapeMoniker Id="9329fc48-c453-4b2a-8566-b43b44a85176" />
|
||||
<rSIOutPortShapeMoniker Id="875aaeb0-b602-46d7-a101-60f35a6c7169" />
|
||||
</nodes>
|
||||
</rSISignalConnector>
|
||||
<rSISignalConnector edgePoints="[(7.22499999403954 : 1.58750000149012); (6.90208332737287 : 1.58750000149012 : JumpStart); (6.73541666070621 : 1.58750000149012 : JumpEnd); (6.7197916607062 : 1.58750000149012 : JumpStart); (6.55312499403954 : 1.58750000149012 : JumpEnd); (5.77500000596046 : 1.58750000149012)]" fixedFrom="Caller" fixedTo="Caller" TargetRelationshipDomainClassId="e3f2b7da-330d-4daf-bd29-4d4ed734c0af">
|
||||
<nodes>
|
||||
<rSIInPortShapeMoniker Id="61bf0fe8-2ce8-4fdc-a229-c4930e86f858" />
|
||||
<rSIOutPortShapeMoniker Id="5f2a1bb6-fc66-403e-9a06-c43d89c69d4f" />
|
||||
</nodes>
|
||||
</rSISignalConnector>
|
||||
<rSISignalConnector edgePoints="[(7.22499999403954 : 1.98750000149012); (6.90208332737287 : 1.98750000149012 : JumpStart); (6.73541666070621 : 1.98750000149012 : JumpEnd); (6.7197916607062 : 1.98750000149012 : JumpStart); (6.55312499403954 : 1.98750000149012 : JumpEnd); (6.55312499403953 : 1.98750000149012 : JumpStart); (6.38645832737287 : 1.98750000149012 : JumpEnd); (5.77500000596046 : 1.98750000149012)]" fixedFrom="Caller" fixedTo="Caller" TargetRelationshipDomainClassId="e3f2b7da-330d-4daf-bd29-4d4ed734c0af">
|
||||
<nodes>
|
||||
<rSIInPortShapeMoniker Id="ed64210b-8a9c-4ff9-a138-37c8ac8f3ff9" />
|
||||
<rSIOutPortShapeMoniker Id="ce7a4976-8bec-4a72-b34e-4ea3036ce377" />
|
||||
</nodes>
|
||||
</rSISignalConnector>
|
||||
<rSISignalConnector edgePoints="[(7.22499999403954 : 2.38750000149012); (6.90208332737287 : 2.38750000149012 : JumpStart); (6.73541666070621 : 2.38750000149012 : JumpEnd); (6.7197916607062 : 2.38750000149012 : JumpStart); (6.55312499403954 : 2.38750000149012 : JumpEnd); (6.55312499403953 : 2.38750000149012 : JumpStart); (6.38645832737287 : 2.38750000149012 : JumpEnd); (5.77500000596046 : 2.38750000149012)]" fixedFrom="Caller" fixedTo="Caller" TargetRelationshipDomainClassId="e3f2b7da-330d-4daf-bd29-4d4ed734c0af">
|
||||
<nodes>
|
||||
<rSIInPortShapeMoniker Id="d7a2b3a8-dcaa-4d99-9619-0f251d894e23" />
|
||||
<rSIOutPortShapeMoniker Id="e74ddd91-20ff-40aa-b484-83c35d98943d" />
|
||||
</nodes>
|
||||
</rSISignalConnector>
|
||||
<rSISignalConnector edgePoints="[(7.22499999403954 : 2.78750000149012); (6.90208332737287 : 2.78750000149012 : JumpStart); (6.73541666070621 : 2.78750000149012 : JumpEnd); (6.7197916607062 : 2.78750000149012 : JumpStart); (6.55312499403954 : 2.78750000149012 : JumpEnd); (6.55312499403953 : 2.78750000149012 : JumpStart); (6.38645832737287 : 2.78750000149012 : JumpEnd); (5.77500000596046 : 2.78750000149012)]" fixedFrom="Caller" fixedTo="Caller" TargetRelationshipDomainClassId="e3f2b7da-330d-4daf-bd29-4d4ed734c0af">
|
||||
<nodes>
|
||||
<rSIInPortShapeMoniker Id="10f03176-0037-4a78-aa82-800f285b30e3" />
|
||||
<rSIOutPortShapeMoniker Id="582de37e-8ef3-4894-af46-79c49125ae3d" />
|
||||
</nodes>
|
||||
</rSISignalConnector>
|
||||
<rSISignalConnector edgePoints="[(7.22499999403954 : 7.41250000149012); (6.1416666607062 : 7.41250000149012); (6.1416666607062 : 3.58750000149012); (5.77500000596046 : 3.58750000149012)]" manuallyRouted="true" fixedFrom="Caller" fixedTo="Caller" TargetRelationshipDomainClassId="e3f2b7da-330d-4daf-bd29-4d4ed734c0af">
|
||||
<nodes>
|
||||
<rSIInPortShapeMoniker Id="cde453ce-be8d-44b8-a671-c14010ed25c6" />
|
||||
<rSIOutPortShapeMoniker Id="d6d6c32e-5b84-407b-8b34-dbd08ff78623" />
|
||||
</nodes>
|
||||
</rSISignalConnector>
|
||||
<rSISignalConnector edgePoints="[(7.22499999403954 : 3.91250000149012); (6.81874999403954 : 3.91250000149012); (6.81874999403954 : 0.787500001490116); (5.77500000596046 : 0.787500001490116)]" manuallyRouted="true" fixedFrom="Caller" fixedTo="Caller" TargetRelationshipDomainClassId="e3f2b7da-330d-4daf-bd29-4d4ed734c0af">
|
||||
<nodes>
|
||||
<rSIInPortShapeMoniker Id="b9db9b1d-979e-461a-bf53-f41ec267c0c8" />
|
||||
<rSIOutPortShapeMoniker Id="adc62a2b-f7c0-41e6-bf88-9887991ca59d" />
|
||||
</nodes>
|
||||
</rSISignalConnector>
|
||||
<rSISignalConnector edgePoints="[(7.22499999403954 : 5.03750000149012); (6.63645832737287 : 5.03750000149012); (6.63645832737287 : 1.18750000149012); (5.77500000596046 : 1.18750000149012)]" manuallyRouted="true" fixedFrom="Caller" fixedTo="Caller" TargetRelationshipDomainClassId="e3f2b7da-330d-4daf-bd29-4d4ed734c0af">
|
||||
<nodes>
|
||||
<rSIInPortShapeMoniker Id="aef6ce81-606b-4cda-9f28-3aa6ba3b1b84" />
|
||||
<rSIOutPortShapeMoniker Id="875aaeb0-b602-46d7-a101-60f35a6c7169" />
|
||||
</nodes>
|
||||
</rSISignalConnector>
|
||||
<rSISignalConnector edgePoints="[(7.22499999403954 : 6.16250000149012); (6.4697916607062 : 6.16250000149012); (6.4697916607062 : 1.58750000149012); (5.77500000596046 : 1.58750000149012)]" manuallyRouted="true" fixedFrom="Caller" fixedTo="Caller" TargetRelationshipDomainClassId="e3f2b7da-330d-4daf-bd29-4d4ed734c0af">
|
||||
<nodes>
|
||||
<rSIInPortShapeMoniker Id="7f989a9f-1089-415d-95c0-fb368c29ae62" />
|
||||
<rSIOutPortShapeMoniker Id="5f2a1bb6-fc66-403e-9a06-c43d89c69d4f" />
|
||||
</nodes>
|
||||
</rSISignalConnector>
|
||||
</nestedChildShapes>
|
||||
</rSIObjectDiagram>
|
||||
103
RSI Config Files/RSI Network/RSI_Ethernet.rsi.xml
Normal file
103
RSI Config Files/RSI Network/RSI_Ethernet.rsi.xml
Normal file
@ -0,0 +1,103 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<RSIObjects xsi:noNamespaceSchemaLocation="/Roboter/Config/System/Common/Schemes/RSIContext.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<RSIObject ObjType="DIGIN" ObjTypeID="29" ObjID="DIGIN1">
|
||||
<Parameters>
|
||||
<Parameter Name="Index" ParamID="1" ParamValue="1" />
|
||||
<Parameter Name="DataSize" ParamID="2" ParamValue="2" />
|
||||
</Parameters>
|
||||
</RSIObject>
|
||||
<RSIObject ObjType="DIGOUT" ObjTypeID="43" ObjID="DIGOUT1">
|
||||
<Parameters>
|
||||
<Parameter Name="Index" ParamID="1" ParamValue="1" />
|
||||
<Parameter Name="DataSize" ParamID="2" ParamValue="0" />
|
||||
</Parameters>
|
||||
</RSIObject>
|
||||
<RSIObject ObjType="DIGOUT" ObjTypeID="43" ObjID="DIGOUT2">
|
||||
<Parameters>
|
||||
<Parameter Name="Index" ParamID="1" ParamValue="2" />
|
||||
<Parameter Name="DataSize" ParamID="2" ParamValue="0" />
|
||||
</Parameters>
|
||||
</RSIObject>
|
||||
<RSIObject ObjType="DIGOUT" ObjTypeID="43" ObjID="DIGOUT3">
|
||||
<Parameters>
|
||||
<Parameter Name="Index" ParamID="1" ParamValue="3" />
|
||||
<Parameter Name="DataSize" ParamID="2" ParamValue="0" />
|
||||
</Parameters>
|
||||
</RSIObject>
|
||||
<RSIObject ObjType="SOURCE" ObjTypeID="45" ObjID="SOURCE1">
|
||||
<Parameters>
|
||||
<Parameter Name="Type" ParamID="1" ParamValue="1" />
|
||||
<Parameter Name="Offset" ParamID="2" ParamValue="0" />
|
||||
<Parameter Name="Amplitude" ParamID="3" ParamValue="50" />
|
||||
<Parameter Name="Period" ParamID="4" ParamValue="5" />
|
||||
</Parameters>
|
||||
</RSIObject>
|
||||
<RSIObject ObjType="POSCORR" ObjTypeID="27" ObjID="POSCORR1">
|
||||
<Inputs>
|
||||
<Input InIdx="1" OutObjID="ETHERNET1" OutIdx="1" />
|
||||
<Input InIdx="2" OutObjID="ETHERNET1" OutIdx="2" />
|
||||
<Input InIdx="3" OutObjID="ETHERNET1" OutIdx="3" />
|
||||
<Input InIdx="4" OutObjID="ETHERNET1" OutIdx="4" />
|
||||
<Input InIdx="5" OutObjID="ETHERNET1" OutIdx="5" />
|
||||
<Input InIdx="6" OutObjID="ETHERNET1" OutIdx="6" />
|
||||
</Inputs>
|
||||
<Parameters>
|
||||
<Parameter Name="LowerLimX" ParamID="1" ParamValue="-50" />
|
||||
<Parameter Name="LowerLimY" ParamID="2" ParamValue="-50" />
|
||||
<Parameter Name="LowerLimZ" ParamID="3" ParamValue="-50" />
|
||||
<Parameter Name="UpperLimX" ParamID="4" ParamValue="50" />
|
||||
<Parameter Name="UpperLimY" ParamID="5" ParamValue="50" />
|
||||
<Parameter Name="UpperLimZ" ParamID="6" ParamValue="50" />
|
||||
<Parameter Name="MaxRotAngle" ParamID="7" ParamValue="50" />
|
||||
<Parameter Name="RefCorrSys" ParamID="1" ParamValue="1" IsRuntime="false" />
|
||||
</Parameters>
|
||||
</RSIObject>
|
||||
<RSIObject ObjType="MAP2DIGOUT" ObjTypeID="14" ObjID="MAP2DIGOUT1">
|
||||
<Inputs>
|
||||
<Input InIdx="1" OutObjID="ETHERNET1" OutIdx="8" />
|
||||
</Inputs>
|
||||
<Parameters>
|
||||
<Parameter Name="Index" ParamID="1" ParamValue="20" />
|
||||
<Parameter Name="DataSize" ParamID="2" ParamValue="2" />
|
||||
</Parameters>
|
||||
</RSIObject>
|
||||
<RSIObject ObjType="MAP2SEN_PREA" ObjTypeID="17" ObjID="MAP2SEN_PREA1">
|
||||
<Inputs>
|
||||
<Input InIdx="1" OutObjID="ETHERNET1" OutIdx="1" />
|
||||
</Inputs>
|
||||
<Parameters>
|
||||
<Parameter Name="Index" ParamID="1" ParamValue="1" />
|
||||
</Parameters>
|
||||
</RSIObject>
|
||||
<RSIObject ObjType="MAP2SEN_PREA" ObjTypeID="17" ObjID="MAP2SEN_PREA2">
|
||||
<Inputs>
|
||||
<Input InIdx="1" OutObjID="ETHERNET1" OutIdx="2" />
|
||||
</Inputs>
|
||||
<Parameters>
|
||||
<Parameter Name="Index" ParamID="1" ParamValue="2" />
|
||||
</Parameters>
|
||||
</RSIObject>
|
||||
<RSIObject ObjType="MAP2SEN_PREA" ObjTypeID="17" ObjID="MAP2SEN_PREA3">
|
||||
<Inputs>
|
||||
<Input InIdx="1" OutObjID="ETHERNET1" OutIdx="3" />
|
||||
</Inputs>
|
||||
<Parameters>
|
||||
<Parameter Name="Index" ParamID="1" ParamValue="3" />
|
||||
</Parameters>
|
||||
</RSIObject>
|
||||
<RSIObject ObjType="ETHERNET" ObjTypeID="64" ObjID="ETHERNET1">
|
||||
<Inputs>
|
||||
<Input InIdx="1" OutObjID="DIGIN1" OutIdx="1" />
|
||||
<Input InIdx="2" OutObjID="DIGOUT1" OutIdx="1" />
|
||||
<Input InIdx="3" OutObjID="DIGOUT2" OutIdx="1" />
|
||||
<Input InIdx="4" OutObjID="DIGOUT3" OutIdx="1" />
|
||||
<Input InIdx="5" OutObjID="SOURCE1" OutIdx="1" />
|
||||
</Inputs>
|
||||
<Parameters>
|
||||
<Parameter Name="ConfigFile" ParamID="1" ParamValue="RSI_EthernetConfig.xml" IsRuntime="false" />
|
||||
<Parameter Name="Timeout" ParamID="1" ParamValue="100" />
|
||||
<Parameter Name="Flag" ParamID="4" ParamValue="1" />
|
||||
<Parameter Name="Precision" ParamID="8" ParamValue="1" />
|
||||
</Parameters>
|
||||
</RSIObject>
|
||||
</RSIObjects>
|
||||
42
RSI Config Files/RSI Network/RSI_EthernetConfig.xml
Normal file
42
RSI Config Files/RSI Network/RSI_EthernetConfig.xml
Normal file
@ -0,0 +1,42 @@
|
||||
<ROOT>
|
||||
<CONFIG>
|
||||
<IP_NUMBER>10.10.10.10</IP_NUMBER> <!-- IP-number of the external socket -->
|
||||
<PORT>64000</PORT> <!-- Port-number of the external socket -->
|
||||
<SENTYPE>ImFree</SENTYPE> <!-- The name of your system send in <Sen Type="" > -->
|
||||
<ONLYSEND>FALSE</ONLYSEND> <!-- TRUE means the client don't expect answers. Do not send anything to robot -->
|
||||
</CONFIG>
|
||||
<!-- RSI Data: TYPE= "BOOL", "STRING", "LONG", "DOUBLE" -->
|
||||
<!-- INDX= "INTERNAL" switch on internal read values. Needed by DEF_... -->
|
||||
<!-- INDX= "nmb" Input/Output index of RSI-Object / Maximum of RSI Channels: 64 -->
|
||||
<!-- HOLDON="1", set this output index of RSI Object to the last value -->
|
||||
<!-- DEF_Delay count the late packages and send it back to server -->
|
||||
<!-- DEF_Tech: .T = advance .C = main run / .T1 advance set function generator 1 -->
|
||||
|
||||
<SEND>
|
||||
<ELEMENTS>
|
||||
<ELEMENT TAG="DEF_RIst" TYPE="DOUBLE" INDX="INTERNAL" />
|
||||
<ELEMENT TAG="DEF_RSol" TYPE="DOUBLE" INDX="INTERNAL" />
|
||||
<ELEMENT TAG="DEF_Delay" TYPE="LONG" INDX="INTERNAL" />
|
||||
<ELEMENT TAG="DEF_Tech.C1" TYPE="DOUBLE" INDX="INTERNAL" />
|
||||
<ELEMENT TAG="DiL" TYPE="LONG" INDX="1" />
|
||||
<ELEMENT TAG="Digout.o1" TYPE="BOOL" INDX="2" />
|
||||
<ELEMENT TAG="Digout.o2" TYPE="BOOL" INDX="3" />
|
||||
<ELEMENT TAG="Digout.o3" TYPE="BOOL" INDX="4" />
|
||||
<ELEMENT TAG="Source1" TYPE="DOUBLE" INDX="5" />
|
||||
</ELEMENTS>
|
||||
</SEND>
|
||||
<RECEIVE>
|
||||
<ELEMENTS>
|
||||
<ELEMENT TAG="DEF_EStr" TYPE="STRING" INDX="INTERNAL" />
|
||||
<ELEMENT TAG="DEF_Tech.T2" TYPE="DOUBLE" INDX="INTERNAL" HOLDON="0" />
|
||||
<ELEMENT TAG="RKorr.X" TYPE="DOUBLE" INDX="1" HOLDON="1" />
|
||||
<ELEMENT TAG="RKorr.Y" TYPE="DOUBLE" INDX="2" HOLDON="1" />
|
||||
<ELEMENT TAG="RKorr.Z" TYPE="DOUBLE" INDX="3" HOLDON="1" />
|
||||
<ELEMENT TAG="RKorr.A" TYPE="DOUBLE" INDX="4" HOLDON="1" />
|
||||
<ELEMENT TAG="RKorr.B" TYPE="DOUBLE" INDX="5" HOLDON="1" />
|
||||
<ELEMENT TAG="RKorr.C" TYPE="DOUBLE" INDX="6" HOLDON="1" />
|
||||
<ELEMENT TAG="FREE" TYPE="LONG" INDX="7" HOLDON="1" />
|
||||
<ELEMENT TAG="DiO" TYPE="LONG" INDX="8" HOLDON="1" />
|
||||
</ELEMENTS>
|
||||
</RECEIVE>
|
||||
</ROOT>
|
||||
53
src/RSIPI/cli.py
Normal file
53
src/RSIPI/cli.py
Normal file
@ -0,0 +1,53 @@
|
||||
import sys
|
||||
import time
|
||||
from src.RSIPI.rsi_api import RSIAPI
|
||||
|
||||
class RSICommandLineInterface:
|
||||
"""Command-Line Interface for controlling RSI Client."""
|
||||
|
||||
def __init__(self, config_file):
|
||||
"""Initialize CLI with an RSI API instance."""
|
||||
self.api = RSIAPI(config_file)
|
||||
self.running = True
|
||||
|
||||
def run(self):
|
||||
"""Starts the CLI interaction loop."""
|
||||
print("✅ RSI Command-Line Interface Started. Type 'help' for commands.")
|
||||
while self.running:
|
||||
command = input("RSI> ").strip().lower()
|
||||
self.process_command(command)
|
||||
|
||||
def process_command(self, command):
|
||||
"""Processes user input commands."""
|
||||
parts = command.split()
|
||||
if not parts:
|
||||
return
|
||||
|
||||
cmd = parts[0]
|
||||
|
||||
if cmd == "start":
|
||||
self.api.start()
|
||||
elif cmd == "stop":
|
||||
self.api.stop()
|
||||
elif cmd == "exit":
|
||||
self.api.stop()
|
||||
self.running = False
|
||||
elif cmd == "help":
|
||||
self.show_help()
|
||||
else:
|
||||
print("❌ Unknown command. Type 'help' for a list of commands.")
|
||||
|
||||
def show_help(self):
|
||||
"""Displays the list of available commands."""
|
||||
print("""
|
||||
Available Commands:
|
||||
start - Start the RSI client in the background
|
||||
stop - Stop the RSI client
|
||||
exit - Stop RSI and exit CLI
|
||||
help - Show this command list
|
||||
""")
|
||||
|
||||
if __name__ == "__main__":
|
||||
config_file = "RSI_EthernetConfig.xml"
|
||||
cli = RSICommandLineInterface(config_file)
|
||||
cli.run()
|
||||
138
src/RSIPI/config_parser.py
Normal file
138
src/RSIPI/config_parser.py
Normal file
@ -0,0 +1,138 @@
|
||||
import xml.etree.ElementTree as ET
|
||||
import logging
|
||||
|
||||
class ConfigParser:
|
||||
"""Handles parsing the RSI config file and generating structured send/receive variables."""
|
||||
|
||||
def __init__(self, config_file):
|
||||
"""Initialize with the configuration file and process send/receive structures."""
|
||||
self.config_file = config_file
|
||||
self.internal_structure = {
|
||||
"ComStatus": "String",
|
||||
"RIst": {"X": 0, "Y": 0, "Z": 0, "A": 0, "B": 0, "C": 0},
|
||||
"RSol": {"X": 0, "Y": 0, "Z": 0, "A": 0, "B": 0, "C": 0},
|
||||
"ASPos": {"A1": 0, "A2": 0, "A3": 0, "A4": 0, "A5": 0, "A6": 0},
|
||||
"ELPos": {"E1": 0, "E2": 0, "E3": 0, "E4": 0, "E5": 0, "E6": 0},
|
||||
"ESPos": {"E1": 0, "E2": 0, "E3": 0, "E4": 0, "E5": 0, "E6": 0},
|
||||
"MaCur": {"A1": 0, "A2": 0, "A3": 0, "A4": 0, "A5": 0, "A6": 0},
|
||||
"MECur": {"E1": 0, "E2": 0, "E3": 0, "E4": 0, "E5": 0, "E6": 0},
|
||||
"IPOC": 0,
|
||||
"BMode": "Status",
|
||||
"IPOSTAT": "",
|
||||
"Delay": {"D": 0},
|
||||
"EStr": "EStr Test",
|
||||
"Tech.T2": {"T21": 0, "T22": 0, "T23": 0, "T24": 0, "T25": 0, "T26": 0, "T27": 0, "T28": 0, "T29": 0, "T210": 0},
|
||||
"RKorr": {"X": 0, "Y": 0, "Z": 0, "A": 0, "B": 0, "C": 0}
|
||||
}
|
||||
self.network_settings = {}
|
||||
self.receive_variables,self.send_variables = self.process_config()
|
||||
|
||||
# ✅ Rename Tech.XX keys to Tech in send and receive variables at the last step
|
||||
self.rename_tech_keys(self.send_variables)
|
||||
self.rename_tech_keys(self.receive_variables)
|
||||
|
||||
# ✅ Ensure IPOC is always present in send variables
|
||||
if "IPOC" not in self.send_variables:
|
||||
self.send_variables.update({"IPOC": 0})
|
||||
|
||||
print(f"✅ Final Send Variables: {self.send_variables}")
|
||||
print(f"✅ Final Receive Variables: {self.receive_variables}")
|
||||
|
||||
def process_config(self):
|
||||
"""Parse the config file and create structured send and receive variables."""
|
||||
send_vars = {}
|
||||
receive_vars = {}
|
||||
|
||||
try:
|
||||
tree = ET.parse(self.config_file)
|
||||
root = tree.getroot()
|
||||
|
||||
# ✅ Extract network settings
|
||||
config = root.find("CONFIG")
|
||||
self.network_settings = {
|
||||
"ip": config.find("IP_NUMBER").text.strip(),
|
||||
"port": int(config.find("PORT").text.strip()),
|
||||
"sentype": config.find("SENTYPE").text.strip(),
|
||||
"onlysend": config.find("ONLYSEND").text.strip().upper() == "TRUE",
|
||||
}
|
||||
|
||||
# ✅ Parse SEND section (values received from RSI)
|
||||
send_section = root.find("SEND/ELEMENTS")
|
||||
for element in send_section.findall("ELEMENT"):
|
||||
tag = element.get("TAG").replace("DEF_", "")
|
||||
indx = element.get("INDX", "")
|
||||
var_type = element.get("TYPE", "")
|
||||
print(f"🔍 Processing SEND: {tag} | INDX: {indx} | TYPE: {var_type}")
|
||||
if tag != "FREE":
|
||||
self.process_variable_structure(send_vars, tag, var_type, indx)
|
||||
|
||||
# ✅ Parse RECEIVE section (values sent to RSI)
|
||||
receive_section = root.find("RECEIVE/ELEMENTS")
|
||||
for element in receive_section.findall("ELEMENT"):
|
||||
tag = element.get("TAG").replace("DEF_", "")
|
||||
indx = element.get("INDX", "")
|
||||
var_type = element.get("TYPE", "")
|
||||
print(f"🔍 Processing RECEIVE: {tag} | INDX: {indx} | TYPE: {var_type}")
|
||||
if tag != "FREE":
|
||||
self.process_variable_structure(receive_vars, tag, var_type, indx)
|
||||
|
||||
logging.info("✅ Config processed successfully.")
|
||||
except Exception as e:
|
||||
logging.error(f"❌ Error processing config file: {e}")
|
||||
|
||||
# ✅ Ensure IPOC is always in send variables
|
||||
if "IPOC" not in send_vars:
|
||||
send_vars["IPOC"] = 0
|
||||
|
||||
print(f"✅ Processed Send Variables: {send_vars}")
|
||||
print(f"✅ Processed Receive Variables: {receive_vars}")
|
||||
return send_vars, receive_vars
|
||||
|
||||
def process_variable_structure(self, var_dict, tag, var_type, indx=""):
|
||||
"""Handles structured and simple variables based on internal structure and TYPE attribute."""
|
||||
tag = tag.replace("DEF_", "") # ✅ Strip "DEF_" prefix
|
||||
|
||||
print(f"🔍 Assigning {tag}: INDX={indx}, TYPE={var_type}")
|
||||
|
||||
if indx == "INTERNAL":
|
||||
if tag in self.internal_structure:
|
||||
internal_value = self.internal_structure[tag]
|
||||
var_dict[tag] = internal_value.copy() if isinstance(internal_value, dict) else internal_value
|
||||
print(f"✅ INTERNAL Match: {tag} -> {var_dict[tag]}")
|
||||
else:
|
||||
print(f"❌ INTERNAL variable '{tag}' not found in internal dictionary.")
|
||||
elif "." in tag: # ✅ Handle elements in the format XXX.ZZ
|
||||
parent, subkey = tag.split(".", 1)
|
||||
if parent not in var_dict:
|
||||
var_dict[parent] = {} # ✅ Create parent dictionary if not exists
|
||||
var_dict[parent][subkey] = self.get_default_value(var_type)
|
||||
print(f"📂 Assigned '{tag}' as nested dictionary under '{parent}': {var_dict[parent]}")
|
||||
else:
|
||||
var_dict[tag] = self.get_default_value(var_type)
|
||||
print(f"📄 Assigned Standard Value: '{tag}' -> {var_dict[tag]}")
|
||||
|
||||
def rename_tech_keys(self, var_dict):
|
||||
"""Rename Tech.XX keys to Tech in send and receive variables at the last step."""
|
||||
tech_data = {}
|
||||
for key in list(var_dict.keys()):
|
||||
if key.startswith("Tech."):
|
||||
tech_data.update(var_dict.pop(key)) # ✅ Merge all Tech.XX keys into Tech
|
||||
if tech_data:
|
||||
var_dict["Tech"] = tech_data # ✅ Store under Tech
|
||||
print(f"✅ Renamed Tech.XX keys to 'Tech': {var_dict['Tech']}")
|
||||
|
||||
def get_default_value(self, var_type):
|
||||
"""Returns a default value based on TYPE."""
|
||||
if var_type == "BOOL":
|
||||
return False
|
||||
elif var_type == "STRING":
|
||||
return ""
|
||||
elif var_type == "LONG":
|
||||
return 0
|
||||
elif var_type == "DOUBLE":
|
||||
return 0.0
|
||||
return None # Unknown type fallback
|
||||
|
||||
def get_network_settings(self):
|
||||
"""Return the extracted network settings."""
|
||||
return self.network_settings
|
||||
137
src/RSIPI/echo_server.py
Normal file
137
src/RSIPI/echo_server.py
Normal file
@ -0,0 +1,137 @@
|
||||
import sys
|
||||
import os
|
||||
import socket
|
||||
import time
|
||||
import xml.etree.ElementTree as ET
|
||||
import logging
|
||||
import threading
|
||||
|
||||
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "..")))
|
||||
|
||||
from src.RSIPI.rsi_config import RSIConfig
|
||||
|
||||
# ✅ Configure Logging
|
||||
LOGGING_ENABLED = True
|
||||
|
||||
if LOGGING_ENABLED:
|
||||
logging.basicConfig(
|
||||
filename="echo_server.log",
|
||||
level=logging.DEBUG,
|
||||
format="%(asctime)s [%(levelname)s] %(message)s",
|
||||
datefmt="%Y-%m-%d %H:%M:%S"
|
||||
)
|
||||
|
||||
class EchoServer:
|
||||
"""A UDP echo server that sends test messages to the RSI client and logs received messages."""
|
||||
|
||||
def __init__(self, config_file, delay_ms=4):
|
||||
self.config = RSIConfig(config_file)
|
||||
network_settings = self.config.get_network_settings()
|
||||
|
||||
self.server_address = ("0.0.0.0", 50000)
|
||||
self.client_address = ("127.0.0.1", network_settings["port"])
|
||||
self.udp_socket = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
|
||||
self.udp_socket.bind(self.server_address)
|
||||
|
||||
self.ipoc_value = 123456
|
||||
self.delay_ms = delay_ms / 1000 # Convert milliseconds to seconds
|
||||
|
||||
self.send_variables = self.config.get_send_variables()
|
||||
self.receive_variables = self.config.get_receive_variables()
|
||||
|
||||
self.running = True # ✅ Control flag for graceful shutdown
|
||||
self.thread = threading.Thread(target=self.send_message, daemon=True)
|
||||
|
||||
logging.info(f"✅ Echo Server started on {self.server_address}")
|
||||
logging.info(f"📡 Sending messages to RSI Client on port {network_settings['port']}")
|
||||
logging.info(f"⏳ Message delay set to {delay_ms}ms")
|
||||
print("✅ Echo Server Started")
|
||||
print(f"📡 Sending messages to RSI Client on port {network_settings['port']}")
|
||||
|
||||
def generate_message(self):
|
||||
"""Generate a properly formatted RSI message dynamically based on the config file."""
|
||||
root = ET.Element("Rob", Type="KUKA") # ✅ Correct root element
|
||||
|
||||
for tag, value in self.send_variables.items():
|
||||
if isinstance(value, dict):
|
||||
element = ET.SubElement(root, tag.split(".")[0]) # Create main element
|
||||
for sub_key, sub_value in value.items():
|
||||
if isinstance(sub_value, bool):
|
||||
sub_value = int(sub_value) # Convert booleans to 0/1
|
||||
element.set(sub_key, f"{sub_value:.1f}" if isinstance(sub_value, float) else str(sub_value))
|
||||
else:
|
||||
element = ET.SubElement(root, tag)
|
||||
if isinstance(value, bool):
|
||||
value = int(value) # Convert booleans to 0/1
|
||||
element.text = f"{value:.1f}" if isinstance(value, float) else str(value)
|
||||
|
||||
ET.SubElement(root, "IPOC").text = str(self.ipoc_value)
|
||||
|
||||
message = ET.tostring(root, encoding="utf-8").decode()
|
||||
logging.debug(f"📤 Sent XML Message:\n{message}")
|
||||
print(f"📤 Sent XML Message:\n{message}")
|
||||
return message
|
||||
|
||||
def send_message(self):
|
||||
"""Send messages every 4ms or 12ms without waiting for a response."""
|
||||
while self.running:
|
||||
try:
|
||||
message = self.generate_message()
|
||||
logging.debug(f"📡 Sending message to RSI client with IPOC={self.ipoc_value}...")
|
||||
print(f"📡 Sending message to RSI client with IPOC={self.ipoc_value}...")
|
||||
self.udp_socket.sendto(message.encode(), self.client_address) # ✅ Send without waiting
|
||||
|
||||
# ✅ Attempt to receive a response
|
||||
self.udp_socket.settimeout(self.delay_ms)
|
||||
try:
|
||||
response, addr = self.udp_socket.recvfrom(1024)
|
||||
received_message = response.decode()
|
||||
|
||||
logging.debug(f"📩 Received XML Message:\n{received_message}")
|
||||
print(f"📩 Received XML Message:\n{received_message}")
|
||||
|
||||
except socket.timeout:
|
||||
print("⚠️ No response received before next send cycle.")
|
||||
|
||||
time.sleep(self.delay_ms) # ✅ Apply user-defined delay (4ms or 12ms)
|
||||
self.increment_ipoc() # ✅ Increment IPOC for next message
|
||||
|
||||
except ConnectionResetError:
|
||||
logging.warning("⚠️ RSI Client is not responding. Retrying...")
|
||||
print("⚠️ RSI Client is not responding. Retrying in 2 seconds...")
|
||||
time.sleep(2) # ✅ Instead of crashing, wait and retry
|
||||
|
||||
except Exception as e:
|
||||
logging.error(f"❌ Unexpected error: {e}")
|
||||
print(f"❌ Unexpected error: {e}")
|
||||
|
||||
def increment_ipoc(self):
|
||||
"""Increment the IPOC value by 4 milliseconds for the next message."""
|
||||
self.ipoc_value += 4
|
||||
logging.debug(f"🔄 IPOC incremented to {self.ipoc_value}")
|
||||
print(f"🔄 IPOC incremented to {self.ipoc_value}")
|
||||
|
||||
def start(self):
|
||||
"""Start the Echo Server message loop in a separate thread."""
|
||||
self.running = True
|
||||
self.thread.start()
|
||||
|
||||
def stop(self):
|
||||
"""Gracefully stop the Echo Server."""
|
||||
print("🛑 Stopping Echo Server...")
|
||||
logging.info("🛑 Stopping Echo Server...")
|
||||
self.running = False # ✅ Stop the loop
|
||||
self.thread.join() # ✅ Wait for the thread to finish
|
||||
self.udp_socket.close() # ✅ Close the socket
|
||||
logging.info("✅ Echo Server Stopped")
|
||||
print("✅ Echo Server Stopped")
|
||||
|
||||
if __name__ == "__main__":
|
||||
config_file = "RSI_EthernetConfig.xml"
|
||||
echo_server = EchoServer(config_file, delay_ms=4)
|
||||
try:
|
||||
echo_server.start()
|
||||
while True:
|
||||
time.sleep(1) # Keep main thread alive
|
||||
except KeyboardInterrupt:
|
||||
echo_server.stop()
|
||||
121
src/RSIPI/graphing.py
Normal file
121
src/RSIPI/graphing.py
Normal file
@ -0,0 +1,121 @@
|
||||
import time
|
||||
import logging
|
||||
import pandas as pd
|
||||
import matplotlib.pyplot as plt
|
||||
import matplotlib.animation as animation
|
||||
|
||||
# ✅ Configure Logging for Graphing Module
|
||||
LOGGING_ENABLED = True
|
||||
|
||||
if LOGGING_ENABLED:
|
||||
logging.basicConfig(
|
||||
filename="graphing.log",
|
||||
level=logging.DEBUG,
|
||||
format="%(asctime)s [%(levelname)s] %(message)s",
|
||||
datefmt="%d-%m-%Y %H:%M:%S"
|
||||
)
|
||||
|
||||
class RSIGraphing:
|
||||
"""Handles real-time and CSV-based graphing for RSI analysis."""
|
||||
|
||||
def __init__(self, csv_file=None):
|
||||
"""Initialize graphing for real-time plotting or CSV replay."""
|
||||
self.csv_file = csv_file
|
||||
self.fig, self.ax = plt.subplots(1, 2, figsize=(12, 5)) # ✅ Two subplots: Time-Series & X-Y Trajectory
|
||||
|
||||
# ✅ Titles and Labels
|
||||
self.ax[0].set_title("Real-Time Position Tracking")
|
||||
self.ax[0].set_xlabel("Time")
|
||||
self.ax[0].set_ylabel("Position (mm)")
|
||||
self.ax[1].set_title("2D Trajectory (X-Y)")
|
||||
self.ax[1].set_xlabel("X Position")
|
||||
self.ax[1].set_ylabel("Y Position")
|
||||
|
||||
# ✅ Data storage for plotting
|
||||
self.time_data = []
|
||||
self.x_data, self.y_data, self.z_data = [], [], []
|
||||
self.actual_x, self.actual_y, self.actual_z = [], [], []
|
||||
self.trajectory_x, self.trajectory_y = [], []
|
||||
|
||||
self.plot_mode = "TCP" # ✅ Toggle between "TCP" and "Joints"
|
||||
|
||||
if csv_file:
|
||||
self.load_csv_log(csv_file)
|
||||
self.plot_csv_data()
|
||||
else:
|
||||
self.ani = animation.FuncAnimation(self.fig, self.update_graph, interval=500, save_count=100)
|
||||
|
||||
plt.show()
|
||||
|
||||
def update_graph(self, frame):
|
||||
"""Update the live graph with new position data."""
|
||||
timestamp = time.strftime("%H:%M:%S")
|
||||
self.time_data.append(timestamp)
|
||||
|
||||
# ✅ Simulated Data for Testing (Replace with real-time data)
|
||||
self.x_data.append(len(self.time_data) * 10)
|
||||
self.y_data.append(len(self.time_data) * 5)
|
||||
self.z_data.append(len(self.time_data) * 2)
|
||||
|
||||
self.actual_x.append(len(self.time_data) * 9.8)
|
||||
self.actual_y.append(len(self.time_data) * 4.9)
|
||||
self.actual_z.append(len(self.time_data) * 1.8)
|
||||
|
||||
# ✅ 2D Trajectory (X-Y)
|
||||
self.trajectory_x.append(len(self.time_data) * 9.8)
|
||||
self.trajectory_y.append(len(self.time_data) * 4.9)
|
||||
|
||||
# ✅ Clear and replot data
|
||||
self.ax[0].clear()
|
||||
self.ax[0].plot(self.time_data, self.x_data, label="Planned X", linestyle="dashed")
|
||||
self.ax[0].plot(self.time_data, self.y_data, label="Planned Y", linestyle="dashed")
|
||||
self.ax[0].plot(self.time_data, self.z_data, label="Planned Z", linestyle="dashed")
|
||||
|
||||
self.ax[0].plot(self.time_data, self.actual_x, label="Actual X", marker="o")
|
||||
self.ax[0].plot(self.time_data, self.actual_y, label="Actual Y", marker="o")
|
||||
self.ax[0].plot(self.time_data, self.actual_z, label="Actual Z", marker="o")
|
||||
|
||||
self.ax[0].legend()
|
||||
self.ax[0].set_title(f"Real-Time {self.plot_mode} Position")
|
||||
self.ax[0].set_xlabel("Time")
|
||||
self.ax[0].set_ylabel("Position (mm)")
|
||||
|
||||
# ✅ 2D Trajectory (X-Y)
|
||||
self.ax[1].clear()
|
||||
self.ax[1].plot(self.trajectory_x, self.trajectory_y, label="Actual Path", marker="o")
|
||||
self.ax[1].set_title("2D Trajectory (X-Y)")
|
||||
self.ax[1].set_xlabel("X Position")
|
||||
self.ax[1].set_ylabel("Y Position")
|
||||
self.ax[1].legend()
|
||||
|
||||
def load_csv_log(self, filename):
|
||||
"""Load a CSV log and replay motion."""
|
||||
df = pd.read_csv(filename)
|
||||
self.time_data = df["Timestamp"].tolist()
|
||||
self.trajectory_x = df["Receive.RIst.X"].tolist()
|
||||
self.trajectory_y = df["Receive.RIst.Y"].tolist()
|
||||
|
||||
logging.info(f"Loaded CSV log: {filename}")
|
||||
|
||||
def plot_csv_data(self):
|
||||
"""Plot data from a CSV file for post-analysis."""
|
||||
plt.figure(figsize=(10, 5))
|
||||
plt.plot(self.trajectory_x, self.trajectory_y, label="Planned Path", linestyle="dashed")
|
||||
plt.scatter(self.trajectory_x, self.trajectory_y, color='red', label="Actual Path", marker="o")
|
||||
plt.title("CSV Replay: 2D Trajectory (X-Y)")
|
||||
plt.xlabel("X Position")
|
||||
plt.ylabel("Y Position")
|
||||
plt.legend()
|
||||
plt.show()
|
||||
|
||||
if __name__ == "__main__":
|
||||
import argparse
|
||||
|
||||
parser = argparse.ArgumentParser(description="RSI Graphing Utility")
|
||||
parser.add_argument("--csv", help="Path to CSV file for replay mode", type=str)
|
||||
args = parser.parse_args()
|
||||
|
||||
if args.csv:
|
||||
RSIGraphing(csv_file=args.csv)
|
||||
else:
|
||||
RSIGraphing() # Run in live mode if no CSV is provided
|
||||
11
src/RSIPI/main.py
Normal file
11
src/RSIPI/main.py
Normal file
@ -0,0 +1,11 @@
|
||||
from src.RSIPI.rsi_client import RSIClient
|
||||
import rsi_api
|
||||
from time import sleep
|
||||
|
||||
if __name__ == "__main__":
|
||||
config_file = "RSI_EthernetConfig.xml" # Ensure this file exists in the working directory
|
||||
client = RSIClient(config_file)
|
||||
client.start()
|
||||
sleep(5)
|
||||
# client.update_variable("EStr", "Testing 123 Testing")
|
||||
print("done")
|
||||
106
src/RSIPI/network_process.py
Normal file
106
src/RSIPI/network_process.py
Normal file
@ -0,0 +1,106 @@
|
||||
import multiprocessing
|
||||
import socket
|
||||
import time
|
||||
import logging
|
||||
from config_parser import ConfigParser
|
||||
import sys
|
||||
import os
|
||||
import socket
|
||||
import xml.etree.ElementTree as ET
|
||||
import multiprocessing
|
||||
from xml_handler import XMLGenerator # ✅ Import XML generator module
|
||||
from config_parser import ConfigParser # ✅ Import the updated config parser
|
||||
|
||||
|
||||
import multiprocessing
|
||||
import socket
|
||||
import logging
|
||||
from config_parser import ConfigParser
|
||||
from xml_handler import XMLGenerator
|
||||
|
||||
class NetworkProcess(multiprocessing.Process):
|
||||
"""Handles UDP communication in a separate process."""
|
||||
|
||||
def __init__(self, ip, port, send_variables, receive_variables, stop_event, config_parser):
|
||||
super().__init__()
|
||||
self.send_variables = send_variables
|
||||
self.receive_variables = receive_variables
|
||||
self.stop_event = stop_event
|
||||
self.config_parser = config_parser
|
||||
self.udp_socket = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
|
||||
|
||||
# ✅ Fallback IP handling
|
||||
self.client_address = (ip, port)
|
||||
if not self.is_valid_ip(ip):
|
||||
logging.warning(f"Invalid IP address '{ip}' detected. Falling back to '0.0.0.0'.")
|
||||
print(f"⚠️ Invalid IP '{ip}', falling back to '0.0.0.0'.")
|
||||
self.client_address = ('0.0.0.0', port)
|
||||
else:
|
||||
self.client_address = (ip, port)
|
||||
|
||||
try:
|
||||
self.udp_socket.bind(self.client_address)
|
||||
logging.info(f"✅ Network process initialized on {self.client_address}")
|
||||
except OSError as e:
|
||||
logging.error(f"❌ Failed to bind to {self.client_address}: {e}")
|
||||
raise
|
||||
|
||||
self.controller_ip_and_port = None
|
||||
|
||||
def is_valid_ip(self, ip):
|
||||
"""Check if an IP address is valid and can be bound on this machine."""
|
||||
try:
|
||||
socket.inet_aton(ip) # Validate format
|
||||
with socket.socket(socket.AF_INET, socket.SOCK_DGRAM) as s:
|
||||
s.bind((ip, 0)) # Try binding
|
||||
return True
|
||||
except (socket.error, OSError):
|
||||
return False
|
||||
|
||||
|
||||
def run(self):
|
||||
"""Start the network loop."""
|
||||
print("[DEBUG] Network process started.")
|
||||
while not self.stop_event.is_set():
|
||||
try:
|
||||
print("[DEBUG] Waiting for incoming message...")
|
||||
self.udp_socket.settimeout(5)
|
||||
data_received, self.controller_ip_and_port = self.udp_socket.recvfrom(1024)
|
||||
message = data_received.decode()
|
||||
|
||||
print(f"[DEBUG] Received message: {message}")
|
||||
self.process_received_data(message)
|
||||
|
||||
# ✅ Generate the send XML using the updated XMLGenerator
|
||||
send_xml = XMLGenerator.generate_send_xml(self.send_variables, self.config_parser.network_settings)
|
||||
print(f"[DEBUG] Sending response: {send_xml}")
|
||||
|
||||
self.udp_socket.sendto(send_xml.encode(), self.controller_ip_and_port)
|
||||
|
||||
except socket.timeout:
|
||||
print("[WARNING] No message received within timeout period.")
|
||||
except Exception as e:
|
||||
print(f"[ERROR] Network process error: {e}")
|
||||
|
||||
|
||||
def stop_network(self):
|
||||
"""Safely stop the network process."""
|
||||
if self.udp_socket:
|
||||
self.udp_socket.close()
|
||||
print("✅ Network socket closed.")
|
||||
|
||||
def process_received_data(self, xml_string):
|
||||
"""Parse incoming XML and update shared variables."""
|
||||
try:
|
||||
root = ET.fromstring(xml_string)
|
||||
for element in root:
|
||||
if element.tag in self.receive_variables:
|
||||
if len(element.attrib) > 0: # ✅ Handle structured data (dictionaries)
|
||||
self.receive_variables[element.tag] = {k: float(v) for k, v in element.attrib.items()}
|
||||
else:
|
||||
self.receive_variables[element.tag] = element.text
|
||||
|
||||
print(f"[DEBUG] Updated received variables: {self.receive_variables}")
|
||||
except Exception as e:
|
||||
print(f"[ERROR] Error parsing received message: {e}")
|
||||
|
||||
80
src/RSIPI/rsi_api.py
Normal file
80
src/RSIPI/rsi_api.py
Normal file
@ -0,0 +1,80 @@
|
||||
import threading
|
||||
import time
|
||||
import inspect
|
||||
|
||||
|
||||
class RSIAPI:
|
||||
def __init__(self):
|
||||
"""Initialize RSIAPI with shared send variables."""
|
||||
self.shared_send_variables = {} # Ensure this is always initialized
|
||||
self.running = False # RSI status
|
||||
print(f"✅ RSIAPI instance created from: {inspect.stack()[1].filename}")
|
||||
print(f"✅ shared_send_variables initialized: {self.shared_send_variables}")
|
||||
|
||||
def start_rsi(self):
|
||||
"""Simulate RSI client startup."""
|
||||
print("\n🚀 Starting RSI Client...")
|
||||
self.running = True
|
||||
self.shared_send_variables["EStr"] = "RSI Started" # Default value
|
||||
print(f"✅ RSI Running: {self.running}")
|
||||
print(f"📌 Initial shared_send_variables: {self.shared_send_variables}")
|
||||
|
||||
# Run a separate thread to simulate RSI process
|
||||
rsi_thread = threading.Thread(target=self.rsi_loop, daemon=True)
|
||||
rsi_thread.start()
|
||||
|
||||
def rsi_loop(self):
|
||||
"""Simulate RSI running in the background."""
|
||||
while self.running:
|
||||
print(f"🔄 RSI Loop Running... Current EStr: {self.shared_send_variables.get('EStr', 'N/A')}")
|
||||
time.sleep(2) # Simulate 2-second update intervals
|
||||
|
||||
def update_variable(self, variable, value):
|
||||
"""Update a variable in shared_send_variables."""
|
||||
print("\n🔍 Debugging update_variable()")
|
||||
print(f"🔹 Checking if shared_send_variables exists: {hasattr(self, 'shared_send_variables')}")
|
||||
|
||||
if not hasattr(self, "shared_send_variables"):
|
||||
print("❌ Error: shared_send_variables is missing!")
|
||||
return
|
||||
|
||||
if variable in self.shared_send_variables:
|
||||
self.shared_send_variables[variable] = value
|
||||
print(f"✅ Updated {variable} to {value}")
|
||||
else:
|
||||
print(f"⚠️ Warning: Variable '{variable}' not found in shared_send_variables.")
|
||||
print(f"📌 Available variables: {list(self.shared_send_variables.keys())}")
|
||||
|
||||
def stop_rsi(self):
|
||||
"""Stop the RSI process."""
|
||||
print("\n🛑 Stopping RSI Client...")
|
||||
self.running = False
|
||||
self.shared_send_variables["EStr"] = "RSI Stopped"
|
||||
print(f"✅ RSI Stopped. Final EStr: {self.shared_send_variables['EStr']}")
|
||||
|
||||
|
||||
# ==============================
|
||||
# ✅ TEST CODE: Start RSI & Change Variables
|
||||
# ==============================
|
||||
|
||||
if __name__ == "__main__":
|
||||
print("\n🚀 Starting RSIAPI Test...\n")
|
||||
|
||||
# Step 1: Create an instance of RSIAPI
|
||||
api = RSIAPI()
|
||||
|
||||
# Step 2: Start RSI
|
||||
api.start_rsi()
|
||||
|
||||
# Step 3: Wait 3 seconds and update `EStr`
|
||||
time.sleep(3)
|
||||
print("\n🛠 Updating 'EStr' variable to 'Testing 123'...")
|
||||
api.update_variable("EStr", "Testing 123")
|
||||
|
||||
# Step 4: Wait another 3 seconds and update `EStr` again
|
||||
time.sleep(3)
|
||||
print("\n🛠 Updating 'EStr' variable to 'Final Test Value'...")
|
||||
api.update_variable("EStr", "Final Test Value")
|
||||
|
||||
# Step 5: Stop RSI after 5 more seconds
|
||||
|
||||
72
src/RSIPI/rsi_client.py
Normal file
72
src/RSIPI/rsi_client.py
Normal file
@ -0,0 +1,72 @@
|
||||
import logging
|
||||
import multiprocessing
|
||||
import time
|
||||
from src.RSIPI.config_parser import ConfigParser
|
||||
from src.RSIPI.network_process import NetworkProcess
|
||||
|
||||
class RSIClient:
|
||||
"""Main RSI API class that integrates network, config handling, and message processing."""
|
||||
|
||||
def __init__(self, config_file):
|
||||
"""Initialize the RSI client and set up logging and networking."""
|
||||
logging.info(f"📂 Loading RSI configuration from {config_file}...")
|
||||
|
||||
# Load configuration
|
||||
self.config_parser = ConfigParser(config_file)
|
||||
network_settings = self.config_parser.get_network_settings()
|
||||
|
||||
self.manager = multiprocessing.Manager()
|
||||
self.send_variables = self.manager.dict(self.config_parser.send_variables)
|
||||
self.receive_variables = self.manager.dict(self.config_parser.receive_variables)
|
||||
self.stop_event = multiprocessing.Event()
|
||||
|
||||
logging.info(f"🚀 Starting network process on {network_settings['ip']}:{network_settings['port']}...")
|
||||
|
||||
# ✅ Corrected constructor call with all necessary parameters
|
||||
self.network_process = NetworkProcess(
|
||||
network_settings["ip"],
|
||||
network_settings["port"],
|
||||
self.send_variables,
|
||||
self.receive_variables,
|
||||
self.stop_event,
|
||||
self.config_parser
|
||||
)
|
||||
|
||||
self.network_process.start()
|
||||
|
||||
def start(self):
|
||||
"""Keep the client running and allow periodic debugging."""
|
||||
logging.info("✅ RSI Client Started")
|
||||
print("✅ RSI Client Started. Press CTRL+C to stop.")
|
||||
|
||||
try:
|
||||
while not self.stop_event.is_set():
|
||||
time.sleep(2)
|
||||
except KeyboardInterrupt:
|
||||
self.stop()
|
||||
except Exception as e:
|
||||
logging.error(f"❌ RSI Client encountered an error: {e}")
|
||||
print(f"❌ RSI Client encountered an error: {e}")
|
||||
|
||||
def stop(self):
|
||||
"""Stop the network process safely and close resources."""
|
||||
logging.info("🛑 Stopping RSI Client...")
|
||||
print("🛑 Stopping RSI Client...")
|
||||
|
||||
self.stop_event.set() # ✅ Signal all processes to stop
|
||||
|
||||
if self.network_process.is_alive():
|
||||
self.network_process.terminate()
|
||||
self.network_process.join()
|
||||
|
||||
logging.info("✅ RSI Client Stopped")
|
||||
print("✅ RSI Client Stopped")
|
||||
|
||||
if __name__ == "__main__":
|
||||
config_file = "RSI_EthernetConfig.xml"
|
||||
client = RSIClient(config_file)
|
||||
|
||||
try:
|
||||
client.start()
|
||||
except KeyboardInterrupt:
|
||||
client.stop()
|
||||
130
src/RSIPI/rsi_config.py
Normal file
130
src/RSIPI/rsi_config.py
Normal file
@ -0,0 +1,130 @@
|
||||
import xml.etree.ElementTree as ET
|
||||
import logging
|
||||
|
||||
# ✅ Configure Logging (Allow it to be turned off)
|
||||
LOGGING_ENABLED = True # Change to False to disable logging
|
||||
|
||||
if LOGGING_ENABLED:
|
||||
logging.basicConfig(
|
||||
filename="rsi_config.log", # Save logs to file
|
||||
level=logging.DEBUG, # Log everything for debugging
|
||||
format="%(asctime)s [%(levelname)s] %(message)s",
|
||||
datefmt="%Y-%m-%d %H:%M:%S"
|
||||
)
|
||||
|
||||
class RSIConfig:
|
||||
"""Processes the RSI config.xml file to determine communication parameters."""
|
||||
|
||||
internal = {
|
||||
"ComStatus": "String",
|
||||
"RIst": ["X", "Y", "Z", "A", "B", "C"],
|
||||
"RSol": ["X", "Y", "Z", "A", "B", "C"],
|
||||
"AIPos": ["A1", "A2", "A3", "A4", "A5", "A6"],
|
||||
"ASPos": ["A1", "A2", "A3", "A4", "A5", "A6"],
|
||||
"ELPos": ["E1", "E2", "E3", "E4", "E5", "E6"],
|
||||
"ESPos": ["E1", "E2", "E3", "E4", "E5", "E6"],
|
||||
"MaCur": ["A1", "A2", "A3", "A4", "A5", "A6"],
|
||||
"MECur": ["E1", "E2", "E3", "E4", "E5", "E6"],
|
||||
"IPOC": 0,
|
||||
"BMode": "Status",
|
||||
"IPOSTAT": "",
|
||||
"Delay": ["D"],
|
||||
"EStr": "EStr Test",
|
||||
"Tech.C1": ["C11", "C12", "C13", "C14", "C15", "C16", "C17", "C18", "C19", "C110"],
|
||||
"Tech.C2": ["C21", "C22", "C23", "C24", "C25", "C26", "C27", "C28", "C29", "C210"],
|
||||
"Tech.T2": ["T21", "T22", "T23", "T24", "T25", "T26", "T27", "T28", "T29", "T210"],
|
||||
}
|
||||
|
||||
def __init__(self, config_file):
|
||||
self.config_file = config_file
|
||||
self.network_settings = {}
|
||||
self.send_variables = {}
|
||||
self.receive_variables = {}
|
||||
self.load_config()
|
||||
|
||||
def strip_def_prefix(self, tag):
|
||||
"""Remove 'DEF_' prefix from a variable name."""
|
||||
return tag.replace("DEF_", "")
|
||||
|
||||
def process_internal_variable(self, tag):
|
||||
"""Process structured internal variables."""
|
||||
if tag in self.internal:
|
||||
if isinstance(self.internal[tag], list):
|
||||
return {key: 0.0 for key in self.internal[tag]} # Store as dict
|
||||
return self.internal[tag] # Store as default value
|
||||
return None
|
||||
|
||||
def process_variable_structure(self, var_dict, tag, var_type):
|
||||
"""Handles structured variables (e.g., `Tech.T2`, `RKorr.X`)."""
|
||||
if tag in self.internal:
|
||||
var_dict[tag] = self.process_internal_variable(tag)
|
||||
elif "." in tag:
|
||||
base, subkey = tag.split(".", 1)
|
||||
if base not in var_dict:
|
||||
var_dict[base] = {}
|
||||
var_dict[base][subkey] = self.get_default_value(var_type)
|
||||
else:
|
||||
var_dict[tag] = self.get_default_value(var_type)
|
||||
|
||||
def get_default_value(self, var_type):
|
||||
"""Returns a default value based on TYPE."""
|
||||
if var_type == "BOOL":
|
||||
return False
|
||||
elif var_type == "STRING":
|
||||
return ""
|
||||
elif var_type == "LONG":
|
||||
return 0
|
||||
elif var_type == "DOUBLE":
|
||||
return 0.0
|
||||
return None # Unknown type fallback
|
||||
|
||||
def load_config(self):
|
||||
"""Load and parse the config.xml file, ensuring variables are structured correctly."""
|
||||
try:
|
||||
logging.info(f"Loading config file: {self.config_file}")
|
||||
tree = ET.parse(self.config_file)
|
||||
root = tree.getroot()
|
||||
|
||||
# Read Network Settings
|
||||
config = root.find("CONFIG")
|
||||
self.network_settings = {
|
||||
"ip": config.find("IP_NUMBER").text.strip(),
|
||||
"port": int(config.find("PORT").text.strip()),
|
||||
"sentype": config.find("SENTYPE").text.strip(),
|
||||
"onlysend": config.find("ONLYSEND").text.strip().upper() == "TRUE",
|
||||
}
|
||||
logging.info(f"Network settings loaded: {self.network_settings}")
|
||||
|
||||
# Read SEND Section (Values we send to RSI client)
|
||||
send_section = root.find("SEND/ELEMENTS")
|
||||
for element in send_section.findall("ELEMENT"):
|
||||
tag = self.strip_def_prefix(element.get("TAG"))
|
||||
var_type = element.get("TYPE")
|
||||
|
||||
if tag != "FREE": # ✅ Ignore `FREE` variables
|
||||
self.process_variable_structure(self.send_variables, tag, var_type)
|
||||
|
||||
# Read RECEIVE Section (Values we receive from RSI client)
|
||||
receive_section = root.find("RECEIVE/ELEMENTS")
|
||||
for element in receive_section.findall("ELEMENT"):
|
||||
tag = self.strip_def_prefix(element.get("TAG"))
|
||||
var_type = element.get("TYPE")
|
||||
|
||||
if tag != "FREE": # ✅ Ignore `FREE` variables
|
||||
self.process_variable_structure(self.receive_variables, tag, var_type)
|
||||
|
||||
logging.info("Configuration successfully loaded.")
|
||||
logging.debug(f"Send Variables: {self.send_variables}")
|
||||
logging.debug(f"Receive Variables: {self.receive_variables}")
|
||||
|
||||
except Exception as e:
|
||||
logging.error(f"Error loading {self.config_file}: {e}")
|
||||
|
||||
def get_network_settings(self):
|
||||
return self.network_settings
|
||||
|
||||
def get_send_variables(self):
|
||||
return self.send_variables
|
||||
|
||||
def get_receive_variables(self):
|
||||
return self.receive_variables
|
||||
35
src/RSIPI/xml_handler.py
Normal file
35
src/RSIPI/xml_handler.py
Normal file
@ -0,0 +1,35 @@
|
||||
import xml.etree.ElementTree as ET
|
||||
|
||||
class XMLGenerator:
|
||||
"""Converts send and receive variables into properly formatted XML messages."""
|
||||
|
||||
@staticmethod
|
||||
def generate_send_xml(send_variables, network_settings):
|
||||
"""Generate the send XML message dynamically based on send variables."""
|
||||
root = ET.Element("Sen", Type=network_settings["sentype"]) # ✅ Root with Type from config
|
||||
|
||||
for key, value in send_variables.items():
|
||||
if isinstance(value, dict): # ✅ Handle dictionaries as elements with attributes
|
||||
element = ET.SubElement(root, key)
|
||||
for sub_key, sub_value in value.items():
|
||||
element.set(sub_key, f"{float(sub_value):.2f}")
|
||||
else: # ✅ Handle standard elements with text values
|
||||
ET.SubElement(root, key).text = str(value)
|
||||
|
||||
return ET.tostring(root, encoding="utf-8").decode()
|
||||
|
||||
@staticmethod
|
||||
def generate_receive_xml(receive_variables):
|
||||
"""Generate the receive XML message dynamically based on receive variables."""
|
||||
root = ET.Element("Rob", Type="KUKA") # ✅ Root with Type="KUKA"
|
||||
|
||||
for key, value in receive_variables.items():
|
||||
if isinstance(value, dict): # ✅ Handle dictionaries as elements with attributes
|
||||
element = ET.SubElement(root, key)
|
||||
for sub_key, sub_value in value.items():
|
||||
element.set(sub_key, f"{float(sub_value):.2f}")
|
||||
else: # ✅ Handle standard elements with text values
|
||||
ET.SubElement(root, key).text = str(value)
|
||||
|
||||
return ET.tostring(root, encoding="utf-8").decode()
|
||||
|
||||
0
src/__init__.py
Normal file
0
src/__init__.py
Normal file
Loading…
Reference in New Issue
Block a user