Using PLC Clock Time in Omron PLC Programming

Almost every plc have the clock function that is we can get the time value in the plc data words. We can synchronize the plc time with the system time at the time of program downloading. PLC stores the value of time , day , Month and year in its internal data words. We already have discussed about the plc internal words.

Reading the Year/Month/Day/Time Value in PLC :-

Many a times while developing the plc logic sometimes it is required to use the time in program to perform a particular function. Also there must be situation when we need to operate a particular device on a Specific date and time. So all these things are possible in PLC , all we need is to find out the plc system words where these values are stored.

Here we will see the example of Omron PLC. One thing we should keep in mind is that the plc must have battery installed so that real time monitoring of Date and Time is possible. In omron PLC there are 4 system words for storing the value of Year,Month,Date,hour,minute and second.

A351 to A354 are the system words in Omron PLC which stores these values. See below for the complete detail.

A351.00 to A351.07 Seconds: 00 to 59
A351.08 to A351.15 Minutes: 00 to 59
A352.00 to A352.07 Hour: 00 to 23
A352.08 to A352.15 Day of the month
A353.00 to A353.07 Month: 01 to 12
A353.08 to A353.15 Year: 00 to 99
A354.00 to A354.07 Day of the week

00: Sunday, 01: Monday, 02: Tuesday, 03: Wednesday 04: Thursday, 05: Friday, 06: Saturday

So by seeing the above values in these system words we can get the exact Date and Time. We can compare the values in these words with our pre-defined DM words and make the plc logic accordingly. Also when we download the program in plc then for the first time we have to synchronize the plc clock with our system clock. See below picture.

Now for example take a situation that we need to operate a particular output to be on 8 pm 20 Dec 2012 and be on afterward. So for this we will use compare instruction and compare the A351 with #0 and A352 with #2020 and A353 with #1212 and when these conditions gets satisfies the output will be on. If you see properly then these condition will be satisfied exactly on 8 pm 20 Dec 2012.

We hope that this plc tutorial will help you to use the plc clock time in developing plc logic . If you still face any problem you can write us in comment section. Also you can subscribe to get all latest updates in plc programming.Subscribe to Automation-Talk by Email.