"rotating, sequencing, or cycling" of outputs ...

Ron Beaufort

Lifetime Supporting Member
Join Date
Jul 2002
Location
Charleston, SC
Posts
5,701
Greetings to all,

One extremely common request on the forum is for a program which will allow a certain number of devices (usually pumps, motors, or fans) to be "sequenced" or "rotated" so that wear and tear can be more evenly spread over all of the available machinery. That particular function isn't too hard to accomplish – especially if only three or four devices are involved. Beyond that, the logic gets somewhat trickier to write. And then invariably comes the additional specification that certain individual devices must be removed from the lineup occasionally for maintenance or other reasons. Gracefully handling that particular requirement is often the most challenging piece of the puzzle.

I've written the program that I've attached below as a foundation for further development and discussion. Basically I've tried to help answer some of the questions posed in the thread linked here:

http://www.plctalk.net/qanda/showthread.php?p=334570&postcount=1

(and in other posts by the same member) but I've also made a genuine effort to keep the project as "open" as possible in hopes that it will be helpful to more people in the future.

Basic program overview:

12 fans are used to cool an industrial process. As the input temperature increases beyond a certain setpoint, the fans are brought into operation one at a time. The greater the difference between the input temperature signal and the desired setpoint, the greater the number of fans which are placed in operation. As the temperature subsequently drops, the fans are "shed" (or turned off) one at a time.

The lineup of fans may be "rotated" (or "sequenced" – or "cycled") in order to achieve approximately equal wear on each fan. This rotation may be based on Day of the Week, Hour of the Day, Total Time in Service, and so forth - whatever is required by the individual application.

When required for maintenance or repairs, etc., individual fans may be marked as "bypassed" and thereby removed from the lineup list. This is done by marking a specific storage bit with a status of one. For most applications, this operation will be done with an operator's or technician's HMI device. Any fan which has been "bypassed" will not be called into operation – and the next fan in the lineup list will automatically compensate by serving as a substitute for the missing fan. Subsequent removal of the "bypass" marker (by putting a zero in the bit) will automatically reinsert the now-serviceable fan back into its normal position in the fan lineup.

To make the project as readable as possible, "Page Title" documentation has been provided to divide the program into separate functional sections. These are:

1. Rotate the fan lineup
2. Calculate the temperature difference
3. Decide how many fans we need to use
4. Make a list of the available (serviceable) fans
5. Assign each available fan to a specific control bit
6. Drive the field output devices on and off

This general programming approach is often referred to as "abstracting the ideas" – as opposed to the brute force method of "controlling the field outputs" rung-by-rung and branch-by-branch. Once a programmer becomes used to thinking along these "abstract" lines, programs which would normally be extremely complicated to write may be broken down into more easily manageable sections. You'll probably notice how simple all of the various rungs look – which consequently makes it much easier to describe the program flow with detailed rung comments.

Note that this program makes use of Indirect Addressing at both the "word" and at the "bit" levels. If you're not familiar with these concepts, the following RSLogix500 tips might help you understand and interpret the program logic.

From the RSLogix main menu select View/Properties/Comments. Experiment with the various selections for "Symbols" settings. Some selections work better than others depending on whether you're trying to get an "overview" or a "detailed" look at what's going on. Be prepared to switch between the various settings from time to time.

Also - from the RSLogix main menu select View/Properties/Address Display. Experiment with the "Display Value for Indirect Address" checkbox. You should also try "floating" your mouse (and holding it still) over various addresses in the program listing. The "Tool Tip" which pops up will often contain very helpful information.

Notice that a couple of "Custom Data Monitors" have been provided to make it easier to visualize the layout of the "bypass" bits contained in word B3:2 – and also the layouts of the "lineup" and the "available" files. A separate figure has been attached to this post to show an example of how these files are arranged.

Please keep in mind that this program has been developed not only as a basic foundation for a useful project – but also as an example for teaching purposes. In some cases the code could certainly be "tightened up" and the primary objectives might be accomplished with (for example) fewer rungs. In deciding upon the layout, I have tried to keep the main "flow" of the logic as straightforward as possible – mainly to allow for the easiest interpretation of the concepts involved. Another consideration has been to make future program modifications as easy as possible. I've also tried to stay away from certain "advanced" techniques in order to make the project as "portable" as possible between different types of processors.

For a simpler approach (which doesn't use Indirect Addressing) you might want to take a look at a program that I wrote some time ago. You'll find it at this link:

http://www.plctalk.net/qanda/showthread.php?p=65066&postcount=39

For people who don't have access to RSLogix500, a PDF printout of the VACPUMPS program is provided here:

http://www.plctalk.net/qanda/showthread.php?p=226769&postcount=61

Notice that only three devices are required in that older program – so the logic could be handled reasonably well without resorting to Recursive Loops and Indirect Addressing. On the other hand, handling 12 devices gets a little cumbersome without using some extra "tricks of the trade".

Finally, if you're really "into" this type of stuff, then absolutely the best way to get a handle on it is to simply load the program into a spare processor and experiment with how it works. I hope that you will find this material useful.

12fans_a.JPG
 

Attachments

  • 12FANS.pdf
    87.5 KB · Views: 533
  • 12FANS_RSS.zip
    19.1 KB · Views: 171
just finished working on one for 5 pump rotation however the end user had no RTC. This one had the logix added for down pumps and I also added more logix in case several groups were tied for the lowest Ron if you wouldn't mind looking it over I was thinking of adding SQC and SQL statements to reduce the number of rungs. This version is already making use of SQO

http://www.plctalk.net/qanda/showthread.php?t=49003

I'll have to admit your method is a lot more condensed than mine
 
My question or comment does not apply to
Remote sites or a back shift where there is no operator
Life safety systems such as in hospitals or utilities
Critical systems where it must run

With respect to which pump do I turn on to meet demand:
Do we really have so little faith in our employees that we cannot trust them to read an hour meter and select the unit with least run hours?

Is the total cost of developing these types of controls really cost effective?

What are you going to do when these automated circuits fail and how are you going to ensure your employees know what to do?

I hope it is true ONLY in novels where commercial plane pilots were unable to override computer controls and safely hand fly.

Many has been the time when I wished I could easily override automated controls just to test run a motor or jog a piece of equipment to another position.

Or am I just old fashioned nuc submarine sailor who had the ability to hand override almost any control function?

Dan Bentler
 
well it would be a poor design if there was no manual override switch but that can be handled with a bypass switch to turn on the pump or fan, Part of the problem we've found is that on multi pump systems ppl tend to run the same pumps all the time so they wear faster. But on the flip side having all pumps at equal wear can also mean multiple failures at the same approximate time. However despite that one or two of our applications benefict our plant as it aids the operator with having one less thing to baby sit. I guess it all depends on the application like most things. Either way there is an upside and a downside to pump\fan rotation
 
Greetings Dan ...

something in your post sort of "grabbed" me ...

Is the total cost of developing these types of controls really cost effective?

the little program that I posted handles the sequencing of 12 fans – and I had the logic completely done in less than two hours ... (and I'm certainly not the fastest programmer that I know of) ... now it's true that the documentation took about an additional hour or so – but I wanted to adequately nail down the ideas for people who are trying to learn what's going on ... in most "industrial" cases, the documentation would have taken far less than one additional hour ...

incidentally, the "time frame" that I'm talking about here is one MAJOR advantage to the programming approach that I used ... Copy and Paste is extremely easy to do when the rungs are laid out systematically ...

my point is that the development didn't really take all that long ... and (to tell the truth) I actually enjoyed putting it together after supper one night ... I don't get to do as much programming as I used to these days ... I sort of miss it from time to time ...

please don't misunderstand ... I'm not debating whether this type of "automatic control" is a "good thing" or a "bad thing" ... I just wanted to say that this little program didn't take much time to accomplish – and it seems to be a VERY commonly requested type of item on the forum ...
 
Ron

I had no intention of getting down on you.

I was addressing the big picture or concept not your application and for sure not your effort nor workmanship. Maybe I should have made it an independent post.

Dan Bentler
 
one thing I liked about Ron's program is that I never realized you could use an address such as
B3:2/[N7:45] as an input like he has on rung 24 its a rather neat trick
 
Time Proportioning PID - need help!

Ron,

Thank you for the post. It was very helpful. The links in the previous post regarding recursive loops and indirect addressing made life easier to understand the program.

These fans are run to control the water outlet at 28 Deg c.
Our client suggested that said the number of fans required are the number that keeps the fluid outlet temperature at the set point.

For example If the water comes into the unit at let us say 38°C they want to cool it by 10°C, to get 28°C (set point) outlet. The number of fans required to do this is a function of the load on the system, not the temperature difference (like we have done before).

If 12 fans are required to get down to 28°C then 12 fans need to be on, in our previous system only 10 would run. If the load is such that 6 fans keep to the set point then that is enough, if the temperature is below the set point then a fan needs to switch off if it is above the sets point another fan needs to switch on, until the temperature comes under control.

The above to me sounds like a Time Proportioning PID to maintain the temperature.

I managed to find some resources for Time Proportioning PID (from AB (1762-rm001c-en-p) and from this forum (Topic: MicroLogix 1200 and Time Proportioning PID by bernie_carlton)).

Could you / other members please advice how this can be achieved by PID? I have 12 digital outputs to control and I am a bit confused.

Thank you.
ragsncl
 
These fans are run to control the water outlet at 28 Deg c.

For example If the water comes into the unit at let us say 38°C they want to cool it by 10°C, to get 28°C (set point) outlet. The number of fans required to do this is a function of the load on the system, not the temperature difference (like we have done before).

The above to me sounds like a Time Proportioning PID to maintain the temperature.
Thank you. ragsncl

Rags
I think you need to get back to basics. You said
desired temp setpoint on outlet on cooler is 28.
number of fans is proportional to load (heat input)

Both are true.
heat (load) = flow x constant x delta Temp.

What is tolerance on your temperature setpoint?
What kind of equipment are you cooling and
how much does the rejected heat vary time wise?

The one thing I think you need to look at is whether or not the flow rate of the cooled medium is constant.
If so then it is fairly easy to do it -
# of fans is proportional to delta T only.

If you are varying flow ie number of pumps then it gets real complicated and you cannot control number of fans by delta T only. Number of fans could be considered proportional to number of pumps -- ASSUMING - pumps are equal capacity.

I do not think we can adequately help you without better understanding of the process and the equipment.

Dan Bentler
 
Greetings ragsncl ...

it will be interesting to see what the other forum members come up with, but personally I don't think that a PID (time proportional or otherwise) is going to help control the system that you've outlined so far ...

just to get us started, here's the BASIC idea of "time proportional" control ... in general, you end up with a signal which "flashes" ON and OFF ... (think of the flashing turn signals on your car – but the ON duration of each flash is adjustable) ...

I've attached a VERY BASIC time proportional control system below ... if you have a spare system, you could hook up something like a potentiometer to provide the RAW_ANALOG_INPUT signal – and then manually adjust the potentiometer setting to see how the circuit works ... note that I've assumed a raw input range of 0 to 4095 and scaled that to provide a range of 0 to 100 (as in percent) ... naturally you might have to change those values to match your particular system's hardware ...

as you increase the signal from the potentiometer the output should stay ON a larger percentage of time ... (longer flashes) ...

as you decrease the signal from the potentiometer the output should stay ON a smaller percentage of time ... (shorter flashes) ...

if this type of control looks promising to you, then you'll need to use a PID instruction to provide an automatic signal instead of the manually controlled potentiometer ... but that's ANOTHER step – which shouldn't be attempted until you make sure that this "time proportional" control strategy will work for your fan-cooled operation ...

here's where I think you're going to run into a BIG problem ... let's just say that you've got the PID set up and it's providing a time proportional (flashing) output signal ... the next question is WHAT are you going to flash ON and OFF? ... one fan? ... two fans? ... all of the fans? ...

I probably just don't understand how you're trying to set up the system you're working on ... maybe the other forum members will have more insight into what you've got in mind ... personally I just don't see how a PID is going to fit into the system that you're describing ...

now just for discussion, one way that PID MIGHT be useful would be to control the speed of your fans ... so far though, you haven't mentioned speed control at all – only turning one or more fans off or on to accomplish the temperature control ...

finally, you REALLY need to start another new thread to handle this latest topic ... most of the members who deal with PID aren't likely to see your most recent question since you've attached it under a topic with a title which is "non-related" to PID ...

tip: if you decide to experiment with the program that I've attached, use it to control an actual output address – and not just an internal bit ... the screen update is likely to give you a very hit-or-miss result – and confuse you ... it's much better to monitor the LED for one of your output addresses ... (you don't really need to wire up an output device – just watch the LED turn on and off) ...

PS Edit: I see that my distinguished colleague leitmotif has posted while I was typing - and that he goes along with what I have been trying to say ... specifically, we need to know a lot more about your system in order to give you detailed assistance ...

tpo.JPG
 
Last edited:
Something else to consider on cooling fans - especially those whose motor shafts are vertical is rain in the motor when not running. Yes I know the bearing are SUPPOSEDLY sealed and all that but here in Seattle where we get some rain we replace a lot of these motor bearings. A solution is to run these units singly or multiple on VFD to keep them spinning to exclude the rain. It would make more sense to me to put a roof over them but I am only maintenance - I even have the sense to wear raingear and need the job security anyway.

Dan Bentler
 
leitmotif, Thank you for your feedback. It was helpful.

Ron, I will have tried the program with the potentiometer (time proportional) and I dont think thats what our client might prefer.

Before posting my request here I had sent a detailed email regarding the wear and tear the pid might cause (even if it is time proportional). Now your response have confirmed this. I have a meeting today with client I will see how it goes.

Ron, I will start a new thread.

Many thanks for your thoughts/inputs.

ragsncl
 

Similar Topics

It's very embarrassing but when I can't come up with an answer fast, I do need all the help I can get. I have rotating cylinder. One output...
Replies
5
Views
1,560
Hello Gents, I was wondering if anybody on here has used unified faceplates to rotate a shape. I want to be able to rotate a shape 90 degrees...
Replies
6
Views
3,990
Lesson Motor 230VAC-1.2A-1700RPM-62.5PF I am having trouble understanding this. My motor rotates at 0vdc reference with the run forward command...
Replies
39
Views
11,677
Looking for a step control program that combines the features of a load sequencing control (3 element heater) with the traditional tasks. . The...
Replies
3
Views
1,815
I just started using AdvanceHMI software. I have two questions. 1. I'd like to make a main menu screen then the operator would select on of 15...
Replies
1
Views
1,622
Back
Top Bottom