using the real time clock module

Attached is a zip file for a ML1200 that I did recently. I used the RTC to start a chill water system on selected days at a set time. The operator could start or stop the system by setting the time(s)and day(s) thru a PV300 Micro.
 
Alot of questions like this I dont answer because I am not familiar with something that is used. This time I had recently done something similar to what was asked. I was going to do a screen shot of one line but thought....what the heck and posted the whole program. Its small and does just about what he is going to do. I didnt take it as a student project because of it being an ML with an RTC, I could be wrong though.
 
Hello All,

Sorry to be a pain but there are a coule of issues to address in order to improve rsdoran's code.

1) If the controller is down for a Minute when the scheduled time arrives the pump will not start that day.

2) Hour and Minute are used in order to detect start and stop times.

These issues should be addressed together.

A) Convert the Hour/Minute to a number between 0-1439 (the number of minutes in a day - 1)

B) Use Limits to command the devices to operate. Check if the current time is >= to the start time and <= to the stop time.

For example, if you want the pump to start at 9:30AM and stop at 1:12PM you'd compare the current minute of the day with the target times. If it was 12 noon for example those values would be:

9:30AM = 570
1:12PM = 792
12:00PM = 720

If you want to be tricky you can convert the time values to minute of the week and compare those values. This will allow you to configure a device to start on one day of the week and stop on another day of the week.

Good Luck,

(8{)} ( .)

(Yosi)
 

Similar Topics

OK let me first explain how I am doing something and then you can tell me how I can do it better. I move the current day, Month, Hour and Minute...
Replies
4
Views
7,701
Im using Omron CPM1A plc. is there a build in clock that i can call everytime i need to log a certain incident? If not can someone send me a...
Replies
3
Views
7,122
Hi all, I am currently working on my HNC project, for which I am designing a system for my place of work, which will reverse jet my silo filters...
Replies
4
Views
5,553
I'm writing some structured text that's handling a data structure that comes from a PC. The PC structure is in the "new" LREAL 64-bit floating...
Replies
3
Views
499
Hi fellow automation people, FactoryTalk View SE V13 Network I am trying to setup a generic popup trend where I can switch it between...
Replies
0
Views
188
Back
Top Bottom