
Read the fields in a Modbus register map and turn an explicitly documented raw value into engineering units without guessing its address or encoding.
This is an offline interpretation lesson for low-voltage controls technicians. The register map and temperature values are fictional. No device request, scan, configuration change or write command is performed or authorized by this exercise. Use the correct model and firmware documentation for real equipment.
A useful register record identifies the point, table, supported function, addressing convention, register count, representation, scale, units, access and special values. Save the document revision alongside those fields. A screenshot containing only an address and a number is not a complete integration record.
The original poster map defines: Point: room temperature. Table: holding registers. Read function: 03. Printed reference: 40001, explicitly using the traditional first-holding-register convention. Protocol data unit address: 0. Quantity: 1 register. Representation:signed 16-bit integer. Engineering conversion:decoded integer ×0.1 degrees Celsius.
This fictional temperature is observed through a read operation. Its placement in the holding-register table does not authorize writing to it or mean the real product would support such a write.
Modbus defines separate data areas, including coils, discrete inputs, input registers and holding registers. Register values are 16-bit quantities at the protocol level; coils and discrete inputs represent bits. Function 03 reads holding registers, while 04 reads input registers. The selected table/function matters even when an address number looks identical.
Protocol addresses start at zero. Printed documentation and client interfaces may use reference numbers or one-based labels instead. Schneider Electric's overview illustrates traditional reference 40001 as data address 0. This is a convention to confirm, not an instruction to subtract 40001 from every number found in every manual.
For the poster's declared convention only: 40001 corresponds to protocol address 0. 40002 corresponds to protocol address 1. 40010 corresponds to protocol address 9.
A manual that already prints zero-based offsets needs no second subtraction. Client software may ask for a reference number, an offset or a one-based address. Read the field definition before entering anything.
The server identity selects which device is being addressed in the communication arrangement. The register address selects data within that device and table. The returned value is the content, not another address.
An original record might say server 7, holding reference 40001, decoded value 235. Those three numbers serve different purposes. For an actual serial or TCP installation, use the documented device addressing and any gateway unit-identifier requirements. Do not infer that a TCP unit identifier always has exactly the same routing role as a serial device address.
A register contains bits. The map tells you what those bits mean: for example an unsigned integer, signed integer, status bit field or part of a larger number. Modbus's protocol specification defines high-byte-first encoding for a 16-bit data item. Multi-register values require their documented register ordering and representation; do not assume a universal 32-bit word order from the 16-bit rule alone.
The poster's positive raw integer 235 becomes 23.5°C after multiplication by 0.1. For a negative example, a signed 16-bit two's-complement pattern 0xFFCE represents−50. Applying the same scale gives−5.0°C. If that bit pattern is mistakenly interpreted as unsigned 65486, the result would be 6548.6°C. The arithmetic might execute correctly while the interpretation is wrong.
First decode according to the map, then apply its defined conversion. Do not assume every device uses multiplication by 0.1. A product may specify a divisor, offset, floating-point value or other representation. Record the formula explicitly.
A32-bit value commonly occupies two 16-bit registers, but its type and ordering still require documentation. Reading only one half is not a complete value. An adjacent register is not automatically a separate sensor.
Units must come from the map and configuration. A temperature number could be Celsius, Fahrenheit or a scaled integer. A status value may be a bit field rather than a measurement at all.
Review reserved or invalid-value codes before treating every returned bit pattern as a legitimate measurement. A code reserved for unavailable data must not be displayed as a real temperature. An exception response is also not a normal measurement. A communication timeout gives no new process value and should not be silently substituted with zero.
For an offline example, record the map revision, device model, point name, function, address convention, register count, raw data, decoding, scale, units and time associated with the saved sample. Preserve the original raw sample so another reviewer can reproduce the result.
If the number is plausible, still verify its identity. Reading an adjacent room's register could give a believable temperature. Plausibility is a reason to continue checking, not proof of correct addressing.
Do not try write functions to discover which address controls something. A write can change equipment operation. A read/write label describes a capability or map access category; it does not supply task authorization or establish a safe operating procedure.
Modbus Organization, Modbus Application Protocol SpecificationV1.1b3, 2012-04-26: https://www.modbus.org/file/secure/modbusprotocolspecification.pdf Supports data areas, 16-bit representation, protocol addressing, read functions and exception distinction. Schneider Electric FAQFA168406, What is Modbus and How does it work?: https://www.se.com/us/en/faqs/FA168406/ Supports reference-to-address convention examples and representation distinctions.
The older /docs/ URL returned 404; the official replacement PDF above was opened successfully. The example map, temperature scale, signed example and exercises are original teaching material, not copied from a device map.
Mistake: Subtracting one from an address that is already a zero-based offset. Correction: Read the map convention and the client's expected address field before converting.
Mistake: Scaling a signed register as an unsigned integer. Correction: Decode the documented representation first; 0xFFCE is −50 in the stated signed 16-bit example.
Mistake: Displaying a communication timeout as a measured zero. Correction: Preserve unavailable or exception status instead of inventing a new process reading.
The signed interpretation is worth being able to check without a tool, because a wrong sign is the error most likely to look plausible on a graphic.
A 16-bit register holds values from 0 to 65535 when it is read as unsigned. Under the two's-complement convention, any pattern whose unsigned value is 32768 or more stands for a negative number, and the magnitude of that number is 65536 minus the unsigned value.
Take the pattern 0xFFCE. Its unsigned value is 15 × 4096 + 15 × 256 + 12 × 16 + 14, which is 61440 + 3840 + 192 + 14 = 65486. That is above 32767, so the signed value is 65486 − 65536 = −50, and the map's stated scale of 0.1 degrees Celsius turns it into −5.0°C.
Work a positive pattern the same way. 0x0124 is 1 × 256 + 2 × 16 + 4 = 292, which is below 32768, so it is simply 292, and the scaled result is 29.2°C. The signed value −1 is the pattern 0xFFFF, whose unsigned value is 65535 and which scales to −0.1°C.
Two sanity checks are cheap. A plausible number with the wrong sign, and an implausibly large positive number, are both symptoms of a missed signed interpretation. Neither is proof of the cause on its own.
A read asks for a number of consecutive items beginning at an address. Both parts matter, and the errors they produce look different from each other.
Reading a quantity of 1 beginning at protocol address 0 returns only the item at address 0. Reading a quantity of 2 from the same start returns the items at addresses 0 and 1, so the last item sits at the starting address plus the quantity minus one. A request for 10 items beginning at address 20 therefore covers addresses 20 through 29, not 20 through 30.
That arithmetic becomes important when a client is configured to poll a block covering several points at once. If the block begins one item early, every value in it lands against the wrong name while every one of them still looks like a reasonable number, because each one really is a reading from somewhere. Nothing in the response announces that the block was misaligned.
So write down the starting address, the quantity and which point each returned item is expected to be, then verify the first and the last item of a block against separately documented values. A block that decodes correctly at both ends is stronger evidence than one plausible number in the middle.
The same 16 bits can be a number or a set of independent flags, and the map is the only thing that says which. Read as an unsigned integer, a register gives 5. Read as a bit field with the lowest bit numbered zero, the value 5 says that bit zero and bit two are set and the rest are clear, because 5 is 4 plus 1.
Scaling a bit field is meaningless in a quiet and dangerous way. Multiply that 5 by a temperature scale of 0.1 and a graphic displays 0.5 degrees, a figure that offends nobody and describes nothing. Average a day of such values and the trend looks like data.
Bit fields also move in jumps that are not proportional to anything. One further condition becoming true can take the value from 5 to 37, because bit five is worth 32. A reader expecting a measurement sees a sudden large excursion and may report a process event the device never signalled.
Settle the representation from the documented map before any arithmetic, and keep each flag's meaning written beside the bit number it occupies. Where the map is ambiguous, the integrator who published it is the person to ask.
Texas journeyman, 15 questions, scored by topic against the 70% mark. No card, and no account needed to start.
Free study material for low-voltage apprentices. This is a national foundation course: requirements differ by state and by local jurisdiction, and a practice that is common in one place is not a rule everywhere. Nothing here is a licence, a certification, or authority to work unsupervised, and completing it does not count as apprenticeship hours or continuing-education credit. Check the codes adopted where you are working, the licensing authority for that work, and your employer's safety programme. VoltMark is not affiliated with, endorsed by, or sponsored by NFPA, OSHA, NICET, BICSI, FOA, or any state or local licensing authority.

Electrician licensing exam prep: practice questions, timed exam simulations, and step-by-step help finding every answer in the NEC.