MCPcopy Create free account
hub / github.com/4-20ma/ModbusMaster / writeMultipleCoils

Method writeMultipleCoils

src/ModbusMaster.cpp:471–477  ·  view source on GitHub ↗

Modbus function 0x0F Write Multiple Coils. This function code is used to force each coil in a sequence of coils to either ON or OFF in a remote device. The request specifies the coil references to be forced. Coils are addressed starting at zero. The requested ON/OFF states are specified by contents of the transmit buffer. A logical '1' in a bit position of the buffer requests the correspondi

Source from the content-addressed store, hash-verified

469@ingroup discrete
470*/
471uint8_t ModbusMaster::writeMultipleCoils(uint16_t u16WriteAddress,
472 uint16_t u16BitQty)
473{
474 _u16WriteAddress = u16WriteAddress;
475 _u16WriteQty = u16BitQty;
476 return ModbusMasterTransaction(ku8MBWriteMultipleCoils);
477}
478uint8_t ModbusMaster::writeMultipleCoils()
479{
480 _u16WriteQty = u16TransmitBufferLength;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected