This shows you the differences between two versions of the page.
Next revision | Previous revision Last revision Both sides next revision | ||
sdk:castint2float [2017/06/14 12:48] juraschek created |
sdk:castint2float [2017/06/14 12:54] juraschek |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Cast ====== | + | ====== Cast two integer into one float ====== |
Sometime there are 32Bit Float Values stored in 2 16bit Modbus Register. | Sometime there are 32Bit Float Values stored in 2 16bit Modbus Register. | ||
Line 23: | Line 23: | ||
mputint(mem,0,tempint); | mputint(mem,0,tempint); | ||
tempfloat=mgetfloat(mem,0); | tempfloat=mgetfloat(mem,0); | ||
+ | free(mem); | ||
</code> | </code> |