UDINT_TO_DATE

Unsigned DOUBLE INTEGER into DATE

UDINT_TO_DATE converts a value of the data type Unsigned DOUBLE INTEGER into a value of the data type DATE.

Parameters

Input

Unnamed input (UDINT)
Input data type

Output

Unnamed output (DATE)
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
		UDINT_value: UDINT:=232301234;
		DATE_value: DATE:=D#2001-01-01;
	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,UDINT_TO_DATE!,Instance,14,2,23,4,,?D?C);
B(B_VARIN,,UDINT_value,12,2,14,4,);
B(B_VAROUT,,DATE_value,23,2,25,4,);
L(1,0,1,5);
        END_NETWORK_BODY
    END_NET_WORK
END_BODY

ST body

DATE_value := UDINT_TO_DATE(UDINT_value);

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