MODBUS UDP und Modbus RTU

pvs-deck
PowerUser
Avatar
Gender:
Age: 53
Homepage: pvs-deck.de
Posts: 1340
Registered: 02 / 2009
Subject:

MODBUS UDP und Modbus RTU

 · 
Posted: 15.06.2018 - 22:20  ·  #1
Hallo Leute,

ich bin dabei in einer meiner Steuerungen mit WizNet-Chips die Modbus-UDP Funktionen einzubauen.

Ich möchte den Kunden aber beide Möglichkeiten geben, er kann wahlweise MODBUS-RTU über den RS485-Bus betreiben oder Modbus-UDP über WIZNET.

Kann ich bei den den Modbus RTU im laufenden Betrieb abschalten / stillegen?
(ohne Neustart ! )

Ich möchte das beide Varianten auf den selben Speicherbereich schreiben, da sowieso immer nur einer von beiden aktiv sein kann. Es geht um dem MODBUS-Record "ModBuff"

Thorsten
Avra
Schreiberling
Avatar
Gender:
Location: Belgrade, Serbia
Age: 53
Homepage: rs.linkedin.com/in…
Posts: 653
Registered: 07 / 2002
Subject:

Re: MODBUS UDP und Modbus RTU

 · 
Posted: 19.06.2018 - 10:19  ·  #2
If I understood well online translation of your question, you would like to be able to switch off MODBUS RTU when you don't need it. This feature does not exist in original design. This is the original MODBUS loop process:

Code
process WaitForRTU(30, 60 : iData); // this is called when modbus rtu message has arrived
var
  ...
begin
  SetMB_RTUstart;
  WaitSema(mb_RTUsema);
  ...
end;

As you can see, process starts an assembler based (because of strict timing) interrupt routine that handles modbus message reception, and then it waits for a message semaphore to show up. You can try to manually stop WaitForRTU process, or even kill SetMB_RTUstart routine. One or the other should stop the RTU communication.

As for the choice of Modbus UDP, I think it is much, much less common then Modbus TCP, so if you want broader availability and you can make a choice then I would advice to go for Modbus TCP.
pvs-deck
PowerUser
Avatar
Gender:
Age: 53
Homepage: pvs-deck.de
Posts: 1340
Registered: 02 / 2009
Subject:

Re: MODBUS UDP und Modbus RTU

 · 
Posted: 19.06.2018 - 15:59  ·  #3
Quote by Avra

...
As for the choice of Modbus UDP, I think it is much, much less common then Modbus TCP, so if you want broader availability and you can make a choice then I would advice to go for Modbus TCP.

Hello Avra,

yes, but in the building control (own LAN), the UDP is still the most common, it is much faster and manages with less overhead.
Optimal would be the integration of both versions.

Thorsten
Selected quotes for multi-quoting:   0

Registered users in this topic

Currently no registered users in this section

The statistic shows who was online during the last 5 minutes. Updated every 90 seconds.
MySQL Queries: 15 · Cache Hits: 14   62   76 · Page-Gen-Time: 0.017721s · Memory Usage: 2 MB · GZIP: on · Viewport: SMXL-HiDPI