Skip to main content

7.13.6 SPLIT_TOD

Function

Split the time TOD type data into four integer data outputs of HOUR, MINUTE, SECOND and MILLISECOND

LD graphics

SPLIT_TOD

Parameter description

Interface variableDeclarationData typeDescription
INVar_TodTODTime type
HOUROut_PutINTHour
MINUTEOut_PutINTMinute
SECONDOut_PutINTSecond
MILLISECONDOut_PutINTMillisecond
  • If the input value is illegal, all output values are 0

Example

  • An LD example is shown in the following animation:

SPLIT_TOD_GIF

  • ST example is shown in the following code:
SPLIT_TOD(
IN:=IN1,
HOUR=>OUT,
MINUTE=>OUT2,
SECOND=>OUT3,
MILLISECOND=>OUT4
);