---
name: "modbus_get_float_cdab"
section: "3"
platform: "linux"
package: "libmodbus-dev"
version: "3.1.6-2.1"
release: "Debian 12 (Bookworm)"
platforms: ["linux"]
url: "https://new.carta.tech/modbus_get_float_cdab"
---

# modbus\_get\_float\_cdab(3)

get a float value from 2 registers in CDAB byte order

## NAME

modbus\_get\_float\_cdab - get a float value from 2 registers in CDAB byte order

## SYNOPSIS

**float modbus\_get\_float\_cdab(const uint16\_t \****src***);**

## DESCRIPTION

The **modbus\_get\_float\_cdab()** function shall get a float from 4 bytes with swapped words (CDAB order instead of ABCD). The *src* array must be a pointer on two 16 bits values, for example, if the first word is set to F147 and the second to 0x0020, the float value will be read as 123456.0.

## RETURN VALUE

The function shall return a float.

## SEE ALSO

[**modbus\_set\_float\_cdab**(3)](/modbus_set_float_cdab/3.md) [**modbus\_get\_float\_abcd**(3)](/modbus_get_float_abcd/3.md) [**modbus\_get\_float\_badc**(3)](/modbus_get_float_badc/3.md) [**modbus\_get\_float\_dcba**(3)](/modbus_get_float_dcba/3.md)

## AUTHORS

The libmodbus documentation was written by Stéphane Raimbault \<stephane.raimbault@gmail.com\>
