Trying to Read From Decimal Modbus Register on LabVIEW

Updated Aug 29, 2024

Reported In

Software

  • LabVIEW Datalogging and Supervisory Control Module
  • Modbus Master

Programming Language

  • LabVIEW G

Issue Details

I have a sensor communicates over Modbus. It is listing Boolean parameters like "light ON and OFF" on input register addresses followed by a decimal value. For example, 40001.4. How can I get that data?

Solution

Input registers on Modbus are represented by a 16-bit integer. When the parameter address is represented by a decimal. This decimal value represents the bit number. For the example 40001.4 this means input register 1, bit number 4. You can use the Number To Boolean Array Function to process and get the bit number 4 from the 16-bit integer that you get from that register.