Client wants to control pumps based on day of the week

defcon.klaxon

Lifetime Supporting Member
Join Date
Feb 2015
Location
Far NorCal
Posts
616
Hey guys,

I have a client that has a pump they want to control based on what day of the week it is. As in, on Monday have the pump turn on at a certain hour and minute, and then turn off at a certain hour and minute. Same thing on Tuesday, Wednesday, etc. Problem is, is it possible to determine what day of the week it is? HMI is Wonderware InTouch, PLC is Allen Bradley ControlLogix.

Unfortunately I'm not seeing anything that would indicate what day of the week it is, in either HMI or PLC. It sounds so simple on paper, but I'm seeing a huge amount of work to possibly make this work. Any ideas?
 
What I do, if the PLC is always powered on it is easier, is when the hour & minute are 0 for a ONS I add 1 to my day of week DINT. When it reaches 7 MOV 0 on the next branch.

At commissioning all I have to do is make sure the value is correct. Then I check the value in 7 rungs and set a bit "TodayIsSunday" or the proper day.

If the PLC is powered down overnight or over the weekend, you will have to program in some logic to know the last day you set the value and compare to the date at power up and change it enough times for the number of days off.

Or, have the value settable on the HMI and at power-up make the value -1 and if -1 don't change it or do anything looking at it until the operator sets the value.
 
Hello
Not sure how good these CLX are, but if it supports DATE_TO_ULINT then this function returns the day 1-7 are Monday to Sunday
Code:
funDayOfWeek := ULINT_TO_USINT((DATE_TO_ULINT(TheDate) / 86400 + 3) MOD 7) + 1;

Pp
 
RA RSLogix/Studio 5000 provides a DayOfWeek.L5X as part of their software Samples.
Check your local drive - C:\Users\Public\Documents\Studio 5000\Samples

It also includes logic adjustments for Leap Year as well as 400 Year Century.
 
Here's one I adapted from the Rockwell one. I import into all my projects.

It sets your day of week as a number and name.

Tells you what week number you are on too for that year.

May or may not be usefull for you.
 

Similar Topics

I used vmware converter to clone and backup a physical pc FT View client and now after removing vcenter converter and rebooting I am getting a...
Replies
0
Views
64
Hello, We have two stand alone FactoryTalk Site Edition clients running. Recently we've had a problem with FactoryTalk Linx on one of them. After...
Replies
1
Views
94
Hi everyone, I've got some trouble lately with a client and his communication with the server. I'm a beginner, and the project was not orginally...
Replies
0
Views
82
Hello, I'm working on a laptop that needs FactoryTalk Activation Manager installed on it as a host along with a Hyper-V VM client on the same...
Replies
0
Views
94
AssetCentre Client loads correctly on the server, but when going through another machine the client never presents a splash screen; however, it...
Replies
1
Views
143
Back
Top Bottom