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.
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. Keep on Reading!
The click plc has a real-time clock that will allow us to control outputs based on a date or time of day. This real-time clock (RTC) can be set from the click programming software or through the program of the controller. Our programs in the click can use the following calendar and clock values:
SD19 – RTC Year – 4 digits (2021)
SD20 – RTC Year – 2 digits (21)
SD21 – RTC Month – (00 to 12)
SD22 – RTC Day – (00 to 31)
SD23 – RTC Day of the Week – 1 Sunday to 7 Saturday
SD24 – RTC Hour – (00 to 23)
SD25 – RTC Minute – (00 to 59)
SD26 – RTC Second – (00 to 59)
We will be using the RTC – Real Time Clock in a sample program. This program will turn on an output Monday to Friday from noon until 1 pm. It will also adjust for daylight savings time. Let’s get started. Keep on Reading!
A watchdog is a piece of code that will timeout when an error occurs in our program. It will usually cause the CPU (program/sketch) to stop or reset.
We will now look at the instructions for the watchdog timer in productivity blocks. This includes the Configure Watchdog, Start Watchdog, Stop Watchdog, and Pet Watchdog.
Our sample sketch will modify the P1000 Expansion Digital Inputs and Outputs Part 2 program by adding a watchdog timer.
Let’s get started. Continue Reading!
Time instructions in our productivity blocks programming (Arduino sketches) consist of runtime (ms), runtime (us), delay ms, and delay microseconds us.
We will be looking at each of these instructions that are available for our program using productivity blocks. Delay instructions in our sketches should be used with caution. They will pause our program for the delayed time, not allowing other parts of the program to function. We will be looking at this and the method to do the exact same delay functions without pausing your program.
A sample program will be discussed to demonstrate the time functions in our program. Let’s get started. Continue Reading!
Timers are present in just about every PLC program that I have seen. A timing chart is a secret behind understanding the timer that you need in your application. Making a timing chart before writing the program will ensure that all of the information will be accounted for. The secret to using timers is a good review of using these timing charts.
PLC Fiddle has three different timing instructions for us to use in our programs. On-Delay, Off-Delay, and Retentive Timers. We will discuss the timer parameters and the three different instructions. Our timer challenges will help you gain a good understanding of how timers work in the PLC. Let’s get started. Continue Reading!