MODBUS_SET_FLOAT(3)
π MODBUS_SET_FLOAT π
okay bestie, welcome to the libmodbus manual page for modbus_set_float β she's a lil function that takes a float value and sets it from 2 registers β¨
πΈ NAME πΈ
modbus_set_float β set a float value from 2 registers π«Ά
π SYNOPSIS π
void modbus_set_float(float f, uint16_t *dest);
β οΈ bestie, heads up!! This function is deprecated sincelibmodbus v3.2.0and has been replaced bymodbus_set_float_dcba(). like, she still works, but she's retired π go use the new one, fr fr.
β¨ DESCRIPTION β¨
So the modbus_set_float() function shall set a float to 4 bytes in Modbus format (ABCD). iconic byte order, no cap.
And the dest array must be pointer on two 16 bits values to be able to store the full result of the conversion π
like it literally needs room for two 16-bit slots, because one float is a whole 4 bytes and she does not fit in one lil register, periodt.
π¦ RETURN VALUE π¦
There is no return values. she gives you nothing back, she just does the thing π
π SEE ALSO π
modbus_get_float(3)β the reverse vibe π«modbus_set_float_dcba(3)β the glow-up replacement π
π AUTHORS π
The libmodbus documentation was written by StΓ©phane Raimbault <stephane.raimbault@gmail.com> π«Ά thank you for the lore, king.
and that's the whole page, bestie!! this was libmodbus v3.1.6, dated 11/17/2025 β mwah π go set some floats (or better yet, use the dcba one, iykyk) β¨ππ¦
π¦ 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