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

NAME

6       modbus_write_bits - write many bits
7

SYNOPSIS

9       int modbus_write_bits(modbus_t *ctx, int addr, int nb, const uint8_t
10       *src);
11

DESCRIPTION

13       The modbus_write_bits() function shall write the status of the nb bits
14       (coils) from src at the address addr of the remote device. The src
15       array must contains bytes set to TRUE or FALSE.
16
17       The function uses the Modbus function code 0x0F (force multiple coils).
18

RETURN VALUE

20       The modbus_write_bits() function shall return the number of written
21       bits if successful. Otherwise it shall return -1 and set errno.
22

ERRORS

24       EMBMDATA
25           Writing too many bits
26

SEE ALSO

28       modbus_read_bits(3) modbus_write_bit(3)
29

AUTHORS

31       The libmodbus documentation was written by Stéphane Raimbault
32       <stephane.raimbault@gmail.com[1]>
33

NOTES

35        1. stephane.raimbault@gmail.com
36           mailto:stephane.raimbault@gmail.com
37
38
39
40libmodbus 3.0.8                   07/31/2019              MODBUS_WRITE_BITS(3)
Impressum