Sie sind auf Seite 1von 15

Getting started with straton

IEC61850 Server

Revision

Revision Date Description Author


1 01/09/2009 Initial version J. FOLLUT
2 01/12/2009 Add GOOSE configuration J. FOLLUT
3 06/01/2010 Add information on GOOSE J. FOLLUT
4 26/03/2012 Update with 8.3 J. FOLLUT
5 05/03/2013 Add t-attribute J. FOLLUT
6 27/09/2013 Add Quality Time J. FOLLUT
7 19/12/2013 Add details about promisc mode and keepalives P. CARLIER
8 30/10/2014 Add details on runtimes A. BURILLE
9 18/12/2014 Add MMS error codes A. BURILLE
10 19/10/2015 Updated for straton 9.0 + GOOSE supervision A. BURILLE
11 17/11/2015 Updated FAQ about arrays P. CARLIER
12 30/05/2016 Procedure for downloading the latest SCL files A. BURILLE

The information contained in this document is confidential and proprietary to COPA-DATA France and is covered under
the terms and conditions of a Nondisclosure Agreement (NDA). COPA-DATA France submits this document with the
understanding that it will be held in strict confidence and will not be used for any purpose other than the evaluation of
this product and COPA-DATA France qualifications. No part of the document may be circulated, quoted, or reproduced
for distribution outside the Client organization without prior written approval from COPA-DATA France.
COPA-DATA France, All Rights Reserved.
CP_R31_006_B

COPA-DATA France www.copadata.com/embedded


Content

1 Setup IEC61850................................................................................................................................. 3
1.1 Install Ethernet driver ................................................................................................................ 3
1.2 Install straton IDE and Runtime ............................................................................................... 4
2 Create the IEC61850 Server application ....................................................................................... 4
2.1 New straton project.................................................................................................................... 4
2.2 Import variables in straton ........................................................................................................ 5
2.3 t-attribute ..................................................................................................................................... 6
2.4 Quality time ................................................................................................................................. 6
2.5 Download SCL file ..................................................................................................................... 7
2.6 Download straton application ................................................................................................... 8
3 Create GOOSE communication ...................................................................................................... 9
3.1 GOOSE configuration ............................................................................................................... 9
3.2 GOOSE supervision ................................................................................................................ 10
4 Configure the keepalive of the operating system ....................................................................... 11
5 MMS error codes ............................................................................................................................. 12
6 Frequently Asked Questions .......................................................................................................... 12
Annex A – How to download the latest updated SCL files automatically? ..................................... 14
CP_R31_006_B

18. STRATON IEC61850 Server Tutorial.docx 2/15


1 Setup IEC61850

Before using IEC61850 Server some additional components need to be installed.

1.1 Install Ethernet driver


This driver is required only for GOOSE communication; it is installed by the straton runtime
setup.

The Ethernet Multiple Network Protocol Driver is available from COPADATA web site for 32 bits
and 64 bits operating systems. Download from http://www.copadata.com/embedded

 From Networks Properties choose Install


 Select Protocol and Add
 Select the CDProtDrv.inf file
 Restart windows after installation
CP_R31_006_B

COPA-DATA Multiple Network Protocol Driver should be installed.

18. STRATON IEC61850 Server Tutorial.docx 3/15


1.2 Install straton IDE and Runtime
Download and install from http://www.copadata.com/embedded

NB: This feature needs IEC61850 protocol Add-ons, since version 8.6 simply check ‘Add-ons for
straton’ while installing Straton Editor and they will be automatically installed.

2 Create the IEC61850 Server application


2.1 New straton project
Open the IO Drivers window ( ) and insert the IEC61850 Server driver ( )
CP_R31_006_B

18. STRATON IEC61850 Server Tutorial.docx 4/15


2.2 Import variables in straton
Right-click on the Server configuration and select Read Variable From SCL File.

Use the Insert button to load an SCL file.

Select the variables to declare in straton

IMPORTANT:
If the IED is modified, think to re-insert the last updated SCL file and do not forget to check
Download SCL File option!
See the Annex A of this document if the latest version of the SCL files must be downloaded on
the runtime at the same time as the application.
CP_R31_006_B

18. STRATON IEC61850 Server Tutorial.docx 5/15


Go to the Profiles view ( ) to see the IEC61850S variables. These variables are declared as
Global Variables in the dictionary and can be accessed directly from anywhere in the straton
application (Fieldbus, program, graphics).

2.3 t-attribute
The t-attribute can be managed automatically by the stack or through straton application.
 In a straton program, if you create a variable for t-attribute the driver does not update the
t-value anymore.
When in the straton program there is no variable for “t”, only then the driver will set
t-attribute value automatically.

2.4 Quality time


The Quality Time is managed separately by the mapping of additional variable in the IEC61850
profile.

In the profile map a SINT variable with the following attributes:


a. Logical Device = Name of your logical device
b. Logical Node = Empty
c. Data object = Empty
d. Attribute = “TimeQuality”
e. Control = Checked
f. FC = Empty
g. Goose = Empty
CP_R31_006_B

18. STRATON IEC61850 Server Tutorial.docx 6/15


Then you can change the default quality by forcing a bit of this variable

Bit Value IEC61850-8-1 Description


0 Leap Second Known Switching second
1 Clock Failure Clock Failure
2 Clock not synchronized Clock not synchronized
3-7 Time accuracy of fractions of Time accuracy of fractions of second
second
00000 0 bit of accuracy 0 bit of accuracy
00001 1 bit of accuracy 1 bit of accuracy
00010 2 bits of accuracy 2 bits of accuracy
00011 3 bits of accuracy 3 bits of accuracy
00100- Integer value of number of bits Amount of Bits of accuracy, e.g. 01010b
11000 of accuracy means 10 Bits accuracy, equals 1 to 999
(1111100111b) milliseconds behind the
coma
11000- Invalid Invalid
11110
11111 unspecified unspecified

The time quality can be retrieved in the IEC61850 Client by using VSIGETBIT function, see the
IEC61850 Client tutorial.

2.5 Download SCL file


The IEC61850 Server needs the configuration file of the IED, this file need to be downloaded to
the straton runtime. Think to check the “Download SCL file” checkbox in the “Select variable”
window (See “Import variables in straton”).

Note for version before 8.2:


The SCL file that contains additional information is required by the server, in order to transfer this
file it need to be added in the list of downloaded file. These files are automatically downloaded when
Download is checked in the configuration of the IEC61850 Server.

Select the menu Project -> Settings


Click on Advanced
Select the download tab
Click on Add to insert a new file transfer:
 The source is K5BusIec850s.SCL in the folder Custom
 The destination is K5BusIec850s.SCL (For COPALP T5XP runtime).
CP_R31_006_B

18. STRATON IEC61850 Server Tutorial.docx 7/15


2.6 Download straton application
Download the application to the straton runtime:
- Select the communication parameters in menu Tools > Communication Parameters
- Establish the connection through menu Project > Online

NOTES:
On the target, SCL files are downloaded in the “Custom” folder (same directory as the runtime).
Windows: Default port for communication is 502 or 1100
Linux: Create the Custom folder “sudo mkdir Custom” and start the runtime with:
./t5linux /path850=Custom/ (default communication port is 1100)
Result is:

The download is successful and application starts correctly.

The straton runtime is not started or communication parameters are wrong.

The application is not yet downloaded or an error occurs during startup. More detail can be
found in the output view.
CP_R31_006_B

18. STRATON IEC61850 Server Tutorial.docx 8/15


3 Create GOOSE communication
3.1 GOOSE configuration
In order to create a GOOSE communication you need to first configure the IEC61850 server
with the appropriate GOOSE setting in the SCL file.
The GOOSE configuration contains the IP address of the GOOSE server and the multicast
address.
The multicast address within this standard shall have the following structure:
• The first three octets are assigned by IEEE with 01-0C-CD.
• The fourth octet shall be 01 for GOOSE, 02 for GSSE, and 04 for multicast sampled values.
• The last two octets shall be used as individual addresses assigned by the range defined in
the following table.

Service Starting Address Ending Address


GOOSE 01-0C-CD-01-01-00 01-0C-CD-01-01-FF
GSSE 01-0C-CD-01-02-00 01-0C-CD-01-02-FF
Multicast sampled values 01-0C-CD-01-04-00 01-0C-CD-01-04-FF

The configuration of the server is the same as described previously.


Additionally in the GOOSE configuration you need to fill the address of the Ethernet controller to
use for the GOOSE communication:

With Linux, the adapter identification can also be the name of the interface (for example: eth0)
CP_R31_006_B

18. STRATON IEC61850 Server Tutorial.docx 9/15


The server is configured with an SCL file as a normal server.
And using the second tab “GOOSE”, the SCL of the GOOSE server is inserted.

Server configuration GOOSE configuration

Note: After inserting the SCL for the GOOSE, if no variable appears, it means that no GOOSE
configuration is present in the SCL file.

Note: With some distribution of Linux, GOOSE may encounter difficulties to emit packets directly
if no connection request has been made first. In order to solve this issue, type in a console, with
administrator rights, the following command line:
ifconfig eth0 promisc
Replace eth0 by your interface’s name.

3.2 GOOSE supervision


If two servers communicate via GOOSE messages, it is possible with the recent versions of the
61850 driver (since version 7.20) to supervise the GOOSE communication via a specific
variable. It must be a DINT and declared with a 61850S Profile.
CP_R31_006_B

For the moment only the three less significant bits are used.

18. STRATON IEC61850 Server Tutorial.docx 10/15


Bit number Description
0 Set to TRUE in case of connection loss. The connection loss is detected if the
“TimeAllowedToLive” contained in the GOOSE message is reached
1 Set to TRUE if the GOOSE message has a wrong sequence number
2 Set to TRUE if a GOOSE publisher server is/was detected

Examples, Server_1 is a GOOSE subscriber, Server_2 is a GOOSE publisher:


Server_1 has never received GOOSE messages from Server_2 --> Variable = 0
Server_1 receives GOOSE messages from Server_2 --> Variable = 4
Server_1 does not receive GOOSE messages anymore --> Variable = 5

4 Configure the keepalive of the operating system


The 61850 protocol rely on the TCP/IP keep-alive packets to check if the connection is still alive
and detect when a peer is disconnected.

With Linux, configure these parameters by typing in a console, with administrator rights:

echo 5 > /proc/sys/net/ipv4/tcp_keepalive_time


echo 1 > /proc/sys/net/ipv4/tcp_keepalive_intvl
echo 5 > /proc/sys/net/ipv4/tcp_keepalive_probes
echo 3 > /proc/sys/net/ipv4/tcp_retries2

This should reduce the time the system takes to close a connection after a hard disconnection
(typically the RJ45 socket unplugged) to about 10 seconds.
Complete description of the TCP/IP keepalive can be found at
http://stuff.onse.fi/man?program=tcp&section=7

With VxWorks, the configuration depends on the VxWorks version.


See http://www.windriver.com/

With Windows, see these parameters


http://technet.microsoft.com/en-us/library/cc957549.aspx
http://technet.microsoft.com/en-us/library/cc957548.aspx
http://technet.microsoft.com/en-us/library/cc938210.aspx
http://technet.microsoft.com/en-us/library/cc938209.aspx

With WinCE 5.x or 6.x machine the ‘keep-alive’ can be modified in the Registry Editor:
HKEY_LOCAL_MACHINE\Comm\Tcpip\Parms
CP_R31_006_B

If the KeepAliveTime variable isn’t yet created, go to Value -> Add DWORD and set, for
example, 5000 in decimal for 5s.

18. STRATON IEC61850 Server Tutorial.docx 11/15


5 MMS error codes
When the Server is in RUN mode, if the Client sends bad requests the following error codes can
occur:

Error code Description


0 Object - Invalidated
1 Hardware fault
2 Temporarily unavailable
3 Object - Access denied
4 Object - Undefined
5 Invalid address
6 Type - Unsupported
7 Type - Inconsistent
8 Object attribute - Inconsistent
9 Object access - Unsupported
10 Object - Non-existent

6 Frequently Asked Questions


How to create an SCL file?
The SCL file can be created using an SCL editor according to the object required in the device.
Right-click in the project tree > Insert New Item > IEC 61850 – SCL Editor

Error: Could not parse SCL file …..


Please check the download of the configuration file to be added in the project settings.
Project settings > Debugging > Download procedure.
Be sure that this folder exists in the runtime’s folder.

Error: Data attribute …… does not exist in IEC 61850 object model.
Please check in the variable profile list, some variables are not present in the SCL file or has not
been deleted from a previous import.

File transfer failed?


The IEC61850 working directory needs to be filled in the configuration tool. If not the file transfer
is not activated.

I encounter difficulties to emit GOOSE packets with linux


Type in a console, with administrator rights, the following command line:
CP_R31_006_B

ifconfig eth0 promisc


Replace eth0 by your interface’s name.
This will enable your network interface in promiscuous mode and remove filtering of packets.

18. STRATON IEC61850 Server Tutorial.docx 12/15


Downloading SCL files under Linux runtime failed
Make sure that a sub-folder named “Custom” is well created on the Linux device.

SCL files are not found while the application is starting


(Most of the time it means that the “Could not parse SCL file” error occurs)
To start the runtime type the following arguments:
./t5linux /path850=Custom/

Connections are not closing correctly when the client disconnects


First, refer to the chapter about keepalives of this document. If your 61850 stack has been
provided by COPADATA France before Nov. 2013, ask them for the latest version.

I can’t re-use a report control block after I’ve enabled it once and then disconnect
This may happen if the first connection hasn’t been closed correctly.
First, refer to the chapter about keepalives of this document. If your 61850 stack has been
provided by COPADATA France before Nov. 2013, ask them for the latest version.

I can create an array in the SCL file, but then the project would not start and shout the
error message “Data attribute *** in IEC61850 object model has wrong type” even if the
type is correct
You need to change the project settings (in menu Project  Settings) and set the options
“Complex variables in a separate segment” to YES
CP_R31_006_B

18. STRATON IEC61850 Server Tutorial.docx 13/15


Annex A – How to download the latest updated SCL files
automatically?

After modifying an SCL file, the user needs to right-click on the configuration > Read variables
from SCL file and re-select the latest updated SCL file. This way, it is possible to modify the
SCL file independently of the application.

In order to avoid that, the user can edit the download procedure and choose what files will be
downloaded at the same time as the application. To do so, go to
Project > Settings > Debugging > Download procedure > Edit

“SCL: IEC850 Server+GOOSE > \Custom” is automatically created when checking “Download
SCL file” option (see “Import variables in straton”).
Remove this line.

Add the Server SCL file to be downloaded by clicking on “Add”.


Choose the file and choose its name on the runtime:

Do the same thing for the GOOSE SCL file:

Be careful, the names are case sensitive!


IEC850 model file is “K5BusIec850s.SCL” on the target.
IEC850 GOOSE file is “K5BusIec850s_GO.SCL” on the target.

These two items must be downloaded before the <Application code>!


CP_R31_006_B

18. STRATON IEC61850 Server Tutorial.docx 14/15


If the popup window “Cannot open local file for read” appears it means that one of the
documents in the download procedure does not exist.
CP_R31_006_B

18. STRATON IEC61850 Server Tutorial.docx 15/15

Das könnte Ihnen auch gefallen