MODBUS_GET_FLOAT_ABC(3)

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

πŸ’– MODBUS_GET_FLOAT_ABCD πŸ’–

okay bestie, welcome to the libmodbus Manual β€” yes that's the manual name, we're being fancy today. This one's about modbus_get_float_abcd, and it's genuinely not that deep, I promise. πŸŽ€


✨ NAME ✨

modbus_get_float_abcd β€” get a float value from 2 registers in ABCD byte order


🌸 SYNOPSIS 🌸

float modbus_get_float_abcd(const uint16_t *src);

πŸ¦‹ DESCRIPTION πŸ¦‹

so like. modbus_get_float_abcd() shall get a float from 4 bytes in the usual Modbus format. that's it, that's the whole job. πŸ’…

The src array must be a pointer on two 16 bits values. no cap. like, for example, if the first word is set to 0x0020 and the second to 0xF147, then the float value will be read as 123456.0. math ate that fr fr. πŸ”₯

bestie please actually make sure src points at two 16-bit values, because that's the requirement and I'm not gonna pretend otherwise. πŸ™ˆ

πŸ’œ RETURN VALUE πŸ’œ

The function shall return a float. literally just a float. iconic behavior. ✨


🌈 SEE ALSO 🌈

the whole byte-order squad, go read them too, iykyk πŸ‘‘


🫢 AUTHORS 🫢

The libmodbus documentation was written by StΓ©phane Raimbault <stephane.raimbault@gmail.com> β€” thank you for the lore, king πŸ₯Ή


libmodbus v3.1.6 Β· 11/17/2025 β€” and that's the vibe check, bestie, we're done here. go read some registers. mwah πŸ’–πŸŒΈπŸ¦‹

πŸ“¦ where this page comes from