Modbus tcp/ip master/slave simulation problem

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 8.

Moderator: Benj

kabouras_33
Posts: 94
Joined: Thu Jul 27, 2017 5:23 am
Contact:

Re: Modbus tcp/ip master/slave simulation problem

Post by kabouras_33 »

Last note for today!! :mrgreen:
I used modbus poll software in various situations and i works perfect until now so i think that if we manage to communicate flowcode slave with modbus poll we are done :wink:
I stop now because brain salad.
Goodnight!!!

kabouras_33
Posts: 94
Joined: Thu Jul 27, 2017 5:23 am
Contact:

Re: Modbus tcp/ip master/slave simulation problem

Post by kabouras_33 »

Hello!!!
Further update today i tried a flowcode master with simulation slave....the simulation could read coils correctly but not holding registers....
Well by now i dont know if i am helping or i am in completly the wrong direction...
Awaiting your feedback
Thanks again!!!

kabouras_33
Posts: 94
Joined: Thu Jul 27, 2017 5:23 am
Contact:

Re: Modbus tcp/ip master/slave simulation problem

Post by kabouras_33 »

hello again,
i think that the check for incoming macro doesnt give correct responce...
i keep searching awaiting your feedback

User avatar
Benj
Matrix Staff
Posts: 15008
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Contact:

Re: Modbus tcp/ip master/slave simulation problem

Post by Benj »

Hello,

I'll see if I can replicate this problem for you and hopefully provide a fix.

kabouras_33
Posts: 94
Joined: Thu Jul 27, 2017 5:23 am
Contact:

Re: Modbus tcp/ip master/slave simulation problem

Post by kabouras_33 »

Dear Benj,
Hello!! So after some time, i could make the esp8266 work :wink:
The solution is tricky to explain but it looks like flow code components target the wrong index to retrieve or send data to other except flow code,
I wrote my own software in unity 3d and I could locate the problem.
No, the problem is with the w5500 which still I cannot understand why it doesn't work!! (a very simple example would be awesome!!!)
and secondly
I noticed in the slave Modbus TCP there is a macro GetLastIncoming.....
I believe I can retrieve specific info with that macro from the incoming message...
Well, I want to retrieve the address number from the incoming message (index 2) but I have no idea how???
any pointers?

kabouras_33
Posts: 94
Joined: Thu Jul 27, 2017 5:23 am
Contact:

Re: Modbus tcp/ip master/slave simulation problem

Post by kabouras_33 »

Cannot make it work!
esp8266 works very good but w5500 just refuse to connect....am i missing something?
A little help please??
Attachments
SLAVE MODULE1.fcfx
(23.44 KiB) Downloaded 62 times

kabouras_33
Posts: 94
Joined: Thu Jul 27, 2017 5:23 am
Contact:

Re: Modbus tcp/ip master/slave simulation problem

Post by kabouras_33 »

No go...i tried as Modbus TCP slave enc28j60,w5500,w5100 all of them no go
I can ping them but they do not appear on my routers or work of course...
ok, I am waiting for your kind assistance because at least the w5500 which says supported should work but no so I am doing something wrong definitely.

User avatar
Benj
Matrix Staff
Posts: 15008
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Contact:

Re: Modbus tcp/ip master/slave simulation problem

Post by Benj »

Thanks for letting us know of the problem, the W5500 should certainly be working so let me investigate this for you.

kabouras_33
Posts: 94
Joined: Thu Jul 27, 2017 5:23 am
Contact:

Re: Modbus tcp/ip master/slave simulation problem

Post by kabouras_33 »

Thank you Benj,
and if you need anything from me, test,or send you data please tell me!
i will be most happy if i can be of any assistance

TaliG
Posts: 52
Joined: Fri Apr 07, 2017 1:55 am
Location: Greece
Contact:

Re: Modbus tcp/ip master/slave simulation problem

Post by TaliG »

Dear Benj,

I am stuck with the same problem.

I am using Codesys with rasberryPi as a Master, EB091 plus W5500 as a slave.

ModbusTCP with W5500 gives invalid header response.

UART Modbus RTU works great.

Any news on a fix?

Thanks!

rpiRTU.fcfx works great
rpiTCP.fcfx connects but returns wrong response values.
Attachments
rpiRTU.fcfx
(16.03 KiB) Downloaded 39 times
rpiTCP.fcfx
(16.97 KiB) Downloaded 34 times

kabouras_33
Posts: 94
Joined: Thu Jul 27, 2017 5:23 am
Contact:

Re: Modbus tcp/ip master/slave simulation problem

Post by kabouras_33 »

Hi,almost a year now...any updates???on the bug...

User avatar
Benj
Matrix Staff
Posts: 15008
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Contact:

Re: Modbus tcp/ip master/slave simulation problem

Post by Benj »

Hello,

A few months ago I looked into this and provided a fix for the TCP modbus components to fix the header. Please check you are using the latest updates using help -> Check for updates.

Here was the topic where we investigated the problem.
https://www.matrixtsl.com/mmforums/view ... 56#p101856

If you are using the latest files then let me know and I'll have another look into it.

kabouras_33
Posts: 94
Joined: Thu Jul 27, 2017 5:23 am
Contact:

Re: Modbus tcp/ip master/slave simulation problem

Post by kabouras_33 »

Ooo i lost that!!!!
Awesome!!!!i am planning to incorporate it in another system so thats great timing!!!!
Thanks you are the best once again!!!

TaliG
Posts: 52
Joined: Fri Apr 07, 2017 1:55 am
Location: Greece
Contact:

Re: Modbus tcp/ip master/slave simulation problem

Post by TaliG »

Hi kabouras!

Modbus TCP protocol replies are already fixed by Benj.

At least w5500 works fine for me (communicates correctly with modbus poll).

Please take a look at this thread https://www.matrixtsl.com/mmforums/view ... 78&t=22101 and download my test flowchart using w5500 that works great with modbuss poll. (last post).

About esp, I have not tested anything yet, I am waiting some new boards with esp-07s to start play with.

but on the above topic Benj corrected everything about the protocol and the w5500 can communicate correctly with modbus poll.

George

Post Reply