| 1 | # modbus_set_float |
| 2 | |
| 3 | ## Name |
| 4 | |
| 5 | modbus_set_float - set a float value from 2 registers |
| 6 | |
| 7 | ## Synopsis |
| 8 | |
| 9 | ```c |
| 10 | void modbus_set_float(float f, uint16_t *dest); |
| 11 | ``` |
| 12 | |
| 13 | Warning, this function is *deprecated* since libmodbus v3.2.0 and has been |
| 14 | replaced by *modbus_set_float_dcba()*. |
| 15 | |
| 16 | ## Description |
| 17 | |
| 18 | The *modbus_set_float()* function shall set a float to 4 bytes in Modbus format |
| 19 | (ABCD). The `dest` array must be pointer on two 16 bits values to be able to |
| 20 | store the full result of the conversion. |
| 21 | |
| 22 | ## Return value |
| 23 | |
| 24 | There is no return values. |
| 25 | |
| 26 | ## See also |
| 27 | |
| 28 | - [modbus_get_float](modbus_get_float.md) |
| 29 | - [modbus_set_float_dcba](modbus_set_float_dcba.md) |