Page 1 of 1

Modbus TCP

Posted: Wed Jun 14, 2023 10:40 am
by pilot123
I have done further tests, I have got a friend to load a trial version of Flowcode 10 0nto his laptop and have managed to simulate the program operation successfully.
When I try running the Programs on hardware BL0080 development boards, the programs do not work correctly.
I have used Wireshark and Microsoft Network Monitoring tool, and it appears that the actual Modbus message consisting of 12 Bytes is never sent, and if I simulate the Master on my PC to a Slave Hardware, the Modbuds 12 Byte message is sent correctly but the H/W Slave never responds with the 12 Byte message back. Vice versa if I simulate the Slave on my PC to a H/W Master the H?W
Modbus_Slave_Test.fcfx
(15.32 KiB) Downloaded 349 times
Master never sends the Modbus 12 Byte message.
it appears the problem could be with the W5500 modules not communicating with the Network Comms module correctly.
I have attached my Master and Slave Programs.
Could someone please help me with this problem?

Re: Modbus TCP

Posted: Wed Jun 14, 2023 3:02 pm
by BenR
Hello,

Many thanks for letting us know. I've pushed a change to the v10 library update system that may help. Please can you update and restart Flowcode and see if this makes any difference to the embedded programs being able to send out the TCP traffic.

Re: Modbus TCP

Posted: Wed Jun 14, 2023 5:03 pm
by pilot123
Thanks for the reply, but I have Flowcode 9 with a Professional License.
Will this update help me?

Re: Modbus TCP

Posted: Wed Jun 14, 2023 6:12 pm
by BenR
Hello,

Ok I've applied the same change for v9 too now, Let me know how you get on.

Re: Modbus TCP

Posted: Thu Jun 15, 2023 9:46 am
by pilot123
Hi Ben
I have updated Flowcode Version 9, with the updated Network Comms and reprogrammed my BL0080 development boards.
The Master now appears to send out the correct messages with the 12 Bytes of Modbus Data reliably.
The H/W Slave device never works ie. The LED never illuminates.
If I connect my H/W Master device to a Simulated Slave on my PC running Flowcode Version 9 , I get random results about 10% of the time it works.
The problem appears to be that the Network Comms module does not reliably pass the RX Data onto the Modbus TCP Module. When it does the system works ie. About 10% of the time.
So we appear to be halfway there.

Regards.

Re: Modbus TCP

Posted: Fri Jun 16, 2023 10:50 am
by BenR
Hello,

It might be worth trying a higher SPI prescaler property value for the TCP_IP_W5500 component for both the master and slave.

Other then that not sure what to suggest. I can try and rig it up and test here but don't think I'll get chance to do this today.

Re: Modbus TCP

Posted: Fri Jun 16, 2023 3:13 pm
by pilot123
Hi

Thanks for your reply.
My W5500 module is connected to Port A Software with FOSC/4.
I Have reprogrammed both my Master and Slave with FOSC/16 and FOSC/64, and I get exactly the same results as previously described.
Any help would be appreciated.

Regards.

Re: Modbus TCP

Posted: Thu Jun 22, 2023 11:17 am
by pilot123
Hi Ben

Is there any update on this problem?

Regards.

Re: Modbus TCP

Posted: Thu Jul 13, 2023 10:49 am
by BenR
Hello, sorry for the delay.

I've been looking into this and hopefully now have pushed a fix to the library update system for v10 that will solve the issue for you.

Please let me know how you get on and if all is ok now I'll roll the fix out to v9 too.

Re: Modbus TCP

Posted: Thu Aug 31, 2023 12:29 pm
by pilot123
Hi Ben

Sorry for the delay, could you please push your update to Version 9.

I am unable to run my project in V10 because the W5500 Ethernet module does not work ie unable to ping device.

I had this same problem when I upgraded to V9 from V8.

To get around this issue you suggested using the V8 compiler with the V9 software and this cured the problem.
I have tried using the V8 compiler with the V10 software, but to no avail.
The program will not compile at all, and produces an error message.

So I would be grateful if you could push your update to the V9 software so that I can test it.

Regards.