modbus_write_bits.txt 872 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 function shall return the number of written bits if successful. Otherwise it
  18. 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>