How to enable Initial Record Data in an Anybus CompactCom PROFINET

08 Apr 2024
This article provides an example on how you can add an initial Record Data to your Anybus CompactCom PROFINET implementation.

 

APPLICABLE PRODUCTS

ABCC30 PROFINET

ABCC40 PROFINET

 

PRE-REQUISITES

Any Anybus CompactCom PROFINET

A valid GSD file created according to your implementation

 

BACKGROUND

In PROFINET, in general, you can access data acyclically by means of Record Data services at runtime. However, in some applications, you may need the controller to automatically initialize some parameters during establishment of an I/O connection, rather than doing this manually after the connection has been established.

 

SOLUTION DESCRIPTION

In order to do this, you need to add a couple of lines to your already created GSD file. You first create a RecordDataList section, and add one "ParameterRecordDataItem" element to per ADI, as shown below:

<RecordDataList>
<ParameterRecordDataItem Index="12" Length="4" TransferSequence="0">
<Name TextId="T_ID_EXAMPLE"/>
<Ref DataType="Unsigned16" ByteOffset="0" DefaultValue=”11”
AllowedValues="0..65535" TextId="T_ID_EXAMPLE_PRM"/>
</ParameterRecordDataItem>
</RecordDataList>

Index="12" is the ADI number, Length="4" represents its size in bytes, and DefaultValue="11" is the default value that the controller will write to that ADI during establishment of the IO connection.

It is recommended that the RecordDataList section is placed directly after the "</IOData>" keyword for the module to which the data is associated.

After that, you need to add the TextId’s ("T_ID_xxx") to the "<ExternalTextList>" section of the GSD file.

<Text TextId="T_ID_EXAMPLE" Value="Config parameter 1"/>
<Text TextId="T_ID_EXAMPLE_PRM" Value="Parameter value description"/>

 

Example:

We do this test with an Anybus CompactCom 40 PROFINET IRT module, and in place of the IO controller, we use the PROFINET Master Simulator.

In this example, we have three ADIs.

ADI 1 : SPEED is a UINT16, mapped to input data

ADI 2 : REF_SPEED is a UINT16, mapped to output data

ADI 3 : RECORD_TEST is a UINT16, not mapped to Process Data, and only has Set and Get accesses

 

We add the following lines right after the "</IOData>" of the DAP section in the GSD.

<RecordDataList>
<ParameterRecordDataItem Index="3" Length="2" TransferSequence="0">
<Name TextId="T_ID_RECORD_PARAM"/>
<Ref DataType="Unsigned16" ByteOffset="0" DefaultValue="05"
AllowedValues="0..65535" TextId="T_ID_EXAMPLE2_PRM_1"/>
</ParameterRecordDataItem>
</RecordDataList>

 

Then we add the following declarations to the "<ExternalTextList>" section.

<Text TextId="T_ID_RECORD_PARAM" Value="RECORD_TEST" />
<Text TextId="T_ID_EXAMPLE2_PRM_1" Value="Test Record Parameter 1"/>

 

First, we initialize our module. When we access the webpage of the module, we can see that all three ADIs are currently set to zero. This is because an IO connection has not been established with the PROFINET Master yet.

2024-04-10_09h44_30.png

 

We then configure the module in the PROFINET Master Simulator, and when we import the GSD, we can also see the initial record data we defined, by clicking on the Global parameters button.

 

initrecdata.gif

 

As you can see in the recording above, when we initialize the I/O connection and refresh the module's parameter webpage, the initial record data value of 5 is written to the RECORD_TEST ADI.