From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Using NI MODBUS - Reading Multiple Discrete Registers

Solved!
Go to solution

I am using LabVIEW 8.6, with the NI MODBUS 1.2 VI library. I have a device that serves up about 50 holding registers, all of the same format. I would like to read about 20 of them, however they are not consecutive.  (40010, 40015, 40017, etc)  The Read Holding Registers VI only gives me the option to read consecutive registers starting at a given address.   In contrast, Write Multiple Registers VI seems to let me write to an array of discrete registers. Is there a way to do this for reading registers?

Message Edited by AZZOAutomation on 05-28-2009 01:13 AM
0 Kudos
Message 1 of 2
(2,749 Views)
Solution
Accepted by topic author AZZOAutomation

AZZOAutomation a écrit:

I am using LabVIEW 8.6, with the NI MODBUS 1.2 VI library. I have a device that serves up about 50 holding registers, all of the same format. I would like to read about 20 of them, however they are not consecutive.  (40010, 40015, 40017, etc)  The Read Holding Registers VI only gives me the option to read consecutive registers starting at a given address.   In contrast, Write Multiple Registers VI seems to let me write to an array of discrete registers. Is there a way to do this for reading registers?

Message Edited by AZZOAutomation on 05-28-2009 01:13 AM

There is no way to write non consecutive registers with Write Multiple Registers ! It is "only" possible to write consecutive registers starting at a given address.

 

You must either read the whole memory range covering all needed registers and extract the used ones or made multiple reads.

0 Kudos
Message 2 of 2
(2,739 Views)