ArduinoModbus - modbusServer.discreteInputRead()

Description

Perform a “Read Discrete Inputs” operation for the specified address for a single discrete input.

Syntax

int discreteInputRead(int address);
int discreteInputRead(int id, int address);

Parameters

  • id (slave) - id of target, defaults to 0x00 if not specified
  • address address to use for operation

Returns

discrete input value on success, -1 on failure.