MODBUS_SET_FLOAT_ABC(3)
π MODBUS_SET_FLOAT_ABCD π
ok so bestie, we're in the libmodbus manual and today's main character is modbus_set_float_abcd β she takes a float and yeets it into your registers in ABCD byte order. no cap, it's giving "conversion era" β¨
πΈ SYNOPSIS πΈ
void modbus_set_float_abcd(float f, uint16_t *dest);
look at her. two params. zero drama. π
π¦ DESCRIPTION π¦
okay so here's the tea, bestie π β modbus_set_float_abcd() shall set a float to 4 bytes in the usual Modbus format.
and the important bit, don't skip this one π β your dest array must be a pointer on two 16 bits values, because that's literally the only way it can store the full result of the conversion. two. 16-bit. values. no half-sending, she needs the whole thing. periodt. π
β¨ RETURN VALUE β¨
there are no return values. none. zero. she just does the thing and dips π (iconic behaviour honestly)
π SEE ALSO π
the whole float family is here, and they all slay in their own byte order π
iykyk β pick your byte order wisely, they are not the same vibe π
π AUTHORS π
the libmodbus documentation was written by StΓ©phane Raimbault</> <stephane.raimbault@gmail.com> π«Ά thank you for your service, king.
and that's the whole page, bestie!! π§ this was libmodbus v3.1.6, dated 11/17/2025, and the original page header said MODBUS_SET_FLOAT_ABC(3) up top and libmodbus Manual as the manual name β so now you know exactly what you're reading and when it was born π go forth and convert floats, you absolute legend β
π¦ 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