DOUBLE WORD into REAL
DWORD_TO_REAL moves the bit set information of a DWORD variable to a REAL variable. The same functionality can be obtained using DWORD_OVERLAPPING_DUT.
Input
input data type
Output
Conversion result
All input and output variables used for programming this function have been declared in the POU header. The same POU header is used for all programming languages.
VAR
REAL_value: REAL:=0.0;
DWORD_value: DWORD:=16#4007F80D;
END_VAR
BODY
WORKSPACE
NETWORK_LIST_TYPE := NWTYPELD ;
ACTIVE_NETWORK := 0 ;
END_WORKSPACE
NET_WORK
NETWORK_TYPE := NWTYPELD ;
NETWORK_LABEL := ;
NETWORK_TITLE := ;
NETWORK_HEIGHT := 2 ;
NETWORK_BODY
B(B_F,DWORD_TO_REAL!,Instance,9,0,19,2,,?D?C);
B(B_VARIN,,DWORD_value,7,0,9,2,);
B(B_VAROUT,,REAL_value,19,0,21,2,);
L(1,0,1,2);
END_NETWORK_BODY
END_NET_WORK
END_BODY
REAL_value := DWORD_TO_REAL(DWORD_value);