Control station (master)

Simple central station application that uses the TwinCAT IEC 60870-5-104 low-level interface. This sample application can only communicate with one substation.

Download TwinCAT XAE Project (*.zip): LowLevelMasterSample104.zip

In the sample project, the following station parameters are set for the central station:

Data point configuration (it should be the same as the data point configuration of the substation):

Sample implementation of the following services:

The following table briefly describes the main components of the project:

Component

Type

Description

MAIN

PRG

This program part implements the telecontrol protocol

fbClient

FB_IEC870_5_104M (FB)

Implements the central station. An instance of this function block can only communicate with one substation. For each additional substation to communicate with, another instance of this function block is required.

fbServices

FB_IEC870_5_104MServices ( FB)

Includes a simple implementation of some services such as general interrogation, clock synchronization, test commands, etc.

stProcPara

ST_IEC870_5_104MProcData (STRUCT)

Here you can found constantly updated process data – either received or to be sent.

sysPara

ST_IEC870_5_104MSysPara (STRUCT)

Configuration of the system parameters of the central station and the implemented services.

fbLog

FB_IEC870_DebugLogFifo (FB)

A simple log buffer for debugging/troubleshooting purposes.