MODBUS_SET_FLOAT_CDA(3)

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

✨ NAME ✨

modbus_set_float_cdab β€” bestie, this is the one that drops a float value into 2 registers using CDAB byte order πŸ’…

(it lives in the libmodbus manual, and it's lowkey iconic)


🌸 SYNOPSIS 🌸

void modbus_set_float_cdab(float f, uint16_t *dest);

πŸŽ€ DESCRIPTION πŸŽ€

okay so modbus_set_float_cdab() shall set a float to 4 bytes in swapped words Modbus format β€” that's CDAB order instead of ABCD, no cap. πŸ¦‹

and like… the dest array must be pointer on two 16 bits values so it can actually hold the full result of the conversion, bestie. two. not one. the whole conversion needs both of them or it's giving overflow energy. 😭


πŸ’– RETURN VALUE πŸ’–

there is no return values. nothing. void. she does her job and says nothing, main character energy fr fr. πŸ’€


🫢 SEE ALSO 🫢

go read the whole squad, they're all obsessed with each other. ✨


πŸ‘‘ AUTHORS πŸ‘‘

the libmodbus documentation was written by StΓ©phane Raimbault <stephane.raimbault@gmail.com> β€” legend behaviour, honestly. πŸŽ€


and that's the whole page!! this was libmodbus v3.1.6, dated 11/17/2025 β€” bookmark it, screenshot it, tell your friends, because we ate and left no crumbs πŸ’…πŸŒΈπŸ’–

πŸ“¦ where this page comes from