Multiple TCP Processes, Modbus & http

I am currently in the process of building a Modbus TCP Slave adapter.
Now my plan is to perform configuration and monitoring via a http interface.

Now my problem.


in the above sequence http kills the modbus. the port is not even available to connect to.
The init Sequence does not change the result.
if i init http first then modbus i still loose the modbus.

I suspect its a problem of running 2 separate controls both requiring access to ETH.

Does anyone have any ideas ?

Depending on your maximum memory (2 if less than 256K) MAX_TCP_BUFFERS will default to either 2 or 4 and HTTP_MAXSERVERS defaults to 2 so all the sockets could be used up before the Modbus tick gets to open them.

You will have to tune the number of available sockets and servers etc in your system.


1 Like

After looking more closely at the separate pieces of code.
HTTP Max Servers was set to 2,
Max TCP Socket buffers was also set to 2.
So no sockets available for the modbus.
changed Max TCP Socket buffers to 5

All working,
Now on to the next problem.