Duration Literals

Help Contents


A duration literal represents an interval of time, which can be positive or negative. Duration literals begin with the prefix T# or TIME#. Following the prefix is sequence of duration values and units. For example:

T#12h15m represents 12 hours and 15 minutes.

These duration units can be used:


The prefix and duration units are not case sensitive. For example:

T#12h15m is the same duration as TIME#12H15M.

The underscore (_) character can be used to improve readability. For example:


Negative intervals are represented using the minus (-) character immediately after the duration prefix. For example:

T#-250ms represents -250 milliseconds.

Real numbers can be used for fractional duration values. For example:

Time#1.5h represents 1 hour and 30 minutes.

Standards Compliance

Table 7 - IEC 61131-3 Second Edition.

Table 8 - IEC 61131-3 Third Edition.

Further Information

Duration Functions

To learn about functions that use or return duration values.

Common Elements

To learn about other language Common Elements.

Character Codes

For a list of all Unicode character codes used in IEC 61131-3 code.


For the meaning of terms used in Fernhill SCADA.