40
Lab-SCADA IEC 60870-5-104 Slave Simulator User Manual Lab-SCADA IEC 60870-5-104 Slave Simulator User Manual Version 1.1 15 September 2020 Table of Contents 1 Introduction........................................................................................................................ 3 1.1 Contact Information.................................................................................................... 3 1.2 Change History........................................................................................................... 3 1.3 Terms and Abbreviations............................................................................................ 3 1.4 References..................................................................................................................3 2 Licensing............................................................................................................................ 4 2.1 Evaluation Mode and Full Mode................................................................................. 4 2.2 Setting License Key....................................................................................................4 2.3 Software License Agreement......................................................................................5 3 Functional Description....................................................................................................... 8 3.1 Overview..................................................................................................................... 8 3.2 Features and Limitations............................................................................................ 8 3.2.1 Features.............................................................................................................. 8 3.2.2 Limitations........................................................................................................... 9 4 Installation........................................................................................................................ 10 4.1 System Requirements.............................................................................................. 10 4.1.1 Requirements for Daemon application (iec104sld) ........................................... 10 4.1.2 Requirements for GUI control program (ls104msgui.exe)................................ 10 4.2 Delivery (release) Content........................................................................................ 10 4.3 Installation Procedure............................................................................................... 10 5 Configuration....................................................................................................................12 5.1 Configuration File Structure and Example File.........................................................12 5.2 Description of Main Configuration Parameters.........................................................14 5.3 Description of Command Point Configuration Parameters...................................... 19 5.4 Description of Data Point Configuration Parameters............................................... 20 5.5 Using Linux utility iec104s for configuration............................................................. 23 5.5.1 Adding and Updating Command Points............................................................ 23 5.5.2 Deleting Command Points.................................................................................23 5.5.3 Adding and Updating Data Points..................................................................... 23 5.5.4 Deleting Data Points..........................................................................................23 Sirius Network Software Page 1 http://www.lab-scada.com [email protected]

Lab-SCADA IEC 60870-5-104 Slave Simulator User Manuallab-scada.com/iec104_slave_simulator_manual.pdfLab-SCADA IEC 60870-5-104 Slave Simulator User Manual 1 Introduction 1.1 Contact

  • Upload
    others

  • View
    78

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Lab-SCADA IEC 60870-5-104 Slave Simulator User Manuallab-scada.com/iec104_slave_simulator_manual.pdfLab-SCADA IEC 60870-5-104 Slave Simulator User Manual 1 Introduction 1.1 Contact

Lab-SCADA IEC 60870-5-104 Slave Simulator User Manual

Lab-SCADA IEC 60870-5-104

Slave Simulator

User Manual

Version 1.1 15 September 2020

Table of Contents 1 Introduction........................................................................................................................3

1.1 Contact Information....................................................................................................3 1.2 Change History...........................................................................................................3 1.3 Terms and Abbreviations............................................................................................3 1.4 References..................................................................................................................3

2 Licensing............................................................................................................................4 2.1 Evaluation Mode and Full Mode.................................................................................4 2.2 Setting License Key....................................................................................................4 2.3 Software License Agreement......................................................................................5

3 Functional Description.......................................................................................................8 3.1 Overview.....................................................................................................................8 3.2 Features and Limitations............................................................................................8

3.2.1 Features..............................................................................................................8 3.2.2 Limitations...........................................................................................................9

4 Installation........................................................................................................................10 4.1 System Requirements..............................................................................................10

4.1.1 Requirements for Daemon application (iec104sld)...........................................10 4.1.2 Requirements for GUI control program (ls104msgui.exe)................................10

4.2 Delivery (release) Content........................................................................................10 4.3 Installation Procedure...............................................................................................10

5 Configuration....................................................................................................................12 5.1 Configuration File Structure and Example File.........................................................12 5.2 Description of Main Configuration Parameters.........................................................14 5.3 Description of Command Point Configuration Parameters......................................19 5.4 Description of Data Point Configuration Parameters...............................................20 5.5 Using Linux utility iec104s for configuration.............................................................23

5.5.1 Adding and Updating Command Points............................................................23 5.5.2 Deleting Command Points.................................................................................23 5.5.3 Adding and Updating Data Points.....................................................................23 5.5.4 Deleting Data Points..........................................................................................23

Sirius Network Software Page 1

http://[email protected]

Page 2: Lab-SCADA IEC 60870-5-104 Slave Simulator User Manuallab-scada.com/iec104_slave_simulator_manual.pdfLab-SCADA IEC 60870-5-104 Slave Simulator User Manual 1 Introduction 1.1 Contact

Lab-SCADA IEC 60870-5-104 Slave Simulator User Manual

5.5.5 Showing configured points................................................................................24 5.6 Using Windows GUI ls104slgui.exe for Configuration..............................................24

5.6.1 Updating IEC104 Protocol Configuration..........................................................24 5.6.2 Managing Data Points.......................................................................................25 5.6.3 Managing Command Points..............................................................................25

6 Operation.........................................................................................................................26 6.1 Overview...................................................................................................................26 6.2 Windows GUI Porgram.............................................................................................27

6.2.1 Connecting to iec104sld....................................................................................28 6.2.2 IEC104 Configuration Management..................................................................28 6.2.3 IEC104 Outstation Data Points View................................................................29 6.2.4 IEC104 Outstation Command Points View.......................................................30 6.2.5 Event Log View..................................................................................................31 6.2.6 IEC104 Statistics View......................................................................................33

6.3 Command Line Interface..........................................................................................34 6.3.1 Starting iec104sld..............................................................................................34 6.3.2 Stopping iec104sld............................................................................................34 6.3.3 Checking the software version..........................................................................34 6.3.4 Showing the Loaded Configuration...................................................................34 6.3.5 Showing Configured Data and Command Points.............................................36 6.3.6 Viewing IEC104 Data Link Statistics.................................................................36 6.3.7 Viewing System Log..........................................................................................37

Sirius Network Software Page 2

Page 3: Lab-SCADA IEC 60870-5-104 Slave Simulator User Manuallab-scada.com/iec104_slave_simulator_manual.pdfLab-SCADA IEC 60870-5-104 Slave Simulator User Manual 1 Introduction 1.1 Contact

Lab-SCADA IEC 60870-5-104 Slave Simulator User Manual

1 Introduction

1.1 Contact InformationDeveloped by Sirius Network Softwarehttp://[email protected]

Product description on the web: http://www.lab-scada.com/index.html

1.2 Change History

Date Revision Comment

17.08.20 “1.00” Initial version

30.08.20 “1.01” Minor proofing

15.09.20 “1.1.0” Support for Windows version of the server part

1.3 Terms and Abbreviations

ASDU – Application Serivice Data Unit

CA – Common Address

GUI – Graphical User Interface

IEC - International Electrotechnical Commission

IOA – Information Object Address

IP – Internet Protocol

RTU – Remote Terminal Unit

SCADA - Supervisory Control And Data Acquisition

SSH – Secure Shell Protocol

TCP – Transmission Control Protocol

UI – User Interface

1.4 References

[1] International Standard IEC 60870-5-104, second edition 2006-06. Telecontrol equipment and systems – Part 5-104: Transmission protocols – Network access for IEC 60870-5-101 using standard transport profiles

[2] International Standard IEC 60870-5-5, first edition 1995-06, Telecontrol equipment andsystems - Part 5: Transmission protocols - Section 5: Basic application functions

[3] International Standard IEC 60870-5-101, Telecontrol equipment and systems – Part 5-101: Transmission protocols – Companion standard for basic telecontrol tasks

Sirius Network Software Page 3

Page 4: Lab-SCADA IEC 60870-5-104 Slave Simulator User Manuallab-scada.com/iec104_slave_simulator_manual.pdfLab-SCADA IEC 60870-5-104 Slave Simulator User Manual 1 Introduction 1.1 Contact

Lab-SCADA IEC 60870-5-104 Slave Simulator User Manual

2 Licensing

2.1 Evaluation Mode and Full Mode

If you have not yet purchased the software, the iec104sld runs in evaluation mode, in which it will transfer a maximum of 30 IEC104 application layer messages before closing IEC104 data link layer.

You can set the license key and switch into full mode at any time either via GUI control application or using Linux command line utility iec104s as explained in the following section.

2.2 Setting License Key

Using Windows GUI application:

Run ls104lsgui.exe (From Start menu or directly from installation folder). Click “Connect” button. After the connection to iec104sld is established click “Set License Key” button., youwill see the following dialog window:

When running Linux version of iec104sdl - Using Linux command line utility iec104s, execute:

iec104s show license

License ID: 7b1a963a867b1a94d1c61019a43449b5

Copy the LICENSE ID value from the GUI dialog window or from the terminal, Contact Sirius Network Software ([email protected]) and communicate the LICENSE ID value.

Sirius Network Software will issue you a License Key. If using GUI, Enter the received License key in the above dialog box in the file LICENSE KEY and click button “Set Key”. If using Linux command line, execute:

Sirius Network Software Page 4

Page 5: Lab-SCADA IEC 60870-5-104 Slave Simulator User Manuallab-scada.com/iec104_slave_simulator_manual.pdfLab-SCADA IEC 60870-5-104 Slave Simulator User Manual 1 Introduction 1.1 Contact

Lab-SCADA IEC 60870-5-104 Slave Simulator User Manual

iec104s set license key=<license key>

Sirius Network Software Page 5

Page 6: Lab-SCADA IEC 60870-5-104 Slave Simulator User Manuallab-scada.com/iec104_slave_simulator_manual.pdfLab-SCADA IEC 60870-5-104 Slave Simulator User Manual 1 Introduction 1.1 Contact

Lab-SCADA IEC 60870-5-104 Slave Simulator User Manual

2.3 Software License Agreement

READ THIS BEFORE INSTALLING THE SOFTWARE AND BEFORE ACCEPTING THE LICENSE AGREEMENT

THIS SOFTWARE LICENSE AGREEMENT IS BEING PROVIDED TO YOU AS PART OF A TRIAL FOR REVIEW BEFORE PURCHASE. THE FOLLOWING LICENSE AGREEMENT IS A CLICKTHROUGH LICENSE AGREEMENT THAT IS SHOWN DURINGTHE INSTALLATION OF THE SOFTWARE. YOU MUST AGREE TO ALL THE TERMS AND CONDITIONS OF THIS AGREEMENT IN ORDER TO INSTALL THE SOFTWARE.

THEREFORE, IF YOU DO NOT AGREE TO ALL THE TERMS AND CONDITIONS OF THIS AGREEMENT, DO NOT INSTALL THE SOFTWARE.

Sirius Network Software. License Agreement

THIS IS A LEGAL AGREEMENT BETWEEN YOU (“YOU”) AND SIRIUS NETWORK SOFTWARE. SIRIUS NETWORK SOFTWARE IS WILLING TO LICENSE THE

SIRIUS NETWORK SOFTWARE SOFTWARE AND RELATED DOCUMENTATION PURCHASED BY YOU AND KNOWN AS LAB-SCADA IEC 60870-5-104 SLAVE SIMULATOR (THE “SOFTWARE”) TO YOU ONLY UPON THE CONDITION THAT YOU ACCEPT ALL OF THE TERMS CONTAINED IN THIS LICENSE AGREEMENT (THE "AGREEMENT"). PLEASE READ THE TERMS AND CONDITIONS CAREFULLY BEFORE CLICKING ON THE “I AGREE” BUTTON, AS CLICKING ON THIS BUTTON

WILL INDICATE YOUR ASSENT TO THEM. IF YOU DO NOT AGREE TO THE BELOW TERMS AND CONDITIONS, THEN CLICK ON THE “I DO NOT AGREE” BUTTON. IF YOU DO NOT AGREE TO THE BELOW TERMS AND CONDITIONS, SIRIUS NETWORKSOFTWARE IS UNWILLING TO LICENSE THE SOFTWARE TO YOU.

1. Subject to the following terms and conditions, SIRIUS NETWORK SOFTWARE grants to you a nonexclusive, nontransferable limited license to install and use the Software solely for your internal business purposes and subject to the limitations in

this Agreement.

You are entitled to install and use server part of the Software (iec104sld) on a single servercomputer only.

You may install the Windows GUI controlling application lsiec104slgui.exe on any number of computers.

2. You may not transfer the Software to another entity or person. You shall not modify, translate, reverse assemble or reverse compile in whole or in part the Software. You shall not rent, sell, time-share, lease, sublicense, transfer, copy, disclose, display or otherwise make available the Software or copies thereof to others, except as provided herein. Any

breach of the above terms and conditions shall immediately terminate your license under this Agreement.

Sirius Network Software Page 6

Page 7: Lab-SCADA IEC 60870-5-104 Slave Simulator User Manuallab-scada.com/iec104_slave_simulator_manual.pdfLab-SCADA IEC 60870-5-104 Slave Simulator User Manual 1 Introduction 1.1 Contact

Lab-SCADA IEC 60870-5-104 Slave Simulator User Manual

3. You may not erase, delete or modify any copyright, trademark or other proprietary notices included on the Software.

You agree that if you infringe SIRIUS NETWORK SOFTWARE intellectual property rights or exceed the scope of permitted use of this license, SIRIUS NETWORK SOFTWARE will be irreparably injured and may obtain a court order to enjoin you from further use of the Software.

4. This license is not a sale. Title, ownership rights, and intellectual property rights in and to the Software shall remain in SIRIUS NETWORK SOFTWARE. You agree to abide by the copyright laws and all other applicable laws of the Republic of Ireland and the European Union and international treaties. You acknowledge that the Software in source code form remains a confidential trade secret of SIRIUS NETWORK SOFTWARE. Failure to comply with the above restrictions will result in automatic termination of this Agreement and will make available to SIRIUS NETWORK SOFTWARE other legal remedies.

5. Notwithstanding anything herein to the contrary, you acknowledge and agree that SIRIUS NETWORK SOFTWARE may terminate your license to the Software if you have failed to comply with any of your obligations under this Agreement.

You shall not be entitled to a refund in the event of termination by SIRIUS NETWORK SOFTWARE pursuant the foregoing sentence.

6. The Software is distributed "AS IS" and you assume full responsibility for determining the suitability of The Software and for results obtained.

Sirius Network Software makes no warranty that all errors have been or can be eliminated from the Software and, with respect thereto, Sirius Network Software shall not be responsible for losses, damages, costs, or expenses of any kind resulting from using or misusing The Software including without limitation, any liability for business expenses, machine downtime, damages experienced by you or any third person as a result of any deficiency, defect, bug, error or malfunction. Sirius Network Software shall not be liable for any indirect, special, incidental, or consequential damages relating to or arising out of the subject matter of this notice or actions taken thereunder

NO WARRANTY OF ANY KIND IS EXPRESSED OR IMPLIED. YOU USE THE SOFTWARE AT YOUR OWN RISK. Sirius Network Software DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. NOBODY WILL BELIABLE FOR DATA LOSS, DAMAGES, LOSS OF PROFITS OR ANY OTHER KIND OF LOSS WHILE USING OR MISUSING THIS SOFTWARE.

7. You may terminate the license granted under this Agreement at any time by destroying or deleting all copies of the Software in your possession or control. In the event of termination of this Agreement for any reason, all the sections of this Agreement will surviveexcept for Sections 1 and 2.

8. This Agreement shall be governed by and construed in accordance with the laws of the Republic of Ireland, without regard to the choice of law provisions thereof.

9. This Agreement sets forth the entire agreement between you and SIRIUS NETWORK SOFTWARE pertaining to the licensing of the Software and supersedes in its entirety any and all written or oral agreements previously existing between the parties with respect to

Sirius Network Software Page 7

Page 8: Lab-SCADA IEC 60870-5-104 Slave Simulator User Manuallab-scada.com/iec104_slave_simulator_manual.pdfLab-SCADA IEC 60870-5-104 Slave Simulator User Manual 1 Introduction 1.1 Contact

Lab-SCADA IEC 60870-5-104 Slave Simulator User Manual

such subject matter. If any provision of this Agreement is held invalid or unenforceable, such provision shall be revised to the extent necessary to cure the invalidity or unenforceability, and the remainder of this

Agreement shall continue in full force and effect. In the event of any conflict between any provision of this Agreement and any applicable law, the provision or provisions of this Agreement affected shall be modified to remove such

conflict and permit compliance with such law and as so modified this Agreement shall continue in full force and effect.

This Agreement may not be assigned without the consent of SIRIUS NETWORK SOFTWARE.

Sirius Network Software Page 8

Page 9: Lab-SCADA IEC 60870-5-104 Slave Simulator User Manuallab-scada.com/iec104_slave_simulator_manual.pdfLab-SCADA IEC 60870-5-104 Slave Simulator User Manual 1 Introduction 1.1 Contact

Lab-SCADA IEC 60870-5-104 Slave Simulator User Manual

3 Functional Description

3.1 Overview

Lab-SCADA IEC104 Slave Simulator implements controlled (slave) station role of the IEC 60870-5-104 communication protocol [1].

The software consists of the following components:

Component Description

Iec104sld.exe Windows version of the core application, implements the core communication services of the IEC 60870-5-104 Slave station protocol

iec104sld Server daemon application for Linux OS, implements the core communication services of the IEC 60870-5-104 Slave station protocol

iec104s Command line UI front end for Linux OS, used for communicating to the iec104sld application

ls104slgui.exe GUI control application for Windows OS, used for communicating to the iec104sld application

The Linux version of iec104sld server application can be configured and operated using either the Linux command line interface (iec104s) or the Windows GUI program (ls104lsgui.exe).

The Windows version of iec104sld (iec104sld) can be configured and operated using the Windows GUI program (ls104lsgui.exe) or by manually editring the configuration file

3.2 Features and Limitations

3.2.1 Features

• Implements IEC 60870-5-104 [1] Slave Station communication protocol and Application Functions (IEC 60870-5-5) [2]

◦ Station initialization

◦ Clock Synchronization

◦ Test Procedure

◦ Data Acquisition

◦ Acquisition of Events

◦ Cyclic Data Transmission

Sirius Network Software Page 9

Page 10: Lab-SCADA IEC 60870-5-104 Slave Simulator User Manuallab-scada.com/iec104_slave_simulator_manual.pdfLab-SCADA IEC 60870-5-104 Slave Simulator User Manual 1 Introduction 1.1 Contact

Lab-SCADA IEC 60870-5-104 Slave Simulator User Manual

◦ General Interrogation

◦ Command Transmission

◦ Transmission of Integrated Totals

◦ Parameter Loading

• Supports maximum 16777215 number of data points (maximum possible according to IEC 60870-5-101 standard

• User Interface

◦ Windows GUI control program

◦ Linux command line front end (for Linux version of iec104sld)

◦ On-the-fly configuration o(no application restart needed): Adding, Removing, Modifying configuration properties

◦ Built-in protocol analyzer / Protocol Trace

◦ Extensive logging with configurable severity

◦ Protocol / communication statistic counters

3.2.2 Limitations

The iec104sld application is capable of simulating a maximum of 16777215 data points requiring approximately 4GB of RAM.

Sirius Network Software Page 10

Page 11: Lab-SCADA IEC 60870-5-104 Slave Simulator User Manuallab-scada.com/iec104_slave_simulator_manual.pdfLab-SCADA IEC 60870-5-104 Slave Simulator User Manual 1 Introduction 1.1 Contact

Lab-SCADA IEC 60870-5-104 Slave Simulator User Manual

4 Installation

4.1 System Requirements

4.1.1 Requirements for Daemon application (iec104sld)

• For Linux version of iec104sld: Linux server OS (Debian / Ubuntu 14.04, 16.04, 18.04)

• For Windows version of iec104sld: Windows 7 and higher

• RAM: The application consumes minimum 4GB of RAM

4.1.2 Requirements for GUI control program (ls104msgui.exe)

• Windows 7 and later.

4.2 Delivery (release) Content

The Lab-SCADA IEC 60870-5-104 Slave simulator is delievered as an installation executable: lab-scada-iec104sl_setup.exe containing the following files:

• iec104sld.exe – the Windows version of the core application.

• iec104sld-x.x.x.deb – Debian package (x.x.x is the release version number) for installation onto Linux server.

• ls104slgui.exe – Windows based GUI control program for managing the iec104sld daemon server application

• iec104_slave_simulator_manual.pdf – this user manual

4.3 Installation Procedure

1. Download lab-scada-iec104sl_setup.exe to your Windows PC.

2. Run the installation program lab-scada-iec104sl_setup.exe

3. During the installaiton, read and accept the Software License Agreement and click Next. At the end of installation, click “Finish”.

4. By default, the release delivery files are installed in c:\Lab-SCADA-Iec104sl

5. Go to the installation folder (see above). Copy / transfer file iec104sld-x.x.x.deb to your Linux server PC.

6. Go to / Log in to your Linux server PC. To install or upgrade the iec104sld server application use dpkg utility as follows (use sudo before the command or run as root):

7. dpkg -i iec104sld-x.x.x.deb

Sirius Network Software Page 11

Page 12: Lab-SCADA IEC 60870-5-104 Slave Simulator User Manuallab-scada.com/iec104_slave_simulator_manual.pdfLab-SCADA IEC 60870-5-104 Slave Simulator User Manual 1 Introduction 1.1 Contact

Lab-SCADA IEC 60870-5-104 Slave Simulator User Manual

As a result of completed installation:

• For Windows version: iec104sld.exe is located in c:\Lab-SCADA-Iec104sl

• For Windows version: ls104slgui.exe is located in c:\Lab-SCADA-Iec104sl

• For Linux version: Executable file iec104sld is located in /usr/sbin

• For Linux version: Executable file iec104s is located in /usr/bin

• For Linux version: Configuration files are located in /etc/iec104sld

• For Linux version: The user manual is also located in /etc/iec104sld

On Linux, the installation process writes data to cron.d so that the iec104sld starts automatically on boot. To start iec104sld manually after installation, execute as root:

/usr/sbin/iec104sld /etc/iec104sld/iec104sld.cfg

Check that iec104sld is running:

iec104s show version

iec104sld ver: 1.0.0, Tue Jul 28 15:58:51 UTC 2020, Copyright (C) 2020 Sirius Network Software

IEC104S Library Version: 1.0.0

Check connectivity between the Windows control GUI application and the iec104sld:

Run ls104slgui.exe (From Start menu or directly from installation folder). Click “Connect” button.

You will see dialog box “Connect to LabScada IEC104 Slave”.

Enter the IP address of your Linux server on which the iec104sld is running and specify the TCP port number configured for GUI access in the iec104sld configuration (by default port 3335)

Click “Connect”. Connection to iec104sld should get established. You can then manage the IEC104 configuration and perform other control tasks.

On Windows, by default the windows version of iec104sld (iec104sld.exe) starts automatically by the Windows GUI application ls104msgui.exe. First connection from the GUI to the locally running iec104sld.exe is established automatically.

To connect the GUI manually to the locally running iec104sld.exe, specify 127.0.0.1 as remote IP address.

Sirius Network Software Page 12

Page 13: Lab-SCADA IEC 60870-5-104 Slave Simulator User Manuallab-scada.com/iec104_slave_simulator_manual.pdfLab-SCADA IEC 60870-5-104 Slave Simulator User Manual 1 Introduction 1.1 Contact

Lab-SCADA IEC 60870-5-104 Slave Simulator User Manual

5 ConfigurationFor Linux: The configuration file of iec104sld Linux daemon application is located at /etc/iec104sld/iec104sld.cfg

Configuration is possible in one of the following ways:

• Open configuration file with any text editor (e.g, nano or vi), change the settings, save and restart iec104sld

• Change configuration using command line front end utility iec104s. In this case, no application restart is needed. Using this method it is possible to add, remove and change parameters of IEC104 link and application layer, add, change and remove data points and command points

• Change configuration using Windows control GUI program lsiec104slgui.exe. This is equivalent to using the Linux command line iec104s. No application restart is needed.

For Windows: The configuration file of iec104sld.exe is located at c:\Lab-SCADA-Iec104Sl\iec104sld.cfg

The configuration procedures are the same as for Linux version explained above.

5.1 Configuration File Structure and Example File

The configuration file is a text file having the following general structure:

# Main parameters

iec104s_xxx=value

. . .

# Command points

cmdpoint typeid=<typeid value> ioa=<ioa value> status_ioa=<status ioa> sbo=<0|1>

. . .

# Data pointspoint typeid=<type id> ioa=<IOA> qflags=<quality mask> value=<value> [other options]

. . .

The following gives an example of the configuration file. The lines are terminated with CR/LF or LF.

netui_port=3335key=c3a5e2c0afd60bcaf49365b098acd24976c7a212iec104s_dl_auto_start=0

Sirius Network Software Page 13

Page 14: Lab-SCADA IEC 60870-5-104 Slave Simulator User Manuallab-scada.com/iec104_slave_simulator_manual.pdfLab-SCADA IEC 60870-5-104 Slave Simulator User Manual 1 Introduction 1.1 Contact

Lab-SCADA IEC 60870-5-104 Slave Simulator User Manual

iec104s_local_ip1=0.0.0.0iec104s_local_port1=2404iec104s_local_ip2=iec104s_local_port2=iec104s_remote_ip=iec104s_k=12iec104s_w=9iec104s_t1=15iec104s_t2=10iec104s_t2=20iec104s_gi_resp_time=100iec104s_txq_size=128iec104s_sync_time=1iec104s_casdu=3333iec104s_broadcast_casdu=65535iec104s_offline_q_on=0iec104s_send_eoi=0iec104s_expert_debug=1iec104s_dump_data=1iec104s_trace_on=1iec104s_bg_scan_secs=0iec104s_cyclic_secs=0iec104s_itotals_mode=Diec104s_itotals_frz_secs=10iec104s_itotals_spont_tx_secs=11iec104s_itotals_inc_secs=60iec104s_double_transmission_on=0iec104s_timetag_cmds_on=1iec104s_max_cmd_delay=65000iec104s_execute_timeout_secs=5iec104s_exp_cs_intvl_secs=30

# Command pointscmdpoint typeid=58 ioa=1 status_ioa=100 sbo=0cmdpoint typeid=46 ioa=2 status_ioa=1000 sbo=1cmdpoint typeid=63 ioa=3 status_ioa=6004 sbo=1

# data points# single point informationpoint typeid=1 ioa=100 qflags=0x00 value=off iv=1 nt=1 bl=1 sb=1

# double pointpoint typeid=3 ioa=1000 qflags=0x00 value=on

# step positionpoint typeid=5 ioa=2005 qflags=0x00 value=-13

Sirius Network Software Page 14

Page 15: Lab-SCADA IEC 60870-5-104 Slave Simulator User Manuallab-scada.com/iec104_slave_simulator_manual.pdfLab-SCADA IEC 60870-5-104 Slave Simulator User Manual 1 Introduction 1.1 Contact

Lab-SCADA IEC 60870-5-104 Slave Simulator User Manual

# Bitstringpoint typeid=7 ioa=3001 qflags=0x00 value=0xffffffff

# Measured Normalized Valuepoint typeid=9 ioa=4002 qflags=0x00 value=0.5point typeid=9 ioa=4004 qflags=0x00 value=-0.3

# Measured Scaled Valuepoint typeid=11 ioa=5002 qflags=0x00 value=5

# Short Floating Point Numberpoint typeid=13 ioa=6004 qflags=0x00 value=-1.0

# integrated total point typeid=15 ioa=7000 qflags=0x00 value=0

point typeid=20 ioa=1103 qflags=0x00 value=[ST15..0=0000000000000001,CD15..0=0000000000000000]

# MVAL without qualitypoint typeid=21 ioa=8004 qflags=0x00 value=-0.9999

# single point with timepoint typeid=30 ioa=9000 qflags=0x00 value=on

5.2 Description of Main Configuration Parameters

Tag name Type and Range Default Description

netui_port Integer (1..65535)

3335 TCP port number on which the iec104sld daemon listens for a connection from the Window GUIcontrol application lsiec104slgui.exe.

key Hexadecimal string, 40 characters

none When the software is licensed, this parameter holds the license key given to the customer after the purchase.

log_level Integer (0..7) 5 Logging level:0-Emergency1-Alert2-Critical3-Error4-Warning5-Notice6-Info

Sirius Network Software Page 15

Page 16: Lab-SCADA IEC 60870-5-104 Slave Simulator User Manuallab-scada.com/iec104_slave_simulator_manual.pdfLab-SCADA IEC 60870-5-104 Slave Simulator User Manual 1 Introduction 1.1 Contact

Lab-SCADA IEC 60870-5-104 Slave Simulator User Manual

7-Debug

iec104s_dl_auto_start Integer (0,1) 0 1= IEC104 data link is started immediately on iec104sld daemon application start up.0= IEC104 data link is not automatically started and must be started manually using Start button from the GUI or the corresponding command line interface function.

iec104s_local_ip1 String (IPv4address)

0.0.0.0 Local IP address used by first link in the redundancy group, IEC104 data link layer listens for an incoming connection on this address.

iec104s_local_port1 Integer (1..65535)

2404 TCP port number used by first link in the redundancy group, IEC104 data link layer listens for an incoming connection on this port

iec104s_local_ip2 String (IPv4address)

0.0.0.0 Local IP address used by secondlink in the redundancy group, IEC104 data link layer listens for an incoming connection on this address.

iec104s_local_port2 Integer (1..65535)

0 TCP port number used by second link in the redundancy group, IEC104 data link layer listens for an incoming connection on this port. NOTE: when this parameter is set to 0 (default) redundancy is disabled (only first local_ip / port pair is used)

iec104s_remote_ip1 String (IPv4address)

Not set If set, iec104s_remote_ip1 and iec104s_remote_ip2 specify the permitted remote server list (IEC 104 Masters from which the connections shall be accepted. If TCP connection comes in from any other IP address it shall be rejected. If the parameter is not set (default), TCP connections from any IP address are

Sirius Network Software Page 16

Page 17: Lab-SCADA IEC 60870-5-104 Slave Simulator User Manuallab-scada.com/iec104_slave_simulator_manual.pdfLab-SCADA IEC 60870-5-104 Slave Simulator User Manual 1 Introduction 1.1 Contact

Lab-SCADA IEC 60870-5-104 Slave Simulator User Manual

accepted.

iec104s_remote_ip2 String (IPv4address)

Not set See iec104s_remote_ip1

tcp_keepalive_enabled Integer (0,1) 1 Enables or disablesthe use of TCP keep alives

tcp_keepalive_interval Integer [0..65535]

5 TCP keep alivesend probe interval in seconds

tcp_keepalive_timeout Integer [0..65535]

5 TCP keep aliveresponse timeout in seconds

tcp_keepalive_count Integer [0..65535]

3 TCP keep alive probe retry count

tcp_user_timeout Integer [0..65535]

20000 Maximumretransmission time before connection considered closed in established state (milliseconds)

iec104s_k Integer (1..32767)

12 IEC104 K parameter

(Maximum number of

outstanding I format

APDUs), number of frames

iec104s_w Integer (1..32767)

9 IEC104 W parameter(Receiver acknowledges sender frames after at most W frames), number of frames

iec104s_t1 Integer(1..255)

15 IEC104 T1 parameter

iec104s_t2 Integer(1..255)

10 IEC104 T2 parameter

iec104s_t3 Integer (1..172800)

20 IEC104 T3 parameter

iec104s_gi_resp_time Integer [0.65535] 100 Interval in milliseconds for sending individual successive data point messages during General Interrogation poll.

iec104s_txq_size Integer (1..4294967295)

128 IEC104 transmit ASDU queue size, number of frames

iec104s_sync_time Integer (0,1) 1 Enables clock synchronization (setting system time) during IEC104 clock synchronization procedure

Sirius Network Software Page 17

Page 18: Lab-SCADA IEC 60870-5-104 Slave Simulator User Manuallab-scada.com/iec104_slave_simulator_manual.pdfLab-SCADA IEC 60870-5-104 Slave Simulator User Manual 1 Introduction 1.1 Contact

Lab-SCADA IEC 60870-5-104 Slave Simulator User Manual

iec104s_exp_cs_intvl_secs Integer (1..4294967295)

60 Expected frequency of clock synchronization messages from IEC104 master in seconds

iec104s_casdu Integer (1..65534)

3333 ASDU CA (commonaddress) of the IEC104 controlled station. The IEC104 slave simulator responds to messages containing this address.

iec104s_broadcast_casdu Integer (1..65535)

65535 Broadcast ASDU CA(common address)

iec104s_offline_q_on Integer (0,1) 0 1=queue PDUs in process direction (data point events) whenIEC104 DL is down, 0=(default) drop process direction PDUs when IEC104 DL down

iec104s_send_eoi Integer (0,1) 0 1= send End of Initialization message to master 0=do not send end of init message to master

iec104s_bg_scan_secs Integer(0..4294967295)

0 Time period in seconds for sending data point messages with cause of transmissionBackground Scan. 0=background scantransmission disabled.

iec104s_cyclic_secs Integer(0..4294967295)

0 Time period in seconds for sending data point messages with cause of transmission Cyclic.0=cyclic transmission disabled.

iec104s_itotals_mode String (A, B, C, D)

D Integrated totals collection mode (see IEC 60870-5-101 (7.4.8 Selections from transmission of integrated totals)

A - Local freeze with spontaneous transmission

B - Local freeze with counter interrogation

Sirius Network Software Page 18

Page 19: Lab-SCADA IEC 60870-5-104 Slave Simulator User Manuallab-scada.com/iec104_slave_simulator_manual.pdfLab-SCADA IEC 60870-5-104 Slave Simulator User Manual 1 Introduction 1.1 Contact

Lab-SCADA IEC 60870-5-104 Slave Simulator User Manual

C - Counter interrogation commands from the controlling station initiate the freeze, freeze with reset or reset commands. A subsequent counter interrogationcommand is issued by the controlling station to collect the frozen values from the controlled station

D - Counter interrogation commands from the controlling station initiate the freeze operation, and the frozen values are reported spontaneously

iec104s_itotals_frz_secs Integer(0..4294967295)

10 Integrated totals local freeze period (seconds) at which the current value of counter data points is copied to frozen value . Only frozen values are transmitted spontaneously (ModeA) or sent during Counter Interrogation (Mode B). Counter data points are points withiec104_type_id equal one of:15 – Integrated Total37 - Integrated totals with time tag41 - integrated totals containing time taggedsecurity statistics

iec104s_itotals_spont_tx_secs Integer(0..4294967295)

11 Period in seconds for sending integrated totals data points with cause of transmission Spontaneous if integrated totals mode is set to A or D.

iec104s_itotals_inc_secs Integer(0..4294967295)

60 Period in seconds at which the integrated total data points increment.

iec104s_timetag_cmds_on Integer (0,1) 1 According to IEC 60870-5-101, the controlled station can be configured to accept commands from the master station containing either no time tags, or time tags but not both.1= accepting time tagged

Sirius Network Software Page 19

Page 20: Lab-SCADA IEC 60870-5-104 Slave Simulator User Manuallab-scada.com/iec104_slave_simulator_manual.pdfLab-SCADA IEC 60870-5-104 Slave Simulator User Manual 1 Introduction 1.1 Contact

Lab-SCADA IEC 60870-5-104 Slave Simulator User Manual

commands enabled (Not time tagged commands rejected)0=accepting time tagged commands disabled (Time tagged commands rejected and non-time tagged commands accepted.

iec104s_max_cmd_delay Integer (1..65535)

65000 When processing time tagged commands, specifies the maximum deviation of command time stamp from local system time.

iec104s_execute_timeout_secs

Integer(0..4294967295)

Time in seconds allowed between select and execute commands

iec104s_expert_debug Integer (0,1) 0 Enables extra logging detail - expert level information.

iec104s_dump_data Integer (0,1) 0 Enables logging hexadecimal dump of received and transmitted IEC 104 frames

iec104s_trace_on Integer (0,1) 0 Enables logging of decoded IEC 60870-5-104 protocol messages (protocol analyzer)

5.3 Description of Command Point Configuration Parameters

Tag name Type and Range

Default Description

typeid Integer (1..255)

none Command point type ident as specified in IEC 60870-5-104:45 – single command46 – double command47 – regulating step command48 – set-point command normalized value49 – set-point command scaled value50 – set-point command float51 – bitstring of 32 bits58 – single command with time tag59 – double command with time tag60 - regulating step command with time tag61 - set point command, normalized value with time tag62 - set point command, scaled value with time tag63 - set point command, short floating-point number with time tag

Sirius Network Software Page 20

Page 21: Lab-SCADA IEC 60870-5-104 Slave Simulator User Manuallab-scada.com/iec104_slave_simulator_manual.pdfLab-SCADA IEC 60870-5-104 Slave Simulator User Manual 1 Introduction 1.1 Contact

Lab-SCADA IEC 60870-5-104 Slave Simulator User Manual

64 - bitstring of 32 bits with time tag

ioa Integer(1..16777215)

none Information Object Address of command point

status_ioa Integer(1..16777215)

none Information Object Address of feedback point associated with the control commandNote: that this number must be defined in ioa parameter of one of the data points.

sbo Integer (0,1) none 1=Control command point operates using Select Before Operate model0=Control command point operates using Direct Operate model

5.4 Description of Data Point Configuration Parameters

Tag name Type and Range

Default Description

typeid Integer (1..255)

none IEC 60870-5-101 type identification of the data point (process information in monitor direction)

ioa Integer(1..16777215)

none Information Object Address of data point

qflags Integer (0x00..0xff)

none Hexadecimal 8 bit character (0xXX) specifies the Quality bitmap associated withthe data point as defined in IEC 60870-5-101

b7 (0x80) – IV (invalid)b6 (0x40) – NT (not topical)b5 (0x20) – SB (substituted)b4 (0x10) – BL (Blocked)b3 – not usedb2 – not usedb1 – not usedb0 (0x01) – OV (Overflow)

oflags Integer (0x00..0xff)

none Hexadecimal 8 bit character (0xXX) specifies the optional operating flags

Currently supported flags:0x01 – Enable cyclic transmission. Applicable for typeid supporting cyclic transmission:

M_ME_NA_1 (9)M_ME_NB_1 (11)M_ME_NC_1 (13)

Sirius Network Software Page 21

Page 22: Lab-SCADA IEC 60870-5-104 Slave Simulator User Manuallab-scada.com/iec104_slave_simulator_manual.pdfLab-SCADA IEC 60870-5-104 Slave Simulator User Manual 1 Introduction 1.1 Contact

Lab-SCADA IEC 60870-5-104 Slave Simulator User Manual

M_ME_ND_1 (21)

value String none Syntax of value depends on typeid:

typeid 1, 30:on, off

typeid 3, 31:on, off, 0, 3

typeid 5, 32:decimal signed int, e.g. 0,1, 10, -10

typeid 7, 33:Hexadecimal 32 bit: e.g 0x00000000, 0xffffffff, 0x55aa55aa, etc.

typeid 9, 21, 34:Normalized value from -1.0 to 0.999969482421875 (must be in float form with a decimal point)

typeid 11, 35:signed integer, eg 0, -1, 10

typeid 13, 36:floating point number: eg 0.0, 1.0, can also be in sci notation:1.1754943508222875e-383.4e+38

typeid 15, 37:signed integer 32 bit: 0,1 9, -5 etc

typeid 20:Status bits and change bits:value=[ST15..0=0000000000000001,CD15..0=0000000000000000]

typeid 38, 39, 40:Hexadecimal 32 bit number:0x1, 0xa, 0x0 etc.

Optional flags:

iv

Integer (0,1) none Sets the corresponding bit in the quality descriptor of the data point

Sirius Network Software Page 22

Page 23: Lab-SCADA IEC 60870-5-104 Slave Simulator User Manuallab-scada.com/iec104_slave_simulator_manual.pdfLab-SCADA IEC 60870-5-104 Slave Simulator User Manual 1 Introduction 1.1 Contact

Lab-SCADA IEC 60870-5-104 Slave Simulator User Manual

ntsbblovt

t=transient indication, only valid foe Step position information data point

Sirius Network Software Page 23

Page 24: Lab-SCADA IEC 60870-5-104 Slave Simulator User Manuallab-scada.com/iec104_slave_simulator_manual.pdfLab-SCADA IEC 60870-5-104 Slave Simulator User Manual 1 Introduction 1.1 Contact

Lab-SCADA IEC 60870-5-104 Slave Simulator User Manual

5.5 Using Linux utility iec104s for configuration

To manage the IEC104 slave simulator configuration using Linux command line front end, execute the commands described below while iec104sld is running. The changes take effect immediately, daemon restart is not required. The changes are saved automatically tothe configuration file

5.5.1 Adding and Updating Command Points

iec104s set cmdpoint typeid=typeid ioa=ioa status_ioa=statusioa sbo=<0|1>

The above command adds new or updates an existing command point.

See “5.3” for description of parameters.

Example:

iec104s set cmdpoint typeid=1 ioa=123 status_ioa=1003 sbo=1

5.5.2 Deleting Command Points

iec104s remove cmdpoint ioa=<ioa>

The above command deletes an existing command point.

Example:

iec104s remove cmdpoint ioa=1

5.5.3 Adding and Updating Data Points

iec104s set datapoint typeid=typeid ioa=ioa value=value [other parameters, see 5.4]

Example:

iec104s set datapoint typeid=1 ioa=100 value=off iv=1 nt=1 bl=1 sb=1

Note: when a data point value is changed or a new data point created the application generates an IEC104 message to the master with cause of transmission 'Spontaneous' if the data point type supports this cause of transmission according to IEC 60870-5-101 standard

5.5.4 Deleting Data Points

iec104s remove datapoint ioa=<ioa>

The above command deletes an existing command point.

Example:

iec104s remove datapoint ioa=1

Sirius Network Software Page 24

Page 25: Lab-SCADA IEC 60870-5-104 Slave Simulator User Manuallab-scada.com/iec104_slave_simulator_manual.pdfLab-SCADA IEC 60870-5-104 Slave Simulator User Manual 1 Introduction 1.1 Contact

Lab-SCADA IEC 60870-5-104 Slave Simulator User Manual

5.5.5 Showing configured points

iec104s show points

The above command displays the configured command and data points

5.6 Using Windows GUI ls104slgui.exe for Configuration

You can perform IEC104 Slave link management from within Windows GUI application while connected to the iec104sld Linux daemon as shown in the following sections.

5.6.1 Updating IEC104 Protocol Configuration

Change the required parameters as shown below and click Apply Config button.

IEC 104 data link can be started and stopped by clicking on 'Start Link' and 'Stop Link' buttons. If the checkbox 'Auto Start IEC104 Data Link' is checked, the IEC104 data link starts automatically when the iec104sld application is started.

Sirius Network Software Page 25

Page 26: Lab-SCADA IEC 60870-5-104 Slave Simulator User Manuallab-scada.com/iec104_slave_simulator_manual.pdfLab-SCADA IEC 60870-5-104 Slave Simulator User Manual 1 Introduction 1.1 Contact

Lab-SCADA IEC 60870-5-104 Slave Simulator User Manual

5.6.2 Managing Data Points

To add new, change existing or delete data points, fill in the fields on the right as shown in the screenshot below. Existing point fields are shown when you click / select a point in the list view.

When ready, click 'Add / Update' button to add new point or update an existing one.

Click 'Delete' button to delete data point with the IOA shown in the IOA fields.

5.6.3 Managing Command Points

To add new, change existing or delete command points, fill in the fields on the right as shown in the screenshot below. Existing point fields are shown when you click / select a point in the list view.

When ready, click 'Add / Update' button to add new point or update an existing one.

Click 'Delete' button to delete data point with the IOA shown in the IOA fields.

Sirius Network Software Page 26

Page 27: Lab-SCADA IEC 60870-5-104 Slave Simulator User Manuallab-scada.com/iec104_slave_simulator_manual.pdfLab-SCADA IEC 60870-5-104 Slave Simulator User Manual 1 Introduction 1.1 Contact

Lab-SCADA IEC 60870-5-104 Slave Simulator User Manual

6 Operation

6.1 Overview

iec104sld is a server application that runs on a Linux server and acts as an IEC 60870-5-104 Slave station simulator maintaining an IEC 104 session over TCP/IP to remote IEC 104 controlling station (master).

iec104sld is managed remotely either from a Windows PC using ls104slgui.exe applicationor from Linux shell using iec104s command line utility.

Additionally the product is shipped with the Windows version of iec104sld (iec104sld.exe) which starts by the Windows GUI before connecting to it (to 127.0.0.1).

The application supports simulating command points and data points which can be added, edited or deleted using the Windows UI or the command line interface.

Sirius Network Software Page 27

Page 28: Lab-SCADA IEC 60870-5-104 Slave Simulator User Manuallab-scada.com/iec104_slave_simulator_manual.pdfLab-SCADA IEC 60870-5-104 Slave Simulator User Manual 1 Introduction 1.1 Contact

Lab-SCADA IEC 60870-5-104 Slave Simulator User Manual

6.2 Windows GUI Porgram

Windows GUI control program is used to manage iec104sld IEC104 Slave Simulator. Mainprogram's views and control areas are shown below:

(1) IEC104 Link and Application Layer Management group of controls. This area is used to change and update IEC104 configuration, start and stop IEC104 data link.

(2) IEC104 Protocol Statistics view. This view shows IEC104 data link and application layer statistic counters.

(3) Outstation data points. This view displays the configured information objects.

(4) Outstation data points control area, Here it is possible to edit, add or remove properties of configured data points.

(5) Outstation command points. This view displays the configured information objects related to the commands that the controlled station is able to process.

(6) Outstation command points control area, Here it is possible to edit, add or remove properties of configured command points.

(7) System log. This view shows the events logged by iec104sld. Beside viewing the log, it is also possible to pause, resume and export the log.

Sirius Network Software Page 28

Page 29: Lab-SCADA IEC 60870-5-104 Slave Simulator User Manuallab-scada.com/iec104_slave_simulator_manual.pdfLab-SCADA IEC 60870-5-104 Slave Simulator User Manual 1 Introduction 1.1 Contact

Lab-SCADA IEC 60870-5-104 Slave Simulator User Manual

6.2.1 Connecting to iec104sld

Click “CONNECT” button.You will see dialog box “Connect to LabScada IEC104 Slave”.

Enter the IP address of your Linux server on which the iec104sld is running and specify the TCP port number configured for GUI access in the iec104sld configuration (by default port 3335)

Click “Connect”. Connection to iec104sld should get established. You can then manage the IEC104 parameters and perform other control tasks.

The TCP port on which iec104sld is listening is configured in the iec104sld configuration file in the option netui_port (On Linux stored by default at /etc/iec104sld/iec104sld.cfg):

To disconnect from iec104sld you can click “DISCONNECT” button.

6.2.2 IEC104 Configuration Management

See section 5.6.1 Updating IEC104 Protocol Configuration.

The control fields are explained in 5.2 Description of Main Configuration Parameters.

Sirius Network Software Page 29

Page 30: Lab-SCADA IEC 60870-5-104 Slave Simulator User Manuallab-scada.com/iec104_slave_simulator_manual.pdfLab-SCADA IEC 60870-5-104 Slave Simulator User Manual 1 Introduction 1.1 Contact

Lab-SCADA IEC 60870-5-104 Slave Simulator User Manual

6.2.3 IEC104 Outstation Data Points View

This view displays the configured information objects.

The control group on the left of the points list allows editing, adding or deleting the data points.

Sirius Network Software Page 30

Page 31: Lab-SCADA IEC 60870-5-104 Slave Simulator User Manuallab-scada.com/iec104_slave_simulator_manual.pdfLab-SCADA IEC 60870-5-104 Slave Simulator User Manual 1 Introduction 1.1 Contact

Lab-SCADA IEC 60870-5-104 Slave Simulator User Manual

6.2.4 IEC104 Outstation Command Points View

This view displays the configured information objects related to the commands that the controlled station is able to process.

Outstation command points control area allow editing properties of, adding or removing configured command points

Sirius Network Software Page 31

Page 32: Lab-SCADA IEC 60870-5-104 Slave Simulator User Manuallab-scada.com/iec104_slave_simulator_manual.pdfLab-SCADA IEC 60870-5-104 Slave Simulator User Manual 1 Introduction 1.1 Contact

Lab-SCADA IEC 60870-5-104 Slave Simulator User Manual

6.2.5 Event Log View

System Log view shows the events logged by iec104sld during operation. These include events about:

• the application starting and stopping,

• IEC104 link connection and disconnection

• performance of IEC 101 application layer functions (IEC 60870-5-5 [2])

• IEC 60870-5-104 protocol tracing

• various debug events, such as state machine events and transitions.

Supported log operations:

• Export Log button is used to export the collected log into a text file

• Clear log button clears the log view

• Log Pause button pauses transmission of log events from iec104sld to the GUI application.

Note that when iec104sld genetrates an event, it goes to two destinations:

• Linux syslog

• Windows GUI program if it is connected to iec104sld.

Sirius Network Software Page 32

Page 33: Lab-SCADA IEC 60870-5-104 Slave Simulator User Manuallab-scada.com/iec104_slave_simulator_manual.pdfLab-SCADA IEC 60870-5-104 Slave Simulator User Manual 1 Introduction 1.1 Contact

Lab-SCADA IEC 60870-5-104 Slave Simulator User Manual

The logging options include:

• Protocol Trace- generation of decoded IEC 60870-5-104 protocol trace events

• Hex Dump – enables logging of hexadecimal dump of received and transmitted IEC104 frames

• Expert – enables debug level logging of various functions of iec104sld.

The above options are configurable in the main IEC104 Protocol parameters configuration area as shown below:

Sirius Network Software Page 33

Page 34: Lab-SCADA IEC 60870-5-104 Slave Simulator User Manuallab-scada.com/iec104_slave_simulator_manual.pdfLab-SCADA IEC 60870-5-104 Slave Simulator User Manual 1 Introduction 1.1 Contact

Lab-SCADA IEC 60870-5-104 Slave Simulator User Manual

6.2.6 IEC104 Statistics View

IEC104 Protocol Statistics view shows IEC104 data link and application layer statistic counters:

Description of statistic counters:

Counter name Description

ASDUs RX Number of IEC 104/IEC101 application level messages received

ASDUs TX Number of IEC 104/IEC101 application level messages transmitted

ASDU RX Bad CA Number of IEC 104/IEC101 application level messages received and discarded as having ASDU CA value mismatching the configured ASDU CA.

ASDU RX Malformed Number of IEC 104/IEC101 application level messages received that were considered malformed and discarded

ASDU TX Errors Number of IEC 104/IEC101 application level messages discarded due to transmission error

Pkts RX Number of IEC 104 data link frames received

Pkts TX Number of IEC 104 data link frames transmitted

TxQ Overflows Number of IEC 104 data link frames discarded at transmission due to transmit queue being full

Sirius Network Software Page 34

Page 35: Lab-SCADA IEC 60870-5-104 Slave Simulator User Manuallab-scada.com/iec104_slave_simulator_manual.pdfLab-SCADA IEC 60870-5-104 Slave Simulator User Manual 1 Introduction 1.1 Contact

Lab-SCADA IEC 60870-5-104 Slave Simulator User Manual

6.3 Command Line Interface

6.3.1 Starting iec104sld

After installation iec104sld is normally started automatically at boot by cron.

To start the application manually, from the Linux server command line, execute as root:

/usr/sbin/iec104sld /etc/iec104sld/iec104sld.cfg

6.3.2 Stopping iec104sld

To stop the iec104sld application, execute:

iec104s quit

Alternatively :

killall iec104sld

6.3.3 Checking the software version

To check the software version, execute:

./iec104s show version

iec104sld ver: 1.0.0, Tue Jul 28 15:58:51 UTC 2020, Copyright (C) 2020 Sirius Network Software

IEC104S Library Version: 1.0.0

6.3.4 Showing the Loaded Configuration

To show the loaded configuration, execute the following command:

iec104s show config

Example output:

netui_port=3335

key=

log_level=5

iec104s_dl_auto_start=0

iec104s_local_ip1=0.0.0.0

iec104s_local_port1=2404

iec104s_local_ip2=

iec104s_local_port2=

iec104s_remote_ip1=

iec104s_remote_ip2=

Sirius Network Software Page 35

Page 36: Lab-SCADA IEC 60870-5-104 Slave Simulator User Manuallab-scada.com/iec104_slave_simulator_manual.pdfLab-SCADA IEC 60870-5-104 Slave Simulator User Manual 1 Introduction 1.1 Contact

Lab-SCADA IEC 60870-5-104 Slave Simulator User Manual

tcp_keepalive_enabled=1

tcp_keepalive_interval=5

tcp_keepalive_timeout=5

tcp_keepalive_count=3

tcp_user_timeout=20000

iec104s_k=12

iec104s_w=9

iec104s_t1=15

iec104s_t2=20

iec104s_t3=20

iec104s_gi_resp_time=100

iec104s_txq_size=128

iec104s_sync_time=1

iec104s_exp_cs_intvl_secs=60

iec104s_casdu=3333

iec104s_broadcast_casdu=65535

iec104s_offline_q_on=0

iec104s_send_eoi=0

iec104s_bg_scan_secs=0

iec104s_cyclic_secs=0

iec104s_itotals_mode=D

iec104s_itotals_frz_secs=10

iec104s_itotals_spont_tx_secs=11

iec104s_itotals_inc_secs=60

iec104s_double_transmission_on=0

iec104s_timetag_cmds_on=1

iec104s_max_cmd_delay=65000

iec104s_execute_timeout_secs=5

iec104s_expert_debug=1

iec104s_dump_data=1

iec104s_trace_on=1

Sirius Network Software Page 36

Page 37: Lab-SCADA IEC 60870-5-104 Slave Simulator User Manuallab-scada.com/iec104_slave_simulator_manual.pdfLab-SCADA IEC 60870-5-104 Slave Simulator User Manual 1 Introduction 1.1 Contact

Lab-SCADA IEC 60870-5-104 Slave Simulator User Manual

6.3.5 Showing Configured Data and Command Points

To view the configured data and command points execute the following command:

iec104s show points

Example output

cmd point #0: typeid=58, ioa=1, status_ioa=100, sbo=0

cmd point #1: typeid=46, ioa=2, status_ioa=1000, sbo=1

cmd point #2: typeid=63, ioa=3, status_ioa=6004, sbo=1

data point #0: typeid=1, ioa=100, qflags=0xf0, value=0x0 (off)

data point #1: typeid=3, ioa=1000, qflags=0x00, value=0x2 (on)

data point #2: typeid=5, ioa=2005, qflags=0x00, value=0x73 (-13, T=0)

data point #3: typeid=7, ioa=3001, qflags=0x00, value=0xffffffff

data point #4: typeid=9, ioa=4002, qflags=0x00, value=0x4000 (0.500000)

data point #5: typeid=9, ioa=4004, qflags=0x00, value=0xffffd99a (-0.299988)

data point #6: typeid=11, ioa=5002, qflags=0x00, value=0x5 (5)

data point #7: typeid=13, ioa=6004, qflags=0x00, value=0xbf800000 (-1.000000)

data point #8: typeid=15, ioa=7000, qflags=0x00, value=0x96 (150) (frzVal=0)

data point #9: typeid=20, ioa=1103, qflags=0x00, value=0x10000 (ST b15..b0=0000000000000001,CD b15..b0=0000000000000000)

data point #10: typeid=21, ioa=8004, qflags=0x00, value=0xffff8004 (-0.999878)

data point #11: typeid=30, ioa=9000, qflags=0x00, value=0x1 (on)

6.3.6 Viewing IEC104 Data Link Statistics

To view IEC104 Data Link statistics execute the following command:

iec104s show stats

Example output:

IEC104S DL Stats:

Pkt RX: 4, TX: 13, Drop: 0

phTxErrs: 0, phTxBlocked: 0, TxQ Overrun: 0

DL State: NET_CLOSED

DL uptime: 0 hrs 0 mins 1 secs

Per connection stats:

Sirius Network Software Page 37

Page 38: Lab-SCADA IEC 60870-5-104 Slave Simulator User Manuallab-scada.com/iec104_slave_simulator_manual.pdfLab-SCADA IEC 60870-5-104 Slave Simulator User Manual 1 Introduction 1.1 Contact

Lab-SCADA IEC 60870-5-104 Slave Simulator User Manual

Connection 0: NET_CLOSED

PktRx: 4, PktTx: 13, PktDrop: 0

Connection 1: NET_CLOSED

PktRx: 0, PktTx: 0, PktDrop: 0

6.3.7 Viewing System Log

During operation iec104sld generates syslog events. To view the syslog events in real timeyou can use the following command:

tail -f /var/log/syslog

To view all syslog events:

cat /var/log/syslog| grep iec104sld

Example output:

Aug 19 08:09:10 host1 iec104sld: IEC104S DL: listen(0): TCP listening on 0.0.0.0 port 2404

Aug 19 08:09:10 host1 iec104sld: IEC104S DL(0) Incoming TCP session accepted from 192.168.0.28 port 52124

Aug 19 08:09:10 host1 iec104sld: IEC104S DL(0): ev [NET_CLOSED] <-- EV_CONNECT (0)

Aug 19 08:09:10 host1 iec104sld: IEC104S DL(0): netst [NET_CLOSED] -> [NET_ESTABLISHED]

Aug 19 08:09:10 host1 iec104sld: iec104s_dl_activation (1)

Aug 19 08:09:10 host1 iec104sld: IEC104S DL(0): RxDUMP(6): 68 04 07 00 00 00

Aug 19 08:09:10 host1 iec104sld: 08:09:10.265: TRC-IEC104S DL(0): RX (6): U STARTDT Act

Aug 19 08:09:10 host1 iec104sld: IEC104S DL(0): ev [NET_ESTABLISHED] <-- EV_104_FRAME (0)

Aug 19 08:09:10 host1 iec104sld: IEC104S DL(0): ev [DL_STOPPED] <-- EV_RX_START (0)

Aug 19 08:09:10 host1 iec104sld: IEC104S DL(0): dlst [DL_STOPPED] -> [DL_STARTED]

Aug 19 08:09:10 host1 iec104sld: IEC104S DL: TxDUMP(6): 68 04 0b 00 00 00

Aug 19 08:09:10 host1 iec104sld: 08:09:10.265: TRC-IEC104S DL(0): TX (6): U STARTDT Con

Aug 19 08:09:10 host1 iec104sld: IEC104S DL(0): RxDUMP(22): 68 14 00 00 00 00 67 01 06 00 05 0d 00 00 00 1f 28 0908 13 08 14

Aug 19 08:09:10 host1 iec104sld: 08:09:10.269: TRC-IEC104S DL(0): RX (22): I RSN=0 SSN=0 (103) C_CS_NA_1 Act

Aug 19 08:09:10 host1 iec104sld: IEC104S DL(0): ev [NET_ESTABLISHED] <-- EV_104_FRAME (0)

Aug 19 08:09:10 host1 iec104sld: IEC104S DL(0): ev [DL_STARTED] <-- EV_RX_I (0)

Aug 19 08:09:10 host1 iec104sld: IEC104S App: Rx Clock Sync command, COT=6

Aug 19 08:09:10 host1 iec104sld: iec104s_cmd_rx: typeId=103, IOA=0, COT=6, OA=0

Aug 19 08:09:10 host1 iec104sld: App: Processing clock synch cmd: RX time: 2020.08.19 08:09:10.271 su=0

Aug 19 08:09:10 host1 iec104sld: App: Clock before sync: 2020.08.19 08:09:10.269 su=0

Aug 19 08:09:10 host1 iec104sld: App: Synchronizing clock to: 2020.08.19 08:09:10.271 su=0

Sirius Network Software Page 38

Page 39: Lab-SCADA IEC 60870-5-104 Slave Simulator User Manuallab-scada.com/iec104_slave_simulator_manual.pdfLab-SCADA IEC 60870-5-104 Slave Simulator User Manual 1 Introduction 1.1 Contact

Lab-SCADA IEC 60870-5-104 Slave Simulator User Manual

Aug 19 08:09:10 host1 iec104sld: App: Clock after sync: 2020.08.19 08:09:10.271 su=0

Aug 19 08:09:10 host1 iec104sld: IEC104S DL(0): ev [NET_ESTABLISHED] <-- EV_101_FRAME (0)

Aug 19 08:09:10 host1 iec104sld: IEC104S DL: TxDUMP(22): 68 14 00 00 02 00 67 01 07 00 05 0d 00 00 00 1d 28 49 08 13 08 14

Aug 19 08:09:10 host1 iec104sld: 08:09:10.271: TRC-IEC104S DL(0): TX (22): I RSN=1 SSN=0 (103) C_CS_NA_1 ActCon

Aug 19 08:09:10 host1 iec104sld: IEC104S DL(0): RxDUMP(16): 68 0e 02 00 02 00 64 01 06 00 05 0d 00 00 00 14

Aug 19 08:09:10 host1 iec104sld: 08:09:10.274: TRC-IEC104S DL(0): RX (16): I RSN=1 SSN=1 (100) C_IC_NA_1 Act

Aug 19 08:09:10 host1 iec104sld: IEC104S DL(0): ev [NET_ESTABLISHED] <-- EV_104_FRAME (0)

Aug 19 08:09:10 host1 iec104sld: IEC104S DL(0): ev [DL_STARTED] <-- EV_RX_I (0)

Aug 19 08:09:10 host1 iec104sld: IEC104S App: Rx Interrogation command, QOI=20

Aug 19 08:09:10 host1 iec104sld: IEC104S DL(0): ev [NET_ESTABLISHED] <-- EV_101_FRAME (0)

Aug 19 08:09:10 host1 iec104sld: IEC104S DL: TxDUMP(16): 68 0e 02 00 04 00 64 01 07 00 05 0d 00 00 00 14

Aug 19 08:09:10 host1 iec104sld: 08:09:10.274: TRC-IEC104S DL(0): TX (16): I RSN=2 SSN=1 (100) C_IC_NA_1 ActCon

Aug 19 08:09:10 host1 iec104sld: IEC104S App: Started Genegal Interrogation

Aug 19 08:09:10 host1 iec104sld: IEC104S DL(0): ev [NET_ESTABLISHED] <-- EV_101_FRAME (0)

Aug 19 08:09:10 host1 iec104sld: IEC104S DL: TxDUMP(16): 68 0e 04 00 04 00 01 01 14 00 05 0d 64 00 00 f0

Aug 19 08:09:10 host1 iec104sld: 08:09:10.374: TRC-IEC104S DL(0): TX (16): I RSN=2 SSN=2 (1) M_SP_NA_1 Inrogen [ioa=100]

Aug 19 08:09:10 host1 iec104sld: IEC104S DL(0): ev [NET_ESTABLISHED] <-- EV_101_FRAME (0)

Aug 19 08:09:10 host1 iec104sld: IEC104S DL: TxDUMP(16): 68 0e 06 00 04 00 03 01 14 00 05 0d e8 03 00 02

Aug 19 08:09:10 host1 iec104sld: 08:09:10.474: TRC-IEC104S DL(0): TX (16): I RSN=2 SSN=3 (3) M_DP_NA_1 Inrogen [ioa=1000]

Aug 19 08:09:10 host1 iec104sld: IEC104S DL(0): ev [NET_ESTABLISHED] <-- EV_101_FRAME (0)

Aug 19 08:09:10 host1 iec104sld: IEC104S DL: TxDUMP(17): 68 0f 08 00 04 00 05 01 14 00 05 0d d5 07 00 73 00

Aug 19 08:09:10 host1 iec104sld: 08:09:10.574: TRC-IEC104S DL(0): TX (17): I RSN=2 SSN=4 (5) M_ST_NA_1 Inrogen [ioa=2005]

Aug 19 08:09:10 host1 iec104sld: IEC104S DL(0): ev [NET_ESTABLISHED] <-- EV_101_FRAME (0)

Aug 19 08:09:10 host1 iec104sld: IEC104S DL: TxDUMP(20): 68 12 0a 00 04 00 07 01 14 00 05 0d b9 0b 00 ff ff ff ff 00

Aug 19 08:09:10 host1 iec104sld: 08:09:10.674: TRC-IEC104S DL(0): TX (20): I RSN=2 SSN=5 (7) M_BO_NA_1 Inrogen [ioa=3001]

Aug 19 08:09:10 host1 iec104sld: IEC104S DL(0): ev [NET_ESTABLISHED] <-- EV_101_FRAME (0)

Aug 19 08:09:10 host1 iec104sld: IEC104S DL: TxDUMP(24): 68 16 0c 00 04 00 09 02 14 00 05 0d a2 0f 00 00 40 00 a40f 00 9a d9 00

Aug 19 08:09:10 host1 iec104sld: 08:09:10.774: TRC-IEC104S DL(0): TX (24): I RSN=2 SSN=6 (9) M_ME_NA_1 Inrogen [ioa=4002]

Aug 19 08:09:10 host1 iec104sld: IEC104S DL(0): ev [NET_ESTABLISHED] <-- EV_101_FRAME (0)

Aug 19 08:09:10 host1 iec104sld: IEC104S DL: TxDUMP(18): 68 10 0e 00 04 00 0b 01 14 00 05 0d 8a 13 00 05 00 00

Aug 19 08:09:10 host1 iec104sld: 08:09:10.874: TRC-IEC104S DL(0): TX (18): I RSN=2 SSN=7 (11) M_ME_NB_1 Inrogen [ioa=5002]

Aug 19 08:09:10 host1 iec104sld: IEC104S DL(0): ev [NET_ESTABLISHED] <-- EV_101_FRAME (0)

Aug 19 08:09:10 host1 iec104sld: IEC104S DL: TxDUMP(20): 68 12 10 00 04 00 0d 01 14 00 05 0d 74 17 00 00 00 80 bf00

Aug 19 08:09:10 host1 iec104sld: 08:09:10.974: TRC-IEC104S DL(0): TX (20): I RSN=2 SSN=8 (13) M_ME_NC_1

Sirius Network Software Page 39

Page 40: Lab-SCADA IEC 60870-5-104 Slave Simulator User Manuallab-scada.com/iec104_slave_simulator_manual.pdfLab-SCADA IEC 60870-5-104 Slave Simulator User Manual 1 Introduction 1.1 Contact

Lab-SCADA IEC 60870-5-104 Slave Simulator User Manual

Inrogen [ioa=6004]

Aug 19 08:09:10 host1 iec104sld: IEC104S DL(0): RxDUMP(6): 68 04 01 00 12 00

Aug 19 08:09:10 host1 iec104sld: 08:09:10.978: TRC-IEC104S DL(0): RX (6): S RSN=9

Aug 19 08:09:10 host1 iec104sld: IEC104S DL(0): ev [NET_ESTABLISHED] <-- EV_104_FRAME (0)

Aug 19 08:09:10 host1 iec104sld: IEC104S DL(0): ev [DL_STARTED] <-- EV_RX_S (0)

Aug 19 08:09:11 host1 iec104sld: IEC104S DL(0): ev [NET_ESTABLISHED] <-- EV_101_FRAME (0)

Aug 19 08:09:11 host1 iec104sld: IEC104S DL: TxDUMP(20): 68 12 12 00 04 00 14 01 14 00 05 0d 4f 04 00 01 00 00 0000

Aug 19 08:09:11 host1 iec104sld: 08:09:11.074: TRC-IEC104S DL(0): TX (20): I RSN=2 SSN=9 (20) M_SP_NA_1 Inrogen [ioa=1103]

Aug 19 08:09:11 host1 iec104sld: IEC104S DL(0): ev [NET_ESTABLISHED] <-- EV_101_FRAME (0)

Aug 19 08:09:11 host1 iec104sld: IEC104S DL: TxDUMP(17): 68 0f 14 00 04 00 15 01 14 00 05 0d 44 1f 00 04 80

Aug 19 08:09:11 host1 iec104sld: 08:09:11.174: TRC-IEC104S DL(0): TX (17): I RSN=2 SSN=10 (21) M_ME_ND_1 Inrogen [ioa=8004]

Aug 19 08:09:11 host1 iec104sld: IEC104S App: Finished Genegal Interrogation

Aug 19 08:09:11 host1 iec104sld: IEC104S DL(0): ev [NET_ESTABLISHED] <-- EV_101_FRAME (0)

Aug 19 08:09:11 host1 iec104sld: IEC104S DL: TxDUMP(16): 68 0e 16 00 04 00 64 01 0a 00 05 0d 00 00 00 14

Aug 19 08:09:11 host1 iec104sld: 08:09:11.275: TRC-IEC104S DL(0): TX (16): I RSN=2 SSN=11 (100) C_IC_NA_1 ActTerm

Aug 19 08:09:13 host1 iec104sld: IEC104S DL(0): dlst [DL_STARTED] -> [DL_STOPPED]

Aug 19 08:09:13 host1 iec104sld: IEC104S DL(0): netst [NET_ESTABLISHED] -> [NET_CLOSED]

Aug 19 08:09:13 host1 iec104sld: IEC104S DL(1): dlst [DL_STOPPED] -> [DL_STOPPED]

Aug 19 08:09:13 host1 iec104sld: IEC104S DL(1): netst [NET_CLOSED] -> [NET_CLOSED]

Aug 19 08:09:13 host1 iec104sld: IEC104S DL: Data Link Layer closed

Aug 19 08:09:13 host1 iec104sld: iec104s_dl_activation (0)

Sirius Network Software Page 40