1MODBUS_READ_INPUT_BI(3)        Libmodbus Manual        MODBUS_READ_INPUT_BI(3)
2
3
4

NAME

6       modbus_read_input_bits - read many input bits
7

SYNOPSIS

9       int modbus_read_input_bits(modbus_t *ctx, int addr, int nb, uint8_t
10       *dest);
11

DESCRIPTION

13       The modbus_read_input_bits() function shall read the content of the nb
14       input bits to the address addr of the remote device. The result of
15       reading is stored in dest array as unsigned bytes (8 bits) set to TRUE
16       or FALSE.
17
18       You must take care to allocate enough memory to store the results in
19       dest (at least nb * sizeof(uint8_t)).
20
21       The function uses the Modbus function code 0x02 (read input status).
22

RETURN VALUE

24       The modbus_read_input_status() function shall return the number of read
25       input status if successful. Otherwise it shall return -1 and set errno.
26

ERRORS

28       EMBMDATA
29           Too many discrete inputs requested
30

SEE ALSO

32       modbus_read_input_registers(3)
33

AUTHORS

35       The libmodbus documentation was written by Stéphane Raimbault
36       <stephane.raimbault@gmail.com[1]>
37

NOTES

39        1. stephane.raimbault@gmail.com
40           mailto:stephane.raimbault@gmail.com
41
42
43
44libmodbus 3.0.8                   07/31/2019           MODBUS_READ_INPUT_BI(3)
Impressum