Real Time Clock Management Functions

Time Zone and Clock Synchronization

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

Function

Description

DTGetNTPServer

Read the NTPClosed "Network Time Protocol" A networking protocol for clock synchronization between computer systems. The PCMM2G can be configured to synchronize with public NTP time servers over the internet or a local NTP time server for networks that are not connected to the internet. 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.

Read the Real Time Clock

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

Function

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.

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.

Format the Present Date / Time

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

Function

Description

day_time

Format the present date / time to a string.

DTFormat

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

Triggering Operations

These functions are used for triggering operations:

Function

Description

DTAt

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

DTEvery

Generate a pulse signal with long period.


    • A real-time clock may not be available on all controller hardware models.
      See the controller hardware specifications for real-time clock availability.
    • The AKD PDMM and PCMM reset the date and time when powered-on.
      The reset is to Jan 1, 1970 00:00:00.
      The elapsed time from device power-on can be determined from the Real Time Clock functions.
    • PCMM2G does not reset the date and time when powered on.