ArduinoModbus : Modbus Server class
Write values to the server's Discrete Inputs for the specified address and values.
int writeDiscreteInputs(int address, uint8_t values[], int nb);
address - address to use for operation
values - array of discrete inputs values to write
nb - number of discrete inputs to write
1 on success, 0 on failure.
ModbusServer class