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.
- General Client - Project structure
- Client - Base Sample Project
- Client - Read Data (GetAllDataValues, GetDataValues)
- Client - Write Data (SetAllDataValues, SetDataValues)
- Client - Report Control Blocks (Unbuffered, Buffered)
- Client - Direct Control with normal security
- Client - SBO Control with normal security
- Client - Direct Control with enhanced security
- Client - SBO Control with enhanced security
- Client - Read/Write DataSet Values (GetDataSetValues, SetDataSetValues)
- Client - GOOSE Subscriber (GetGoCBDataValues, SetGoCBDataValues)
- Client - GOOSE Subscriber (without Client-Server communication)
- Client - User defined timestamp clock source
- Client - Dynamic created DataSets (CreateDataSet, DeleteDataSet)
- General Server - Project structure
- Server - Base Sample Project
- Server – GOOSE Publisher (GetGoCBDataValues, SetGoCBDataValues)
- Server - GOOSE Publisher (without Client-Server communication)
- Server - Direct Control with normal security
- Server - Direct Control with enhanced security
- Server - SBO Control with normal security
- Server - SBO Control with enhanced security
- Server - User defined timestamp clock source
- Server - Unbuffered Reporting
- Server - Data access events
- Server - Buffered Reporting
- Multiple GOOSE publishers/subscribers on one network adapter (without client-server communication)
- TLS - Secure client-server communication using certificates or PSK (pre-shared key)
- Authentication, negotiation of supported services and optional communication parameters