Click Plus Real Time Clock Setup and Use

Click Plus Real Time Clock Setup and Use


The real-time clock on the Click Plus can now be more accurate. A network time service (NTP or SNTP) has been added to the Click Plus controller. This will allow the time to be synchronized with an internet time server or local network. Daylight savings time is quickly implemented with just a memory retentive bit that we can turn on and off based on the time change in the area.
Click Plus Real Time Clock Setup and Use
We will be setting up the network time service on our Click Plus. The real-time clock (RTC) will be updated via the internet time service. Daylight savings time and the RTC will also be programmed. This will be based on our previous Click Real-Time Clock post. Let’s get started.

Our entire Click series can be found here. All of the previous information for the Click PLC can be applied to the Click PLUS.
Previously we looked at the following:
Software InstallationVideo
Click Software Establish CommunicationVideo
MQTT CommunicationVideo
Data LoggingVideo
The programming software and manuals can be downloaded from the Automation Direct website free of charge.
Watch the video below to see the Real-Time Clock with Network Time Service on the Click Plus PLC. (C2-03CPU)

Click Plus Network Time Service

The specification for the RTC in the CLICK C0-1x series is a possible drift of 100s per month. Additionally, the cycle for updating RTC data to the SD register is 1s. Therefore, there is an error of 1s ± 1s in the timing of the display of data in the SD Register.

Click Plus now has a Network Time Service. (NTP (Network Time Protocol) or SNTP (Simple Network Time Protocol)) This synchronizes the date and time on the PLC with a network-based time service. This could be a public time server on the internet or a time server on your local network.
Click Plus Real Time Clock Setup and Use
On the main menu | Setup, select Network Time Service.
Click Plus Real Time Clock Setup and Use
This can also be called using the home screen menu. Select network time service under the CPU on the setup area.
Click Plus Real Time Clock Setup and Use
Enable Network Time Service: The Network Time Service must be enabled by checking this box before it can be configured or used.
Click Plus Real Time Clock Setup and Use
Port: Select a port from the available Ethernet ports on your PLC. The Network Time Service can run on either wired or wireless Ethernet ports. We have selected the WiFi WLAN port.
Preferred: Enter an IP Address or Host Name for the preferred Time Server. If a Host Name is entered, a DNS server must be configured for the port. Time.nist.gov is used as the internet time service.
Alternate: To configure a backup Network Time Server, check this box, and enter an IP Address or Host Name for the alternate Time Server. If a Host Name is entered, a DNS server must be configured for the port.
Scheduled Time Synchronization: To schedule updates at a fixed interval, enable this feature and select the desired interval. Synchronization can be scheduled:
– Every Hour at a selected minute
– Once per day at a selected hour and minute
– Once per week at a selected weekday, hour, and minute
– Each time the PLC is powered on and communication is enabled
Time Zone Offset: Network Time Servers return the time in Coordinated Universal Time (UTC). You must specify the offset to your desired time zone, in one of the following three ways.
– Use Register: Enter or select a DS or DD register that contains the desired time offset in minutes.
– Use Constant: Select a standard time zone from the dropdown list. The offset will not automatically account for Daylight Saving Time, as noted below.
Manual Time Synchronization: The Network Time Service will synchronize the PLC’s date and time when requested by setting flag SC120: Network_Time_Request.
Click Plus Real Time Clock Setup and Use
Calling the Data View we can monitor the RTC and network time settings.
Watch the video below to see the network time service in action on our Click Plus controller.

Click Plus DST

Daylight Saving Time (DST) changeover dates vary across regions and years, the Constant Time Zone offset will not automatically account for Daylight Saving Time. The system will adjust the offset by one hour to account for Daylight Saving Time while the flag SC121: Network_Time_DST is set.
Here is an example of setting this DST bit in the Click PLC.
Daylight Saving Time begins at 2:00 am local time on the second Sunday in March. On the first Sunday in November areas on Daylight Saving Time return to Standard Time at 2:00 am local time. When Daylight Saving Time begins, turn your clocks ahead one hour.
Click Plus Real Time Clock Setup and Use
Using the set and reset instructions you can see how we add or subtract an hour based on the DST.
Click Plus Real Time Clock Setup and Use
The Call instruction is used to call up the DST subroutine. Watch the video below for the testing of this logic in the Click controller.

Real-Time Clock Program

This is the same example that we did previously when we discussed the real-time clock on the Click controller.
Y1 output will be activated Monday to Friday from noon until 1 pm. It will activate lights in a lunchroom.
Click Plus Real Time Clock Setup and Use
Our example real-time clock is called with an unconditional run to the subroutine.
Click Plus Real Time Clock Setup and Use
When the day of the week is greater than 1 (Sunday) and less than 7 (Saturday) and the hour is equal to 12 then output Y001 is turned on.
We can test this circuit out by manually adjusting the real-time clock. Select Calendar/Clock Adjust… from the main menu | PLC.
Click Plus Real Time Clock Setup and Use
The top part of the Calendar/Clock Setup window will display the current RTC settings in the PLC. You can adjust the RTC to the PC (computer) clock or manually enter a value. Once the write to PLC button is selected the new time will then be placed in the controller.

Download the sample Click Plus program here.

Watch the video below to see the real-time clock in action on our Click Plus controller.

Click PLC Support Links
The Click PLC can be programmed using free Click programming software from Automation Direct. Here is a link to the software.
Version 3.00
Version 2.60
The entire Click PLC series prior to the Click PLUS release can be found here.
All previous posts and information are still valid with the Click PLC line-up.
YouTube Click Playlist
YouTube Click PLUS Playlist
Click and Click PLUS PLC Overview
Click and Click PLUS PLC Videos from Automation Direct

Watch on YouTube: Click Plus Real-Time Clock
If you have any questions or need further information please contact me.
Thank you,
Garry



If you’re like most of my readers, you’re committed to learning about technology. Numbering systems used in PLCs are not difficult to learn and understand. We will walk through the numbering systems used in PLCs. This includes Bits, Decimal, Hexadecimal, ASCII, and Floating Point.

To get this free article, subscribe to my free email newsletter.


Use the information to inform other people how numbering systems work. Sign up now.

The ‘Robust Data Logging for Free’ eBook is also available as a free download. The link is included when you subscribe to ACC Automation.


Leave a Reply

Your email address will not be published. Required fields are marked *