Analog Output follow up

You want your HMI to update on every scan (usually). Remember the SBR that I placed in your program is called by SP0 (1st scan only). You can call other SBRs from any set of conditions if you wish. For example you may call a different SBR to start the pump if the pressure drops below a certain point (not reccommended for this application). Generally SBRs are smaller "sub programs" that you may want to have executed only under certain conditions, and not all the time. When called by the GTS instruction the scan jumps to that SBR then returns (RT) to the rung under the last GTS executed.
 
The WHOLE PICTURE

Oh and forgot to metion it feeds a 300 gallon storage tank. Wich provides water for lawns in a gated community
Is this the application or a part of it? If you explain the whole application and what you want to happen it will help someone to help you skin this cat. You have 3 pumps, but how the water is used is going to determine how they should be controlled. So far we`re trying to read your mind and assume what you want to happen. And you know what this means. Check out GOTO which is a coil F5 and LBL F7 which is a box. You have to be careful with SUB that are called because if something is turned on in a sub and you jump out it can be left on with no way to turn it off if you are not careful. Don`t worry about scan time there is nothing here that is time dependant that i see. I believe the reason Mike said put that stuff in a sub is because once you load these values and get your program the way you want it you never need to see them again. Like when you add a pv you will use pointers for your pv to plc registers. One scan will load these and once the value is in the register it won`t change so it doesn`t need to be scanned every time. If it`s a watering project how many heads are going to be on at a time? What are all the different scenarios you can think of.
In your program where you are adding and subtracting. (Like in rung 20 and 21) you might as well say equal because it is going to add this value every scan until it`s not true and that ain`t gonna take long.
 
Last edited:
I can honestly say the info I gave was the info dumped on my lap. The job is on the other end of the state... and They are having me build the control panel, and desighn the program at the shop. Then go down at the end of the month and install.

I am fairly sure the program will work they way the customer has requested. Just want to make sure I dont have any unexpected suprises raise their ugly head.

The subroutine I understand why, just trying to wrap my pea brain around the mechanics of it. Well have to do further research, granted on this job really not a big deal, scan time isnt a critical issue. I would like the know how, for future jobs
 
BoxerBrats said:
..scan time isnt a critical issue.

I wouldnt count on that. Even in a short program, doing a lot of loads, Outs, Moves & math could trip the watchdog timer. Always use a sub to setup your presets. It's just better orginized, and faster execution.
 
Hmmm... I see some flaws... some seem fatal...

Boxer indicated that the tank is being pressurized by the pumps. His exact words were...

"counting on tank pressure" and "using pressure caused pressurizing the tank from the pumps".

Now, in as much as water is not compressible... the compression has to occur on something else... that something else would be "air".

Is this tank supposed to be Air-Tight??? It better be!

Boxer did not indicate the shape of the tank... so I am free to assume that the 300-Gal (40-cuft) tank is 40-sqft by 1-ft high... not much column pressure there. I'll ignore the column pressure for this discussion.

Has any consideration been given to monitoring the water level and knowing what the water level is when the tank is "at pressure"? In order to KNOW that the system is re-charging properly, you have to KNOW what the water level is when the system pressure is at set point.

There is a special relationship that exists between pressure and volume... this relationship is known as Boyle's Law. This law indicates the relationship between pressure and volume in a gas (This law assumes constant temperature. Charles' Law takes temperature into account).

P1 V1 = P2 V2

P1 and V1 are the initial pressure and volume.
P2 and V2 are the pressure and volume after a change.

The equation can be manipulated into a ratio...

P1 P2
---- = ----
V2 V1

In a nut-shell, this relationship indicates that a particular initial volume of air, at some pressure, is required to maintain a particular range of pressures over a range of changes in the volume.

Consider the following...The tank is 300 gallons. The pressure set point is 30-psi.

Let's say that when the tank pressure is 30-psi, the tank has 275 gallons of water.This means there are 25 gallons of air pressurized at 30-psi.

P1 30-psi P2
---- = ----
V2 V1 25-gal(air)


Now, if only one gallon of water is removed from the tank... that means there is now 26-gal of air... but, at what pressure?

P1 30-psi P2 28.8-psi
---- = ----
V2 26-gal(air) V1 25-gal(air)


By drawing off one gallon of water from 275 gallons (.36% of the available volume) the pressure drops by 4%.

What if 20 gallons of water is removed from the tank... that means there is now 45-gal of air... but, at what pressure?

P1 30-psi P2 16.6-psi
---- = ----
V2 45-gal(air) V1 25-gal(air)


By drawing off 20 gallons of water from 275 gallons (7.2% of the available volume) the pressure drops by 55.3%.

Now, let's say that when the tank pressure is 30-psi, the tank has 100 gallons of water. This means there are 200 gallons of air pressurized at 30-psi.

P1 30-psi P2
---- = ----
V2 V1 200-gal(air)


Now, if only one gallon of water is removed from the tank... that means there is now 201-gal of air... but, at what pressure?

P1 30-psi P2 29.8-psi
---- = ----
V2 201-gal(air) V1 200-gal(air)


By drawing off one gallon of water from 100 gallons (1.0% of the available volume) the pressure drops by 0.7%.

What if 20 gallons of water is removed from the tank... that means there is now 220-gal of air... but, at what pressure?

P1 30-psi P2 27.2-psi
---- = ----
V2 220-gal(air) V1 200-gal(air)


By drawing off 20 gallons of water from 100 gallons (20% of the available volume) the pressure drops by 9.4%.

Recapping...
*By drawing off one gallon of water from 275 gallons (.36% of the available volume) the pressure drops by 4%.
*By drawing off 20 gallons of water from 275 gallons (7.2% of the available volume) the pressure drops by 55.3%.
*By drawing off one gallon of water from 100 gallons (1.0% of the available volume) the pressure drops by 0.7%.
*By drawing off 20 gallons of water from 100 gallons (20% of the available volume) the pressure drops by 9.4%.

It can be easily seen that having less air in the system results in greater pressure changes as water is drawn from the system.

Here is an extreme example to drive the point home...

Let's say that when the tank pressure is 30-psi, the tank has 299 gallons of water. This means there is one gallon of air pressurized at 30-psi.

P1 30-psi P2
---- = ----
V2 V1 1-gal(air)


Now, let's draw one gallon of water from the tank... that means there is now 2-gal of air... but, at what pressure?

P1 30-psi P2 15-psi
---- = ----
V2 2-gal(air) V1 1-gal(air)


By drawing off one gallon of water from 299 gallons (.33% of the available volume) the pressure drops by 50%!

Let's try drawing 20 gallons of water from the tank... that means there is now 21-gal of air... but, at what pressure?

P1 30-psi P2 1.4-psi
---- = ----
V2 21-gal(air) V1 1-gal(air)


By drawing off 20 gallons of water from 299 gallons (6.6% of the available volume) the pressure drops by 95.4%... you are approaching a vacuum state!

The whole point of this exercise is to show that, if you are using a pressurized system, the ratio of air to water at the particular pressure really, really matters! Your system needs to monitor the level of the water at set point and it needs to be able to add air if the air is being lost.

Next issue... in the next post... The VFD

Hey Phil... the editors SUCK!!! WYSIWYG??? Not Hardly!
 
Now... the next issue... the VFD...

Consider this...

You plan on controlling the speed of the VFD relative to set point... as the pressure approaches set point you plan to slowdown the VFD...

As pressure increases you are planning to slowdown the VFD... as pressure increases, the load increases. Just as the load is increasing you are slowing down the VFD... the VFD has to work harder to continue raising the pressure while running slower and slower...

Picture this extreme example...

Let's say, just for the sake of this discussion, that you are using only the VFD to maintain pressure. As the pressure gets within a few pounds of set point the motor rpm is really low... something like 4 or 5-RPM... the actual rpm depends on the volume of the pump.

At this point the VFD is working harder than ever! This will be incredibly tough on the VFD and the motor! There will be absolutely no savings in this method!

You would probably realize better savings if there was a valve setup between the pump and the tank. As long as the pressure is low the valve is directed to the tank. When the pressure is adequate, the valve shifts and redirects the output from the pump back down the well.

Off course, this means that the pump motor will run continuously during those periods when water usage is expected. It could be shutdown during those periods when water usage is not expected.
 
I might be able to shed some light on the system operation for you.

Basic idea, the skid is designed to supply water to a sprinkler system. The jockey pump is used to keep static line pressure. The two main pumps are used to supply the sprinkler system water when the system is running. The pumps would have been sized based on the maximum number of sprinkler heads that would be opened at one time. The sprinkler controller opens the heads, the line pressure drops, the pumping skid starts pumping.

I think the “tank” is an accumulator, it’s main purpose is to alleviate surges when the sprinkler heads open and close.

This kind of pumping system is used on a lot of golf courses. The only problem with this kind of pumping station is that the right hand doesn’t know what the left hand is doing. The sprinkler controller just runs it’s programmed schedule. The pumping skid just knows, line pressure is gone, kick the main pumps on. Problem – What happens if there is a break in the line? The pumping skid takes off running.

So, the pumping skid isn’t pumping into a tank, it’s pumping directly into the sprinkler lines.

The VFD is used basically because you don’t know how many sprinkler heads will be opened at one time. It’s used to dial in the pump speed for however many heads are opened. Since the heads are opened in groups, the VFD should find it’s setpoint and run in that ballpark until the new group of heads open/close.
 
You described it very well... did way better job thab I did, so I apoligize for any confusion. Overall I keep going through my PLC program, al looks like it should work, just like you described. Thanks for your input.
 
This just goes to show what a wasted effort it is to quickly jump in and "guess" what the poorly described problem is really about.

Wouldn't it be interesting if questions had to be submitted for review (completeness, reasonableness, etc.) before they were posted for soliciting answers?
 
I am sorry, if the question was unclear.

The original question was if the program would work the way it was written. I built it to the customers request. I was not hired to evaluate system, and give my opinion. They had requested to operate a certain way. I had never wrote a analog program, wanted to make sure there was any errors in my ladder logic

But i DO APPRECIATE EVERYONES INPUT
 
Yea, I felt sorry for you Terry when I saw how much work you put into your posts. L

About your program. Looking at the PDF file, your analog card set-up doesn’t look right to me.

Should be

LD K202
OUT V700
LDA O2000
OUT V701
LDA O2010
OUT V702


Second, I would scale all the analog values, this makes it easy to view the data in the program, instead of having to convert.

To scale the analog input-

LD V2000
MUL K2000
DIV K4095
OUT V1210

V1210 will be 0 – 2000 or 0 to 200.0 psi

I would group logical memory locations together.

My setpoint values are VXXXX to VXXXX
My raw input/output values are VXXXX to VXXXX
My scaled input/output values are VXXXX to VXXXX

I can’t understand what you mean in the comment for Rung 2. “Load in value for pressure set multiplied 20.4 for BCD value” The reason I don’t understand is because when you use a LD instruction, the value you enter is in BCD. I would also remove the documentation (or update it) where you say PRESSURE SET = 120 psi = 2451 BCD, because for one you are actually entering K125 to that memory location, and it’s 125 BCD. If I were going to name the value in the documentation I would do it when the program was complete, so there’s no confusion. I would start the documentation as PRESSURE SET = XXX psi, so I wouldn’t forget to update it when the program was complete.

I would download the manual from AutomationDirect and read about the LD, OUT, and LDA instructions.
I would download the option card manual from AutomationDirect and read/re-read it.
 
Last edited:
About your program. Looking at the PDF file, your analog card set-up doesn’t look right to me.

Should be

LD K202
OUT V700
LDA O2000
OUT V701
LDA O2010
OUT V702

Ok forgive my ignorance, trying to learn as I go. by using the code would I know be assighning the pointer of the analog input to V2000, and the output pointer to V2010?
 
Yes
If this was a F2-4AD2DA card for a DL250 and you pointed to
LDA O2000 V2000 would be the first location to store your input data CH1 = V2000 CH2 = V2001 CH3 = V2002 CH4 = V2003. Then if you pointed to LDA O2010 for your output V2010 would be the first V memory location for your analog out CH1 out = V2010 CH2 out = V2011. The F2-4AD2DA card has 4 analog in and 2 analog out.
Hope this helps?

:site:
 

Similar Topics

Hello! Hope you are great. I need to make a change in a PLC with ladder logic. I will mount a analog valve and I need to control it in ramp up...
Replies
7
Views
275
I have a 170AAO92100 card that I am interested in using as a 10 volt output. Is there setup that I have to do in order to change output or simply...
Replies
0
Views
80
Hi We're having issues with an FX1N-1DA-BD Analog output module. We're using an metallic contamination sensor MCS 1000 to detect particles. This...
Replies
1
Views
101
I am having trouble with getting no control of my analog output signal. I am using the SCL function block to control my analog output. The logic...
Replies
11
Views
228
I have a program that I am gradually piecing together (my first program). There are 4 cascading timers that turn Y001 and Y001 + Y002 on and off...
Replies
8
Views
531
Back
Top Bottom