ArduinoModbus : Modbus Client class

requestFrom()

Description

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

Syntax

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

Parameters

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

Returns

0 on failure, number of values read on success

See also

ModbusClient Class