smartgridadsc / openplc61850 Goto Github PK
View Code? Open in Web Editor NEWOpenPLC61850, an extension of OpenPLC compatible with the IEC 61850 MMS protocol
License: GNU General Public License v3.0
OpenPLC61850, an extension of OpenPLC compatible with the IEC 61850 MMS protocol
License: GNU General Public License v3.0
Hello,
I'm tring to get OpenPLC61850 working. I've tried two approaches: with and without docker. Same result OpenPLC doesn't go in "running mode".
I tried compiling for the hardware again, it compiled succesfully:
Generating C files...
POUS.c
POUS.h
LOCATED_VARIABLES.h
VARIABLES.csv
Config0.c
Config0.h
Res0.c
Moving Files...
Compiling for Linux
Generating object files...
Generating glueVars...
Generating mapping file for IEC61850 client function
ST file: ../st_files/blank_program.st
SCL files: ../scl_client_files/ied01.icd ../scl_client_files/ied02.icd
Outfile: iecclient.map
Parsing ST file
Parsing SCL file../scl_client_files/ied01.icd
Parsing SCL file../scl_client_files/ied02.icd
Mapping done, exit
Generating mapping file for IEC61850 server function
ST file: ../st_files/blank_program.st
SCL files: ../scl_server_files/scl.icd
Outfile: iecserver.map
Parsing ST file
Parsing SCL file../scl_server_files/scl.icd
Mapping done, exit
Generating static_model...
Picked up _JAVA_OPTIONS: -Dawt.useSystemAAFontSettings=on -Dswing.aatext=true
Select ICD File ../scl_server_files/scl.icd
parse data type templates ...
parse IED section ...
parse communication section ...
Found connectedAP W1 for IED TestServer
print report instance 01
print report instance 02
print report instance 03
print report instance 04
print report instance 05
print report instance 01
print report instance 02
print report instance 03
print report instance 04
print report instance 05
print report instance 01
print report instance 02
print report instance 03
print report instance 04
print report instance 05
print report instance 01
print report instance 02
print report instance 03
print report instance 04
print report instance 05
Compiling main program...
Compilation finished successfully! ```
The following is the error
``` OpenPLC Runtime starting...
Skipping configuration of Slave Devices (mbconfig.cfg file not found)
Interactive Server: Listening on port 43628
Interactive Server: waiting for new client...
Warning: Persistent Storage file not found
Setting main thread priority to RT
WARNING: Failed to set main thread to real-time priority
Locking main thread memory
Getting current time
Enabling IEC61850 on port 102
Interactive Server: Client accepted! Creating thread for the new client ID: 7...
Interactive Server: waiting for new client...
Interactive Server: Thread created for client ID: 7
Interactive Server: Client accepted! Creating thread for the new client ID: 8...
Interactive Server: client ID: 7 has closed the connection
Terminating interactive server connections
Interactive Server: waiting for new client...
Interactive Server: Client accepted! Creating thread for the new client ID: 7...
Interactive Server: Thread created for client ID: 8
Interactive Server: waiting for new client...
Interactive Server: Thread created for client ID: 7
Interactive Server: client ID: 8 has closed the connection
Terminating interactive server connections
Interactive Server: client ID: 7 has closed the connection
Terminating interactive server connections
127.0.0.1 - - [16/Nov/2023 13:48:50] "GET /runtime_logs HTTP/1.1" 200 -
Interactive Server: Client accepted! Creating thread for the new client ID: 7...
Interactive Server: waiting for new client...
Interactive Server: Thread created for client ID: 7
Issued start_iec61850() command to start on port: 102
Interactive Server: client ID: 7 has closed the connection
Openning database
Terminating interactive server connections
Enabling Modbus on port 502
Starting IEC61850SERVER
Starting IEC61850CLIENT
Invalid mapping for IED01LogicalDevice/GGIO1.AnIn1.mag.f
Invalid mapping for IED01LogicalDevice/GGIO2.SPC1.Oper.ctlVal
Invalid mapping for IED02LogicalDevice/GGIO1.AnIn1.mag.f
Invalid mapping for IED02LogicalDevice/GGIO2.SPC1.Oper.ctlVal
mapping done
Setting control handler for TestServerLogicalDevice/GGIO2.SPCSO
Setting control handler for TestServerLogicalDevice/GGIO3.SPCSO
Setting control handler for TestServerLogicalDevice/GGIO5.SPCSO
Setting control handler for TestServerLogicalDevice/GGIO6.SPCSO
Setting control handler for TestServerLogicalDevice/GGIO8.SPCSO
Setting control handler for TestServerLogicalDevice/GGIO9.SPCSO
Setting control handler for TestServerLogicalDevice/GGIO11.SPCSO
Setting control handler for TestServerLogicalDevice/GGIO12.SPCSO
Setting control handler for TestServerLogicalDevice/GGIO15.SPCSO1
Setting control handler for TestServerLogicalDevice/GGIO15.SPCSO2
terminate called after throwing an instance of 'std::out_of_range'
what(): basic_string::substr: __pos (which is 3) > this->size() (which is 1)
OpenPLC Runtime is not running. Error: [Errno 104] Connection reset by peer
Enabling DNP3 on port 20000
Enabling EtherNet/IP on port 44818
Disabling Persistent Storage
persistent.file removed! ```
Has anyone else faced my same issue?
I've updated the Dockerfile since the one provided with the repository wasn't working:
``` ARG UBUNTU_VERSION=16.04
FROM ubuntu:$UBUNTU_VERSION
ARG PYTHON_VERSION=2.7.9
RUN apt-get update \
&& apt-get install -y sudo wget gcc make openssl libffi-dev libgdbm-dev libsqlite3-dev libssl-dev zlib1g-dev \
&& apt-get clean
WORKDIR /tmp/
RUN wget https://www.python.org/ftp/python/$PYTHON_VERSION/Python-$PYTHON_VERSION.tgz \
&& tar --extract -f Python-$PYTHON_VERSION.tgz \
&& cd ./Python-$PYTHON_VERSION/ \
&& ./configure --with-ensurepip=install --enable-optimizations --prefix=/usr/local \
&& make && make install \
&& cd ../ \
&& rm -r ./Python-$PYTHON_VERSION*
COPY . /workdir
RUN cd /workdir && ./install.sh docker
WORKDIR /workdir
CMD tail -f /dev/null ```
In webserver/core/iec61850client.cpp
in the function checkControlChanges
, the program attempts to check the current value of the IED to see if it needs to send a write command to the IED to update its values. However, when an error is encountered, it merely logs ErrorCheckingValueBeforeWriting
and proceeds on with the rest of the code.
OpenPLC61850/webserver/core/iec61850client.cpp
Lines 182 to 198 in 9d2267d
Ideally, the program should not continue with the rest of the code to send the write command to the IED as this will obscure the bug. There should probably be a continue
statement in the conditional block.
Hey,
is there any way to get in touch with you, to ask a few questions?
I'm actually trying to figure out the concept because i wanted to connect my OpenPLC61850 with another IED and i don't really understand how to.
Would be really glad if you'd message me,
regards
marco
iecserver.map
file to workI'm wondering if there's a special format for the scl file to be used because I've tried many files and neither of them worked so far, they result in an empty server map file.
Do you have an example for a working scl file with stVal
values that I could use to figure out where the issue is?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.