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:

  1. Mark the PLC in the device tree and activate the context menu command Add Device…

  2. In the Add Device dialog select the adapter Ethernet of the Fieldbusses ‣ Ethernet Adapter category and confirm your selection by activating the Add Device button.

Subsequently, add the IEC 61850 Server to the Ethernet Adapter as follows:

  1. Select the Ethernet Adapter in the device tree and activate the context menu command Add Device….

  2. In the Add Device dialog select the IEC 61850 Server of the Miscellaneous category and confirm your selection with the Add Device button.

../_images/459b1e9c71d00538c0a8640e019bc2e2

‘Add Device’ dialog

Now the IEC 61850 Server is inserted in the device tree.

../_images/e49d703471eb540ec0a8640e01901f88

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.

../_images/e87e960471fba22ec0a8640e0086b41a

editor of the IEC 61850 Server

First a Logical Device is added to the server. The 2be048753e0bbf37c0a8640e00f923d5_f8d21807052873f7c0a8640e0159ead5 Logical Device is the instance of an IED.

  1. Select the Logical Device

  2. Activate the > button

Together with the Logical Device the two LNC instances ( 2be048753e0bbf37c0a8640e00f923d5_34ec6bfe060a655bc0a8640e009961aa ) LLN0 and LPHD1 are added. These two information objects are elements of every IED and can not be removed.

../_images/d90625a40544d3c9c0a8640e004018af

Server with Logical Device, LLN0 and LPHD1

Step 3: Add another LNC instance to the Logical Device

  1. Select the Logical Device below the server

  2. On the left-hand side select the XCBR LNC instance below LN [Xxxx]-Switchgear

  3. Activate the > button

../_images/7ffa007b2b2f5a34c0a8640e00b21973

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 2be048753e0bbf37c0a8640e00f923d5_8976a3ad0590d55cc0a8640e00345389 ) will be displayed on the left-hand side. .

  1. Select the XCBR LNC instance on the right-hand side

  2. Select the MaxOpCap CDC instance on the left-hand side

  3. Activate the > button

../_images/58e4ec7e767d1500c0a8640e0187aaf1

XCBR1 with ‘MaxOpCap’ CDC

Step 5: Link an attribute (DA) of the IEC 61850 Server with a CODESYS variable

  1. Select the desired attribute (in the example: Server ‣ LogicalDevice ‣ XCBR1 ‣ MaxOpCap ‣ DA (ST I INT32) StVal )

  2. 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.

../_images/251d401d76be8e61c0a8640e002cf47d

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.

  1. Open the DataSet tab

  2. Activate the New button. The created LLN0.dataSet_0 dataset is displayed in the DataSets section.

  3. Select the LLN0.dataSet_0 DataSet

  4. Select the MaxOpCap data object on the left-hand side (Server ‣ LogicalDevice ‣ LN XCBR1 ‣ FC ST ‣ DO MaxOpCap)

  5. Activate the > button.

Now the DataSet contains the data object LogicalDevice/XCBR1.ST.MaxOpCap

../_images/6e12398476e4e082c0a8640e01fff790

‘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).

  1. Open the Report tab

  2. 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.

  3. Select the LLN0.DataSet_0 dataset in the DataSet selection list

../_images/bec270a0779a1ae0c0a8640e009048f4

‘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.

../_images/add4b77277c53c2ec0a8640e00139cdd

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.

../_images/2824a9b077ce205bc0a8640e013402fc

IEC61850_Generated_GVL with ‘Var_stVal’

Subsequent compile the application via the Build ‣ Build 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.