SPLIT_TOD - Extracts the fields from a TIME_OF_DAY value

Help Contents

Introduction

Extracts the following fields from a TIME_OF_DAY value:

Syntax

Informal Syntax:

SPLIT_TOD( IN, HOUR, MINUTE, SECOND, MILLISECOND )

Formal Syntax:

SPLIT_TOD( IN:=expression,
  HOUR=>variable, MINUTE=>variable, SECOND=>variable, MILLISECOND=>variable )

Parameters

ParameterTypeDescription
INTIME_OF_DAYThe time of day value to split into separate values.
HOURREF_TO INTThe date value extracted from the input value.
MINUTEREF_TO INTThe date value extracted from the input value.
SECONDREF_TO INTThe date value extracted from the input value.
MILLISECONDREF_TO INTThe date value extracted from the input value.

Return Value

None.

Examples

Example of an informal call:

VAR
    Hour, Minute, Second, MS : INT;
END_VAR

SPLIT_TOD(
    TOD#21:50:00.000,
    Hour, Minute, Second, MS )

The variable values after the SPLIT_TOD function call will be:

VariableValue
HourINT#21
MinuteINT#50
SecondINT#0
MSINT#0

Standards Compliance

Table 36.6a - IEC 61131-3 Third Edition.

Further Information

Date and Time Functions

For other date and time functions.

Glossary

For the meaning of terms used in Fernhill SCADA.