PLC Simulator
Modbus function reference

Modbus Function Code 05 — Write Single Coil

Write one boolean output state

05
Load in Modbus sandbox

Data model

Coils (0xxxx reference family)

Access

Write one boolean output state

Protocol quantity

Exactly 1 coil

Worked example

Read the PDU field by field.

Write ON to the coil at protocol address 172. ON is encoded FF00 and OFF is encoded 0000.

Typical use: Sending a single boolean command when the device map explicitly permits a coil write.

Example protocol data units

Request PDU

05 00 AC FF 00

Normal response PDU

05 00 AC FF 00

PDU examples omit the Modbus TCP MBAP header and the Modbus RTU unit-address/CRC envelope. Multi-byte values are shown in network byte order.

Common implementation mistakes

  • Encoding ON as 0001 instead of FF00
  • Writing a physical state without an interlock or authorization check
  • Treating a normal echo response as proof the machine moved

Run the reference

Turn a protocol table into evidence.

Compose the request publicly, then use Pro for advanced graded exceptions, saved fixtures, complete history and project sharing.

Open sandbox

Technical reference and worked-example guide

Modbus function 05 single-coil write guide: field reference

Direct answer

The reader can identify the correct coil offset, encode the standard on or off value, validate the echo and prove the permitted application response without assuming success from transport alone.

Written for pLC programmers writing one documented Boolean command to a Modbus server under controlled conditions.

an industrial communications bench used to inspect Ethernet and isolated serial topology, identity, request-response evidence and mapped device data while studying authorized single-coil commands, encoding and physical-result proof
System map / 02

NODE 01observable

Definition

Authorized client, server identity, function 05, coil offset, on or off encoding, ownership, interlocks, operating mode, response, read-back and physical feedback.

NODE 02observable

Signal path

Approved Boolean demand through write request, server validation and coil state to application logic, output command, equipment response and independent feedback.

NODE 03observable

Worked example

One authorized write changes only the documented coil and the read-back and permitted result agree.

NODE 04observable

Limits

First and last coil, invalid encoding, illegal address, read-only mode, competing owner, duplicate request, timeout, restart and stale read-back.

NODE 05observable

Common mistake

An authority, identity, offset, encoding, owner, interlock, response, read-back or application mismatch.

NODE 06observable

Verification

The command reviewed and tested in a safe environment against current device and machine requirements.

Answer surface / 07

What does Modbus function code 05 do?

It asks a server to write one coil to the defined on or off state using the standard request encoding.

Can a successful coil write prove a motor started?

No. It proves a protocol state at one boundary; verify application logic, final output and independent motor or process feedback.