IEC60870-5-101 protocol parameters
Here you can unpack the complete PLC sources: TcPlcLibIEC870_5_101Slave_TutorialSample.zip
The behaviour of the substation can be adapted to the requirements of the master via the IEC60870-5-101 protocol parameters. Most parameters have preallocated default values that do not have to be changed.
In our example we set the link address and link address octet size:
IF init THEN
init := FALSE;
...
server.protPara.linkAddr := 220;(* slave link address *)
server.protPara.eLinkAddrSize := eIEC870_LinkAddr_TwoOctets; (* link address octet size *)
...
ELSE
server( pInputs := ADR( inputs ),
cbInputs := SIZEOF( inputs ),
pOutputs := ADR( outputs ),
...
END_IF
The documentation for all transfer protocol parameters can be found here: ST_IEC870_5_101PotocolParams.