bkowal

Hello!

I'm trying to make use of ScadaBR to create a HMI for my OpenPLC project. Apparently I cannot connect with my PLC runtime, I'm getting following alarm:

"com.serotonin.modbus4j.exception.ModbusTransportException: java.net.SocketTimeoutException: connect timed out"

 

The IP adress is correct, I've also tried many timeout configurations and nothing has helped. Could anybody help me?

Quote 0 0
thiagoralves
There are several reasons for that, but in summary, your ScadaBR installation is not reaching your OpenPLC installation. You can check:

1. Is OpenPLC running?
2. Is Modbus enabled in your OpenPLC settings
3. Is OpenPLC running on windows? Sometimes windows firewall gets in the way and blocks communications.
4. Can you ping the ScadaBR machine from the OpenPLC machine? If not, then you have issues with your network between ScadaBR and OpenPLC 
Quote 0 0
bkowal

The problem with connection between ScadaBR and OpenPLC Runtime on my host Windows OS was firewall. With disabled firewall everything works fine. Thank you very much! 🙂

However I cannot make a connection between ScadaBR and OpenPLC Runtime on guest Linux Mint OS (Virtual Machine). Everything seems to be configured similarly but in this case it doesn't work. Of course, OpenPLC is running, Modbus is enabled and I can even ping ScadaBR IP from the OpenPLC Linux Virtual Machine. I attach photo of configuration settings with error message.

error&config.png 

Quote 0 0
thiagoralves
Things with VM networking can be a little trickier and varies depending on which hypervisor you're using. There are several different types of network models (NAT, bridged, host-only) that will offer different levels of communication. NAT for example, will allow the VM to communicate out, but no one (except the host) will be able to send messages in. The network unreachable error means exactly that. Your ScadaBR VM can't access the network where your OpenPLC VM is. I suggest you take a look at the help documentation of your hypervisor to correctly configure the networking.
Quote 0 0