In the Hardware Declaration file, parameter records for a module or submodule can be set using the RecordDataList parameter.
The Profinet standard, allows setting parameter records only for submodules.
However, the Hardware Compiler allows specifying parameter records on the module level under certain conditions:
- When no
Submoduleselement for a module is defined in the Hardware Declaration file and the module contains only a single "fixed" submodule (as defined in the GSD file), aRecordDataListparameter can be added to the module. During compile, the parameters will be applied to the fixed submodule. - If a module has multiple submodules or the submodules are defined in the hardware declaration file, the
RecordDataListparameter cannot be set for the module. Instead, you can set the parameter records for the individual submodules.
The RecordDataList parameter consists of one or more entries each of which consists of an Index or IndexName and a RawValue or Values.
IndexorIndexNameidentifies the data record to set (it is not allowed to specify both):Indexspecifies the numeric index of the record. Each index may only be used once in a record data list.- The
IndexNamespecifies the name of the record if available in the GSD. Each index name may only be used once in a record data list.
RawValueorValues(it is not allowed to specify both):- The
RawValuespecifies the value for that parameter record:- It is a sequence of bytes represented as a string of hexadecimal digits.
- The value needs to be prefixed with
0x. - A single byte is represented by two hexadecimal digits each.
For better readability, individual bytes may be separated by spaces.
The value
0x01 02 03 04is equivalent to0x01020304. - The length of the record has to match the length of the record as defined in the GSD file.
The following example shows how to set parameters of the SIMATIC ET 200SP modules via data record 128 in the hardware declaration file.
- Name: ET200SP_ParameterExample
Modules:
- Name: InterfaceModule
TypeIdentifier:
FileName: GSDML-V2.43-Siemens-ET200SP-20240726.XML
GsdId: DIM ST V3.3
Interfaces:
- Label: X1
Name: Interface1
Addresses:
Configured:
- IPv4: 10.10.10.12/24
- Name: DI_1
TypeIdentifier:
GsdId: DI 8x24VDC ST V1.1
FileName: GSDML-V2.43-Siemens-ET200SP-20240726.XML
Parameters:
RecordDataList:
# Potential group
- Index: 243
RawValue: 0x01 00 00 00
# Record 128
- IndexName: Inputs
RawValue: >-
0x00 03 01 86 00 00 86 00 00 86 00 00 86 00 00 86 00 00 86 00 00 86
00 00 86 00
Valuesspecifies an array of parameters. Each parameter consists of an offset and a value:OffsetorOffsetName(it is not allowed to specify both, meaning the value of an offset can only be set via parameterization via Offset or via an OffsetName.)Offsetis the start index of parameter in record data. It is represented as a string inbyte.bitformat. Each offset may only be used once in a record data object.OffsetNameis the name of the entry/offset if available in the GSD.
ValueorValueName(it is not allowed to specify both):Valueis the numeric value of the entry in the record data object. It must be bool, integer or float value. Boolean values can be set with the following values:false,true,0or1.ValueNameis the name of the value/constant if available in the GSD.
- Name: AI_1
TypeIdentifier:
FileName: GSDML-V2.43-Siemens-ET200SP-20240726.XML
GsdId: 'AI 4xTC HS V1.0, REAL'
Parameters:
RecordDataList:
- Index: 128
Values:
- Offset: '2.0' # Measurement type/-area Ch.0
Value: 2560 # Integer value
- Offset: '8.4' # Diag:Wire break Ch.0
Value: 1 # Boolean value with integer
- Offset: '8.5' # Diag:Reference channel Ch.0
Value: true # Boolean value
- Offset: '34.4' # Diag:Wire break Ch.1
Value: false
- Offset: '38.0' # OG1 Ch.1
Value: -352.2 # Float value
- Offset: '34.5' # Diag:Reference channel Ch.1
Value: 0 # Boolean value with integer
- Offset: '28.0' # Channel 1 Type/range of measurement
ValueName: Thermocouple Type N
- OffsetName: Channel 1 Smoothing
ValueName: Strong