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

NAME

6       modbus_write_bit - write a single bit
7

SYNOPSIS

9       int modbus_write_bit(modbus_t *ctx, int addr, int status);
10

DESCRIPTION

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

RETURN VALUE

19       The modbus_write_bit() function shall return 1 if successful. Otherwise
20       it shall return -1 and set errno.
21

SEE ALSO

23       modbus_read_bits(3) modbus_write_bits(3)
24

AUTHORS

26       The libmodbus documentation was written by Stéphane Raimbault
27       <stephane.raimbault@gmail.com[1]>
28

NOTES

30        1. stephane.raimbault@gmail.com
31           mailto:stephane.raimbault@gmail.com
32
33
34
35libmodbus 3.0.8                   07/31/2019               MODBUS_WRITE_BIT(3)
Impressum