MODBUS_WRITE_REGISTE(3)
π MODBUS_WRITE_REGISTERS β the libmodbus manual, but make it cute π
okay bestie, welcome to the libmodbus Manual, section 3 (that's the library-functions girlies, iykyk). this one's about MODBUS_WRITE_REGISTERS, and yes the header up top truncates it to MODBUS_WRITE_REGISTE(3) because man page headers are always doing the most with limited space. we move. π
β¨ NAME β¨
modbus_write_registers β write many registers π«Ά
like, not one register. many. plural. the girlies are eating.
πΈ SYNOPSIS πΈ
int modbus_write_registers(modbus_t *ctx, int addr, int nb, const
uint16_t *src);
π DESCRIPTION π
so here's the vibe: the modbus_write_registers() function shall write the content of the nb holding registers from the array src at address addr of the remote device. no cap. that's literally the whole job and she does it flawlessly. π
and the way she does it?? the function uses the Modbus function code 0x10 (preset multiple registers). iconic behavior honestly.
not me sending nb registers in one single flex. main character energy fr fr. β¨
π¦ RETURN VALUE π¦
- if it ate: the function shall return the number of written registers β that's your success signal, bestie, count them and celebrate π
- if it did NOT eat: it shall return
-1and seterrno. so go check yourerrno, she's trying to tell you something π
π SEE ALSO π
modbus_write_register(3)β the singular version, for when you only have one register's worth of energymodbus_read_registers(3)β the read girlie, the other half of the cycle
π AUTHORS π
the libmodbus documentation was written by StΓ©phane Raimbault <stephane.raimbault@gmail.com> β absolute legend, we stan, thank you for your service π«‘π
and that's the whole page!! this was libmodbus v3.1.6, dated 11/17/2025, and it slayed every second of it. mwah. πβ¨π
π¦ where this page comes from
- debian bookworm: libmodbus-dev 3.1.6-2.1+deb12u1 Β· LGPL-2.1-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms