Sensor Interpretation - Serial MODBUS

The Serial MODBUS gateway offers the ability to poll sensor data directly on the gateway. Since the data recorded into the sensor registers is raw data, interpretation has to occur in order to understand it.

Monnit provides a document to accommodate this interpretation. This document is arranged in terms of sensor Application ID. You can identify your sensor Application ID, locate it on the form, and use the interpretation formulas to interpret the raw data from the sensor. You can download the Excel document below.

Download the Serial MODBUS Interpretation document

Navigating the document

The document contains the following tabs:

  • Definitions - Provides the definition of protocol being used.
  • FRR Decoding Table - This tab defines interpretation for the Fast Read Registers of the Serial MODBUS Gateway in reference to each sensor type.
  • WD_Data Register Breakdown - This tab contains the list of sensor types that are supported by the interface. This is where you will retrieve the information on interpreting the sensor data.

WD_Data Register Breakdown

The WD_Data Register Breakdown section contains the following columns for interpreting the sensor data.

  • Profile - The Application ID of the sensor type.
  • Sensor Name - Displays the type of sensor by name.
  • Data Type - Provides the type of integer that will be integer.
    • u8 - Unsigned 8 bit integer (cannot provide negative values)
    • s8 - Signed 8 bit integer (can provide negative values)
    • u16 - Unsigned 16 bit integer (cannot display negative values)
    • S16 - Signed 16 bit integer (can display negative values)
    • u32 - Unsigned 32 bit integer (cannot display negative values)
    • s32 - Signed 32 bit integer (can display negative numbers)
    • u64 - Unsigned 64 bit integer (cannot display negative numbers)

Note: ⚠The registers in the Serial MODBUS Gateway are 16 bits. Therefore, there is not a manner by which a 32 bit number can be displayed without concatenation. This means that you may encounter sensors that have 32 or 64 bit values that are presented across multiple 16 bit registers and require concatenation. When the values are split across registers, they are described as "high" and "low" and have a trailing "_H" for high or "_L" for low to demonstrate the highest and lowest significant bit (example: Pulse Counter 64 bit). Similarly, there are 8 bit values that might be split across the highest four bits of one register and the lowest four bits in the following four bits of the following register (example: Three Phase Current Meter).

  • Data Points Presented - Provides a verbose description of the values represented in the data.
  • Unit - Provides the unit of measurement represented by the data.
  • Interpretation - Provides the formula (where applicable) and Data register referenced (used to process the raw data to calculate the value per Unit.
  • Concatenation - Provides an example of how to concatenate values that are shared across multiple registers where applicable.

Example

In the example below, we see a Resistance Sensor with Application ID 70. The resistance value is natively provided as a 32 bit number that represents Ohms. Therefore, the raw data is split across two 16 bit registers in Data 0 and Data 1 registers to represent the Resistance_L and Resistance_H values in Data 0 and Data 1 (Data 2-7 are not used).

Polling the appropriate Sensor Registers returns data on Data0 and Data1.

  • Data0 = 46402 (when polling Data0, you see this value)
  • Data1 = 37 (when polling Data1, you see this value)

We will then convert the individual numbers to hexadecimal and push them together.

37 = 0x0025 (in hexadecimal)

46402 = 0xB542 (in hexadecimal)

Concatenate: [37]+[46402]

*Convert to hexadecimal*: [0x0025]+[0xB542] = 0025B542

You can see how we concatenated (pushed together) the two hexadecimal values after converting to arrive at the hexadecimal value 0025B542.

*Convert to decimal* 0x0025B542 = 2,471,234

We now have the final value 2,471,234 to apply the formula to arrive at the final value reported for the Unit.

Apply Formula: 2,471,234 / 10 = 247,123.4

Apply the Unit to the converted value.

Resistance = 247,123.4 Ω

Profile Sensor Name Data Type Data Points Presented Unit Interpretation Concatenation
70 Resistance u32 Resistance Ohms (Ω)

Data produced by the sensor is in u32 format. 2 Registers are needed to contain this value. Concatenate the Registers in order to reconstruct the full value.


Formula: Divide by 10 for 1 decimal point resolution

Example: 2,471,234 / 10 = 247,123.4 Ω

Range: 0 to 250,000.0 Ω


Data0 = Resistance_L Data1 = Resistance_H Data2 - Data7 = NA

Resistance = [Data1]+[Data0]


Example

Data0 = 46402 Data1 = 37 Concatenate:     [37]+[46402]   *Convert to hexidecimal*                                 [0x0025]+[0xB542] = 0x0025B542 *Convert to decimal*                                 0x0025B542 = 2,471,234 Apply Formula: 2,471,234 / 10 = 247,123.4

Resistance = 247,123.4 Ω


FRR Decoding table

The Serial MODBUS Gateway offers Fast Read Registers which allow a user to poll device data quickly and, in many cases, the data is already parsed. Interpretation for this data can be found under the FRR Decoding Table.

Profile Sensor Name Data Type Data Points Presented Unit Interpretation FRR Data
70 Resistance u32 Resistance Ohms (Ω)

Data produced by the sensor is in u32 format. 2 out of 4 FRRs are needed to contain this value. Concatenate the FRRs in order to reconstruct the full value.

Concatenate: [Resistance0] + [Resistance1]

                                   MSV                 LSV

Formula After Concatenate: Divide by 10 for 1 decimal point resolution


Example: [37] - [46402] -> Convert to Hexadecimal

                    [0x0025] + [0xB542] = [0x0025B542]

                    Convert Concatenated result back to Decimal

                    2,471,234 / 10 = 247,123.4 Ω

Range: 0 to 250,000.0 Ω

[Resistance0]-[Resistance1]-[NA]-[NA]


Example

Decimal: [37]-[46402]-[NA]-[NA] Hex: [0x0025]-[0xB542]-[0x0000]-[0x0000]

Range

Decimal: [0 to 38]-[0 to 65535]-[0]-[0] Hex: [0x0026 to 0xFFFF]-[0x0000 to 0xFFFF]-[0x0000]-[0x0000]


Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.