OpenPLC61850 is an extension of OpenPLC (https://github.com/thiagoralves/OpenPLC_v3) by Thiago Alves.
OpenPLC61850 is compatible with the IEC61850-MMS protocol and runs an IEC61850-MMS server and also a client for communicating with other IEC61850-MMS devices.
OpenPLC61850 supports the IEC61850-MMS protocol using libIEC61850 (https://libiec61850.com/libiec61850/) and pugixml (https://pugixml.org/).
OpenPLC61850 is only compatible with Linux. We have only tested it on Ubuntu 20 and Debian 10. However, it should work on most Linux distributions.
To get the OpenPLC61850 files, you can either use git, or download the ZIP file.
If you have not installed git, you can do so with the following command:
sudo apt install git
Once git has been installed, you can download the OpenPLC61850 files using git:
git clone https://github.com/smartgridadsc/OpenPLC61850.git
You can download the ZIP file from this page. Once it is downloaded, you can extract the OpenPLC61850 files like this:
unzip OpenPLC61850-main.zip
To install OpenPLC61850, you just need to run the install script:
cd OpenPLC61850
./install.sh linux
The installation could take a while, depending on your system. Once the installation is complete, you can reboot your system and OpenPLC61850 will be started on boot.
You can check if OpenPLC61850 is running by accessing the web interface in your web browser, at localhost:8080
. To access the web interface on another device, you can replace localhost
with the IP address of the device running OpenPLC61850.
The default username and password for the web interface is openplc
and openplc
.
You can add your IEC 61131-3 PLC programs using the web interface. Since the steps are the same as the original OpenPLC, you can refer to same guide here (follow OpenPLC v3 instructions).
Once the program is added to OpenPLC61850, you can find it in OpenPLC68150/webserver/st_files
. This directory holds all the *.st
files that you have added to OpenPLC61850. The program that will be used during operation of OpenPLC61850 is listed in OpenPLC61850/webserver/active_program
.
Since the web interface was not modified from the original OpenPLC, you have to manually add the server SCL file to OpenPLC61850 directory.
To add the SCL file for the OpenPLC61850 server, you can copy the SCL file to OpenPLC61850/webserver/SCL_server_files
. Since this directory can contain multiple SCL files, you should also edit the OpenPLC61850/webserver/active_scl
text file to reflect the name of the SCL file you would like to use.
For the same reason above, you also have to manually add the IED SCL files to OpenPLC61850 directory. You can add them to OpenPLC61850/webserver/SCL_client_files
. Unlike the server SCL file, every SCL file in OpenPLC61850/webserver/SCL_client_files
is processed for configuration, hence unused IED SCL files should be removed.
After adding SCL files for server and/or IED, you have to recompile the PLC runtime, or the new configuration will not be set. Unfortunately, this is not done automatically.
To recompile the PLC runtime, you can just reload the IEC 61131-3 PLC program in the web interface. You can do so by selecting the same PLC program again in the Programs
tab and pressing Launch Program
button.
Before starting OpenPLC61850, you should perform some checks to ensure that the configuration is properly set.
There are two files you should check: OpenPLC61850/webserver/core/iecserver.map
and OpenPLC61850/webserver/core/iecclient.map
. These files are generated after compilation and reflect the configuration taken from the server and IED SCL files. They should not be empty, and should be similar to these:
Once OpenPLC61850 is configured to your preference, you can start it by pressing the Start PLC
button on the web interface.
This work is supported by the National Research Foundation, Singapore, Singapore University of Technology and Design under its National Satellite of Excellence in Design Science and Technology for Secure Critical Infrastructure Grant (NSoE_DeST-SCI2019-0005).