AP2016
I downloaded your example of ESP8266 code and configured Raspberry Pi to run OpenPLC. Then I installed OpenPLC Editor on PC and downloaded your ladder logic example into Raspberry Pi. Works fine, thank you for very good and detailed instructions. 

Next I would like to run SCADA software on same RPi and have it talking to OpenPLC. I currently use mySCADA home edition software called mySMART House, see http://www.smarthouse.cloud/. It is running on RPi and talking to Allan-Bradley PLC and a few ESP8266 over Modbus WiFi. I would like to eliminate Allen Bradley PLC and have my control code executed by OpenPLC in RPi.

How do i need to configure OpenPLC so it collects data from ESP8266 and provides data to SCADA, running on same Rpi?

Thank you,

Anatoly

Reply 0 0
thiagoralves
OpenPLC supports Modbus natively, so just point your SCADA software to your Pi IP address on port 502 or, if you're running the SCADA software on the Pi itself, point it to localhost.

If you want to collect the data from ESP8266, you'll need to use the ESP8266 driver on the Pi and also flash your ESP8266 with the OpenPLC firmware (if you haven't done so). Then, the OpenPLC running on the Pi will use ESP8266's I/O instead of the Pi's built-in GPIO pins.
Reply 0 0
AP2016
Thank you for quick response. I did configure ESP8266 and it is working fine with OpenPLC server running on RPi.

Now I am trying to setup SCADA runtime and OpenPLC server on same Rpi. First problem I encounter in some conflict between these two application, see OpenPLC log below. Will appreciate any advise how to resolve it.

Capture.JPG 
Reply 0 0
thiagoralves
OpenPLC is a Modbus server running on port 502 (by default Modbus TCP uses port 502). It seems that your SCADA runtime is also a Modbus server running on port 502. You can't have two applications using the same port at the same time. Your options are:
-Change the port that your SCADA Modbus server is using to be something else
-Change OpenPLC code to make it use another port for the Modbus server
-Drop your SCADA runtime entirely since OpenPLC already is a Modbus server and you might not need anything else.
-Use OpenPLC on another RPi
Reply 0 0
Reply