Counter Question

Kunjal

Member
Join Date
Nov 2002
Posts
3
The system I am trying to design is to control TWO PUMPS that turns on alternate to drain the TANK. The pumps only turns on when tank is at HIGH LEVEL and turns off when Tank is at LOW level. I am using a CTUD
STUD

(up and down counter) which upgrades every 0.5 sec, I wanna reset my counter at (highlevel-lowlevel). But the problem is that I am getting values of HIGH LEVEL and LOW LEVEL from user through panel in other words getting values from specified memory location. I can't figure out how to do math operation using SUB
SUB

to do (HIGH LEVEL - LOWLEVEL) and put the output to RESET input of CTUD. If u can suggest better way to approach my problem, pls help me. Thank You all.

I am new to this site and find it amazing. THANX once again.
 
As an intellectual exercise, your scheme is cute - but not very practical.
It reminds me of Rube Goldberg.

It seems that you are making this far more complicated than it needs to be.

What would do if you were the controller for the pumps?
What questions would you be concerned with?
What would you do in response to the answers you got?

You've two problems here...
1. Controlling the tank level
2. Alternating your pumps

Let's look at the first problem...
Basically, you have a tank. When the level in the tank gets to a certain point, you want to drain the tank... down to a certain level.

If you were the controller, what questions would you be asking?

1. Is the level high enough to begin running the pump?
2. Is the level low enough to stop running the pump?

Are there any other questions you might ask? The key here is to think very, very carefully about all of the details. While you are being the actual controller, what details are you watching for?

YOU MUST PUT ASIDE ALL ASSUMPTIONS !!!

When you decide that you should RUN the pump, what exactly caused you to think so? Are there any other reasons you might start the pump?

When you decide that you should STOP the pump, what exactly caused you to think so? Are there any other reasons you might stop the pump?

The primary reason, the reason for the controlled activity at all, is to automatically respond to the level conditions.

You can "see" that the level got to the high point. So you run the pump. And, you run the pump until when? You run the pump until you "see" the level at the low point.

As the controller, you can simply press a "run" button as long as the pump needs to run and then release the "run" button when the level indicates it is time to STOP.

You could also do this another way...
When the level is high, you press a "START" button, and release it. The Pump Motor starts and the Start circuit seals itself in until...? This maintains the RUN signal.

Then, when you see the level is low, you press the "STOP" button. This interrupts the RUN signal and disables the seal. The pump stops.

Are there any other possible conditions that would make you run the pump? How about a Manual indication as opposed to an automatic indication? Somebody tells you to run the pump until they tell you to stop. This might not be a real good idea, but if properly considered, it can work without damaging the pump.

So... You can "see". How does the PLC "see"? How can the PLC "see" the level in the tank like you do?

If the tank was made of glass, or if you had full view of the inside, or if there was a "sight-glass", you would be judging the level in an analog nature. That is, you would "see" that the level is so-high or so-low. You could even "see" how fast the tank level was changing AND in which direction! That is analog.

If, on the other hand, all you could see was a "flag" indicating level-too-high, and another indicating level-too-low, then you would be looking at the tank in a digital manner.

What would you do if you saw that the level was neither too high nor too low? Would you stop the pump if it was running? Or would you let the pump continue running, IF it WAS running?

You wouldn't know any thing about the true level.

This decision should be made under the concept of "dead-band". When you "see" that the level has gone too high, your intent should be to run the pump until the level goes just below too-low, then stop. Once the level begins to increase, don't do anything until you "see" it go too-high once again. Then, turn on the pump again and repeat the process.

How can this kind of control occur?

An analog sensor can actually "measure" the level. The signal from the sensor is a numerical value generated by "Analog Interpreter". The analog sensor controls an analog signal which might be in the form of 0-10V, 0-20mA, 4-20mA, or...? The Interpreter converts that analog signal into a number. You have to configure the Interpreter to produce the correct number. You then have to apply "scaling" to that number so that it "means something" to the process.

Once you have that number, you can write your code to examine the value and make judgements in terms of what to do, or not to do.

Alternatively...
You could have "float-switches", or something similar, to provide digital versions of the too-high and too-low signals.

The code for this is a lot easier. But then, you don't know the true level for most of the time. You would only know that it has just gone too-high or too-low, after which, the level would begin changing without knowing how much or how fast.

In this case, it becomes a matter of determining how often you can afford to have a pump go on-off-on-...etc. This will have an impact on the placement of the switches, ie, how high is too-high and how low is too-low in terms of tank capacity and pump duty.

Using alternating pumps relieves this concern, somewhat.

That brings us to the alternating pump problem.

How would you, as the controller, know which pump to bring on-line?

Basically, it's a game of "I ran this guy last, so I run this other guy next".

Can you see any possible exceptions? How about if a pump is taken out of service? How about if a mag trips out?

Chew on that for a bit... Over.
 
Thanx for your reply. Your tips are really helpful, i am trying to implement that to my program. I will let u know how I do. Thanx once again.
 
I figured it out

Thanx for your help, I got it working. Just had to play around for while., but now have program running and tested out...This board is really help ful.
 

Similar Topics

Hello! I have a question about a routine I found on one of our box palletizing machines. I've attached the 3 rungs that I have the question...
Replies
12
Views
2,220
Hi all, I'm converting a S7-200 program to S7-300. There's a counter being addressed as an open contact such as.... C1 --| |--- In...
Replies
2
Views
1,399
I am having an issue with a little Micrologix program. Counter 1 increments each time item passes sensor on input 0 When Counter 1 increments to...
Replies
4
Views
1,589
Hi, I'm using a Micrologix 1400 PLC as a dual counter and oil monitor. I've included the program. I need to know why the HSC:0 isn't accumulating...
Replies
2
Views
1,695
I'm translating a printout of a program written for an F1/F2 series Mitsubishi PLC to a Micrologix. I've stumbled upon something that I can't...
Replies
4
Views
3,730
Back
Top Bottom