Modbus RTU: Configuring TRM200 and TRM202 Registers

Daniel Price5 min read
ModbusOther ManufacturerTechnical Reference
Licensed PE Working through this on a live machine? A Maine-licensed engineer can take it from here — included with IMD hardware, by the hour for everything else. Book an engineer

Configure each device for Modbus RTU at 9600 baud, then use the device address and register representation shown below. The TRM200 example reads two process values as IEEE 754 floats, while the TRM202 supports demonstrated reads as either scaled 16-bit integers or IEEE 754 floats. Treat the two identical TRM202 setpoint-write examples as one demonstrated register operation: they do not provide a distinct address for writing SP2.

Confirmed communication profiles and register operations

Device Slave address Operation Starting address Quantity Representation
TRM200 1 Read PV1 and PV2 4 registers Two IEEE 754 floats
TRM202 3 Write demonstrated setpoint register 1 register 16-bit value scaled by 10
TRM202 3 Read SP1 and SP2 2 registers 16-bit values scaled by 10
TRM202 3 Read SP1 and SP2 4 registers Two IEEE 754 floats

Both examples use function for reads. The TRM202 write uses function , Write Multiple Registers, even though only one register is written. Register quantities count 16-bit registers, not engineering values: one float occupies two registers.

How to decode the TRM200 PV response

Send this complete RTU frame to slave 1:

01 03 10 09 00 04 90 CB

The fields are slave 01, function 03, starting address 1009, quantity 0004, and CRC bytes 90 CB. Four registers request eight data bytes, enough for two 32-bit values.

The demonstrated response is:

01 03 08 41 D4 C3 00 42 05 A0 00 A9 6C

08 is the response byte count. Interpret 41 D4 C3 00 and 42 05 A0 00 as separate IEEE 754 single-precision values in the byte and word order shown. They decode to approximately 26.5952 and 33.40625. The final A9 6C bytes are the response CRC and are not part of PV2.

If a client reports implausibly small, huge, or negative values, inspect its float-order setting. The captured frame uses the sequence 41 D4 C3 00; a client that swaps the two 16-bit words or reverses bytes will decode a different number.

How to read TRM202 setpoints

The scaled-integer read starts at and requests two registers:

03 03 00 05 00 02 + CRC16

The demonstrated response is:

03 03 04 02 F3 01 F4 28 6F

The byte count is 04. Decode each register as an integer and divide by 10:

Register data Raw decimal Engineering value
02 F3 755 75.5 degrees C
01 F4 500 50.0 degrees C

The alternate float read is already supplied with its CRC:

03 03 10 11 00 04 11 2E

Its demonstrated response is:

03 03 08 42 97 00 00 42 48 00 00 69 21

Decode 42 97 00 00 as 75.5 and 42 48 00 00 as 50.0. Choose one representation for the application. Do not divide the float results by 10; the scale factor applies to the 16-bit representation at .

Writing a TRM202 setpoint safely

To write 50.0 degrees C to the demonstrated register, multiply the engineering value by 10: 50.0 × 10 = 500, which is . Build the request as follows:

03 10 00 05 00 01 02 01 F4 + CRC16
  1. Set the slave address to 03 and the function to 10.
  2. Set the starting address to 0005.
  3. Set the register quantity to 0001 and byte count to 02.
  4. Encode the scaled setpoint as two bytes; 50.0 becomes 01 F4.
  5. Calculate the Modbus CRC over every byte from 03 through F4, then append the CRC in RTU transmission order.
  6. Read back both registers with 03 03 00 05 00 02 and confirm the intended setpoint changed.

The provided SP1 and SP2 write descriptions contain the same address and identical frame. One Modbus write to one register cannot select two independent setpoints without another selection mechanism. Use only for the demonstrated setpoint operation; identify the separate SP2 write address or selection rule from the device register table, then verify it by readback before enabling control.

Diagnostic sequence for no response or bad data

  1. Confirm Modbus RTU mode and 9600 baud at both ends. Read the configured parity, stop-bit, and data-bit settings from the device and duplicate them in the master; baud rate alone is insufficient.
  2. Use slave 1 for the TRM200 example and slave 3 for the TRM202 example. A valid frame sent to the wrong address normally produces no response.
  3. Transmit binary bytes, not the printable characters in the hexadecimal display.
  4. Check the physical serial layer: conductor polarity, common reference where required, termination, biasing, shielding, and duplicate slave addresses.
  5. Verify the CRC over the exact request bytes. Exclude any display spaces or text markers such as + CRC16.
  6. Check address notation in the master. Enter the PDU offsets , , or when the software expects raw offsets; do not silently add a holding-register prefix or one-based adjustment.
  7. Confirm the requested quantity. PV1/PV2 and float SP1/SP2 require four registers; scaled SP1/SP2 require two.
  8. If byte counts and CRCs are valid but values are wrong, test data representation next: scaled integer versus float, followed by float byte and word order.

Verification and recurring integration pitfalls

Capture both transmitted and received bytes during commissioning. A successful read must return the requested slave address and function, followed by the expected byte count: 08 for four registers or 04 for two registers. Validate the response CRC before decoding any data.

After a write, require two checks: validate the function response against the requested start address and quantity, then perform an independent readback. Compare the readback in engineering units, not only as raw hexadecimal. Also confirm that the physical process or device display reflects the intended channel before allowing automatic operation.

The recurring errors are mixing the two TRM202 representations, applying the divide-by-10 scale to a float, requesting values instead of registers, selecting the wrong slave, and letting client software alter raw register addresses. Preserve a known-good byte capture for each operation so later failures can be separated into transport, addressing, framing, and decoding faults.

FAQ

What Modbus address reads TRM200 PV1 and PV2?

Read four registers from on slave 1 with function . Decode the eight returned data bytes as two IEEE 754 floats.

How do I read TRM202 SP1 and SP2 over Modbus RTU?

On slave 3, read two registers from and divide each integer by 10, or read four registers from and decode two IEEE 754 floats.

How do I write 50 degrees C to the TRM202?

For the demonstrated scaled register, encode 50.0 as 500, or , and write one register at using function . Append a calculated CRC and verify the result with a readback.

Why does the TRM Modbus float decode incorrectly?

Confirm that the client uses IEEE 754 single precision and preserves the demonstrated byte and word order. For example, 42 97 00 00 must decode as 75.5, without divide-by-10 scaling.

Why does a valid TRM Modbus request get no response?

Check RTU mode, 9600 baud, the complete serial format, slave address, physical polarity, and CRC. Also verify that the master sends binary bytes and uses the raw register offset expected by its addressing mode.

Back to blog