Basic settings: Protocol parameters
The behavior of the substation can be adapted to the requirements of the master via the IEC60870-5-104 protocol parameters. Most parameters have preallocated default values that do not have to be changed.
The values of the iK and iW parameters are changed in our example:
IF init THEN
init := FALSE;
...
F_CreateServerHnd( '', '127.0.0.1'(* change this! *), 2404, nMode := LISTEN_MODE_CLOSEALL OR CONNECT_MODE_ENABLEDBG, bEnable, hServer);
server.protPara.iK := 12;
server.protPara.iW := 8;
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_104PotocolParams.
The associated PLC example tutorial can be downloaded here.