0% found this document useful (0 votes)
46 views3 pages

MODBUS

The document provides an overview of using Modbus I/O servers, specifically the DSC Module and Real-Time Module, for client-server communication between devices. It details how to create Modbus Slave and Master I/O servers, the data items supported, and their corresponding addresses and types. Additionally, it explains how to monitor and manage these data items using the NI Distributed System Manager.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
46 views3 pages

MODBUS

The document provides an overview of using Modbus I/O servers, specifically the DSC Module and Real-Time Module, for client-server communication between devices. It details how to create Modbus Slave and Master I/O servers, the data items supported, and their corresponding addresses and types. Additionally, it explains how to monitor and manage these data items using the NI Distributed System Manager.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Using Modbus I/O Servers (DSC Module or Real-Time Module) Page 1 of 3

Using Modbus I/O Servers (DSC Module or Real-Time Module)


Modbus is an application-level messaging protocol that provides client-server communication between devices
connected on different types of buses or networks. You can create a Modbus or Modbus Slave I/O server to read data
from or write data to Modbus devices. For example, you can create a Modbus Slave I/O server on a National
Instruments real-time controller and use this controller as a Modbus slave device. You also can create a Modbus I/O
server on a host computer and use this server as a Modbus master device to communicate with a Modbus slave device.
(DSC Module) Refer to the Modbus Fundamentals VI in the labview\examples\lvdsc\Distributed System
Connectivity\Modbus Fundamentals\Modbus Fundamentals.lvproj for an example of connecting to and interacting
with a Modbus device.

Open examples Find related examples

Use the View I/O Items dialog box to view the data items to which the I/O server can read or write. You also can
monitor these data items by using the NI Distributed System Manager. To launch the System Manager from LabVIEW,
select Tools»Distributed System Manager.
Modbus I/O servers use six-digit addresses. You can convert a five-digit address to a six-digit address by adding a zero
between the first and the second digits of the five-digit address. For example, you can convert address 45001 to
405001.
Modbus and Modbus Slave I/O server data items use the following denotations:
l A—Denotes an array.
l D—Denotes a 32-bit unsigned integer.
l F—Denotes a 32-bit floating-point number.
l L—Denotes the length of an array. The Maximum Data Points Per Command values that you specify in the
Advanced Attribute Settings dialog box determine the maximum length of the array. If the array elements are 32-
bit integers or floating-point numbers, the maximum length of the array is half the value you specify for the
corresponding Maximum Data Points Per Command value.
l S—Denotes a 16-bit signed integer.
l SD—Denotes a 32-bit signed integer.

The following table lists the data items that a Modbus or Modbus Slave I/O server supports. The Example column of
this table explains the relationship between data items and their physical I/O point addresses on a Modbus device. This
column uses the following format: Data Item = {I/O point address}. Note that one 32-bit data item occupies two I/O
points.

Note When reading or writing valid and invalid data items simultaneously, Modbus and Modbus Slave I/O
servers identify all data items as invalid.

Modbus
Modbus
Data Item Data Type Slave Description Example
Read Write Read Write
000001–065535 Boolean Yes Yes Yes Yes Accesses single-bit coils. 000001 =
value {000001}
100001–165535 Boolean Yes No Yes Yes Accesses single-bit discrete inputs. 100002 =
value {100002}
300001.1– Boolean Yes No Yes Yes Accesses individual bits of input registers 300001.1 =
365535.16 value and interprets them as logical TRUE or {the first bit of
FALSE values. The least significant bit is 300001}
1. The most significant bit is 16.
300001–365535 16-bit Yes No Yes Yes Accesses 16-bit input registers as 300001 =
unsigned unsigned integers ranging from 0 to {300001}
integer 65,535.
400001.1– Boolean Yes No Yes Yes Accesses individual bits of holding 400002.16 =
465535.16 value registers and interprets them as logical {the 16th bit of
TRUE or FALSE values. The least 400002}
significant bit is 1. The most significant
bit is 16.
400001–465535 16-bit Yes Yes Yes Yes Accesses 16-bit holding registers as 400002 =
unsigned unsigned integers ranging from 0 to {400002}
integer 65,535.
A000001L1– Array of Yes Yes Yes Yes Accesses arrays of single-bit coils. A000001L2 =
A065535L1 Boolean {000001,
values 000002}
A100001L1– Array of Yes No Yes Yes Accesses arrays of single-bit discrete A100005L3 =
A165535L1 Boolean inputs. {100005–
values 100007}

mk:@MSITStore:C:\Program%20Files%20(x86)\National%20Instruments\LabVIEW... 26/03/2025
Using Modbus I/O Servers (DSC Module or Real-Time Module) Page 2 of 3

A300001L1– Array of Yes No Yes Yes Accesses arrays of 16-bit input registers A300001L2 =
A365535L1 16-bit as arrays of unsigned integers. {300001,
unsigned 300002}
integers
A400001L1– Array of Yes Yes Yes Yes Accesses arrays of 16-bit holding A400005L3 =
A465535L1 16-bit registers as arrays of unsigned integers. {400005–
unsigned 400007}
integers
AD300001L1– Array of Yes No Yes Yes Accesses arrays of 32-bit unsigned AD300001L1 =
AD365534L1 32-bit integers. Each 32-bit unsigned integer in {300001,
unsigned the array is composed of two adjacent 300002}
integers 16-bit input registers.
AD400001L1– Array of Yes Yes Yes Yes Accesses arrays of 32-bit unsigned AD400002L3 =
AD465534L1 32-bit integers. Each 32-bit unsigned integer in {400002–
unsigned the array is composed of two adjacent 400007}
integers 16-bit holding registers.
AF300001L1– Array of Yes No Yes Yes Accesses arrays of 32-bit floating-point AF300001L2 =
AF365534L1 32-bit numbers. Each 32-bit floating-point {300001–
floating- number in the array is composed of two 300004}
point adjacent 16-bit input registers.
numbers
AF400001L1– Array of Yes Yes Yes Yes Accesses arrays of 32-bit floating-point AF400002L3 =
AF465534L1 32-bit numbers. Each 32-bit floating-point {400002–
floating- number in the array is composed of two 400007}
point adjacent 16-bit holding registers.
numbers
AS300001L1– Array of Yes No Yes Yes Accesses arrays of 16-bit input registers AS300001L1 =
AS365535L1 16-bit as arrays of signed integers. {300001}
signed
integers
AS400001L1– Array of Yes Yes Yes Yes Accesses arrays of 16-bit holding AS400002L3 =
AS465535L1 16-bit registers as arrays of signed integers. {400002–
signed 400004}
integers
ASD300001L1– Array of Yes No Yes Yes Accesses arrays of 32-bit signed ASD300001L1
ASD365534L1 32-bit integers. Each 32-bit signed integer in = {300001,
signed the array is composed of two adjacent 300002}
integers 16-bit input registers.
ASD400001L1– Array of Yes Yes Yes Yes Accesses arrays of 32-bit signed ASD400002L3
ASD465534L1 32-bit integers. Each 32-bit signed integer in = {400002–
signed the array is composed of two adjacent 400007}
integers 16-bit holding registers.
CommFail Boolean Yes No Yes No Represents a signal the Modbus I/O N/A
value server generates. The signal is TRUE in
the following cases:
l Errors occur when the Shared
Variable Engine fails to
communicate with a Modbus
device.
l Errors occur on the serial ports or
Ethernet interface of a Modbus
Slave I/O server.
D300001– 32-bit Yes No Yes Yes Accesses two adjacent 16-bit input D300001 =
D365534 unsigned registers as one 32-bit unsigned integer {300001,
integer ranging from 0 to 4,294,967,295. 300002}
D400001– 32-bit Yes Yes Yes Yes Accesses two adjacent 16-bit holding D400002 =
D465534 unsigned registers as one 32-bit unsigned integer {400002,
integer ranging from 0 to 4,294,967,295. 400003}
ErrorStatus 32-bit N/A N/A Yes No Represents the error status of the N/A
signed Modbus Slave I/O server. If CommFail
integer is FALSE, this data item is 0. If
CommFail is TRUE, this data item
returns an error code.
F300001– 32-bit Yes No Yes Yes Accesses two adjacent 16-bit input F300001 =
F365534 floating- registers as one 32-bit floating-point {300001,
point number. 300002}

mk:@MSITStore:C:\Program%20Files%20(x86)\National%20Instruments\LabVIEW... 26/03/2025
Using Modbus I/O Servers (DSC Module or Real-Time Module) Page 3 of 3

number
F400001– 32-bit Yes Yes Yes Yes Accesses two adjacent 16-bit holding F400002 =
F465534 floating- registers as one 32-bit floating-point {400002,
point number. 400003}
number
OffHook Boolean Yes Yes N/A N/A Specifies that a Modbus object retain N/A
value exclusive use of a communication port
when the value of OffHook is TRUE. If
the value is FALSE, the Modbus object
does not retain exclusive use of the
communication port. Modbus Slave I/O
servers do not support this data item.
S300001– 16-bit Yes No Yes Yes Accesses 16-bit input registers as signed S300001 =
S365535 signed integers ranging from –32,768 to {300001}
integer 32,767.
S400001– 16-bit Yes Yes Yes Yes Accesses 16-bit holding registers as S400002 =
S465535 signed signed integers ranging from –32,768 to {400002}
integer 32,767.
SD300001– 32-bit Yes No Yes Yes Accesses two adjacent 16-bit input SD300001 =
SD365534 signed registers as one 32-bit signed integer {300001,
integer ranging from –2,147,483,648 to 300002}
2,147,483,647.
SD400001– 32-bit Yes Yes Yes Yes Accesses two adjacent 16-bit holding SD400002 =
SD465534 signed registers as one 32-bit signed integer {400002,
integer ranging from –2,147,483,648 to 400003}
2,147,483,647.
UpdateNow Boolean No Yes N/A N/A Specifies that the Modbus I/O server N/A
value refresh the Modbus device once if the
value of UpdateNow changes from
FALSE to TRUE. Modbus Slave I/O
servers do not support this data item.
UpdateRate 64-bit Yes Yes N/A N/A Specifies how often the Modbus I/O N/A
floating- server refreshes a Modbus device, in
point seconds. You can specify a non-integer
number value for this data item. If the value of
this data item is zero, the Modbus I/O
server does not refresh the device.
Modbus Slave I/O servers do not support
this data item.
Updating Boolean Yes No Yes No Represents a signal the Modbus or N/A
value Modbus Slave I/O server generates. The
signal is TRUE while the Modbus I/O
server polls a Modbus device or the
Modbus Slave I/O server is being
updated.

Understanding Modbus Communication in LabVIEW

Submit feedback on this topic.

Visit ni.com/support for technical support.

mk:@MSITStore:C:\Program%20Files%20(x86)\National%20Instruments\LabVIEW... 26/03/2025

You might also like