Autor Thema: MB_Client UDP broadcast  (Gelesen 6284 mal)

0 Mitglieder und 1 Gast betrachten dieses Thema.

Offline learnetk

  • Newbie
  • *
  • Beiträge: 10
    • Profil anzeigen
MB_Client UDP broadcast
« am: 16. September 2016, 15:11:25 »
Hi Forum,

I am trying to use the MB_Client in Udp mode.The application has a Client and multiple Servers, and i have a few questions in this regard, hope you could help :
- Is it possible to use the MB_Client for Udp Broadcast to multiple servers.
- when the MB_Client recives the data from a servers, how can the client identify the servers(Ip) and its data.

Thanks and warm regards


Offline learnetk

  • Newbie
  • *
  • Beiträge: 10
    • Profil anzeigen
Re: MB_Client UDP broadcast
« Antwort #1 am: 19. September 2016, 08:50:11 »
Hi Peewit
Could you please help ..!

Thanks

Offline peewit

  • Moderator
  • *****
  • Beiträge: 2 378
    • Profil anzeigen
Re: MB_Client UDP broadcast
« Antwort #2 am: 19. September 2016, 12:59:15 »
the Modbus blocks of OSCAT-Network can not be used with broadcast
sorry

Offline learnetk

  • Newbie
  • *
  • Beiträge: 10
    • Profil anzeigen
Re: MB_Client UDP broadcast
« Antwort #3 am: 19. September 2016, 18:21:36 »
Hi Peewit.

Oh thats a bit sad to know broadcast doesnt work with the standard Oscat network library.
Is it possible to get this working with some changes in the MB_Client and IP_Control2 for this special requirement.
I thought maybe in the MB_Client function block if i could set the C_Mode to 5 (Udp+passive+Ip Address) and then
in the IP_Control2 in the UDP_Init if the sockaddr.sin_addr be set to Broadcast, maybe it would work (please correct me).

It would be really nice if you just could suggest a way for me try out. I had found it rather difficult to find a implementation guide for Modbus UDp like the one present for Tcp. If you could suggest something it would be great.

Thanks and warm regards