include/CAPL/MakeConfig.can
Generate Config in SysVars using Config in MakeConfig Added Vendor
This commit is contained in:
parent
bd545bd232
commit
9d0c136b08
6 changed files with 288 additions and 193 deletions
|
@ -1,4 +1,4 @@
|
|||
;CANoe Version |4|7|1|35761 MakeConfig
|
||||
;CANoe Version |4|7|1|52129 MakeConfig
|
||||
Version: 8.2.40 Build 40
|
||||
32 PRO
|
||||
5
|
||||
|
@ -348,15 +348,15 @@ VCaplOptionsStreamer 3 Begin_Of_Object
|
|||
End_Of_Object VCaplOptionsStreamer 3
|
||||
VSVConfigurationStreamer 3 Begin_Of_Object
|
||||
1
|
||||
812
|
||||
829
|
||||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<systemvariables version="4">
|
||||
<namespace name="" comment="">
|
||||
<namespace name="Config" comment="">
|
||||
<namespace name="Modbus" comment="">
|
||||
<variable anlyzLocal="2" readOnly="false" valueSequence="false" unit="" name="Port" comment="" bitcount="32" isSigned="true" encoding="65001" type="int" />
|
||||
<variable anlyzLocal="2" readOnly="false" valueSequence="false" unit="ms" name="RequestTimeout" comment="" bitcount="32" isSigned="true" encoding="65001" type="int" startValue="5" />
|
||||
<variable anlyzLocal="2" readOnly="false" valueSequence="false" unit="" name="MaxTransmissionCount" comment="" bitcount="32" isSigned="true" encoding="65001" type="int" startValue="1" />
|
||||
<variable anlyzLocal="2" readOnly="false" valueSequence="false" unit="" name="Port" comment="" bitcount="32" isSigned="true" encoding="65001" type="int" startValue="502" />
|
||||
<variable anlyzLocal="2" readOnly="false" valueSequence="false" unit="" name="MaxTransmissionCount" comment="" bitcount="32" isSigned="true" encoding="65001" type="int" startValue="2" />
|
||||
<variable anlyzLocal="2" readOnly="false" valueSequence="false" unit="ms" name="RequestTimeout" comment="" bitcount="32" isSigned="true" encoding="65001" type="int" startValue="7" />
|
||||
</namespace>
|
||||
</namespace>
|
||||
</namespace>
|
||||
|
@ -2933,7 +2933,7 @@ End_Of_Object VGrMnBox 3
|
|||
VDOLocalInfoStruct 3 Begin_Of_Object
|
||||
3
|
||||
1
|
||||
62
|
||||
71
|
||||
VDAOBus 4 Begin_Of_Object
|
||||
1
|
||||
1
|
||||
|
@ -3063,7 +3063,7 @@ VSimulinkModelViewerConfiguration 7 Begin_Of_Object
|
|||
End_Of_Object VSimulinkModelViewerConfiguration 7
|
||||
1
|
||||
0
|
||||
297817094
|
||||
3836594437
|
||||
0
|
||||
NodeSignalPanelBustypeCount 0
|
||||
End_Of_Object VSimulationNode 6
|
||||
|
@ -3101,7 +3101,7 @@ NULL
|
|||
End_Of_Object VDOLocalInfoStruct 3
|
||||
0.000000
|
||||
0 0
|
||||
1 1 0 59420 1 233 1 2882400001 98 331 309 611 2882400002 0 0 0 0 0 0 1 2882400001 1270 1270 311 311 2882400002 0 0 0 610451744 0 608276876 3
|
||||
1 1 0 59420 1 233 1 2882400001 98 331 309 611 2882400002 0 0 0 0 0 0 1 2882400001 1270 1270 311 311 2882400002 0 0 0 576526008 0 344968884 3
|
||||
SS_BEGIN_COMMON_INFO
|
||||
1
|
||||
0
|
||||
|
@ -3113,7 +3113,7 @@ Ethernet
|
|||
11
|
||||
1
|
||||
1
|
||||
609817640 1 0 1 0 0 1 0 0 0 2000 1
|
||||
575153512 1 0 1 0 0 1 0 0 0 2000 1
|
||||
SS_BEGIN_COMMON_INFO
|
||||
1
|
||||
3
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
;CANoe Version |4|7|1|38820 ModbusNet
|
||||
;CANoe Version |4|7|1|38832 ModbusNet
|
||||
Version: 8.2.40 Build 40
|
||||
32 PRO
|
||||
10
|
||||
|
@ -1592,7 +1592,10 @@ End_Of_Serialized_Data 14
|
|||
16
|
||||
0
|
||||
17
|
||||
0
|
||||
1
|
||||
14
|
||||
ver=2: FT
|
||||
End_Of_Serialized_Data 14
|
||||
18
|
||||
0
|
||||
19
|
||||
|
@ -4527,7 +4530,7 @@ VUniqueBox 4 Begin_Of_Object
|
|||
VBoxRoot 5 Begin_Of_Object
|
||||
1
|
||||
3
|
||||
0 0 0 1 -1 -1 -8 -30 0 0 890 487
|
||||
0 0 0 1 -1 -1 -1 -1 0 0 890 487
|
||||
|
||||
1
|
||||
|
||||
|
@ -4535,7 +4538,7 @@ MDI_DOCK_INFO_END
|
|||
5
|
||||
1
|
||||
6
|
||||
0 1 -1 -1 -8 -30 0 0 890 487
|
||||
0 1 -1 -1 -1 -1 0 0 890 487
|
||||
6 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 -1 32767 0 0 0 0 0 0 0 0 0 0 -1 -1 0 0 0 0 0 0
|
||||
END_OF_DOCK_INFO
|
||||
1
|
||||
|
@ -4594,7 +4597,7 @@ End_Of_Object VGrMnBox 3
|
|||
VDOLocalInfoStruct 3 Begin_Of_Object
|
||||
3
|
||||
1
|
||||
179
|
||||
183
|
||||
VDAOBus 4 Begin_Of_Object
|
||||
1
|
||||
1
|
||||
|
@ -4706,7 +4709,7 @@ End_Of_Object VIPBStackSetting 8
|
|||
NDebugger::VDebuggerHost 8 Begin_Of_Object
|
||||
2
|
||||
0
|
||||
16
|
||||
23
|
||||
NDebugger::VFile 9 Begin_Of_Object
|
||||
1
|
||||
<VFileName V4 QL> 1 "ModbusTcpCommon.cin"
|
||||
|
@ -4787,6 +4790,41 @@ NDebugger::VFile 9 Begin_Of_Object
|
|||
<VFileName V4 QL> 1 "include\CAPL\ModbusClient.can"
|
||||
27
|
||||
End_Of_Object NDebugger::VFile 9
|
||||
NDebugger::VFile 9 Begin_Of_Object
|
||||
1
|
||||
<VFileName V4 QL> 1 "include\CAPL\include\Common.cin"
|
||||
28
|
||||
End_Of_Object NDebugger::VFile 9
|
||||
NDebugger::VFile 9 Begin_Of_Object
|
||||
1
|
||||
<VFileName V4 QL> 1 "include\CAPL\include\ModbusClientCommon.cin"
|
||||
29
|
||||
End_Of_Object NDebugger::VFile 9
|
||||
NDebugger::VFile 9 Begin_Of_Object
|
||||
1
|
||||
<VFileName V4 QL> 1 "include\CAPL\include\ModbusCommonStructs.cin"
|
||||
30
|
||||
End_Of_Object NDebugger::VFile 9
|
||||
NDebugger::VFile 9 Begin_Of_Object
|
||||
1
|
||||
<VFileName V4 QL> 1 "include\CAPL\include\ModbusFunctions.cin"
|
||||
31
|
||||
End_Of_Object NDebugger::VFile 9
|
||||
NDebugger::VFile 9 Begin_Of_Object
|
||||
1
|
||||
<VFileName V4 QL> 1 "include\CAPL\include\ModbusUdpClientCommon.cin"
|
||||
32
|
||||
End_Of_Object NDebugger::VFile 9
|
||||
NDebugger::VFile 9 Begin_Of_Object
|
||||
1
|
||||
<VFileName V4 QL> 1 "include\CAPL\include\TcpUdpCommon.cin"
|
||||
33
|
||||
End_Of_Object NDebugger::VFile 9
|
||||
NDebugger::VFile 9 Begin_Of_Object
|
||||
1
|
||||
<VFileName V4 QL> 1 "include\CAPL\include\UdpCommon.cin"
|
||||
34
|
||||
End_Of_Object NDebugger::VFile 9
|
||||
VNETStandaloneComponent 9 Begin_Of_Object
|
||||
1
|
||||
VNETControlBox 10 Begin_Of_Object
|
||||
|
@ -5035,7 +5073,7 @@ VBoxRoot 9 Begin_Of_Object
|
|||
1
|
||||
3
|
||||
1 1 2 3 -1 -1 -8 -30 114 0 1146 491
|
||||
Ethernet Packet Builder
|
||||
|
||||
1
|
||||
|
||||
MDI_DOCK_INFO_END
|
||||
|
@ -5112,8 +5150,106 @@ EOF_MBSSDATA
|
|||
1
|
||||
0 0
|
||||
<IPPlugIn.PacketBuilder DefaultBusProtocolId="256" DefaultDestMacIdSelection="107" DefaultDestinationIPAddress="192 . 168 . 1 . 100" DefaultDestinationIPv6Address="0:0:0:0:0:0:0:0" DefaultDestinationMacId="FF:FF:FF:FF:FF:FF" DefaultDestinationPort="502" DefaultSourceIPAddress="192 . 168 . 1 . 10" DefaultSourceIPv6Address="0:0:0:0:0:0:0:0" DefaultSourceMacId="02:00:4C:4F:4F:50" DefaultSourcePort="2000" DefaultSrcMacIdSelection="1" Name="Ethernet Packet Builder">
|
||||
<IPPlugIn.VPersistentFrameWrapper AssignedChannelId="Eth 1" DestMacIdConfStateSel="111" FrameDescription="Read Coils 1-512" FrameIsValid="1" InitialPacketType="4" PDBData="5 0 1651797619 1 9 1 1651797619 1 5 1 1651797619 1 4 0 1651797619 1 11 0 1651797619 1 8 0 1651797619 1 3 0 1651797619 1 10 1 1651797619 1 3 1 1651797619 1 " RawFrameData=" 0-30-de- 7-9a-fd- 0-19-db-cb-83-dd- 8- 0-45- 0- 0-34- 0- 0- 0- 0-40- 6-f7-6f-c0-a8- 1- 1-c0-a8- 1- 3-d5-66- 1-f6- 0- 0- 0- 0- 0- 0- 0- 0-50- 0-fa-15-59- 9- 0- 0- 0- 2- 0- 0- 0- 6- 0- 1- 0- 0- 1-ff-" RawFrameLength="66" SrcMacIdConfStateSel="105" WlanAddr1MacIdConfStateSel="111" WlanAddr2MacIdConfStateSel="111" WlanAddr3MacIdConfStateSel="111" WlanAddr4MacIdConfStateSel="111"/>
|
||||
<IPPlugIn.VPersistentFrameWrapper AssignedChannelId="Eth 1" DestMacIdConfStateSel="111" FrameDescription="" FrameIsValid="1" InitialPacketType="4" PDBData="3 0 1651797619 1 3 1 1651797619 1 10 1 1651797619 1 8 0 1651797619 1 11 0 1651797619 1 4 0 1651797619 1 5 0 1651797619 1 5 1 1651797619 1 9 1 1651797619 1 " RawFrameData=" 0-30-de- 7-9a-fd- 0-19-db-cb-83-dd- 8- 0-45- 0- 0-34- 1-6e-40- 0-80- 6-76- 1-c0-a8- 1- 1-c0-a8- 1- 3-d5-69- 1-f6-18-f0-66-10-dc-70-88-e2-50-18-fa-f0-73-bf- 0- 0- 0- 2- 0- 0- 0- 6- 0- 1- 0- 0- 1-ff-" RawFrameLength="66" SrcMacIdConfStateSel="111" WlanAddr1MacIdConfStateSel="111" WlanAddr2MacIdConfStateSel="111" WlanAddr3MacIdConfStateSel="111" WlanAddr4MacIdConfStateSel="111"/>
|
||||
<IPPlugIn.VPersistentFrameWrapper AssignedChannelId="Eth 1" DestMacIdConfStateSel="111" FrameDescription="Read Coils 1-512" FrameIsValid="1" InitialPacketType="4" PDBData="3 0 1651797619 1 3 1 1651797619 1 10 1 1651797619 1 8 0 1651797619 1 11 0 1651797619 1 4 0 1651797619 1 5 0 1651797619 1 5 1 1651797619 1 9 1 1651797619 1 " RawFrameData=" 0-30-de- 7-9a-fd- 0-19-db-cb-83-dd- 8- 0-45- 0- 0-34- 0- 0- 0- 0-40- 6-f7-6f-c0-a8- 1- 1-c0-a8- 1- 3-d5-66- 1-f6- 0- 0- 0- 0- 0- 0- 0- 0-50- 0-fa-15-59- 9- 0- 0- 0- 2- 0- 0- 0- 6- 0- 1- 0- 0- 1-ff-" RawFrameLength="66" SrcMacIdConfStateSel="105" WlanAddr1MacIdConfStateSel="111" WlanAddr2MacIdConfStateSel="111" WlanAddr3MacIdConfStateSel="111" WlanAddr4MacIdConfStateSel="111"/>
|
||||
<IPPlugIn.VPersistentFrameWrapper AssignedChannelId="Eth 1" DestMacIdConfStateSel="111" FrameDescription="" FrameIsValid="1" InitialPacketType="4" PDBData="5 0 1651797619 1 9 1 1651797619 1 5 1 1651797619 1 4 0 1651797619 1 11 0 1651797619 1 8 0 1651797619 1 3 0 1651797619 1 10 1 1651797619 1 3 1 1651797619 1 " RawFrameData=" 0-30-de- 7-9a-fd- 0-19-db-cb-83-dd- 8- 0-45- 0- 0-34- 1-6e-40- 0-80- 6-76- 1-c0-a8- 1- 1-c0-a8- 1- 3-d5-69- 1-f6-18-f0-66-10-dc-70-88-e2-50-18-fa-f0-73-bf- 0- 0- 0- 2- 0- 0- 0- 6- 0- 1- 0- 0- 1-ff-" RawFrameLength="66" SrcMacIdConfStateSel="111" WlanAddr1MacIdConfStateSel="111" WlanAddr2MacIdConfStateSel="111" WlanAddr3MacIdConfStateSel="111" WlanAddr4MacIdConfStateSel="111"/>
|
||||
<IPPlugIn.SE id="102" intVal="0" key="1919247220"/>
|
||||
<IPPlugIn.SE id="102" index="1" intVal="466" key="1919247220"/>
|
||||
<IPPlugIn.SE id="102" index="2" intVal="0" key="1919247220"/>
|
||||
<IPPlugIn.SE id="102" index="3" intVal="1188" key="1919247220"/>
|
||||
<IPPlugIn.SE id="102" intVal="1" key="1702391908"/>
|
||||
<IPPlugIn.SE id="102" intVal="199" key="1936292453"/>
|
||||
<IPPlugIn.SE id="102" intVal="437" key="1920231791"/>
|
||||
<IPPlugIn.SE id="1004" intVal="1145393987" key="1952540511"/>
|
||||
<IPPlugIn.SE id="1004" intVal="1" key="1986622303"/>
|
||||
<IPPlugIn.SE id="1004" intVal="218" key="2003072104"/>
|
||||
<IPPlugIn.SE id="1004" index="1" intVal="1397708114" key="1952540511"/>
|
||||
<IPPlugIn.SE id="1004" index="1" intVal="1" key="1986622303"/>
|
||||
<IPPlugIn.SE id="1004" index="1" intVal="156" key="2003072104"/>
|
||||
<IPPlugIn.SE id="1004" index="2" intVal="1145394004" key="1952540511"/>
|
||||
<IPPlugIn.SE id="1004" index="2" intVal="1" key="1986622303"/>
|
||||
<IPPlugIn.SE id="1004" index="2" intVal="156" key="2003072104"/>
|
||||
<IPPlugIn.SE id="1004" index="3" intVal="1347571540" key="1952540511"/>
|
||||
<IPPlugIn.SE id="1004" index="3" intVal="1" key="1986622303"/>
|
||||
<IPPlugIn.SE id="1005" index="18" intVal="0" key="1633907830"/>
|
||||
<IPPlugIn.SE id="1005" index="19" intVal="0" key="1633907830"/>
|
||||
<IPPlugIn.SE id="1005" index="20" intVal="1" key="1633907830"/>
|
||||
<IPPlugIn.SE id="1005" index="20" intVal="1" key="1702391908"/>
|
||||
<IPPlugIn.SE id="1005" index="19" intVal="1" key="1702391908"/>
|
||||
<IPPlugIn.SE id="1005" index="18" intVal="1" key="1702391908"/>
|
||||
<IPPlugIn.SE id="1004" index="3" intVal="125" key="2003072104"/>
|
||||
<IPPlugIn.SE id="1004" index="4" intVal="1397316165" key="1952540511"/>
|
||||
<IPPlugIn.SE id="1004" index="4" intVal="1" key="1986622303"/>
|
||||
<IPPlugIn.SE id="1004" index="4" intVal="108" key="2003072104"/>
|
||||
<IPPlugIn.SE id="1004" index="5" intVal="1348029508" key="1952540511"/>
|
||||
<IPPlugIn.SE id="1004" index="5" intVal="1" key="1986622303"/>
|
||||
<IPPlugIn.SE id="1004" index="5" intVal="108" key="2003072104"/>
|
||||
<IPPlugIn.SE id="1004" intVal="0" key="1886352249"/>
|
||||
<IPPlugIn.SE id="1004" intVal="0" key="1886352248"/>
|
||||
<IPPlugIn.SE id="1004" intVal="-1" key="7499639"/>
|
||||
<IPPlugIn.SE id="125" intVal="-1" key="7562604"/>
|
||||
<IPPlugIn.SE id="102" index="1" intVal="1" key="1702391908"/>
|
||||
<IPPlugIn.SE id="102" index="1" intVal="163" key="1936292453"/>
|
||||
<IPPlugIn.SE id="102" index="1" intVal="397" key="1920231791"/>
|
||||
<IPPlugIn.SE id="1005" intVal="0" key="1886352249"/>
|
||||
<IPPlugIn.SE id="1005" intVal="0" key="1886352248"/>
|
||||
<IPPlugIn.SE id="1005" intVal="1" key="1702391908"/>
|
||||
<IPPlugIn.SE id="1005" intVal="0" key="1633907830"/>
|
||||
<IPPlugIn.SE id="1005" index="1" intVal="1" key="1702391908"/>
|
||||
<IPPlugIn.SE id="1005" index="1" intVal="1" key="1633907830"/>
|
||||
<IPPlugIn.SE id="2" intVal="0" key="1702391908"/>
|
||||
<IPPlugIn.SE id="2" index="1" intVal="0" key="1702391908"/>
|
||||
<IPPlugIn.SE id="2" index="2" intVal="0" key="1702391908"/>
|
||||
<IPPlugIn.SE id="1005" index="2" intVal="1" key="1702391908"/>
|
||||
<IPPlugIn.SE id="1005" index="2" intVal="0" key="1633907830"/>
|
||||
<IPPlugIn.SE id="1005" index="3" intVal="1" key="1702391908"/>
|
||||
<IPPlugIn.SE id="1005" index="3" intVal="0" key="1633907830"/>
|
||||
<IPPlugIn.SE id="1005" index="4" intVal="1" key="1702391908"/>
|
||||
<IPPlugIn.SE id="1005" index="4" intVal="0" key="1633907830"/>
|
||||
<IPPlugIn.SE id="1005" index="5" intVal="1" key="1702391908"/>
|
||||
<IPPlugIn.SE id="1005" index="5" intVal="0" key="1633907830"/>
|
||||
<IPPlugIn.SE id="1005" index="6" intVal="1" key="1702391908"/>
|
||||
<IPPlugIn.SE id="1005" index="6" intVal="0" key="1633907830"/>
|
||||
<IPPlugIn.SE id="1005" index="7" intVal="1" key="1702391908"/>
|
||||
<IPPlugIn.SE id="1005" index="7" intVal="0" key="1633907830"/>
|
||||
<IPPlugIn.SE id="1005" index="8" intVal="1" key="1702391908"/>
|
||||
<IPPlugIn.SE id="1005" index="8" intVal="0" key="1633907830"/>
|
||||
<IPPlugIn.SE id="1005" index="9" intVal="0" key="1702391908"/>
|
||||
<IPPlugIn.SE id="1005" index="9" intVal="0" key="1633907830"/>
|
||||
<IPPlugIn.SE id="3" intVal="0" key="1702391908"/>
|
||||
<IPPlugIn.SE id="3" index="1" intVal="0" key="1702391908"/>
|
||||
<IPPlugIn.SE id="3" index="2" intVal="0" key="1702391908"/>
|
||||
<IPPlugIn.SE id="3" index="3" intVal="0" key="1702391908"/>
|
||||
<IPPlugIn.SE id="3" index="4" intVal="0" key="1702391908"/>
|
||||
<IPPlugIn.SE id="3" index="5" intVal="0" key="1702391908"/>
|
||||
<IPPlugIn.SE id="3" index="6" intVal="0" key="1702391908"/>
|
||||
<IPPlugIn.SE id="3" index="7" intVal="0" key="1702391908"/>
|
||||
<IPPlugIn.SE id="3" index="8" intVal="0" key="1702391908"/>
|
||||
<IPPlugIn.SE id="3" index="9" intVal="0" key="1702391908"/>
|
||||
<IPPlugIn.SE id="3" index="10" intVal="0" key="1702391908"/>
|
||||
<IPPlugIn.SE id="3" index="11" intVal="0" key="1702391908"/>
|
||||
<IPPlugIn.SE id="1005" index="10" intVal="1" key="1702391908"/>
|
||||
<IPPlugIn.SE id="1005" index="10" intVal="0" key="1633907830"/>
|
||||
<IPPlugIn.SE id="1005" index="11" intVal="1" key="1702391908"/>
|
||||
<IPPlugIn.SE id="1005" index="11" intVal="1" key="1633907830"/>
|
||||
<IPPlugIn.SE id="1005" index="12" intVal="1" key="1702391908"/>
|
||||
<IPPlugIn.SE id="1005" index="12" intVal="0" key="1633907830"/>
|
||||
<IPPlugIn.SE id="1005" index="13" intVal="1" key="1702391908"/>
|
||||
<IPPlugIn.SE id="1005" index="13" intVal="0" key="1633907830"/>
|
||||
<IPPlugIn.SE id="1005" index="14" intVal="0" key="1702391908"/>
|
||||
<IPPlugIn.SE id="1005" index="14" intVal="0" key="1633907830"/>
|
||||
<IPPlugIn.SE id="1005" index="15" intVal="1" key="1702391908"/>
|
||||
<IPPlugIn.SE id="1005" index="15" intVal="0" key="1633907830"/>
|
||||
<IPPlugIn.SE id="1005" index="16" intVal="1" key="1702391908"/>
|
||||
<IPPlugIn.SE id="1005" index="16" intVal="0" key="1633907830"/>
|
||||
<IPPlugIn.SE id="1005" index="17" intVal="1" key="1702391908"/>
|
||||
<IPPlugIn.SE id="1005" index="17" intVal="1" key="1633907830"/>
|
||||
<IPPlugIn.SE id="102" index="2" intVal="1" key="1702391908"/>
|
||||
<IPPlugIn.SE id="102" index="2" intVal="67" key="1936292453"/>
|
||||
<IPPlugIn.SE id="102" index="2" intVal="164" key="1920231791"/>
|
||||
<IPPlugIn.SE id="127" intVal="0" key="1651534958"/>
|
||||
<IPPlugIn.SE id="1003" intVal="0" key="1886352249"/>
|
||||
<IPPlugIn.SE id="1003" intVal="0" key="1886352248"/>
|
||||
<IPPlugIn.SE id="1003" intVal="0" key="2003072104"/>
|
||||
<IPPlugIn.SE id="4" intVal="0" key="1702391908"/>
|
||||
<IPPlugIn.SE id="4" index="1" intVal="0" key="1702391908"/>
|
||||
<IPPlugIn.SE id="4" index="2" intVal="0" key="1702391908"/>
|
||||
|
@ -5124,104 +5260,6 @@ EOF_MBSSDATA
|
|||
<IPPlugIn.SE id="4" index="7" intVal="0" key="1702391908"/>
|
||||
<IPPlugIn.SE id="4" index="8" intVal="0" key="1702391908"/>
|
||||
<IPPlugIn.SE id="4" index="9" intVal="0" key="1702391908"/>
|
||||
<IPPlugIn.SE id="1003" intVal="0" key="2003072104"/>
|
||||
<IPPlugIn.SE id="1003" intVal="0" key="1886352248"/>
|
||||
<IPPlugIn.SE id="1003" intVal="0" key="1886352249"/>
|
||||
<IPPlugIn.SE id="127" intVal="0" key="1651534958"/>
|
||||
<IPPlugIn.SE id="3" intVal="0" key="1702391908"/>
|
||||
<IPPlugIn.SE id="3" index="1" intVal="0" key="1702391908"/>
|
||||
<IPPlugIn.SE id="102" index="2" intVal="164" key="1920231791"/>
|
||||
<IPPlugIn.SE id="102" index="2" intVal="67" key="1936292453"/>
|
||||
<IPPlugIn.SE id="102" index="2" intVal="1" key="1702391908"/>
|
||||
<IPPlugIn.SE id="3" index="2" intVal="0" key="1702391908"/>
|
||||
<IPPlugIn.SE id="3" index="3" intVal="0" key="1702391908"/>
|
||||
<IPPlugIn.SE id="3" index="4" intVal="0" key="1702391908"/>
|
||||
<IPPlugIn.SE id="3" index="5" intVal="0" key="1702391908"/>
|
||||
<IPPlugIn.SE id="3" index="6" intVal="0" key="1702391908"/>
|
||||
<IPPlugIn.SE id="3" index="7" intVal="0" key="1702391908"/>
|
||||
<IPPlugIn.SE id="3" index="8" intVal="0" key="1702391908"/>
|
||||
<IPPlugIn.SE id="3" index="9" intVal="0" key="1702391908"/>
|
||||
<IPPlugIn.SE id="1005" index="10" intVal="0" key="1633907830"/>
|
||||
<IPPlugIn.SE id="1005" index="11" intVal="1" key="1633907830"/>
|
||||
<IPPlugIn.SE id="1005" index="12" intVal="0" key="1633907830"/>
|
||||
<IPPlugIn.SE id="1005" index="13" intVal="0" key="1633907830"/>
|
||||
<IPPlugIn.SE id="1005" index="14" intVal="0" key="1633907830"/>
|
||||
<IPPlugIn.SE id="1005" index="15" intVal="0" key="1633907830"/>
|
||||
<IPPlugIn.SE id="1005" index="16" intVal="0" key="1633907830"/>
|
||||
<IPPlugIn.SE id="1005" index="17" intVal="1" key="1633907830"/>
|
||||
<IPPlugIn.SE id="1005" index="17" intVal="1" key="1702391908"/>
|
||||
<IPPlugIn.SE id="1005" index="16" intVal="1" key="1702391908"/>
|
||||
<IPPlugIn.SE id="1005" index="15" intVal="1" key="1702391908"/>
|
||||
<IPPlugIn.SE id="1005" index="14" intVal="0" key="1702391908"/>
|
||||
<IPPlugIn.SE id="1005" index="13" intVal="1" key="1702391908"/>
|
||||
<IPPlugIn.SE id="1005" index="12" intVal="1" key="1702391908"/>
|
||||
<IPPlugIn.SE id="1005" index="11" intVal="1" key="1702391908"/>
|
||||
<IPPlugIn.SE id="1005" index="10" intVal="1" key="1702391908"/>
|
||||
<IPPlugIn.SE id="3" index="10" intVal="0" key="1702391908"/>
|
||||
<IPPlugIn.SE id="3" index="11" intVal="0" key="1702391908"/>
|
||||
<IPPlugIn.SE id="2" intVal="0" key="1702391908"/>
|
||||
<IPPlugIn.SE id="2" index="1" intVal="0" key="1702391908"/>
|
||||
<IPPlugIn.SE id="1005" index="2" intVal="0" key="1633907830"/>
|
||||
<IPPlugIn.SE id="1005" index="3" intVal="0" key="1633907830"/>
|
||||
<IPPlugIn.SE id="1005" index="4" intVal="0" key="1633907830"/>
|
||||
<IPPlugIn.SE id="1005" index="5" intVal="0" key="1633907830"/>
|
||||
<IPPlugIn.SE id="1005" index="6" intVal="0" key="1633907830"/>
|
||||
<IPPlugIn.SE id="1005" index="7" intVal="0" key="1633907830"/>
|
||||
<IPPlugIn.SE id="1005" index="8" intVal="0" key="1633907830"/>
|
||||
<IPPlugIn.SE id="1005" index="9" intVal="0" key="1633907830"/>
|
||||
<IPPlugIn.SE id="1005" index="9" intVal="0" key="1702391908"/>
|
||||
<IPPlugIn.SE id="1005" index="8" intVal="1" key="1702391908"/>
|
||||
<IPPlugIn.SE id="1005" index="7" intVal="1" key="1702391908"/>
|
||||
<IPPlugIn.SE id="1005" index="6" intVal="1" key="1702391908"/>
|
||||
<IPPlugIn.SE id="1005" index="5" intVal="1" key="1702391908"/>
|
||||
<IPPlugIn.SE id="1005" index="4" intVal="1" key="1702391908"/>
|
||||
<IPPlugIn.SE id="1005" index="3" intVal="1" key="1702391908"/>
|
||||
<IPPlugIn.SE id="1005" index="2" intVal="1" key="1702391908"/>
|
||||
<IPPlugIn.SE id="2" index="2" intVal="0" key="1702391908"/>
|
||||
<IPPlugIn.SE id="1005" intVal="0" key="1633907830"/>
|
||||
<IPPlugIn.SE id="1005" index="1" intVal="1" key="1633907830"/>
|
||||
<IPPlugIn.SE id="1005" index="1" intVal="1" key="1702391908"/>
|
||||
<IPPlugIn.SE id="1005" intVal="1" key="1702391908"/>
|
||||
<IPPlugIn.SE id="1005" intVal="0" key="1886352248"/>
|
||||
<IPPlugIn.SE id="1005" intVal="0" key="1886352249"/>
|
||||
<IPPlugIn.SE id="125" intVal="-1" key="7562604"/>
|
||||
<IPPlugIn.SE id="102" index="1" intVal="397" key="1920231791"/>
|
||||
<IPPlugIn.SE id="102" index="1" intVal="163" key="1936292453"/>
|
||||
<IPPlugIn.SE id="102" index="1" intVal="1" key="1702391908"/>
|
||||
<IPPlugIn.SE id="1004" intVal="-1" key="7499639"/>
|
||||
<IPPlugIn.SE id="1004" intVal="0" key="1886352248"/>
|
||||
<IPPlugIn.SE id="1004" intVal="0" key="1886352249"/>
|
||||
<IPPlugIn.SE id="1004" intVal="218" key="2003072104"/>
|
||||
<IPPlugIn.SE id="1004" index="1" intVal="156" key="2003072104"/>
|
||||
<IPPlugIn.SE id="1004" index="2" intVal="156" key="2003072104"/>
|
||||
<IPPlugIn.SE id="1004" index="3" intVal="125" key="2003072104"/>
|
||||
<IPPlugIn.SE id="1004" index="4" intVal="108" key="2003072104"/>
|
||||
<IPPlugIn.SE id="1004" index="5" intVal="108" key="2003072104"/>
|
||||
<IPPlugIn.SE id="1004" index="5" intVal="1" key="1986622303"/>
|
||||
<IPPlugIn.SE id="1004" index="5" intVal="1348029508" key="1952540511"/>
|
||||
<IPPlugIn.SE id="1004" index="4" intVal="1" key="1986622303"/>
|
||||
<IPPlugIn.SE id="1004" index="4" intVal="1397316165" key="1952540511"/>
|
||||
<IPPlugIn.SE id="1004" index="3" intVal="1" key="1986622303"/>
|
||||
<IPPlugIn.SE id="1004" index="3" intVal="1347571540" key="1952540511"/>
|
||||
<IPPlugIn.SE id="1004" index="2" intVal="1" key="1986622303"/>
|
||||
<IPPlugIn.SE id="1004" index="2" intVal="1145394004" key="1952540511"/>
|
||||
<IPPlugIn.SE id="1004" index="1" intVal="1" key="1986622303"/>
|
||||
<IPPlugIn.SE id="1004" index="1" intVal="1397708114" key="1952540511"/>
|
||||
<IPPlugIn.SE id="1004" intVal="1" key="1986622303"/>
|
||||
<IPPlugIn.SE id="1004" intVal="1145393987" key="1952540511"/>
|
||||
<IPPlugIn.SE id="102" intVal="437" key="1920231791"/>
|
||||
<IPPlugIn.SE id="102" intVal="199" key="1936292453"/>
|
||||
<IPPlugIn.SE id="102" intVal="1" key="1702391908"/>
|
||||
<IPPlugIn.SE id="102" intVal="0" key="1919247220"/>
|
||||
<IPPlugIn.SE id="102" index="1" intVal="466" key="1919247220"/>
|
||||
<IPPlugIn.SE id="102" index="2" intVal="0" key="1919247220"/>
|
||||
<IPPlugIn.SE id="102" index="3" intVal="1188" key="1919247220"/>
|
||||
<IPPlugIn.SE id="1005" index="18" intVal="1" key="1702391908"/>
|
||||
<IPPlugIn.SE id="1005" index="18" intVal="0" key="1633907830"/>
|
||||
<IPPlugIn.SE id="1005" index="19" intVal="1" key="1702391908"/>
|
||||
<IPPlugIn.SE id="1005" index="19" intVal="0" key="1633907830"/>
|
||||
<IPPlugIn.SE id="1005" index="20" intVal="1" key="1702391908"/>
|
||||
<IPPlugIn.SE id="1005" index="20" intVal="1" key="1633907830"/>
|
||||
</IPPlugIn.PacketBuilder>
|
||||
End_Of_Object VSSPlugInConfiguration 6
|
||||
NULL
|
||||
|
@ -5257,7 +5295,7 @@ NULL
|
|||
End_Of_Object VDOLocalInfoStruct 3
|
||||
0.000000
|
||||
0 0
|
||||
1 1 0 59420 1 233 1 2882400001 323 556 331 782 2882400002 0 0 0 0 0 0 1 2882400001 1197 1197 333 333 2882400002 0 0 0 0 0 0 3
|
||||
1 1 0 59420 1 233 1 2882400001 323 556 331 782 2882400002 0 0 0 0 0 0 1 2882400001 1197 1197 333 333 2882400002 0 0 0 1630953112 0 0 3
|
||||
SS_BEGIN_COMMON_INFO
|
||||
1
|
||||
0
|
||||
|
@ -5269,7 +5307,7 @@ Ether1
|
|||
11
|
||||
1
|
||||
1
|
||||
609817640 1 0 1 0 1 1 0 0 0 2000 1
|
||||
574156496 1 0 1 0 1 1 0 0 0 2000 1
|
||||
SS_BEGIN_COMMON_INFO
|
||||
1
|
||||
3
|
||||
|
@ -5380,7 +5418,7 @@ End_Of_Serialized_Data 2
|
|||
End_Of_Object VWriteBox 2
|
||||
VWinStore 2 Begin_Of_Object
|
||||
1
|
||||
22 2 3 -32088 -32000 -1 -1 -10088 -10000 -9070 -9233
|
||||
22 2 3 -1 -1 -1 -1 -10088 -10000 -9070 -9233
|
||||
End_Of_Child_List
|
||||
End_Of_Object VWinStore 2
|
||||
VWinStore 2 Begin_Of_Object
|
||||
|
@ -5529,7 +5567,7 @@ End_Of_Object VScanBaudrateConfiguration 2
|
|||
0
|
||||
VPersistentPath 2 Begin_Of_Object
|
||||
1
|
||||
<VFileName V4 QL> 1 "modbus.cpd"
|
||||
<VFileName V4 QL> 1 "ModbusNet.cpd"
|
||||
End_Of_Object VPersistentPath 2
|
||||
0
|
||||
3
|
||||
|
|
|
@ -12,6 +12,7 @@ variables
|
|||
char Ip[16];
|
||||
char IpLsb[4];
|
||||
char IpNet[4];
|
||||
enum Vendor Vendor;
|
||||
word SerialCode;
|
||||
word DeviceCode;
|
||||
struct deviceIOs DeviceIOs;
|
||||
|
@ -20,7 +21,6 @@ variables
|
|||
char[16] gIps[long];
|
||||
char gScanFirstIp[16];
|
||||
char gScanLastIp[16];
|
||||
word gScanPort = 502;
|
||||
|
||||
char fnSysvar[40]; // Filename of Sysvars
|
||||
char fnDbc[40]; // Filename of DBC
|
||||
|
@ -33,40 +33,53 @@ variables
|
|||
struct device gIpsSorted[long];
|
||||
dword gScanFirst, gScanLast;
|
||||
word ADi, ADn, ADl;
|
||||
|
||||
byte gMaxTransmissionCount;
|
||||
}
|
||||
|
||||
on preStart
|
||||
{/*
|
||||
{
|
||||
// List of IPs of devices go here
|
||||
/*
|
||||
strncpy(gIps[0], "192.168.1.3", 16);
|
||||
strncpy(gIps[2], "192.168.1.4", 16);
|
||||
strncpy(gIps[3], "192.168.1.8", 16);*/
|
||||
strncpy(gIps[3], "192.168.1.8", 16);
|
||||
*/
|
||||
|
||||
// Scan a range of IPs for devices. Start and Stop go here
|
||||
strncpy(gScanFirstIp, "192.168.1.1", 16);
|
||||
strncpy(gScanLastIp, "192.168.1.100", 16);
|
||||
strncpy(gScanLastIp, "192.168.1.10", 16);
|
||||
|
||||
// Name of the project
|
||||
strncpy(name, "Modbus", elCount(name));
|
||||
// Paths to the generated files relative to .cfg
|
||||
strncpy(fnSysvar, "include/SysVars/generated.vsysvar", elCount(fnSysvar));
|
||||
strncpy(fnDbc, "include/DBC/generated.dbc", elCount(fnDbc));
|
||||
}
|
||||
|
||||
on start
|
||||
{
|
||||
gMaxTransmissionCount = @sysvar::Config::Modbus::MaxTransmissionCount;
|
||||
|
||||
if (gIps.Size() == 0)
|
||||
DetectDevices();
|
||||
else
|
||||
MakeIpNets();
|
||||
}
|
||||
|
||||
/// <PutString>
|
||||
void PutString(file f, char str[])
|
||||
{
|
||||
f.PutString(str, strlen(str));
|
||||
}
|
||||
/// <PutString>
|
||||
void PutString(file f, word d)
|
||||
{
|
||||
char str[6];
|
||||
ltoa(d, str, 10);
|
||||
f.PutString(str, strlen(str));
|
||||
}
|
||||
/// <PutString>
|
||||
void PutString(file f, byte d)
|
||||
{
|
||||
char str[4];
|
||||
|
@ -78,10 +91,11 @@ void PutString(file f, byte d)
|
|||
/// <Step1>
|
||||
void DetectDevices()
|
||||
{
|
||||
@sysvar::Config::Modbus::MaxTransmissionCount = 1;
|
||||
write("Scanning from %s to %s with timeout of %d ms", gScanFirstIp, gScanLastIp, @sysvar::Config::Modbus::RequestTimeout);
|
||||
gScanFirst = ipGetAddressAsNumber(gScanFirstIp);
|
||||
gScanLast = ipGetAddressAsNumber(gScanLastIp);
|
||||
ModbusConnectTo(gScanFirst, 502);
|
||||
ModbusConnectTo(gScanFirst, @sysvar::Config::Modbus::Port);
|
||||
ModbusReadBits(0, 1);
|
||||
}
|
||||
/// <Step1>
|
||||
|
@ -110,6 +124,7 @@ void DetectDevicesNext()
|
|||
}
|
||||
if (gScanFirst == gScanLast)
|
||||
{
|
||||
@sysvar::Config::Modbus::MaxTransmissionCount = gMaxTransmissionCount;
|
||||
MakeIpNets();
|
||||
return;
|
||||
}
|
||||
|
@ -166,10 +181,11 @@ void AnalyzeDevices()
|
|||
ADi = 0;
|
||||
ADl = gIpsSorted.Size();
|
||||
write("Analyzing %s...", gIpsSorted[ips[ADi]].Ip);
|
||||
gIpsSorted[ips[ADi]].Vendor = Wago;
|
||||
if (gRemoteIP != INVALID_IP)
|
||||
gRemoteIP = ips[ADi];
|
||||
else
|
||||
ModbusConnectTo(ips[ADi], gRemotePort);
|
||||
ModbusConnectTo(ips[ADi], @sysvar::Config::Modbus::Port);
|
||||
ModbusReadRegisters(0x2011, 1);
|
||||
ModbusReadRegisters(0x2012, 1);
|
||||
ModbusReadRegisters(0x2030, 65);
|
||||
|
@ -249,7 +265,7 @@ void OnModbusReadRegistersSuccess(struct ModbusResReceiveRegisters mbr, word num
|
|||
{
|
||||
if (mbr.Data[i] == 0x0000)
|
||||
break;
|
||||
ParseDeviceCode(mbr.Data[i], gIpsSorted[ips[ADi]].DeviceIOs);
|
||||
ParseDeviceCode(mbr.Data[i], gIpsSorted[ips[ADi]].Vendor, gIpsSorted[ips[ADi]].DeviceIOs);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -280,9 +296,15 @@ void GenSysvars()
|
|||
|
||||
PutString(f, " <namespace name=\"Config\" comment=\"\">\n");
|
||||
PutString(f, " <namespace name=\"Modbus\" comment=\"\">\n");
|
||||
PutString(f, " <variable anlyzLocal=\"2\" readOnly=\"false\" valueSequence=\"false\" unit=\"ms\" name=\"RequestTimeout\" comment=\"The maximum duration for a Modbus-UDP/-TCP request in milliseconds. After timeout a retransmission may be started (see MaxRetransmissionCount). Use `ping` to get the maximum latency to a device, double it and add 2-3 ms for processing.\" bitcount=\"32\" isSigned=\"true\" encoding=\"65001\" type=\"int\" startValue=\"5\" minValue=\"1\" minValuePhys=\"1\" maxValue=\"1000\" maxValuePhys=\"1000\" />\n");
|
||||
PutString(f, " <variable anlyzLocal=\"2\" readOnly=\"false\" valueSequence=\"false\" unit=\"\" name=\"Port\" comment=\"\" bitcount=\"32\" isSigned=\"true\" encoding=\"65001\" type=\"int\" startValue=\"502\" minValue=\"1\" minValuePhys=\"1\" maxValue=\"65535\" maxValuePhys=\"65535\" />\n");
|
||||
PutString(f, " <variable anlyzLocal=\"2\" readOnly=\"false\" valueSequence=\"false\" unit=\"times\" name=\"MaxTransmissionCount\" comment=\"How often a retransmission of a request will be sent until it gets discarded and an error is thrown.\" bitcount=\"32\" isSigned=\"true\" encoding=\"65001\" type=\"int\" startValue=\"3\" minValue=\"1\" minValuePhys=\"1\" maxValue=\"10\" maxValuePhys=\"10\" />\n");
|
||||
PutString(f, " <variable anlyzLocal=\"2\" readOnly=\"false\" valueSequence=\"false\" unit=\"ms\" name=\"RequestTimeout\" comment=\"The maximum duration for a Modbus-UDP/-TCP request in milliseconds. After timeout a retransmission may be started (see MaxRetransmissionCount). Use `ping` to get the maximum latency to a device, double it and add 2-3 ms for processing.\" bitcount=\"32\" isSigned=\"true\" encoding=\"65001\" type=\"int\" startValue=\"");
|
||||
PutString(f, (word)@sysvar::Config::Modbus::RequestTimeout);
|
||||
PutString(f, "\" minValue=\"1\" minValuePhys=\"1\" maxValue=\"1000\" maxValuePhys=\"1000\" />\n");
|
||||
PutString(f, " <variable anlyzLocal=\"2\" readOnly=\"false\" valueSequence=\"false\" unit=\"\" name=\"Port\" comment=\"\" bitcount=\"32\" isSigned=\"true\" encoding=\"65001\" type=\"int\" startValue=\"");
|
||||
PutString(f, (word)@sysvar::Config::Modbus::Port);
|
||||
PutString(f, "\" minValue=\"1\" minValuePhys=\"1\" maxValue=\"65535\" maxValuePhys=\"65535\" />\n");
|
||||
PutString(f, " <variable anlyzLocal=\"2\" readOnly=\"false\" valueSequence=\"false\" unit=\"times\" name=\"MaxTransmissionCount\" comment=\"How often a retransmission of a request will be sent until it gets discarded and an error is thrown.\" bitcount=\"32\" isSigned=\"true\" encoding=\"65001\" type=\"int\" startValue=\"");
|
||||
PutString(f, (byte)@sysvar::Config::Modbus::MaxTransmissionCount);
|
||||
PutString(f, "\" minValue=\"1\" minValuePhys=\"1\" maxValue=\"10\" maxValuePhys=\"10\" />\n");
|
||||
PutString(f, " </namespace>\n");
|
||||
PutString(f, " <namespace name=\"TcpIp\" comment=\"\">\n");
|
||||
PutString(f, " <variable anlyzLocal=\"2\" readOnly=\"false\" valueSequence=\"false\" unit=\"\" name=\"AdapterIndex\" comment=\"Index of network interface to use\" bitcount=\"32\" isSigned=\"true\" encoding=\"65001\" type=\"int\" startValue=\"2\" minValue=\"1\" minValuePhys=\"1\" maxValue=\"20\" maxValuePhys=\"20\" />\n");
|
||||
|
@ -325,6 +347,15 @@ void GenSysvars()
|
|||
|
||||
//Namespace Info
|
||||
PutString(f, " <namespace name=\"Info\" comment=\"Some information about the device\">\n");
|
||||
// Vendor
|
||||
PutString(f, " <variable anlyzLocal=\"2\" readOnly=\"true\" valueSequence=\"false\" unit=\"\" name=\"Vendor\" comment=\"The vendor of the device\" bitcount=\"32\" isSigned=\"true\" encoding=\"65001\" type=\"int\" startValue=\"");
|
||||
PutString(f, (byte)gIpsSorted[ipN].Vendor);
|
||||
PutString(f, "\">\n");
|
||||
PutString(f, " <valuetable definesMinMax=\"true\">\n");
|
||||
PutString(f, " <valuetableentry value=\"2\" description=\"BuR\" />\n");
|
||||
PutString(f, " <valuetableentry value=\"23\" description=\"Wago\" />\n");
|
||||
PutString(f, " </valuetable>\n");
|
||||
PutString(f, " </variable>\n");
|
||||
// SerialCode
|
||||
PutString(f, " <variable anlyzLocal=\"2\" readOnly=\"true\" valueSequence=\"false\" unit=\"\" name=\"SerialCode\" comment=\"The serial code of the server\" bitcount=\"32\" isSigned=\"true\" encoding=\"65001\" type=\"int\" startValue=\"");
|
||||
PutString(f, gIpsSorted[ipN].SerialCode);
|
||||
|
@ -334,7 +365,7 @@ void GenSysvars()
|
|||
PutString(f, gIpsSorted[ipN].DeviceCode);
|
||||
PutString(f, "\" minValue=\"1\" minValuePhys=\"1\" maxValue=\"10000\" maxValuePhys=\"10000\" />\n");
|
||||
// Modules
|
||||
gIpsSorted[ipN].DeviceIOs.Modules[strlen(gIpsSorted[ipN].DeviceIOs.Modules)] = 0;
|
||||
gIpsSorted[ipN].DeviceIOs.Modules[strlen(gIpsSorted[ipN].DeviceIOs.Modules)-1] = 0;
|
||||
PutString(f, " <variable anlyzLocal=\"2\" readOnly=\"true\" valueSequence=\"false\" unit=\"\" name=\"Modules\" comment=\"The type and number of inputs of modules that are connected to the server\" bitcount=\"8\" isSigned=\"true\" encoding=\"65001\" type=\"string\" startValue=\"");
|
||||
PutString(f, gIpsSorted[ipN].DeviceIOs.Modules);
|
||||
PutString(f, "\" />\n");
|
||||
|
@ -359,19 +390,19 @@ void GenSysvars()
|
|||
// Namespace Data
|
||||
PutString(f, " <namespace name=\"Data\" comment=\"The actual process image\">\n");
|
||||
// InputRegisters
|
||||
PutString(f, " <variable anlyzLocal=\"2\" readOnly=\"false\" valueSequence=\"false\" unit=\"\" name=\"InputRegisters\" comment=\"The values of the input registers\" bitcount=\"32\" isSigned=\"true\" encoding=\"65001\" type=\"intarray\" arrayLength=\"");
|
||||
PutString(f, " <variable anlyzLocal=\"2\" readOnly=\"false\" valueSequence=\"false\" unit=\"\" name=\"InputRegisters\" comment=\"The values of the input registers\" bitcount=\"9\" isSigned=\"true\" encoding=\"65001\" type=\"intarray\" arrayLength=\"");
|
||||
PutString(f, gIpsSorted[ipN].DeviceIOs.InputRegisters);
|
||||
PutString(f, "\" />\n");
|
||||
// InputBits
|
||||
PutString(f, " <variable anlyzLocal=\"2\" readOnly=\"false\" valueSequence=\"false\" unit=\"\" name=\"InputBits\" comment=\"The state of the input bits\" bitcount=\"32\" isSigned=\"true\" encoding=\"65001\" type=\"intarray\" arrayLength=\"");
|
||||
PutString(f, " <variable anlyzLocal=\"2\" readOnly=\"false\" valueSequence=\"false\" unit=\"\" name=\"InputBits\" comment=\"The state of the input bits\" bitcount=\"2\" isSigned=\"true\" encoding=\"65001\" type=\"intarray\" arrayLength=\"");
|
||||
PutString(f, gIpsSorted[ipN].DeviceIOs.InputBits);
|
||||
PutString(f, "\" />\n");
|
||||
// OutputRegisters
|
||||
PutString(f, " <variable anlyzLocal=\"2\" readOnly=\"false\" valueSequence=\"false\" unit=\"\" name=\"OutputRegisters\" comment=\"The values of the output registers. Write here and the values will be sent to the device\" bitcount=\"32\" isSigned=\"true\" encoding=\"65001\" type=\"intarray\" arrayLength=\"");
|
||||
PutString(f, " <variable anlyzLocal=\"2\" readOnly=\"false\" valueSequence=\"false\" unit=\"\" name=\"OutputRegisters\" comment=\"The values of the output registers. Write here and the values will be sent to the device\" bitcount=\"9\" isSigned=\"true\" encoding=\"65001\" type=\"intarray\" arrayLength=\"");
|
||||
PutString(f, gIpsSorted[ipN].DeviceIOs.OutputRegisters);
|
||||
PutString(f, "\" />\n");
|
||||
// OutputBits
|
||||
PutString(f, " <variable anlyzLocal=\"2\" readOnly=\"false\" valueSequence=\"false\" unit=\"\" name=\"OutputBits\" comment=\"The state of the output bits. Write here and the values will be sent to the device\" bitcount=\"32\" isSigned=\"true\" encoding=\"65001\" type=\"intarray\" arrayLength=\"");
|
||||
PutString(f, " <variable anlyzLocal=\"2\" readOnly=\"false\" valueSequence=\"false\" unit=\"\" name=\"OutputBits\" comment=\"The state of the output bits. Write here and the values will be sent to the device\" bitcount=\"2\" isSigned=\"true\" encoding=\"65001\" type=\"intarray\" arrayLength=\"");
|
||||
PutString(f, gIpsSorted[ipN].DeviceIOs.OutputBits);
|
||||
PutString(f, "\" />\n");
|
||||
|
||||
|
@ -456,15 +487,25 @@ void GenDbc()
|
|||
|
||||
|
||||
|
||||
|
||||
/// <zzzModbus>
|
||||
void OnModbusWriteBitFailed(enum ModbusRequestError error, enum ModbusException ex, struct ModbusApHeader mbap){}
|
||||
/// <zzzModbus>
|
||||
void OnModbusWriteRegisterFailed(enum ModbusRequestError error, enum ModbusException ex, struct ModbusApHeader mbap){}
|
||||
/// <zzzModbus>
|
||||
void OnModbusWriteMasksFailed(enum ModbusRequestError error, enum ModbusException ex, struct ModbusApHeader mbap){}
|
||||
/// <zzzModbus>
|
||||
void OnModbusReadWriteRegistersFailed(enum ModbusRequestError error, enum ModbusException ex, struct ModbusApHeader mbap){}
|
||||
/// <zzzModbus>
|
||||
void OnModbusWriteBitsFailed(enum ModbusRequestError error, enum ModbusException ex, struct ModbusApHeader mbap){}
|
||||
/// <zzzModbus>
|
||||
void OnModbusWriteRegistersFailed(enum ModbusRequestError error, enum ModbusException ex, struct ModbusApHeader mbap){}
|
||||
/// <zzzModbus>
|
||||
void OnModbusWriteBitSuccess(struct ModbusResConfirmSingle mbc){}
|
||||
/// <zzzModbus>
|
||||
void OnModbusWriteRegisterSuccess(struct ModbusResConfirmSingle mbc){}
|
||||
/// <zzzModbus>
|
||||
void OnModbusWriteBitsSuccess(struct ModbusResConfirmMultiple mbc){}
|
||||
/// <zzzModbus>
|
||||
void OnModbusWriteRegistersSuccess(struct ModbusResConfirmMultiple mbc){}
|
||||
/// <zzzModbus>
|
||||
void OnModbusWriteMasksSuccess(struct ModbusResConfirmMasks mbc){}
|
|
@ -22,7 +22,6 @@ on preStart
|
|||
on start
|
||||
{
|
||||
ModbusInit();
|
||||
SysvarInit();
|
||||
|
||||
|
||||
// Read serial code, additional stuff is done in OnModbusReceiveRegisters
|
||||
|
|
|
@ -1,6 +1,12 @@
|
|||
/*@!Encoding:1252*/
|
||||
variables
|
||||
{
|
||||
enum Vendor
|
||||
{
|
||||
BuR = 2,
|
||||
Wago = 23
|
||||
};
|
||||
|
||||
struct deviceIOs
|
||||
{
|
||||
byte InputRegisters;
|
||||
|
@ -10,63 +16,68 @@ variables
|
|||
char Modules[1024];
|
||||
};
|
||||
}
|
||||
void SysvarInit()
|
||||
{
|
||||
sysSetVariableString("%BUS_TYPE%%CHANNEL%::%NODE_NAME%::Info", "Modules", "");
|
||||
}
|
||||
|
||||
void ParseDeviceCode(word dev, struct deviceIOs dios)
|
||||
void ParseDeviceCode(word dev, enum Vendor vendor, struct deviceIOs dios)
|
||||
{
|
||||
byte input;
|
||||
byte numChannels;
|
||||
char module[10];
|
||||
|
||||
if (dev & 0x8000) // Digital Module
|
||||
switch(vendor)
|
||||
{
|
||||
numChannels = (dev >> 8) & 0x007F;
|
||||
case Wago: // if this is a Wago device
|
||||
|
||||
if (dev & 0x0001) // Input Module
|
||||
{
|
||||
input = 1;
|
||||
strncpy(module, "DI%d,", elCount(module));
|
||||
dios.InputBits += numChannels;
|
||||
}
|
||||
else if (dev & 0x0002) // Output Module
|
||||
{
|
||||
input = 0;
|
||||
strncpy(module, "DO%d,", elCount(module));
|
||||
dios.OutputBits += numChannels;
|
||||
}
|
||||
else // blööd
|
||||
{
|
||||
writeLineEx(0, 3, "<%NODE_NAME%> Device code 0x%X cannot be decoded", dev);
|
||||
runError(1003, 1);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
switch (dev)
|
||||
{
|
||||
case 881: // devices that have no inputs/outputs
|
||||
return;
|
||||
case 477: // devices that have 2 outputs
|
||||
input = 0;
|
||||
numChannels = 2;
|
||||
break;
|
||||
default: // unknown device. Ouch!
|
||||
writeLineEx(0, 2, "<%NODE_NAME%> Connected device: 750-%d", dev);
|
||||
return;
|
||||
}
|
||||
if (input)
|
||||
{
|
||||
strncpy(module, "AI%d,", elCount(module));
|
||||
dios.InputRegisters += numChannels;
|
||||
}
|
||||
else
|
||||
{
|
||||
strncpy(module, "AO%d,", elCount(module));
|
||||
dios.OutputRegisters += numChannels;
|
||||
}
|
||||
if (dev & 0x8000) // Digital Module
|
||||
{
|
||||
numChannels = (dev >> 8) & 0x007F;
|
||||
|
||||
if (dev & 0x0001) // Input Module
|
||||
{
|
||||
input = 1;
|
||||
strncpy(module, "DI%d,", elCount(module));
|
||||
dios.InputBits += numChannels;
|
||||
}
|
||||
else if (dev & 0x0002) // Output Module
|
||||
{
|
||||
input = 0;
|
||||
strncpy(module, "DO%d,", elCount(module));
|
||||
dios.OutputBits += numChannels;
|
||||
}
|
||||
else // blööd
|
||||
{
|
||||
writeLineEx(0, 3, "<%NODE_NAME%> Device code 0x%X cannot be decoded", dev);
|
||||
runError(1003, 1);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
switch (dev)
|
||||
{
|
||||
case 881: // devices that have no inputs/outputs
|
||||
return;
|
||||
case 477: // devices that have 2 outputs
|
||||
input = 0;
|
||||
numChannels = 2;
|
||||
break;
|
||||
default: // unknown device. Ouch!
|
||||
writeLineEx(0, 2, "<%NODE_NAME%> Connected device: 750-%d", dev);
|
||||
return;
|
||||
}
|
||||
if (input)
|
||||
{
|
||||
strncpy(module, "AI%d,", elCount(module));
|
||||
dios.InputRegisters += numChannels;
|
||||
}
|
||||
else
|
||||
{
|
||||
strncpy(module, "AO%d,", elCount(module));
|
||||
dios.OutputRegisters += numChannels;
|
||||
}
|
||||
}
|
||||
break; // switch(vendor)
|
||||
default:
|
||||
writeLineEx(0, 2, "<%NODE_NAME%> Unknown vendor id: %d", vendor);
|
||||
return;
|
||||
}
|
||||
|
||||
snprintf(module, elCount(module), module, numChannels);
|
||||
|
|
|
@ -3,9 +3,9 @@
|
|||
<namespace name="" comment="">
|
||||
<namespace name="Config" comment="">
|
||||
<namespace name="Modbus" comment="">
|
||||
<variable anlyzLocal="2" readOnly="false" valueSequence="false" unit="ms" name="RequestTimeout" comment="The maximum duration for a Modbus-UDP/-TCP request in milliseconds. After timeout a retransmission may be started (see MaxRetransmissionCount). Use `ping` to get the maximum latency to a device, double it and add 2-3 ms for processing." bitcount="32" isSigned="true" encoding="65001" type="int" startValue="5" minValue="1" minValuePhys="1" maxValue="1000" maxValuePhys="1000" />
|
||||
<variable anlyzLocal="2" readOnly="false" valueSequence="false" unit="ms" name="RequestTimeout" comment="The maximum duration for a Modbus-UDP/-TCP request in milliseconds. After timeout a retransmission may be started (see MaxRetransmissionCount). Use `ping` to get the maximum latency to a device, double it and add 2-3 ms for processing." bitcount="32" isSigned="true" encoding="65001" type="int" startValue="7" minValue="1" minValuePhys="1" maxValue="1000" maxValuePhys="1000" />
|
||||
<variable anlyzLocal="2" readOnly="false" valueSequence="false" unit="" name="Port" comment="" bitcount="32" isSigned="true" encoding="65001" type="int" startValue="502" minValue="1" minValuePhys="1" maxValue="65535" maxValuePhys="65535" />
|
||||
<variable anlyzLocal="2" readOnly="false" valueSequence="false" unit="times" name="MaxTransmissionCount" comment="How often a retransmission of a request will be sent until it gets discarded and an error is thrown." bitcount="32" isSigned="true" encoding="65001" type="int" startValue="3" minValue="1" minValuePhys="1" maxValue="10" maxValuePhys="10" />
|
||||
<variable anlyzLocal="2" readOnly="false" valueSequence="false" unit="times" name="MaxTransmissionCount" comment="How often a retransmission of a request will be sent until it gets discarded and an error is thrown." bitcount="32" isSigned="true" encoding="65001" type="int" startValue="2" minValue="1" minValuePhys="1" maxValue="10" maxValuePhys="10" />
|
||||
</namespace>
|
||||
<namespace name="TcpIp" comment="">
|
||||
<variable anlyzLocal="2" readOnly="false" valueSequence="false" unit="" name="AdapterIndex" comment="Index of network interface to use" bitcount="32" isSigned="true" encoding="65001" type="int" startValue="2" minValue="1" minValuePhys="1" maxValue="20" maxValuePhys="20" />
|
||||
|
@ -18,19 +18,25 @@
|
|||
<variable anlyzLocal="2" readOnly="false" valueSequence="false" unit="ms" name="Interval" comment="The interval with which the device will be queried" bitcount="32" isSigned="true" encoding="65001" type="int" startValue="100" minValue="10" minValuePhys="10" maxValue="10000" maxValuePhys="10000" />
|
||||
</namespace>
|
||||
<namespace name="Info" comment="Some information about the device">
|
||||
<variable anlyzLocal="2" readOnly="true" valueSequence="false" unit="" name="Vendor" comment="The vendor of the device" bitcount="32" isSigned="true" encoding="65001" type="int" startValue="23">
|
||||
<valuetable definesMinMax="true">
|
||||
<valuetableentry value="2" description="BuR" />
|
||||
<valuetableentry value="23" description="Wago" />
|
||||
</valuetable>
|
||||
</variable>
|
||||
<variable anlyzLocal="2" readOnly="true" valueSequence="false" unit="" name="SerialCode" comment="The serial code of the server" bitcount="32" isSigned="true" encoding="65001" type="int" startValue="750" minValue="1" minValuePhys="1" maxValue="10000" maxValuePhys="10000" />
|
||||
<variable anlyzLocal="2" readOnly="true" valueSequence="false" unit="" name="DeviceCode" comment="The device code of the server" bitcount="32" isSigned="true" encoding="65001" type="int" startValue="881" minValue="1" minValuePhys="1" maxValue="10000" maxValuePhys="10000" />
|
||||
<variable anlyzLocal="2" readOnly="true" valueSequence="false" unit="" name="Modules" comment="The type and number of inputs of modules that are connected to the server" bitcount="8" isSigned="true" encoding="65001" type="string" startValue="DI2,DO16," />
|
||||
<variable anlyzLocal="2" readOnly="true" valueSequence="false" unit="" name="Modules" comment="The type and number of inputs of modules that are connected to the server" bitcount="8" isSigned="true" encoding="65001" type="string" startValue="DI2,DO16" />
|
||||
<variable anlyzLocal="2" readOnly="true" valueSequence="false" unit="" name="InputRegisters" comment="Number of input registers" bitcount="32" isSigned="true" encoding="65001" type="int" startValue="0" minValue="0" minValuePhys="0" maxValue="123" maxValuePhys="123" />
|
||||
<variable anlyzLocal="2" readOnly="true" valueSequence="false" unit="" name="InputBits" comment="Number of input bits" bitcount="32" isSigned="true" encoding="65001" type="int" startValue="2" minValue="0" minValuePhys="0" maxValue="2000" maxValuePhys="2000" />
|
||||
<variable anlyzLocal="2" readOnly="true" valueSequence="false" unit="" name="OutputRegisters" comment="Number of output registers" bitcount="32" isSigned="true" encoding="65001" type="int" startValue="0" minValue="0" minValuePhys="0" maxValue="123" maxValuePhys="123" />
|
||||
<variable anlyzLocal="2" readOnly="true" valueSequence="false" unit="" name="OutputBits" comment="Number of output bits" bitcount="32" isSigned="true" encoding="65001" type="int" startValue="16" minValue="0" minValuePhys="0" maxValue="2000" maxValuePhys="2000" />
|
||||
</namespace>
|
||||
<namespace name="Data" comment="The actual process image">
|
||||
<variable anlyzLocal="2" readOnly="false" valueSequence="false" unit="" name="InputRegisters" comment="The values of the input registers" bitcount="32" isSigned="true" encoding="65001" type="intarray" arrayLength="0" />
|
||||
<variable anlyzLocal="2" readOnly="false" valueSequence="false" unit="" name="InputBits" comment="The state of the input bits" bitcount="32" isSigned="true" encoding="65001" type="intarray" arrayLength="2" />
|
||||
<variable anlyzLocal="2" readOnly="false" valueSequence="false" unit="" name="OutputRegisters" comment="The values of the output registers. Write here and the values will be sent to the device" bitcount="32" isSigned="true" encoding="65001" type="intarray" arrayLength="0" />
|
||||
<variable anlyzLocal="2" readOnly="false" valueSequence="false" unit="" name="OutputBits" comment="The state of the output bits. Write here and the values will be sent to the device" bitcount="32" isSigned="true" encoding="65001" type="intarray" arrayLength="16" />
|
||||
<variable anlyzLocal="2" readOnly="false" valueSequence="false" unit="" name="InputRegisters" comment="The values of the input registers" bitcount="9" isSigned="true" encoding="65001" type="intarray" arrayLength="0" />
|
||||
<variable anlyzLocal="2" readOnly="false" valueSequence="false" unit="" name="InputBits" comment="The state of the input bits" bitcount="2" isSigned="true" encoding="65001" type="intarray" arrayLength="2" />
|
||||
<variable anlyzLocal="2" readOnly="false" valueSequence="false" unit="" name="OutputRegisters" comment="The values of the output registers. Write here and the values will be sent to the device" bitcount="9" isSigned="true" encoding="65001" type="intarray" arrayLength="0" />
|
||||
<variable anlyzLocal="2" readOnly="false" valueSequence="false" unit="" name="OutputBits" comment="The state of the output bits. Write here and the values will be sent to the device" bitcount="2" isSigned="true" encoding="65001" type="intarray" arrayLength="16" />
|
||||
</namespace>
|
||||
</namespace>
|
||||
</namespace>
|
||||
|
|
Loading…
Reference in a new issue