Parameters for GSD based modules can be set via parameter records.
This is based on the parameters described in the GSD file that the IO controller transmits to IO devices at startup. For PROFINET IO, these parameters are stored in the form of "Record Data Object" (comparable to data records). To set the parameter records, the element "ParameterRecordDataItem" is used in the GSD. It can be located optionally below a submodule.
An example from the GSDML-V2.42-Siemens-ET200SP-20230413.xml file:
<RecordDataList>
<ParameterRecordDataItem Index="243" Length="4">
<Name TextId="BaseUnit" />
<Const Data="0x00,0x00,0x00,0x00" ByteOffset="0" />
<Ref DataType="Bit" TextId="BaseUnit" ValueItemTarget="BaseUnit" DefaultValue="0" ByteOffset="0" BitOffset="0" Changeable="true" Visible="true" />
</ParameterRecordDataItem>
..
<ValueItem ID="BaseUnit">
<Help TextId="BaseUnit_Help" />
<Assignments>
<Assign Content="0" TextId="use potential group of left module" />
<Assign Content="1" TextId="allow new potential group" />
</Assignments>
</ValueItem>
The individual parameters of a submodule can be distributed over several record data items.
Each ParameterRecordDataItem is addressed using its index.
Other attributes of a ParameterRecordDataItem in the GSD are the length of the object in bytes (attribute Length) and the name of the record (element Name).
More information about the settable values of the DataRecord can be found under the ValueList section of the GSD file.
To resolve this xml information:
- ET200SP IO SubModules has a ParameterRecordData called BaseUnit.
- It is 4 bytes long without Offset.
- It has two possible values: 0 (use potential group of left module) and 1 (allow new potential group).
- Its default value is 0.
For ET200SPs it required to create at least one potential group on the first module (white baseunit).
For configuring the base unit of the first module, the ParameterRecordDataItem BaseUnit should be parameterized via HWL file. To achieve this parameterization, proper index (243) and the raw value of the four bytes, as explained below, must be assigned.
The index is 243. The record is 4 bytes so the default value is 0x00 00 00 00. The value for a new potential group is 1 and the offset is 0 so let's change the first byte to 1 (0x01 00 00 00). This is the value we will need to set in the HWL file for our first module.