Overloaded conversion to DOUBLE INTEGER
This instruction converts a value of any allowed data type into a value of the data type DINT.
Input
Value to be converted
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
diValue: DINT:=0;
uiValue: UINT:=0;
bStart: BOOL:=FALSE;
END_VAR
When the variable bStart is set to TRUE, the function is carried out.
BODY
WORKSPACE
NETWORK_LIST_TYPE := NWTYPELD ;
ACTIVE_NETWORK := 0 ;
END_WORKSPACE
NET_WORK
NETWORK_TYPE := NWTYPELD ;
NETWORK_LABEL := ;
NETWORK_TITLE := ;
NETWORK_HEIGHT := 5 ;
NETWORK_BODY
B(B_VARIN,,uiValue,11,2,13,4,);
B(B_VAROUT,,diValue,19,2,21,4,);
B(B_CONTACT,,bStart,5,1,7,3,);
B(B_F,E_TO_DINT!,,13,0,19,4,,?DEN?D?AENO?C);
L(1,2,5,2);
L(7,2,13,2);
L(1,0,1,5);
END_NETWORK_BODY
END_NET_WORK
END_BODY
IF (bStart) THEN
diValue := TO_DINT(uiValue);
END_IF;