Quickstart¶
Here, a project with an IEC 61850 Server is created as an example. After the configuration of the Server, a dataset is created and assigned to a Report. Subsequently the code is generated for the IEC 61850 Server and the project is loaded to the PLC. On the PLC the project can be connected with an d IEC 61850 client.
Step 1: Create a new project and insert the IEC 61850 Server
First create a new project. Select the Standard project template.
Subsequently the dialog opens for selecting the PLC and the implementation language. Select the CODESYS Control Win V3 PLC and the Structured Text (ST) implementation language.
Now the project is created displayed with its objects in the device tree.
In order to add the IEC 61850 Server to the PLC, first add an Ethernet Adapter:
Mark the PLC in the device tree and activate the context menu command Add Device…
In the Add Device dialog select the adapter Ethernet of the category and confirm your selection by activating the Add Device button.
Subsequently, add the IEC 61850 Server to the Ethernet Adapter as follows:
Select the Ethernet Adapter in the device tree and activate the context menu command Add Device….
In the Add Device dialog select the IEC 61850 Server of the Miscellaneous category and confirm your selection with the Add Device button.
‘Add Device’ dialog
Now the IEC 61850 Server is inserted in the device tree.
Device tree with IEC 61850 Server
Step 2: Add the Logical Device to the server
Open the editor for the configuration of the server via a double-click on the IEC 61850 Server in the device tree.
editor of the IEC 61850 Server
First a Logical Device is added to the server. The Logical Device is the instance of an IED.
Select the Logical Device
Activate the > button
Together with the Logical Device the two LNC instances ( ) LLN0 and LPHD1 are added. These two information objects are elements of every IED and can not be removed.
Server with Logical Device, LLN0 and LPHD1
Step 3: Add another LNC instance to the Logical Device
Select the Logical Device below the server
On the left-hand side select the XCBR LNC instance below LN [Xxxx]-Switchgear
Activate the > button
Adding the LNC instance ‘XCBR’
Step 4: Expand the XCBR LNC instance with the optional MaxOpCap CDC instance
If you select the LNC instance on the right-hand side, all of the optional and obligatory CDCs (data objects ) will be displayed on the left-hand side. .
Select the XCBR LNC instance on the right-hand side
Select the MaxOpCap CDC instance on the left-hand side
Activate the > button
XCBR1 with ‘MaxOpCap’ CDC
Step 5: Link an attribute (DA) of the IEC 61850 Server with a CODESYS variable
Select the desired attribute (in the example:
)Edit the CODESYS variable name in the input field Monitoring Var (in the example Var_stVal) in the Properties section
The Autom. declare option must be activated, thus the variable is declared automatically as global variable by theIEC 61850 Server. You can edit the initial value in the input field next to the Monitoring Var field.
Link of the attribute ‘stVal’ to the monitoring variable ‘Var_stVal’
Step 6: Create a dataset
In this step you create a dataset (Compilation of data) for the IEC 61850 configuration created in the previous steps.
Open the DataSet tab
Activate the New button. The created LLN0.dataSet_0 dataset is displayed in the DataSets section.
Select the LLN0.dataSet_0 DataSet
Select the MaxOpCap data object on the left-hand side ( )
Activate the > button.
Now the DataSet contains the data object LogicalDevice/XCBR1.ST.MaxOpCap
‘DataSet’ tab
Step 7: Create a Report
In this step you assign a report to the defined DataSet. A report transports the data assigned via a dataset to a connected client in the event of a trigger (see Properties).
Open the Report tab
Activate the New button. The RCB_1 is displayed in the Reports section. In the Name: field you can change the name of the report.
Select the LLN0.DataSet_0 dataset in the DataSet selection list
‘Report’ tab with created ‘RCB’ report
You set options about the reporting behavior in the General options section, you select the events that trigger a report in the Trigger Options section (for more information about these options see Report).
Step 8: Generate code and load the application to the PLC
The Generate code command of the menu IEC61850 generates code from the created configuration and puts it into the IEC61850 Generated POUs folder of the device tree.
device tree with ‘IEC61850 Generated POUs’
The global variable Var_stVal created in step 5 is listed in the IEC61850_Generated_GVL global variables list.
IEC61850_Generated_GVL with ‘Var_stVal’
Subsequent compile the application via the
command.Step 9: Connecting with an IEC 61850 Client
If the application was finished successfully you create a connection to an IEC 61850 client in this step. For this, login to the PLC and start the application via the Start command of the Debug menu. Now you connect an IEC 61850 client with the IEC 61850 Server. By the client you can read out your IEC 61850 Server configuration and the configured DataSets und Reports, as well as you can receive GOOSE messages and send GOOSE messages to the server.