kk
OpenPLC Runtime starting...
Interactive Server: Listening on port 43628
Device bb-x15 is disconnected. Attempting to reconnect...
Connection failed on MB device bb-x15: Operation now in progress
Device bb-x15 is disconnected. Attempting to reconnect...
Connection failed on MB device bb-x15: Connection refused
Device bb-x15 is disconnected. Attempting to reconnect...
Quote 0 0
thiagoralves
There is a problem. You added a slave device called “bb-x15” but this device is refusing connections.
Quote 0 0
kk
Where can I modify the connection of slave devices?
Quote 0 0
kk
The openplc client has a slave device menu, but when it clicks in, it displays:

Internal Server Error


The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application
Quote 0 0
thiagoralves
Your OpenPLC installation is messed up. The only way to change the slave configuration is through the slave device menu. Just reinstall OpenPLC and you should be fine.
Quote 0 0
kk
Yes, I can use it after reinstallation. Thank you very much. I wonder if there are any slave device tutorials
Quote 0 0
thiagoralves
https://www.openplcproject.com/runtime

Capture.png 
Quote 0 0
kk
This is my slave device, but it doesn't show that it's connected,

Maybe there's something wrong with my hardware_layer.cpp code.

Screenshot from 2019-03-20 11-57-04.png
 
OpenPLC Runtime starting...
Interactive Server: Listening on port 43628
Device bb-x15 is disconnected. Attempting to reconnect...
Connection failed on MB device bb-x15: Connection refused
Device bb-x15 is disconnected. Attempting to reconnect...
Connection failed on MB device bb-x15: Connection refused
Device bb-x15 is disconnected. Attempting to reconnect...
Connection failed on MB device bb-x15: Connection refused
Device bb-x15 is disconnected. Attempting to reconnect...
Connection failed on MB device bb-x15: Connection refused
Device bb-x15 is disconnected. Attempting to reconnect...
Connection failed on MB device bb-x15: Connection refused
Device bb-x15 is disconnected. Attempting to reconnect...
Connection failed on MB device bb-x15: Connection refused
Device bb-x15 is disconnected. Attempting to reconnect...
Connection failed on MB device bb-x15: Connection refused
Device bb-x15 is disconnected. Attempting to reconnect...
Connection failed on MB device bb-x15: Connection refused

Quote 0 0
kk
Screenshot from 2019-03-20 16-31-37.png Screenshot from 2019-03-20 16-33-14.png 
When I was running, it was displayed on the terminal, and all the output ports were pulled down.
Quote 0 0
thiagoralves
It looks like your bb-x15 device is not responding to Modbus commands, or maybe is not even accessible from your OpenPLC. Are you sure your device can talk on Modbus protocol? What device is this? Also, your configuration is wrong. You must use numbers (0, 1, 2,...) instead of PLC addresses (%QX100.0) to indicate the start and range of your slave device, as explained on the tutorials I sent you earlier.
Quote 0 0
kk
this is my equipment;
Screenshot from 2019-03-21 08-27-14.png
I installed the openplc server on arm5728, plugged in the internet, connected to the web page according to the IP address, I want to control his gpio,so my first step is to modify the hardware. cpp, file;
Screenshot from 2019-03-21 09-10-13.png 

 Screenshot from 2019-03-21 09-10-39.png 


 
Quote 0 0
thiagoralves
So, why do you want to add a slave device?
Quote 0 0
kk
Yes, I'm wrong. I don't need to add slave devices. Maybe I haven't figured out how the server works.
Quote 0 0
thiagoralves
Follow the tutorials on the Reference tab of the OpenPLC website to get a better idea of how OpenPLC works. Preferably, try following the tutorials in a platform that is actually supported (like raspberry pi) before you try to add support for another platform.
Quote 0 0
kk
Screenshot from 2019-03-25 13-38-41.png
why Runtime: Error connecting to OpenPLC runtime;


Is there something wrong with my program?
Quote 0 0