When I export a project with CAN device, the resulting PLCOpen xml file includes the CAN cfg.
I noticed that the elements in the section <configuration name="CAN_Local_Device"> have ParameterId attributes.</configuration>
Are these ParameterId attributes fixed or variable?
What are the 'rules' for creating CAN cfg ParameterId attributes?
For example: Is the "Vendor ID" always ParameterId="285310992"? Or can it be any number like ParameterId="12345", as long as it's a unique number.
(Reason for asking: I want to create a PLCOpen file with CAN cfg, via an external application. And import it in CoDeSys.
When I export a project and change the ParameterIds, starting from 1 and counting up, an re-import does not show the correct result.)
When I export a project with CAN device, the resulting PLCOpen xml file includes the CAN cfg.
I noticed that the elements in the section <configuration name="CAN_Local_Device"> have ParameterId attributes.</configuration>
Are these ParameterId attributes fixed or variable?
What are the 'rules' for creating CAN cfg ParameterId attributes?
For example: Is the "Vendor ID" always ParameterId="285310992"? Or can it be any number like ParameterId="12345", as long as it's a unique number.
(Reason for asking: I want to create a PLCOpen file with CAN cfg, via an external application. And import it in CoDeSys.
When I export a project and change the ParameterIds, starting from 1 and counting up, an re-import does not show the correct result.)
For example (export PLCOpen file):
...
<parametersection>
<name>CAN-Parameter</name>
<description>
<parameter type="localTypes:RangeNodeID" parameterid="1"> <-- ParameterId="1"
<attributes onlineaccess="read">
<value>1</value>
<name>Node-ID</name>
</attributes></parameter>
<parameter type="std:STRING" parameterid="20"> <-- ParameterId="20"
<attributes download="false" onlineaccess="read">
<value>'3S - Smart Software Solutions GmbH'</value>
<name>Vendor Name</name>
</attributes></parameter>
...
<parameter type="std:DWORD" parameterid="285310992"> <-- ParameterId="285310992"
<attributes onlineaccess="read">
<value>0</value>
<name>Vendor ID</name>
</attributes></parameter>
...</description></parametersection>
After some analysis, I found that the ParameterId s are fixed.
Are these ParameterId s specified somewhere?
For the CANbus and CAN_Local_Device (from 3S), I made a list manually:
CANbus: <name>Settings</name>
0x0 "Baudrate" "std:INT" 0
0x1 "DummyParameter1" "std:DWORD" 1
0x2 "NetID" "std:DWORD" 2
0x1000 "BlockFDTSDO" "std:BOOL" 4096
CAN_Local_Device: <name>CAN-Parameter</name>
0x1 "Node-ID" "localTypes:RangeNodeID" 1
0x14 "Vendor Name" "std:STRING" 20
0x15 "Product Name" "std:STRING" 21
0x16 "Number of IO ranges" "std:DWORD" 22
0x17 "Number of parameter ranges" "std:DWORD" 23
0x18 "UpdateIoWhileInStop" "std:BOOL" 24
CAN_Local_Device: <name>TxPDOs</name> and <name>RxPDOs</name>
0x4 "NrOfRXPDO" "std:UINT" 4
0x5 "NrOfTXPDO" "std:UINT" 5
CAN_Local_Device: <name>available TxPDOs</name> and <name>available RxPDOs</name>
formula: (Index << 12) | Type
0x1400000 "Settings" "localTypes:Struct_PDOCommunicationParameter" 20971520
0x1400001 "Generic COBID" "std:STRING" 20971521
CAN_Local_Device: <name>RxPDO-Mappings</name> and <name>TxPDO-Mappings</name>
formula: 0x10000.0000 | (Index << 12) | (Sub_Index << 4) | Type
0x11600010 "Digital_Outputs1_1" "localTypes:Struct_PDOMappingEntry" 291504144
0x11600011 "Digital_Outputs1_1" "std:USINT" 291504145
CAN_Local_Device: <name>IoRanges</name>
formula: 0x3000.0000 | IoRange
0x30000000 "Digital_Inputs1" "localTypes:Struct_IoRange" 805306368