Examples

Some samples of the use of the IEC 61850 implementation in TwinCAT are explained in this chapter. As all samples are based on a general structure, this is explained first and is a prerequisite in the subsequent samples. Following that, each sample has its own chapter in which the special functions of the project are listed.

The sample code is included in the documentation as zip files. After unpacking the samples, it is advisable to retain the project folder structure. Each sample is accompanied by an ICD file. If the ICD file is imported from the original folder in the TwinCAT Telecontrol Configurator and a new, modified TwinCAT project is generated, then a TwinCAT project comparison can be made with the original project. TwinCAT Telecontrol Configurator will output a corresponding message during project code generation and suggest project comparison. The prerequisite for this is that a project with the same name has been found in a subdirectory (below the ICD file).
The sample projects use the default solution/project names of the TwinCAT Telecontrol Configurator. In order to generate a project that can be compared with TwinCAT Project Compare, the project type: server must be selected for the server samples and the project type: client for the client samples during code generation.

If the ICD file has been copied to a different location or a different project or solution name has been assigned, then no automatic TwinCAT project comparison can be performed after code generation. TwinCAT Telecontrol Configurator generates a new TwinCAT project at the new location or under a different name. If this is the case, you can start TwinCAT Project Compare as a standalone tool (Start > Beckhoff > TwinCAT Project Compare), navigate to the two projects there and perform a comparison.