Modbus TCP Slave

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

Flowcode v10 Modbus TCP Slave

Post by seokgi »

Hello?

Project : Modbus gateway
MCU : PIC18F67K40(I made a PCB with PIC18F57Q43, but FC10 does not support the Q43 series)
Ethernet : W5500

While working on a project, Modbus TCP slave mode does not work.
I am sending the project file I wrote below. Please point out any mistakes.
Thank you
Attachments
HiKOREA_Hub-240315-18F67K40.fcfx
(40.52 KiB) Downloaded 15 times

BenR
Matrix Staff
Posts: 1739
Joined: Mon Dec 07, 2020 10:06 am
Has thanked: 440 times
Been thanked: 603 times

Re: Modbus TCP Slave

Post by BenR »

Hello,

Have you checked that the Wiznet module is configured and working by pinging the IP address 192.168.1.100? If it's not responding then it could be a problem with your pin connections or SPI speed etc. If still having issues then might be worth including a 1 second flasher just to prove that the chip is running and configured correctly.

seokgi
Posts: 179
Joined: Thu Dec 03, 2020 1:43 pm
Has thanked: 5 times
Been thanked: 7 times

Re: Modbus TCP Slave

Post by seokgi »

Ping to the IP address where W5500 is set works fine. And all other functions work normally.

seokgi
Posts: 179
Joined: Thu Dec 03, 2020 1:43 pm
Has thanked: 5 times
Been thanked: 7 times

Re: Modbus TCP Slave

Post by seokgi »

Even if you change the SPI to software ch1 ch2, it does not work.
And even if I change the prescale to Fosc/64 Fosc/16 Fosc/4, it doesn't work.
PING is still works fine.
Thank you.

seokgi
Posts: 179
Joined: Thu Dec 03, 2020 1:43 pm
Has thanked: 5 times
Been thanked: 7 times

Re: Modbus TCP Slave

Post by seokgi »

I have tried various methods, but modbus tcp still does not work.
When I scanned with a port scan program, port number 502 was not scanned. When I run the Modbus slave program, the PC's port 502 is scanned.

Perhaps port number 502 is not assigned in FC10.
Is there any way to solve this?
Please help me.
Thank you.

BenR
Matrix Staff
Posts: 1739
Joined: Mon Dec 07, 2020 10:06 am
Has thanked: 440 times
Been thanked: 603 times

Re: Modbus TCP Slave

Post by BenR »

Hello,

I'm doing some work with the W5500 at the moment so I'll see if I can replicate the problem and find a solution for you.

seokgi
Posts: 179
Joined: Thu Dec 03, 2020 1:43 pm
Has thanked: 5 times
Been thanked: 7 times

Re: Modbus TCP Slave

Post by seokgi »

Thank you for your help.
When will the PIC Q43 series be supported?

seokgi
Posts: 179
Joined: Thu Dec 03, 2020 1:43 pm
Has thanked: 5 times
Been thanked: 7 times

Re: Modbus TCP Slave

Post by seokgi »

I replaced the MCU for this project with PIC24FH512GA606. I tried changing all the options I could. However,

MODBUS TCP Slave does not work.

Ping works well.

I am posting the project I wrote.

Thank you.
Attachments
HUB-240322.fcfx
(52.87 KiB) Downloaded 11 times

medelec35
Matrix Staff
Posts: 1451
Joined: Wed Dec 02, 2020 11:07 pm
Has thanked: 512 times
Been thanked: 472 times

Re: Modbus TCP Slave

Post by medelec35 »

seokgi wrote:
Tue Mar 19, 2024 10:55 am
When will the PIC Q43 series be supported?
Hello to support new devices they have to be available within the compiler, then the fcdx file will need to be manually created.
For the current version of the XC8 compiler, only:
pic18f27q43
pic18f47q43
pic18f57q43
Are available for generating fcdx files.
We will be switching to a newer version of the XC8 compiler.
Then these will all be available to create fcdx files for:
pic18f25q43
pic18f26q43
pic18f27q43
pic18f45q43
pic18f46q43
pic18f47q43
pic18f55q43
pic18f56q43
pic18f57q43

fcdx creation for new targets are very involved and time consuming since there could be new peripherals added.

If you would like to suggest a target device to add, then we can look into adding that first.
Martin

seokgi
Posts: 179
Joined: Thu Dec 03, 2020 1:43 pm
Has thanked: 5 times
Been thanked: 7 times

Re: Modbus TCP Slave

Post by seokgi »

I thought applying to Q43 would be quick and easy. But looking at what you said, it seems very difficult.
Knowing the above, I purchased 2,000 PIC18F57Q43 last year. I mainly use it for industrial purposes and use serial ports a lot.
So I want to use PIC18F57Q43. I would appreciate your support for this.

And I did a lot of testing like the post above, but MODBUS TCP SLAVE still doesn't work.
Please help me
Thank you.

Post Reply