adriano.mele

Hi all,

I am pretty new to this system and I have to say that it seems very nice 🙂

Anyway, I am having a bit of a trouble in setting my system. Here is my situation.

On one side, I have openPLC (runtime+editor) installed on my windows PC. On the other, I installed ScadaBR on a remote Linux server, to which I connect via ssh (using PuTTY).

I tunneled port 9090, so that I can connect to ScadaBR via browser from my windows laptop nicely. But when I try to setup a data source (Modbus IP) it asks for the host and port from which the data are sent.

The default port is 502, so I just tried to forward port 502 to one of the available ports of the Linux server (as I did for the 9090), but I get the following error when I try to connect:

 

14:04:50: 'my_PC': com.serotonin.modbus4j.exception.ModbusInitException: java.net.ConnectException: Connection refused

 

Any idea on what could be the reason? Any hint?


EDIT - I think I solved the issue. Should it be useful to anyone, I just forwarded local port 502 to server's port 8502 using the Remote SSH tunnel option. Apparently, port 502 cannot be forwarded to port 502 (which I guess is reserved?)

Quote 0 0
thiagoralves
All ports below 1024 are reserved on any Linux system. To use them you must have root privileges (or use some other tricks)
Quote 1 0
adriano.mele

Hi thiago, sorry for replying so late, but thanks for your answer.

I take the occasion to make another couple of small questions.

 

1. Just take for example the Hello World project for OpenPLC: it has two variables, one input (a button) and one output (a lamp). By default, the variables are declared as local variables, and can be associated to specific memory locations (i.e. %IX0.0, %QX0.0) which can be addressed in ScadaBR. I tried to set up a small GUI and everything works nicely.

However, if I declare these variables as Input/Outputs (as they should be, I think?), the memory location is not settable anymore. Is there a way to address input/output those variables from ScadaBR? Are they associated to specific memory locations?

2. Can I use ScadaBR while running an OpenPLC program in debug mode? (I saw something similar done in beremiz with svgui, but I am not sure about how to do it here)

Quote 0 0
thiagoralves
Hi Adriano,

1) input / output types have nothing to do with the variable being tied to an input or output pin on the PLC. What defines this is the location where the variable is placed, i.e. %IX variables are digital input, %QX variables are digital output, etc. These type definitions only make sense when you’re dealing with function and function blocks. Inside a function block you can define if a variable is an input for that function or output that returns some value.

2) No. The debug mode has no networking support.
Quote 1 0
adriano.mele

Hi Thiago, thanks again for your quick reply.

1. That's what I suspected. Thanks for confirming that.

2. Ok, good to know (that's a pity though, that could be very useful)

Quote 0 0