modbus_write_bit.txt 732 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. modbus_write_bit(3)
  2. ===================
  3. NAME
  4. ----
  5. modbus_write_bit - write a single bit
  6. SYNOPSIS
  7. --------
  8. *int modbus_write_bit(modbus_t *'ctx', int 'addr', int 'status');*
  9. DESCRIPTION
  10. -----------
  11. The *modbus_write_bit()* function shall write the status of _status_ at the
  12. address _addr_ of the remote device. The value must be set to `TRUE` or `FALSE`.
  13. The function uses the Modbus function code 0x05 (force single coil).
  14. RETURN VALUE
  15. ------------
  16. The function shall return 1 if successful. Otherwise it shall return -1 and set
  17. errno.
  18. SEE ALSO
  19. --------
  20. linkmb:modbus_read_bits[3]
  21. linkmb:modbus_write_bits[3]
  22. AUTHORS
  23. -------
  24. The libmodbus documentation was written by Stéphane Raimbault
  25. <stephane.raimbault@gmail.com>