Set an Output 90 days from now.

mbradford

Member
Join Date
Aug 2006
Location
Michigan
Posts
5
Hi, I'm using a AB SLC1200 and need to set a maintenance flag 90 days from the current date. I know there are date status bits but am not sure how to calculate the date 90 days from now. In a spreadsheet there are functions to take care of these calculations but I am not sure how to do it in a PLC.

So, in a nut-shell I want to:
1. Operator presses a button to indicate the beginning of a new 3 month period.
2. SLC/PLC sets a new date for service.
3. Track current date and notify operator 1 week prior to service.
4. Set an Output once date is reached.
Start over at 1 once the service is complete.

If you could direct me to some sample programs with something like this in it I would be very grateful.

Thank you,
Mike
 
I haven't used the SLC1200, but if it has a real time clock you could set a routine that would run whenever the day changed and increment a variable.

This may not be the most efficient way, but if you run the calculation, you'll still want to be checking for that interval to end and not be much more efficient either.

Is it SLC1200 or micrologix 1200?
 
Last edited:
Maybe you could calculate for hours. That might be easier.
90x24=2160hrs-service due
2160-(7x24)=1992hrs-week prior notice
 
I haven't used the SLC1200, but if it has a real time clock you could set a routine that would run whenever the day changed and increment a variable.

This may not be the most efficient way, but if you run the calculation, you'll still want to be checking for that interval to end and not be much more efficient either.

Is it SLC1200 or micrologix 1200?

Thank you, It is a micrologix 1200 and I believe it has a real time clock.
 
Thank you, It is a micrologix 1200 and I believe it has a real time clock.

Sqidge my previous post - the RTC is accessed through a Function File called, strangely enough, RTC
 
Last edited:
If your PLC runs continuously then I'd go the hour calc route and do a simple compare. Increment hours using one shot and RTC.HR = 0.

If the machine gets turned off regularly then this becomes more complex. You'd need to consider days in each month, leap years etc.
 
If the PLC ain't running the process that needs maintenance isn't either....

And how critical is the accuracy for a maintenance flag ?

I would just accumulate run-time hours in the PLC using a RTO timer, and not worry about the times it is shut down (for maintenance, lol).

Timebase 1S
Preset 3600
.DN = 1 hour

2160 hours = 90 days
1992 hours = 83 days - 1 week before scheduled maintenance

EDIT : The more I think about this, the more I'm inclined to say that the PLC shouldn't be telling the maintenance people... they should have their own schedules to work to. What if 10 systems flagged up for maintenance in the same week ? What if a program change needed a download on day 82 ? What if a processor fails and is replaced ? etc., etc. The only thing that is reliable is the maintenance departments own records, that way they can schedule their workload effectively.
 
Last edited:
EDIT : The more I think about this, the more I'm inclined to say that the PLC shouldn't be telling the maintenance people... they should have their own schedules to work to. What if 10 systems flagged up for maintenance in the same week ? What if a program change needed a download on day 82 ? What if a processor fails and is replaced ? etc., etc. The only thing that is reliable is the maintenance departments own records, that way they can schedule their workload effectively.

I agree!!
 
It's very common for CNC wood working machines to set a maintenance flag for the operator. Some times its for lube , filter cleaning and coolant checks. "Maintenance" comes in many forms.
 
It's very common for CNC wood working machines to set a maintenance flag for the operator. Some times its for lube , filter cleaning and coolant checks. "Maintenance" comes in many forms.

Everything I said in my earlier post remains true - if the controller is replaced, or the program is downloaded, the accumulated time is lost, so maintenance is delayed, possibly beyond what is required. That could damage the machinery.

Some people believe the PLC is the brain, but in fact it is just the muscle, and is easily pulled.
 
Everything I said in my earlier post remains true - if the controller is replaced, or the program is downloaded, the accumulated time is lost, so maintenance is delayed, possibly beyond what is required. That could damage the machinery.

Some people believe the PLC is the brain, but in fact it is just the muscle, and is easily pulled.

Whilst I agree that the machine itself shouldn't be the holder of its maintenance records, it is nice to have a flag to remind the operator that the interval has lapsed.

Whilst the PLC can easily be pulled, humans are humans and therefore make mistakes, so having a possible cross reference doesn't hurt.
 
Whilst I agree that the machine itself shouldn't be the holder of its maintenance records, it is nice to have a flag to remind the operator that the interval has lapsed.

Whilst the PLC can easily be pulled, humans are humans and therefore make mistakes, so having a possible cross reference doesn't hurt.

I think the only justification for a maintenance flag coming up is if it is for 90 working days elapsed, rather than 90 physical days. Anything other than that is just a waste of the operators time and attentions.
 
Thanks for the ideas. The maintenance schedule is not cut in stone so a few days one way to the other is not a problem. I decided to copy the day into an integer file at reset and compare that to the current day. Once they are no longer = I increment a different integer file and set the first one to the current RTC.day. I can then monitor the second integer file and once it has reached 80 days set a prep flag then at 90 days set a warning flag. I'll lose a couple of days if the slc is off (like on the weekend) but that will be okay since the machine isn't running anyway.
 
.... but that will be okay since the machine isn't running anyway.

So you are happy with a "running time", why not just use a one-hour RTO timer (3600 seconds) and a counter to count hours, both RTO timers and counters are retentive during power cycles, so will accumulate machine run-time better. BTW 90 days is 2160 hours.

For the odd occasion when the whole program and data has to be downloaded, losing the accumulated data, the maintenance schedule overrides.
 

Similar Topics

Hello Guys I am working on a small program for a baggage load/lift/unload system which was given to me in an interview once The Problem says...
Replies
1
Views
805
Hi all, I have a ABB ACS 550 VFD, and I'm reading current from the first analog output (AO1). The range I'm using is 0 to 66 amp, 4 mA to 20 mA...
Replies
8
Views
3,129
Hi there. I have a problem on a Q series mitsubishi QooUCPU. Here the ladder go. Ld sm403 Out t11 k2 Ld m200 and not l110w Ld m503 Ld not m504...
Replies
4
Views
1,437
Hi All, With AB RsLogix PID: What is the best way to reset the output to a specific value. For now i'm overwriting the PID.DATA[0] but i'm not...
Replies
9
Views
2,922
Hi I can't get the plc to set any output, I can Se the output is on in the program, but the output is not lighting on the front off the output...
Replies
2
Views
2,911
Back
Top Bottom