ArduinoModbus - client.beginTransmission()

Description

Begin the process of a writing multiple coils or holding registers. Use write(value) to set the values you want to send, and endTransmission() to send request on the wire.

Syntax

int beginTransmission(int type, int address, int nb);
int beginTransmission(int id, int type, int address, int nb);

Parameters

  • id (slave) - id of target, defaults to 0x00 if not specified
  • type - type of write to perform, either
    • COILS (FC 0x01)
    • HOLDING_REGISTERS (FC 0x03)
  • address start address to use for operation
  • nb - number of values to write

Returns

1 on success, 0 on failure