Modbus TCP read error

For general Flowcode discussion that does not belong in the other sections.
Post Reply
seokgi
Posts: 226
http://meble-kuchenne.info.pl
Joined: Thu Dec 03, 2020 1:43 pm
Has thanked: 8 times
Been thanked: 8 times

Flowcode v11 Modbus TCP read error

Post by seokgi »

I want to aggregate multiple devices operating via Modbus RTU serial and transmit data using Modbus TCP.

MCU: PIC24FJ512GA606

LAN: W5500

When checking in Modbus POLL, it does not work at all and only repeats read error and write error. If I delete the listen (502) from network comm in the main directory, a message appears stating that the server has closed it.

Please help.
Attachments
Hub-260302-24FJ512GA606-tcp-2.fcfx
(24.44 KiB) Downloaded 128 times

BenR
Matrix Staff
Posts: 2191
Joined: Mon Dec 07, 2020 10:06 am
Has thanked: 599 times
Been thanked: 794 times

Re: Modbus TCP read error

Post by BenR »

Hello,

Sorry for the delay in getting back to you.

The NetworkComms1::Listen component macro call in main is not required.

I'll see if I can replicate the problem with the server socket being closed as this shouldn't be happening.

You could try changing the Modbus TCP component property "Open and Close Socket" to No and see if that helps.

seokgi
Posts: 226
Joined: Thu Dec 03, 2020 1:43 pm
Has thanked: 8 times
Been thanked: 8 times

Re: Modbus TCP read error

Post by seokgi »

Modbus TCP component property "Open and Close Socket"

Do not support this option.

Thank you.

BenR
Matrix Staff
Posts: 2191
Joined: Mon Dec 07, 2020 10:06 am
Has thanked: 599 times
Been thanked: 794 times

Re: Modbus TCP read error

Post by BenR »

Here is the property I mean, If you don't have this maybe check the help -> library updates to see if there is a new version of the component.
Screenshot 2026-04-23 164335.png
Screenshot 2026-04-23 164335.png (53.58 KiB) Viewed 1104 times

seokgi
Posts: 226
Joined: Thu Dec 03, 2020 1:43 pm
Has thanked: 8 times
Been thanked: 8 times

Re: Modbus TCP read error

Post by seokgi »

It works well. However, errors still occur about once every 20 times.

Thank you.

Post Reply