Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Not applicable
Hello,
for a longer time I look for an example, how to realize a Modbus TCP Master in a XMC4700 by using LWIP. At the beginning I tried to install/configure the RTOS Settings in the ETH-LWIP_0-App, but unfortunally this will not work (->"DAVE is not able to grant you latest hardware resources request")
I think, I am not the first one, who wants to realize the Modbus TCP.
Maybe someone can help me or give me some hints, for what I have to look?

Best regards,
Oliver Sick
0 Likes
14 Replies
jferreira
Employee
Employee
10 sign-ins 5 sign-ins First like received
Hi,

Did you try the examples provided in DAVE?
Go to Help>Install DAVE APP/Example/Device Library...
2336.attach

Regards,
Jesus
0 Likes
Not applicable
Hello,
and thanks for your answer.
No, I haven´t seen this. Give me some time to download and read/understand that.
Maybe there are some following questions.

Best regards,
Oliver
0 Likes
Not applicable
Ok,
this one is working, that is clear. But as far as I understand it, this example is working with the RTOS and that is my problem, because in the project, where I want to include the MODBUS TCP, I can´t add the RTOS on the ETH-LWIP General settings page.
It starts compiling/including/... something and at the end DAVE is not able to grant the resource. I think, there is somewhere a conflict with another app, but I don´t know, with which app.

Best regards,
Oliver
0 Likes
jferreira
Employee
Employee
10 sign-ins 5 sign-ins First like received
Hi,

Are you using in your project SYSTIMER APP?

Regards,
Jesus
0 Likes
Not applicable
Hello Jesus,
unfortunally I am out of office and it takes some time to be back. I am not really sure, but it can be, that this app is used. Is that the problem?

Best regards,
Oliver
0 Likes
Not applicable
Yes,
now I have looked in the apps and have seen, that the SYSTIMER-app is used. Is it like an interlock for the RTOS?

Best regards,
Oliver
0 Likes
Not applicable
Hello again,
it´s time to have this thread at the top. I still have problems with the RTOS and as far as I can read from the last answers, it could be possible, that the SYSTIMER-app is the problem. But what can I do? Do I have to uninstall the SYSTIMER-app? Change the configuration?

Best regards,
Oliver
0 Likes
Not applicable
Ok,
I tried some things and now it is possible to activate the RTOS. I copied the code from the MODBUS-example (see above), but now there is the next problem. Of course, I have not the relevant library "freemodbus-v1.5.0" in my project.
How can I add this library to my project? I looked in the internet, but for me it´s not really clear how to do it.

Best regards,
Oliver
0 Likes
jferreira
Employee
Employee
10 sign-ins 5 sign-ins First like received
Hi,

You can just copy+paste the folder containing the library into to your project.

Regards,
Jesus
0 Likes
User5327
Level 4
Level 4
Hello,

I would like to use TCP Modbus in our Project, but we do not use RTOS.
Is it possible to create TCP modbus project WITHOUT RTOS?

Regards,
Koumak
0 Likes
User5327
Level 4
Level 4
Please help,
I tried to take exapmle "Modbus TCP XMC47" and change settings in ETH app from Enable to Disable.
But after re-generating code and re-compile -> there are 6 Errors in "porttimer.c" library.
... it seems not working without RTOS 😞
Is there some workaround please?

Note: When this would be done, I supposed move contain of "void mbtcp_thread(void const *argument)" to main loop.

Regards,
Koumak
0 Likes
User5327
Level 4
Level 4
push to top
0 Likes
jferreira
Employee
Employee
10 sign-ins 5 sign-ins First like received
0 Likes
Not applicable
Hi,

I am using XMC4700 Modbus tcp with RTOS.

when i connect XMC directly to a PC .
1. Ping for the IP is good
2. Response is better.(I use FNC CODE -15)
3. It works continuous.

But when i connect it to a Huge network.
1.Ping is not good.(Time out occurs often)
2.As timeout is often request/response is not good.
3.Device lag in performance.

Can i get some help on this?

Is this a issue in networking or our XMC Ethernet module?
0 Likes