From 5344793f824b94e0033e39a2360886223250ea42 Mon Sep 17 00:00:00 2001 From: GitHub Action Date: Tue, 16 Apr 2024 19:44:09 +0000 Subject: [PATCH] Add changes for bfc203ce8ddf2457da18676def92056cf68174a3 --- _sources/creating_driver.rst.txt | 17 ++++++++-------- _sources/overview.rst.txt | 6 ++++++ acknowledgments.html | 2 +- creating_driver.html | 21 ++++++++++--------- debugging.html | 2 +- device_support.html | 2 +- driver_architecture.html | 2 +- example_applications.html | 2 +- genindex.html | 2 +- index.html | 4 ++-- medm_screens.html | 2 +- overview.html | 35 ++------------------------------ search.html | 2 +- searchindex.js | 2 +- 14 files changed, 39 insertions(+), 62 deletions(-) diff --git a/_sources/creating_driver.rst.txt b/_sources/creating_driver.rst.txt index ed1e4aa..3ac09ee 100644 --- a/_sources/creating_driver.rst.txt +++ b/_sources/creating_driver.rst.txt @@ -2,14 +2,14 @@ Creating a **modbus** port driver --------------------------------- Before **modbus** port drivers can be created, it is necessary to first -create at least one asyn TCP/IP or serial port driver to communicate +create at least one asyn TCP/IP, UDP/IP or serial port driver to communicate with the hardware. The commands required depend on the communications link being used. -TCP/IP -~~~~~~ +TCP/IP UDP/IP +~~~~~~~~~~~~~ -For TCP/IP use the following standard asyn command: +For TCP/IP or UDP/IP use the following standard asyn command: :: @@ -31,6 +31,7 @@ the asynInterpose interface does no harm. However, the asynInterposeEos interface is definitely needed when using drvAsynIPPortConfigure to talk to a terminal server that is communicating with the Modbus device over Modbus RTU or ASCII, because then the communication from the device may well be broken up into multiple packets. +To use UDP rather than TCP, add " UDP" after the host name/number and optional port number. :: @@ -105,7 +106,7 @@ modbusInterposeConfig After creating the asynIPPort or asynSerialPort driver, the next step is to add the asyn "interpose interface" driver. This driver takes the device-independent Modbus frames and adds or removes the -communication-link specific information for the TCP, RTU, or ASCII link +communication-link specific information for the TCP, UDP, RTU, or ASCII link protocols. The interpose driver is created with the command: :: @@ -128,7 +129,7 @@ protocols. The interpose driver is created with the command: - Name of the asynIPPort or asynSerialPort previously created. * - linkType - int - - Modbus link layer type:, 0 = TCP/IP, 1 = RTU, 2 = ASCII + - Modbus link layer type:, 0 = TCP/IP, 1 = RTU, 2 = ASCII, 3 = UDP/IP * - timeoutMsec - int - The timeout in milliseconds for write and read operations to the underlying asynOctet @@ -186,7 +187,7 @@ created with the following command: * - slaveAddress - int - The address of the Modbus slave. This must match the configuration of the Modbus - slave (PLC) for RTU and ASCII. For TCP the slave address is used for the "unit identifier", + slave (PLC) for RTU and ASCII. For TCP or UDP the slave address is used for the "unit identifier", the last field in the MBAP header. The "unit identifier" is ignored by most PLCs, but may be required by some. * - modbusFunction @@ -454,4 +455,4 @@ Number formats It can be convenient to specify the modbusStartAddress and modbusLength in octal, rather than decimal, because this is the convention on most PLCs. In the iocsh and vxWorks shells this is done by using a leading 0 -on the number, i.e. 040400 is an octal number. \ No newline at end of file +on the number, i.e. 040400 is an octal number. diff --git a/_sources/overview.rst.txt b/_sources/overview.rst.txt index 1e57537..6c56657 100644 --- a/_sources/overview.rst.txt +++ b/_sources/overview.rst.txt @@ -21,6 +21,12 @@ Modbus supports the following 3 communication-link layers: - Description * - TCP - TCP/IP using standard port 502. + * - UDP + - UDP/IP using standard port 502. The use of UDP/IP is not part of the MODBUS + - standard but is useful for FPGAs with Ethernet in firmware which may provide + - support only for UDP. The only difference between TCP and UDP operation is + - that when using UDP a missing reply packet is not considered to + - be an error until the transaction has been attempted 5 times. * - RTU - RTU is normally run over serial communication links, i.e. RS-232, RS-422, or RS-485. RTU uses an additional CRC for packet checking. The diff --git a/acknowledgments.html b/acknowledgments.html index 387262d..ba22580 100644 --- a/acknowledgments.html +++ b/acknowledgments.html @@ -102,7 +102,7 @@

Acknowledgments

© Copyright 2023, Mark Rivers. - Last updated on 2024-March-25. + Last updated on 2024-April-16.

diff --git a/creating_driver.html b/creating_driver.html index d88cfed..b21790e 100644 --- a/creating_driver.html +++ b/creating_driver.html @@ -49,7 +49,7 @@
  • Overview of Modbus
  • Driver architecture
  • Creating a modbus port driver