WORD_BCD_TO_UINT

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.

Parameters

Input

Unnamed input (WORD_BCD)

input data type

Output

Unnamed output (UINT)

Conversion result

Example

POU header

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

LD body

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

Modified on: 2019-01-24Feedback on this pagePanasonic hotline