Can we transfer DINT value through IEEE 754 standard to REAL?

If I use directly DINT_TO_REAL I will get value like the picture below:

But Customer want to get the value of IEEE 754 float:
3.6440908908843994
image

Do we have such functions?

Hi,

REAL is already IEEE 754, so no need to convert it.

Datatype REAL(FLOAT)

if you need to see the bit representation then just memcpy REAL to UDINT (or DINT or DWORD).

Hi,
if I understand this correctly the REAL value comes split up in two 2-byte values (gVar1, gVar2), maybe over a network.
These two values are combined into one 4-byte value (gDWORD) and should be shown as a REAL again.

Create a dynamic REAL vaiable (e.g. dREAL)
image
In the code use the “ACCESS” operator:

dREAL ACCESS ADR(gDWORD);

This is what we get
image

Thanks both are good ideas for this issue.