Page 2 of 2
Re: Modbus / TCP Error
Posted: Wed Jul 19, 2023 10:06 am
by seokgi
Yesterday, with your help, I tested it.
I initialized the PC, installed FC10 and updated.
However, MODBUS/TCP still doesn't work.
Upload the project file and logic analyzer screen here.
It may be difficult, but please take a look.
I look forward to your help on site.
Thank you.
And I'm sorry.
Re: Modbus / TCP Error
Posted: Wed Jul 19, 2023 10:12 am
by seokgi
Modbus Poll accured read error, Write Error, Response Error, and Exception Error 31. 97. 32
Ping is OK.
And SPI operates only in Software Mode.
Re: Modbus / TCP Error
Posted: Wed Jul 19, 2023 1:20 pm
by seokgi
Is there any way I can do it?
I'm sorry to have been troublesome.
Re: Modbus / TCP Error
Posted: Wed Jul 19, 2023 4:48 pm
by BenR
Can you try and increase the SPI prescale for the TXP_IP component, things weren't working for me when I had this set too low. 250KHz clock seems like it should be ok.
Might also be worth trying a hardware SPI channel if available.
Might also be worth doing a flasher test to confirm the MCU is running at the speed you think it is.
https://www.flowcode.co.uk/wiki/index.p ... ED_flasher
What are you using as the Master?
Re: Modbus / TCP Error
Posted: Fri Jul 21, 2023 10:29 am
by seokgi
I tried changing the SPI Prescale. But the clock rate doesn't change and the error still occurs.
10Hz is generated by the MCU, and when viewed with an oscilloscope, it is measured as approximately 9.96Hz.
And if you change the hardware channel, the system won't work (maybe hangup?)
Also, if I2C is changed to a hardware channel, it does not work. If the serial EPROM does not work, changing it with software will work.
Engineers who using other languages do not understand this situation.
Thank you.
Re: Modbus / TCP Error
Posted: Fri Jul 21, 2023 1:50 pm
by BenR
For the TCP_IP_W5500 component try switching to a hardware channel and also change the Fosc/2 to something more like Fosc/16 or /32 or /64
For me /4 wasn't working but as soon as I went to /16 it all worked flawlessly.
Everything else looks to be ok.
Have you tried my program at all on your hardware and in the simulator to see if that is working for you?