Table of Contents

COMPOSEDATETIME

Function name

COMPOSEDATETIME

ST call

PROGRAM COMPOSEDATETIME_DEMO
   VAR
     DT1: DT;
        Y,MILIS:INT;
        M,D,H,MI,S:SINT;
    END_VAR
 DT := COMPOSEDATETIME(YEAR := Y, MONTH := M, DAY := D, HOURS := H, MINUTES := MI, SECONDS := S, MILISECONDS := MILIS);
END_PROGRAM

Description

Returns value of DATETIME type, corresponding to combination of input time values entered as integers.

Inputs

Input TypeDescription
YEAR INT Input value
MONTH SINTInput value
DAY SINTInput value
HOURS SINTInput value
MINUTES SINTInput value
SECONDS SINTInput value
MILISECONDSINT Input value

Outputs

OutputTypeDescription
DT Output value

Application example