top of page

Modbus Single-Coil Writes: A Boolean True Is Not an Arbitrary Wire Value

9 hours ago
3 min read

An HMI may display True while a Modbus device rejects the command. First establish what the driver actually transmitted: an application Boolean and the two-byte FC05 output field are different layers of the same operation.


For Write Single Coil, the defined ON field is FF00 and OFF is 0000. Inspect the encoded request in an isolated test environment, then keep protocol response, stored state and physical feedback separate.

Original conceptual illustration of a logical switch, encoded command and isolated controller output
Original conceptual illustration, not a product photograph, customer installation or live software screen.

1. Locate the conversion boundary


Start with the command path on paper: screen control, application variable, driver call, transmitted request and addressed device. Mark which component translates a Boolean into the protocol field. A library may accept true as a high-level argument and correctly encode it; editing its input into a hexadecimal literal can introduce a second conversion error.


For an integration involving a controller and HMI, review the communications requirements alongside ProSense automation and control solutions. Confirm the exact controller model, coil map, driver version and permitted command before selecting equipment. A product family name alone does not establish write compatibility.


Section 6.5 of the Modbus application specification defines FF00 for ON and 0000 for OFF; other output-field values are invalid for this function. These are hexadecimal protocol fields, not a recommendation to write arbitrary numbers into an application tag.


2. Build a safe evidence checklist


  1. Use a simulator or an electrically isolated, authorised training arrangement with no connected machinery. Record the test boundary before enabling any write.

  2. Save the application's intended Boolean and the driver's documented argument type. Avoid guessing from a screen label such as integer or bit.

  3. Capture the request using an approved diagnostic facility. Identify the function, coil address and output field, distinguishing protocol addresses from the manual's displayed numbering.

  4. Compare the normal response with the request. Record independent state and feedback separately; do not treat an echoed command as evidence that an actuator reached its position.


Changing outputs on operating plant can create hazards. Application-specific control design, isolation, interlocks and validation belong to competent people following the equipment documentation and site procedures. A generic communications command is not a certified safety function.


Three checks for a single-coil write: logical intent, FC05 wire value, and separate confirmation
Original conceptual engineering checklist; requirements must be checked for the actual device and deployment.

3. Worked example: a simulator rejects ON


In a hypothetical bench test, a developer bypasses a library's Boolean interface and constructs an FC05 output field containing 0001. The simulator rejects the request. The useful investigation is the encoding path, rather than increasing a timeout or changing the coil's process meaning.


After correcting the test encoder to use the function's defined ON representation, retain the before-and-after request records. Keep the target address and all other settings constant. This isolates the conversion change and makes the result reviewable without suggesting that the same coil address is valid on real equipment.


Now test the documented OFF path and the application's readback handling. A completed protocol exchange answers a communications question; the project still needs its own acceptance criteria for commanded state, observed state and behaviour following a lost connection.


4. Diagnose the evidence you actually have


Evidence

Next check

No reply

Addressing, connection and approved timeout diagnostics

Exception reply

Exact function format and device manual

Normal echo

Readback and independent process feedback

UI says True

Driver argument type and captured request


Do not transplant FC05 encoding rules into a multiple-coil function or a holding-register bit field. Different functions have different layouts. Do not overwrite a complete register to change one apparent bit without understanding the device's documented semantics and other users of that register.


5. Recommended equipment / related solutions


Use networking and gateway solutions to scope the connection path and diagnostic access, and the automation range linked above to discuss controller/HMI requirements. Send the intended interface and exact device documentation; no particular gateway is endorsed by this article as compatible.


For another command-verification boundary, read why a Modbus read/write transaction writes before it reads. That guide concerns a different function, but helps frame why request completion and application acceptance need explicit tests.


FAQ


Should I replace every True argument with FF00?


No. Follow the driver's interface contract. A Boolean API may already perform the encoding; inspect its documentation and test output before changing application values.


Does a successful response prove the machine moved?


No. Define and validate independent feedback appropriate to the application. This article demonstrates protocol interpretation using an isolated test arrangement.


Technical references


Modbus Application Protocol Specification V1.1b3, section 6.5. Use the exact manufacturer's model and firmware documentation for implementation.


Need help with your application?


Send the device model, firmware, redacted request/response evidence and application constraints. ProSense can help scope the equipment and integration requirements.


ProSense Instruments — equipment and instrumentation; sales@prosenseinstruments.com.au.


ProSense Solutions — industrial monitoring and control systems; sales@prosense.com.au.


ProSight Software — software and integration enquiries; info@prosightsoftware.com. Call 1800 560 854.



bottom of page