Clock Management Functions (Real Time)

All Functions (Alphabetically)

Name

Description

day_time

Format the present date / time to a string.

DTAt

Generate a pulse at designated time stamp (date and time).

DTCurDate

Get the present date stamp.

DTCurDateTime

Get the present date and time stamp.

DTCurTime

Get the present time stamp.

DTDay

Get the day of the month from the date stamp.

DTEvery

Generate a pulse signal with long period.

DTFormat

Format the present date/time to a string with a custom format.

DTGetNTPServer

Read the NTP server address.

DTGetNTPSync

Read the NTP synchronization enable state.

DTGetTimeZone

Read the Time Zone.

DTHour

Get the hours from the time stamp.

DTL_To_LDT_Local

Converts a field-expanded calendar date and time (DTL), expressed in local time, to a long date and time (LDT).

DTL_To_LDT_UTC

Converts a field-expanded calendar date and time (DTL), expressed in Coordinated Universal Time (UTC), to a long date and time (LDT).

DTListTimeZones

List the time zones available on the controller.

DTMake

Builds the date and time stamps according to DT conventions.

DTMin

Get the minutes from the time stamp.

DTMonth

Get the month from the date stamp.

DTMs

Get the milliseconds from the time stamp.

DTSec

Get the seconds from the time stamp.

DTSetDateTime

Sets the local date and time.

DTSetNTPServer

Set the NTP server address.

DTSetNTPSync

Set the NTP synchronization enable state.

DTSetTimeZone

Set the time zone.

DTYear

Get the year from the date stamp.

LDT_Now

Reports the current system time as a long date and time (LDT).

LDT_To_DTL_Local

Converts a long date and time (LDT) to a field-expanded calendar date and time (DTL), expressed in local time.

LDT_To_DTL_UTC

Converts a long date and time (LDT) to a field-expanded calendar date and time (DTL), expressed in Coordinated Universal Time (UTC).


    • A real-time clock may not be available on all controller hardware models.
      See the controller hardware specifications for real-time clock availability.
    • PCMM2G does not reset the date and time when powered on.

Data Type Conversions

Name

Description

DTL_To_LDT_Local

Converts a field-expanded calendar date and time (DTL), expressed in local time, to a long date and time (LDT).

DTL_To_LDT_UTC

Converts a field-expanded calendar date and time (DTL), expressed in Coordinated Universal Time (UTC), to a long date and time (LDT).

LDT_To_DTL_Local

Converts a long date and time (LDT) to a field-expanded calendar date and time (DTL), expressed in local time.

LDT_To_DTL_UTC

Converts a long date and time (LDT) to a field-expanded calendar date and time (DTL), expressed in Coordinated Universal Time (UTC).

Format the Present Date / Time

These functions format the present date/time to a string:

Name

Description

day_time

Format the present date / time to a string.

DTFormat

Format the present date/time to a string with a custom format.

Read the Real Time Clock

These functions read the real time clock of the target system:

Name

Description

DTCurDate

Get the present date stamp.

DTCurDateTime

Get the present date and time stamp.

DTCurTime

Get the present time stamp.

DTDay

Get the day of the month from the date stamp.

DTHour

Get the hours from the time stamp.

DTMake

Builds the date and time stamps according to DT conventions.

DTMin

Get the minutes from the time stamp.

DTMonth

Get the month from the date stamp.

DTMs

Get the milliseconds from the time stamp.

DTSec

Get the seconds from the time stamp.

DTYear

Get the year from the date stamp.

LDT_Now

Reports the current system time as a long date and time (LDT).

Time Zone and Clock Synchronization

These function blocks configure the time zone and clock synchronization for the controller.

Name

Description

DTGetNTPServer

Read the NTP server address.

DTGetNTPSync

Read the NTP synchronization enable state.

DTGetTimeZone

Read the Time Zone.

DTListTimeZones

List the time zones available on the controller.

DTSetDateTime

Sets the local date and time.

DTSetNTPServer

Set the NTP server address.

DTSetNTPSync

Set the NTP synchronization enable state.

DTSetTimeZone

Set the time zone.

Triggering Operations

These functions are used for triggering operations:

Name

Description

DTAt

Generate a pulse at designated time stamp (date and time).

DTEvery

Generate a pulse signal with long period.