Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
75 views

How To Communicate With Modbus RTU Slave Device in LabVIEW

This document provides instructions for communicating with a Modbus RTU slave device in LabVIEW. It explains that each slave device needs a unique Modbus ID and the same baud rate as configured in the DCON Utility Pro software. It then outlines the steps to open a COM port using MB Serial Init, read and write data using MB Serial Master Query with the correct function code, starting address, quantity and data, and close the connection when finished.

Uploaded by

saberleffi1
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
75 views

How To Communicate With Modbus RTU Slave Device in LabVIEW

This document provides instructions for communicating with a Modbus RTU slave device in LabVIEW. It explains that each slave device needs a unique Modbus ID and the same baud rate as configured in the DCON Utility Pro software. It then outlines the steps to open a COM port using MB Serial Init, read and write data using MB Serial Master Query with the correct function code, starting address, quantity and data, and close the connection when finished.

Uploaded by

saberleffi1
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

How to communicate with Modbus RTU slave device in LabVIEW?

1. Make sure the Modbus ID and Baudrate used in the Modbus RTU slave device. If there
are multiple Modbus salve devices on the RS‐485 network, each of them needs be
assigned with a unique Modbus ID.

For ICP DAS Modbus RTU slave devices, the DCON Utility Pro is free download at
http://ftp.icpdas.com/pub/cd/8000cd/napdos/driver/dcon_utility/ to search modules
out and configure the searched devices.

2. Unzip the ModbusRTU.zip, open a suitable demo for the I/O type on the module, the
COM port and Baud Rate settings on the front panel need be the same as what the
module used in the DCON_Utility_pro. The modbus ID is 1 in the demo.
(The NI Modbus.llb is free download on the NI web site.)
3. On the Block Diagram, the first vi is MB Serial Init used to configure the COM port
connection parameters such as COM port, Baud Rate, Parity and Timeout.

4. Read/Write data with MB Serial Master Query.vi.

Function code
Starting Address
Quantity
Data (Analog output data if needed)
Discrete (Digital output data if needed)

Mode: RTU
Slave Address: the unique Modbus ID for a module
5. Close the connection at the end of the program.

You might also like