ArduinoModbus - client.requestFrom()


Read multiple coils, discrete inputs, holding registers, or input register values. Use available() and read() to process the read values.


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


  • id (slave) - id of target, defaults to 0x00 if not specified
  • type - type of read to perform, either COILS, DISCRETE_INPUTS, HOLDING_REGISTERS, or INPUT_REGISTERS
  • address start address to use for operation
  • nb - number of values to read


0 on failure, number of values read on success