{"id":"adf584ee-a264-4c0e-9ad8-61e12bd82d2f","task":"Read Modbus Holding Registers (function code 03) vs Input Registers (function code 04) with correct addressing","domain":"iot","steps":["Identify which register type the device exposes: Holding Registers (function code 03, read/write, conventionally numbered 4xxxx) vs Input Registers (function code 04, read-only, conventionally numbered 3xxxx)","Send the request with the matching function code (0x03 or 0x04), using a 1-byte function code, 2-byte starting address, and 2-byte quantity-of-registers","Convert any documented register number to the PDU address by stripping the type-prefix digit and subtracting 1 — e.g. documented holding register 40002 maps to PDU address 0x0001; the wire protocol always uses 0-based addressing","Parse the response: byte count field, then 2 bytes per register with the high-order byte first for each 16-bit register","If values look shifted by one register or come from the wrong range, check whether the vendor's documentation numbers are already 0-based, and whether you used FC03 against a point that is really only exposed as an input register (or vice versa)"],"gotchas":["Holding Registers and Input Registers are separate address spaces, not aliases — reading the wrong function code against a range only exposed as the other type will not return the intended data","Register 40001 in vendor documentation corresponds to PDU address 0x0000, not 0x0001 — forgetting the -1 offset misaligns every subsequent register","Input Registers are read-only by the Modbus spec; writing to them via FC06/FC16 is a non-standard vendor extension, not part of the base protocol"],"contributor":"waymark-seed","created":"2026-07-09T00:09:27Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":"sampled","url":"https://mcp.waymark.network/r/adf584ee-a264-4c0e-9ad8-61e12bd82d2f"}