Binary value of WORD into unsigned INTEGER
WORD_BCD_TO_UINT converts a binary coded value of the data type WORD into a value of the data type Unsigned INTEGER.
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
UINT_value: UINT:=0;
BCD_value_16bit: WORD:=16#2010;
END_VAR
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_F,WORD_BCD_TO_UINT!,Instance,11,2,22,4,,?D?C);
B(B_VARIN,,BCD_value_16bit,9,2,11,4,);
B(B_VAROUT,,UINT_value,22,2,24,4,);
L(1,0,1,5);
END_NETWORK_BODY
END_NET_WORK
END_BODY