1MODBUS_WRITE_BITS(3) libmodbus Manual MODBUS_WRITE_BITS(3)
2
3
4
6 modbus_write_bits - write many bits
7
9 int modbus_write_bits(modbus_t *ctx, int addr, int nb, const uint8_t
10 *src);
11
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
20 The function shall return the number of written bits if successful.
21 Otherwise it shall return -1 and set errno.
22
24 EMBMDATA
25 Writing too many bits
26
28 modbus_read_bits(3) modbus_write_bit(3)
29
31 The libmodbus documentation was written by Stéphane Raimbault
32 <stephane.raimbault@gmail.com>
33
34
35
36libmodbus v3.1.6 01/19/2023 MODBUS_WRITE_BITS(3)