Yuting666
Hi, I am a student doing my final year project at university. I plan to build a simulation platform of Power System, and I plan to use a power system case solver: Pandapower (http://www.pandapower.org/about/) to simulate the real-time running power system, and I want to collect all the sensor data from the Pandapower, and input all the sensor data to the OpenPLC, and OpenPLC will perform some power system control logic based on the data collected by those sensors. 

If I want to achieve that goal, how can a python project simulating power system communicate to the OpenPLC, and how do OpenPLC run-time and OpenPLC editor can be integrated with this case?

I've already studied how the OpenPLC editor works, it will generate an st file. Can we manually write logics in an ST file which corresponds to the power system logics running in Pandapower, and put the logic in the OpenPLC runtime?

How can OpenPLC runtime give instructions to Pandapower program and tell the program to switch on/ switch off some circuit breaker? Is there any existing API or communication protocol enabled?

I look forward to your reply!
Thank you!
Quote 0 0
Yuting666
Oh I think I should read/write value from the registers of OpenPLC, is it a correct solution? Then I use modBus TCP to pass the value to the OpenPLC
Quote 0 0
thiagoralves
This is one approach. Another approach would be to create a modbus server in your python project using PyModbus. This modbus server will have all input and output variables you want. Then you add this modbus server as a slave device on openplc (Generic Modbus TCP) so that openplc will read and write to that buffer in your python program automatically.
Quote 1 0
Yuting666
Thanks so much for your prompt reply!
Quote 0 0