Technical reference and worked-example guide
Modbus function 02 discrete-input guide: field reference
Direct answer
The reader can form a valid request, unpack response bits, reconcile address notation and distinguish protocol state, PLC mapping and physical input truth.
Written for pLC, HMI and integration learners reading read-only discrete input state and connecting returned bits to field or device evidence.

Definition
Client, server, transport, unit identity, starting input address, quantity, address base, packed-bit order, read-only semantics, freshness, quality and field meaning.
Signal path
Application request through transport and device map to packed input bits, consuming tags, application logic and independent field evidence.
Worked example
Known inactive and active input cases read repeatedly with correct address, bit location and physical interpretation.
Limits
First and last address, excessive quantity, exception, timeout, short frame, unused packed bits, stale cache, device restart and sensor disagreement.
Common mistake
An identity, function, address-base, quantity, packing, freshness, device-map, logic or field-evidence mismatch.
Verification
The discrete-input map and behavior checked against current device manuals and a known physical or simulated condition.
What does Modbus function code 02 read?
It reads discrete input bits, commonly representing read-only Boolean status in the server data model; exact meaning comes from the device map.
How is function 02 different from function 01?
Function 02 addresses discrete inputs while function 01 addresses coils; device semantics and access rules still require documentation.