Examples

Used controlled or controlling station configuration parameters:

To compile this sample code you need the TwinCAT Version 2.10 Build > 1328!

The example applications contain two program parts:
P_MAIN_LowSpeed() implements the protocoll and P_SerialComm_HighSpeed implements the TwinCAT communication over serial communication interface.

Requirements

PLC Project

TwinCAT System Manager Configuration

Description

LowLevelSlaveSample.zip

(unbalanced mode)

 LowLevelSlaveSampleBal.zip

(balanced mode)

LowLevelSlaveSample.zip

(unbalanced mode)

 

LowLevelSlaveSampleBal.zip
(balanced mode)

Simple Slave-Application which uses the TwinCAT IEC60870-5-101 Serial Link Interface.
 

The function block FB_IEC870_5_101SServices implements test command, clock synchronisation command, general interrogation command and counter interrogation command (mode C).

The bitstring datapoint (M_BO_TB_1, with time tag CP56Time2a, information object address: 100) is send every second to the controlling station with the cause of transfer: spontanous.

One counter value (M_IT_NA_1, without time tag, information object address: 400) is send as response to counter interrogation command (mode C) to the controlling station.

LowLevelMasterSample.zip

(unbalanced mode)

 

LowLevelMasterSampleBal.zip
(balanced mode)

LowLevelMasterSample.zip
(unbalanced mode)

 

LowLevelMasterSampleBal.zip
(balanced mode)

Simple Master-Application which uses the TwinCAT IEC60870-5-101 Serial Link Interface.

 

The function block FB_IEC870_5_101MServices implements test command, clock synchronisation command, general interrogation command and counter interrogation command.