1MODBUS_WRITE_BIT(3) libmodbus Manual MODBUS_WRITE_BIT(3)
2
3
4
6 modbus_write_bit - write a single bit
7
9 int modbus_write_bit(modbus_t *ctx, int addr, int status);
10
12 The modbus_write_bit() function shall write the status of status at the
13 address addr of the remote device. The value must be set to TRUE or
14 FALSE.
15
16 The function uses the Modbus function code 0x05 (force single coil).
17
19 The function shall return 1 if successful. Otherwise it shall return -1
20 and set errno.
21
23 modbus_read_bits(3) modbus_write_bits(3)
24
26 The libmodbus documentation was written by Stéphane Raimbault
27 <stephane.raimbault@gmail.com>
28
29
30
31libmodbus v3.1.6 02/04/2022 MODBUS_WRITE_BIT(3)