modbus_write_register.txt 773 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. modbus_write_register(3)
  2. ========================
  3. NAME
  4. ----
  5. modbus_write_register - write a single register
  6. SYNOPSIS
  7. --------
  8. *int modbus_write_register(modbus_t *'ctx', int 'addr', int 'value');*
  9. DESCRIPTION
  10. -----------
  11. The _modbus_write_register()_ function shall write the value of 'value'
  12. holding registers at the address 'addr' of the remote device.
  13. The function uses the Modbus function code 0x06 (preset single register).
  14. RETURN VALUE
  15. ------------
  16. The _modbus_write_register()_ function shall return 1 if successful. Otherwise
  17. it shall return -1 and set errno.
  18. SEE ALSO
  19. --------
  20. linkmb:modbus_read_register[3]
  21. linkmb:modbus_write_registers[3]
  22. AUTHORS
  23. -------
  24. The libmodbus documentation was written by Stéphane Raimbault
  25. <stephane.raimbault@gmail.com>