PLC Simulator
Modbus function reference

Modbus Function Code 15 — Write Multiple Coils

Write a packed block of boolean states

15
Load in Modbus sandbox

Data model

Coils (0xxxx reference family)

Access

Write a packed block of boolean states

Protocol quantity

1–1968 coils

Worked example

Read the PDU field by field.

Write ten coil states beginning at protocol address 19. The request declares quantity, byte count and packed data.

Typical use: Updating a documented contiguous command block in one transaction.

Example protocol data units

Request PDU

0F 00 13 00 0A 02 CD 01

Normal response PDU

0F 00 13 00 0A

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

  • Mismatching quantity and byte count
  • Packing bits most-significant-bit first
  • Overwriting adjacent command bits that another controller owns

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