Time based program

DBTech

Member
Join Date
Apr 2006
Location
US
Posts
5
I was asked by my boss if I could come up with a time based program. Its probably simple, but not being a programmer, i dont know where to start. I'll be using an Automation Direct PLC (not sure which one yet) to turn some compressors off and on at certain times of the day. I'll have to have an HMI as well and dont know how to really interface that either. I can handle the discreet I/O, its just the time and HMI thing. Any help or links would be greatly appreciated.
 
I don't know the AD range, but most modern processors have an internal clock.

There are many ways to do what you require, but I would imagine a compare statement is the way to go, the biggest issue would be getting the formats right between the HMI and PLC, so that they reflect the times correctly.

Shouldn't be that difficult, if you decide on the HMI, let the forum know, there is plenty of AD experience on here.

I am not sure whether it is even available down here?
 
Personally if I were in need of a clock, I wouldnt bother with the DL-05 & memory module combo, but go with the DL-06 for a few dollars more. Unless panel space is a serious consideration...

The HMI can plug into the 2ndary com port on the DL-06.
 
I can not offer an Automation Direct example but a year or so ago I did a project using a Micrologix 1200 and Panelview 300 Micro, that scheduled a chiller, that is similar. The instruction set from AB and AD is different so you will have to do a conversion but my example(s) may offer enough to get you started. I did most of this in one day and never got to finish the project but it was working as needed.

Look primarily at rung 5 and 13 for the scheduling process, it also offers the ability to manually start the chiller if needed.
 
DBtech,

Are these air compressors? If so, they are not usually actually turned off for a 3-shift operation, but instead are alternated at a set time each day, so that the the Lead Compressor becomes the Lag Compressor, and vice versa.
 
Lancie1,

Yes these are air compressors. The night shift is a skeleton crew so we dont need all of them running. Were just taking the trouble of manually shutting them off and on.

I havent begun to think about how to alternate them yet...o_O
 
Its funny, when you mentioned air compressors the first thing I thought of was a situation where all were not needed on 3rd shift..example; a dairy processing plant at night does not run production, that is when maintenance and cleanup is performed.

I have actually developed a system for that purpose but used their in house computers etc so did not keep a copy of the program.

I looked at the DL06 manual and the date and time are kept in Vmem locations, look at Chapter 5 page 171-2 http://web2.automationdirect.com/static/manuals/d006userm/d06uservol1.pdf

The equivalent, I think, to the AB EQU instruction for AD is ANDE, look in Chapter 5 page 28.

Alternate may depend on the compressors, in some cases one compressor may be much larger than the others and is always the primary. If the compressors are all the same size and able to handle the lighter load then too alternate you initially start with one then use a "WAS" bit to show it was last used.

As an example lets say you have 3 compressors, called 1, 2, and 3. Monday compressor 1 was "lead" compressor so runs all day/night. Tuesday the plc looks at what compressor "WAS" left running, 1 in this case, and sets 2 to run all day. Each time it sets one it resets the others "WAS" bit..ie 2 resets 1's "WAS" and 3 resets 2's "WAS" bit.

Using that method allows you to actually do more with little effort. A pressure sensor could also be incorporated to initialize the compressors as needed i.e. you want to maintain a constant 90psi, if the system pressure drops then add the next compressor.
 
What if the time is changed?

I came across some code very similar to the posted file a year go. The problem that I encountered, was that if the time was changed to before the current time, then the EQU instruction would not work.

ie. If The time was 10:05:22, and I wanted to start the pump, then I would have to enter 10:06 and wait, and the same if I wanted to stop the pump, if the time was 10:22:15, I would have to enter 10:23:00 and wait.

This setup had a auto/manual system, so the ability was there to stop it. The problem was, that this was not how the operator understood it.

I changed the code, so that it contained >= & <= statements, this was Omron.

I am not picking at the code at all, but I guess the way that the system that I had, I could of added a start & stop button to the HMI.
Also, by using >= & <= statements, if the desired operating time is in the middle of the night, with no-one there monitoring, and there is a momentary loss in comms, or something similar, or if this fault is reset by someone, they might not know the scheduling, and the system will not start.

Just my 2c, not judging, just sharing an experience that I had.
 

Similar Topics

I'm working as an engineer with a factory which uses mostly Mitsubishi(FX series) and Omron(CQM1H and CPM1A) plcs. Due to some improvement reason...
Replies
13
Views
13,100
Has any one been able to assign a program that will work with the CPU supplied and not with any other CPU, i.e. if you load the program on to the...
Replies
3
Views
7,132
We are having several yarn winders which are controlled by inidvidual plcs. Whenever program fails we reload the program using back-up tape, for...
Replies
3
Views
5,581
Hi I have a ifix 5.5 application where the operator opens a valve by clicking on a screen object. I can trace from object to data base that it is...
Replies
2
Views
49
Hi, I wanted to ask is there a way to have a visibility expression use the IP address of the HMI (Dynics, not PV) to show certain elements? The...
Replies
3
Views
224
Back
Top Bottom