MODBUS_SET_FLOAT_ABC(3)

πŸ“¦
version 3.1.6 Β· 3 versions
, in debian bookworm

πŸ’– 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