ModbusSlaveNode.writeCoil()

[Modbus]

Description

Write to the Coils register.

Syntax

node1.writeCoil(address, value)
node2.writeCoil(address, size, buffer)

Parameters

  • node1/node2: ModbusSlaveNode object.
  • address: Address of the Coils register to write to.
  • value: The value of the single Coils register that you want to write to.
  • size: The number of plural Coils registers to write to.
  • buffer: Copy the array data in the array space pointed to by the buffer to the Coil register.

Returns

int: If it succeeds, send back MODBUS_SUCCESS, and vice versa send back EXCEPTION_CODE.

See Also


Libraries Reference Home

The text of the 86Duino reference is a modification of the Arduino reference and is licensed under a Creative Commons Attribution-ShareAlike 3.0 License. Code samples in the reference are released into the public domain.

Leave a Comment

Scroll to Top