Page 3 of 4

Re: Modbus TCP Slave

Posted: Thu Apr 11, 2024 10:07 am
by BenR
Hello,

Looking now. I have the module in front of me and am doing a big overhaul to it to try and get it working properly for Modbus TCP and to add functions like DHCP and DNS lookup. I'll let you know how I get on.

Re: Modbus TCP Slave

Posted: Thu Apr 11, 2024 10:58 am
by seokgi
Thank you very much for your help.
However, too much time has passed and we are receiving criticism from customers.
I know you're busy, but please help me.

Thank you.

Transrate by Google

Re: Modbus TCP Slave

Posted: Fri Apr 12, 2024 4:12 pm
by BenR
Hello,

Right I've spent the last two days on this and managed to get it so it's now working correctly and reliably. It looks like in the end what made it work was a tiny delay in just the right part of the code. I still want to spend more time on adding DHCP and DNS but for now it at least (fingers crossed) should allow things like the Modbus TCP and the Webserver to function correctly with the W5500 module.

Please let me know how you get on using the latest library updates.

Re: Modbus TCP Slave

Posted: Mon Apr 15, 2024 5:13 am
by seokgi
Thank you for your help.

TCP Connect
Listen
Scoket Open

If I use commands such as, the port will be searched. However, if you do not use the above command,
The port is not searched.
Modbus TCP Slave is not connected.

MCU : Pic18F67K40

Thank you.

Re: Modbus TCP Slave

Posted: Mon Apr 15, 2024 6:54 am
by seokgi
Can you post the project you tested?

Re: Modbus TCP Slave

Posted: Mon Apr 15, 2024 8:55 am
by seokgi
If I unplug the network cable and plug it again, the port not be searched, but if I reset it again, the port will be searched.
After 2~3 minutes after reset, the port does not search.
And in the port searcher, the manufacturers are searched differently for PIC18F67K40 and PIC24FJ512GA606. Is this right?

thank you.

Re: Modbus TCP Slave

Posted: Mon Apr 15, 2024 10:06 am
by BenR
Hello,

Here is my test project.

Slave is running on an Arduino Uno and the master is running in the Flowcode sim.

Modbus_TCP_Slave.fcfx
(13.86 KiB) Downloaded 39 times
Modbus_TCP_Master.fcsx
(12.31 KiB) Downloaded 24 times

Re: Modbus TCP Slave

Posted: Fri Apr 19, 2024 4:42 am
by seokgi
I tested it with the program you posted.
However, it does not work properly.
Sometimes it appears to be a normal value.
However, timeout, read error, and write error are repeated. I adjusted all the timings.
It also doesn't work.

If I unplug the LAN cable and re-plug it or after a long period of time, port 502 is not searched.

Sometimes I can't connect.
Please take a look again.

Thank you.

Re: Modbus TCP Slave

Posted: Sat Apr 20, 2024 12:27 pm
by BenR
Please can you post your project so I can try and replicate your setup.

Re: Modbus TCP Slave

Posted: Mon Apr 22, 2024 10:29 am
by seokgi
I posted my project.

Thank you so much.