jinyistudio
Hi

As my title. I have write some web server application for green house monitoring and run in PI2.

I plan porting OpenPLC as my softlogic to access some modbus slave and My web server as HMI.

Could you give some idea for how to communication with OpenPLC ?
[jinyi_title_1p] 
Delphi, B4A, B4J, C#/Mono, Mitsubishi Q-PLC
[image]
Delphi, C#, Q-PLC, B4A, B4J, Raspberry PI2
Delphi, C#, Q-PLC, B4A, B4J, Raspberry PI2
[image]
Delphi, C#, Q-PLC, B4A, B4J, Raspberry PI2
Quote 0 0
thiagoralves
The OpenPLC works as a slave Modbus/TCP device, and can also talk to other Modbus (TCP or RTU) devices if you choose the modbus driver. Maybe the best solution for you is to write code on your webserver HMI to talk to the OpenPLC via modbus/tcp. Then you will be able to read its variables and write to coils and holding registers. To talk to your other modbus slave devices, just choose the modbus driver at the end of the building process and then upload the modbus configuration file. Then, OpenPLC will export all its I/O to your modbus slave devices, which means that it will read the inputs from your slave devices (and for your program it will appear as internal located input variables), process your logic and then write the outputs to your slave devices (again, the outputs will appear as internal located output variables).
Quote 1 0
jinyistudio
Hi

Could i try to make my blank driver to share data(variable) between OpenPLC and My WebAPP ?
Does modbus driver could work with blank driver together ? My idear is modbus driver for access slave device,blank driver supporting WebSocket Or REST API for handshaking between OpenPLC and My WebAPP.  [confused]

Bye
[jinyi_title_1p] 
Delphi, B4A, B4J, C#/Mono, Mitsubishi Q-PLC
[image]
Delphi, C#, Q-PLC, B4A, B4J, Raspberry PI2
Delphi, C#, Q-PLC, B4A, B4J, Raspberry PI2
[image]
Delphi, C#, Q-PLC, B4A, B4J, Raspberry PI2
Quote 0 0
thiagoralves
You can use only one driver with the OpenPLC at once. However, no matter which driver you choose, the OpenPLC will be always a Modbus/TCP slave, so you can read and write data to it using the Modbus/TCP protocol.

If you pick the modbus driver, then it will also be able to communicate with other slave modbus devices and read and write data to them.
Quote 0 0