MODBUS_SET_FLOAT_DCB(3)

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

MODBUS_SET_FLOAT_DCB(3) πŸ’–

okay bestie, welcome to the libmodbus Manual ✨ this one's a lil cutie from section 3, and no cap it's short and sweet.


🌸 NAME 🌸

modbus_set_float_dcba β€” set a float value in 2 registers using DCBA byte order πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

void modbus_set_float_dcba(float f, uint16_t *dest);

✨ DESCRIPTION ✨

so the way that modbus_set_float_dcba() works is: it shall set a float to 4 bytes in inverted Modbus format (aka DCBA order). iconic, honestly.

and listen β€” the dest array must be a pointer on two 16 bits values so it can actually store the full result of the conversion. like, two. not one. not three. two. πŸŽ€ the math has to math.

not me warning you: if dest isn't big enough for those two 16-bit values, you're gonna have a bad time πŸ™ˆ it literally cannot hold the whole conversion otherwise.

πŸ’œ RETURN VALUE πŸ’œ

There is no return values. πŸ’€ like, none. void behavior, void energy, nothing comes back to you. periodt.


🌈 SEE ALSO 🌈

go read those too, bestie, iykyk 🫢


πŸ‘‘ AUTHORS πŸ‘‘

The libmodbus documentation was written by StΓ©phane Raimbault <stephane.raimbault@gmail.com> β€” thank you legend, we appreciate you fr fr πŸ’–


and that's the whole vibe check! this page came to you courtesy of libmodbus v3.1.6, dated 11/17/2025 β€” slay, bye bestie πŸ’…βœ¨πŸ¦‹πŸŒΈ

πŸ“¦ where this page comes from