modbus_write_bits.txt 892 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. modbus_write_bits(3)
  2. ====================
  3. NAME
  4. ----
  5. modbus_write_bits - write many bits
  6. SYNOPSIS
  7. --------
  8. *int modbus_write_bits(modbus_t *'ctx', int 'addr', int 'nb', const uint8_t *'src');*
  9. DESCRIPTION
  10. -----------
  11. The _modbus_write_bits()_ function shall write the status of the 'nb' bits
  12. (coils) from 'src' at the address 'addr' of the remote device. The
  13. 'src' array must contains bytes set to _TRUE_ or _FALSE_.
  14. The function uses the Modbus function code 0x0F (force multiple coils).
  15. RETURN VALUE
  16. ------------
  17. The _modbus_write_bits()_ function shall return the number of written bits if
  18. successful. Otherwise it shall return -1 and set errno.
  19. ERRORS
  20. ------
  21. EMBMDATA::
  22. Writing too many bits
  23. SEE ALSO
  24. --------
  25. linkmb:modbus_read_bits[3]
  26. linkmb:modbus_write_bit[3]
  27. AUTHORS
  28. -------
  29. The libmodbus documentation was written by Stéphane Raimbault
  30. <stephane.raimbault@gmail.com>