<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to PLCOpen and CoDeSys: CAN cfg ParameterId: fixed or variable?</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/b319fb161f/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/Engineering/thread/b319fb161f/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/Engineering/thread/b319fb161f/</id><updated>2020-02-27T13:51:49.233000Z</updated><subtitle>Recent posts to PLCOpen and CoDeSys: CAN cfg ParameterId: fixed or variable?</subtitle><entry><title>PLCOpen and CoDeSys: CAN cfg ParameterId: fixed or variable?</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/b319fb161f/?limit=25#161a" rel="alternate"/><published>2020-02-27T13:51:49.233000Z</published><updated>2020-02-27T13:51:49.233000Z</updated><author><name>chab</name><uri>https://forge.codesys.com/u/chab/</uri></author><id>https://forge.codesys.com946f6cc6ca6592bde5d70fa94750d2b9939ea041</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;After some analysis, I found that the ParameterId s are fixed.&lt;/p&gt;
&lt;p&gt;Are these ParameterId s specified somewhere?&lt;/p&gt;
&lt;p&gt;For the CANbus and CAN_Local_Device (from 3S), I made a list manually:&lt;/p&gt;
&lt;p&gt;CANbus: &amp;lt;name&amp;gt;Settings&amp;lt;/name&amp;gt;&lt;br/&gt;
0x0          "Baudrate"                     "std:INT"                               0&lt;br/&gt;
0x1          "DummyParameter1"              "std:DWORD"                             1&lt;br/&gt;
0x2          "NetID"                        "std:DWORD"                             2&lt;br/&gt;
0x1000       "BlockFDTSDO"                  "std:BOOL"                           4096&lt;/p&gt;
&lt;p&gt;CAN_Local_Device: &amp;lt;name&amp;gt;CAN-Parameter&amp;lt;/name&amp;gt;&lt;br/&gt;
0x1          "Node-ID"                      "localTypes:RangeNodeID"                1&lt;br/&gt;
0x14         "Vendor Name"                  "std:STRING"                           20&lt;br/&gt;
0x15         "Product Name"                 "std:STRING"                           21&lt;br/&gt;
0x16         "Number of IO ranges"          "std:DWORD"                            22&lt;br/&gt;
0x17         "Number of parameter ranges"   "std:DWORD"                            23&lt;br/&gt;
0x18         "UpdateIoWhileInStop"          "std:BOOL"                             24&lt;/p&gt;
&lt;p&gt;CAN_Local_Device: &amp;lt;name&amp;gt;TxPDOs&amp;lt;/name&amp;gt; and &amp;lt;name&amp;gt;RxPDOs&amp;lt;/name&amp;gt;&lt;br/&gt;
0x4          "NrOfRXPDO"                    "std:UINT"                              4&lt;br/&gt;
0x5          "NrOfTXPDO"                    "std:UINT"                              5&lt;/p&gt;
&lt;p&gt;CAN_Local_Device: &amp;lt;name&amp;gt;available TxPDOs&amp;lt;/name&amp;gt; and &amp;lt;name&amp;gt;available RxPDOs&amp;lt;/name&amp;gt;&lt;br/&gt;
formula: (Index &amp;lt;&amp;lt; 12) | Type&lt;br/&gt;
0x1400000    "Settings"                     "localTypes:Struct_PDOCommunicationParameter" 20971520&lt;br/&gt;
0x1400001    "Generic COBID"                "std:STRING"                                  20971521&lt;/p&gt;
&lt;p&gt;CAN_Local_Device: &amp;lt;name&amp;gt;RxPDO-Mappings&amp;lt;/name&amp;gt; and &amp;lt;name&amp;gt;TxPDO-Mappings&amp;lt;/name&amp;gt;&lt;br/&gt;
formula: 0x10000.0000 | (Index &amp;lt;&amp;lt; 12) | (Sub_Index &amp;lt;&amp;lt; 4) | Type&lt;br/&gt;
0x11600010   "Digital_Outputs1_1"           "localTypes:Struct_PDOMappingEntry"           291504144&lt;br/&gt;
0x11600011   "Digital_Outputs1_1"           "std:USINT"                                   291504145&lt;/p&gt;
&lt;p&gt;CAN_Local_Device: &amp;lt;name&amp;gt;IoRanges&amp;lt;/name&amp;gt;&lt;br/&gt;
formula: 0x3000.0000 | IoRange&lt;br/&gt;
0x30000000   "Digital_Inputs1"              "localTypes:Struct_IoRange"     805306368&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>PLCOpen and CoDeSys: CAN cfg ParameterId: fixed or variable?</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/b319fb161f/?limit=25#bf08" rel="alternate"/><published>2020-02-27T13:51:49.076000Z</published><updated>2020-02-27T13:51:49.076000Z</updated><author><name>chab</name><uri>https://forge.codesys.com/u/chab/</uri></author><id>https://forge.codesys.com0b179d723fab11a2722bc88d4cef85ef2d80f485</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;When I export a project with CAN device, the resulting PLCOpen xml file includes the CAN cfg.&lt;br/&gt;
I noticed that the elements in the section &amp;lt;configuration name="CAN_Local_Device"&amp;gt; have ParameterId attributes.&amp;lt;/configuration&amp;gt;&lt;/p&gt;
&lt;p&gt;Are these ParameterId attributes fixed or variable? &lt;br/&gt;
What are the 'rules' for creating CAN cfg ParameterId attributes?&lt;/p&gt;
&lt;p&gt;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.&lt;/p&gt;
&lt;p&gt;(Reason for asking: I want to create a PLCOpen file with CAN cfg, via an external application. And import it in CoDeSys.&lt;br/&gt;
When I export a project and change the ParameterIds, starting from 1 and counting up, an re-import does not show the correct result.)&lt;/p&gt;
&lt;p&gt;For example (export PLCOpen file): &lt;br/&gt;
...&lt;br/&gt;
&amp;lt;parametersection&amp;gt;&lt;br/&gt;
  &amp;lt;name&amp;gt;CAN-Parameter&amp;lt;/name&amp;gt;&lt;br/&gt;
  &amp;lt;description&amp;gt;&lt;br/&gt;
  &amp;lt;parameter type="localTypes:RangeNodeID" parameterid="1"&amp;gt;            &amp;lt;-- ParameterId="1"&lt;br/&gt;
    &amp;lt;attributes onlineaccess="read"&amp;gt;&lt;br/&gt;
    &amp;lt;value&amp;gt;1&amp;lt;/value&amp;gt;&lt;br/&gt;
    &amp;lt;name&amp;gt;Node-ID&amp;lt;/name&amp;gt;&lt;br/&gt;
  &amp;lt;/attributes&amp;gt;&amp;lt;/parameter&amp;gt;&lt;br/&gt;
  &amp;lt;parameter type="std:STRING" parameterid="20"&amp;gt;                      &amp;lt;-- ParameterId="20" &lt;br/&gt;
    &amp;lt;attributes download="false" onlineaccess="read"&amp;gt;&lt;br/&gt;
    &amp;lt;value&amp;gt;'3S - Smart Software Solutions GmbH'&amp;lt;/value&amp;gt;&lt;br/&gt;
    &amp;lt;name&amp;gt;Vendor Name&amp;lt;/name&amp;gt;&lt;br/&gt;
  &amp;lt;/attributes&amp;gt;&amp;lt;/parameter&amp;gt;&lt;br/&gt;
...&lt;br/&gt;
  &amp;lt;parameter type="std:DWORD" parameterid="285310992"&amp;gt;          &amp;lt;-- ParameterId="285310992"&lt;br/&gt;
    &amp;lt;attributes onlineaccess="read"&amp;gt;&lt;br/&gt;
    &amp;lt;value&amp;gt;0&amp;lt;/value&amp;gt;&lt;br/&gt;
    &amp;lt;name&amp;gt;Vendor ID&amp;lt;/name&amp;gt;&lt;br/&gt;
  &amp;lt;/attributes&amp;gt;&amp;lt;/parameter&amp;gt;&lt;br/&gt;
...&amp;lt;/description&amp;gt;&amp;lt;/parametersection&amp;gt;&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>