Stupid CLX Question

bobwithdana

Member
Join Date
Dec 2003
Location
california
Posts
239
I want to disable some logic on Weekends ? Using Contrologix Wallclock , I was thinking about starting say on monday and count everytime the day increments. Then disable the logic on Day 6 and 7. For Saturday and Sunday, Seems kind of stupid. Does anyone have any other ideas?
 
The basic idea's OK but if you're reading the day attribute remember that it doesn't always increment each day, it merely changes .

I usually disable logic at weekends too but that's a mental health issue, not directly due to PLC code. :)
 
Time out

Keep in mind that the CLX doesn't calculate the day-of-the-week (DOW), it only keeps track of the current day.

So your logic is going to depend on whether or not the PLC is ON when you see a transition change in days.

For example, say that you compare the Current_Day to the Stored_Day. If they aren't equal, you'll increment the DOW counter, and move Current_Day to Stored_Day. Standard, straightforward logic.

But if they shut the plant down on Christmas eve (Sat) including powering off the PLC panel, leave it off all day Christmas (Sun), and power the plant back up on the 26th(Mon), your PLC will notice that the date is different, and will increment the day by one. The PLC will think it's Sunday, when in reality it's Monday. Ouch.

It is possible to calculate the DOW from the date. There are a couple of methods. One is just to calculate the number of days since 1/1/2000 (a Saturday, I think), and do use a MOD instruction (if the CLX has one - I don't remember and don't have the software here at home.

On the other hand, you can add something to your Operator Interface that tells the user what DOW the PLC thinks it is, and allows them to adjust it. Then the Standard, straightforward logic is sufficient.
 
Alternative

Is there a reason you cannot add a selector switch either hardwired or to a panelview and just have the operator turn it off on weekends?

As for as using the wallclock, you could use a EQU block.

WallClock.day = 6 -----------() Turn Off Logic
WallClock.day = 7
 
A couple of points; the WALLCLOCKTIME.CurrentValue is the sum of the the CST.CurrentValue and the WALLCLOCKTIME.CSTOffset. The CST.Currentvalue is only reset when the battery is changed and should continue to accumulate even when the processor is turned off. (I say "should" here because it's one of those things that I've read in the documentation, thought "I see, so that's how it works" but never actually tried for myself; I stand to be corrected/humiliated)

The third element of the DateTime is day of month not day of week so simply looking for 6 or 7 isn't sufficient. Likewise don't try SSV-ing a value of 0 to it..... (also my previous point about it not incrementing, January 31'st isn't followed by January 32'nd)

Also, if you're going to count days, don't forget leap years :)
 
Thanks for all the help, OK so heres how I see it, The one thing for sure is that there is always seven days in one week, That never changes, Even with Leap year. My Processors are all UPS Backed up so there will never be a off processor.

Im thinking, The same way we would use timers and counters to convert seconds to minutes, Minutes to hours and hours to days. I will just simply enable my logic at 7:00am Monday morning and disable it on the 6th and 7th 24 hour periods. Over and Over. I will add this visual to the panelview just to make sure it never gets off.

Again Thanks to everyone.

Bob
 

Similar Topics

Been working with PLCs for a couple of decades, but almost 100% DirectLogic. Have a customer who wanted me to make a couple of simple changes to a...
Replies
3
Views
1,099
New to the EcoStruxure programming software (I'm an AutomationDirect guy) and I've been banging my head against the wall trying to figure out how...
Replies
2
Views
991
All Performed a managed ROCKWELL download before lunch. When it was finished it opened the file folder of were it loaded too. Customer called and...
Replies
4
Views
1,450
I have 3 valves that I need to open for 1 minute every 30 minutes, but not all at the same time. I have one TON timer (Start Blowdowns Timer)...
Replies
15
Views
4,583
I just quit my job lol 12 years of not being apricated and being treated like your nothing to them spending years learning new skills that saves...
Replies
50
Views
10,810
Back
Top Bottom