Is it possible to program this onto a Click PLC? If so, I need help anyway.

The code I posted sometime ago did just that (I think), it gets to setpoint, waits a few secs to sabilise, logs the actual at that point (pre-test), runs the time test, grabs the actual & logs it, the difference is the pre - post, not able to look at my code as I do not have it here.
 
The code I posted sometime ago did just that (I think), it gets to setpoint, waits a few secs to sabilise, logs the actual at that point (pre-test), runs the time test, grabs the actual & logs it, the difference is the pre - post, not able to look at my code as I do not have it here.


Yes.

OP's code did the same thing in a Post Test Check subroutine, but the rest of the code never did anything with the value obtained.
 
Which is why I was asking about the rate of pressure rise, PSI/minute, e.g. when the regulator knob was turned up to supply maximum air pressure. Because it is always going to overshoot. Then there is also the issue of noise, as @parky mentioned.

I guess my point is that the "right" way to do this is to record the maximum settled pressure several seconds after the pump stops. The the tolerance for drop during the timed test is twice the sensor noise (1σ? 3σ) plus the test tolerance below that maximum. Also, I am not sure it makes sense to have a SP+tolerance test; how could the pressure increase after the pump stops and the pressure settles: is this setup outdoors or otherwise subject to temperature change?

What is the pressure ratio of the pump?

If that is known, then, also with trial and error and testing, a target regulated air pressure setpoint could be calculated for the I/P transducer that would have the pump stall at or near the test pressure.

I found my specific pump model, the description on it says that it can "Stall at pre-determined pressure to hold that pressure without consuming power" and can be "Easily automated – many modification and control options" not sure exactly what that means or how, but I will do more digging on this pump.

The pump is a Haskel model 4B-14 liquid pump, the nominal ratio is 14:1 the actual area ratio is 16:1, I will do some research into how exactly we can calculate the pressure in system from the air driven pressure. If you guys have any tips for this that would be great, it would make the program way easier to make and scan/execute.

Here is the link to specs, https://fluidprocess.com/product/model-4b-14-liquid-pump/

(air drive pressure x air drive piston area = outlet (stall) pressure x driven hydraulic plunger area) This is when the pump stalls and stays at pressure. I will try and implement this equation into the last program you made @drbitboy.

I just need to make an equation. Since the area ratio is 16:1, the equation above would be (air drive pressure x 16 = outlet (stall) pressure), now time to code this in.
 
Last edited:
I found my specific pump model, the description on it says that it can "Stall at pre-determined pressure to hold that pressure without consuming power"...


I've been following this thread and almost asked this very question a few pages ago. We have some air-driven hydraulic clamp systems that work this way. The pump will stall at a certain output pressure that's related to the inlet air pressure. To control the outlet pressure, we adjust the air pressure regulator that feeds the pump.



That does seriously simplify your control scheme if your air pressure regulator setpoint can be adjusted by an analog signal. Especially if it's very repeatable and reliable. On our units, as the pump outlet pressure approaches stall, you can hear the pump slowing down. Your potential overshoot problem can likely be managed very easily by starting at an air pressure just below where you want it to end up and then sneaking up on it.
 
Cool!

The pump brochure says the pump will keep pumping at the nominal ratio (14:1), and of course stall must happen at the actual ratio (16:1) if not before.

E.g. for 200psig liquid discharge pressure, the air pressure needs to drop to approximately

  • (200 + 14.7)psia* / 14 = 15.3psig* to keep pumping
  • (200 + 14.7)psia / 16 = 13.4psig minimum to stall
* I am pretty sure the force balance is done in absolute pressure (psia) to include all forces: liquid discharge pressure is absolute and presses on only one side of the liquid piston; air pressure net result gauge pressure (psig) because 0psig = 14.7psia of that is affecting both sides** of the air piston.

** there is more area on one side than the other, but I am guessing that is a second-order effect.
 
Last edited:
I found some air-driven pump performance curves here, like the one below, so we could build a characteristic from that and model the system.

So, I edited your program @drbitboy and I made a huge change. The post you sent before helped a lot.
I got the area ratio of the pump I am using and its 16:1, so the air drive piston area is 16 times larger than the driven hydraulic plunger area.
Now using this equation, (Air drive pressure x Air drive piston Area = Outlet pressure x Driven hydraulic plunger Area) we can do some algebra to know how much pressure the transducer needs to receive the output pressure we need.

The air drive pressure is the Ip transducers pressure output so we can replace it in the equation.

Now we get this equation (IP transducer pressure= setpoint pressure/16) so now we can input this equation into the program and use it to pump to a certain output pressure.
Check rung 1 of subroutine 00 input map, I put that equation there and different percentage values to use later when trying to pump slow. We also don’t need a pump air cutoff valve because once the transducer reaches a certain pressure and stays there the pump stalls and the pressure stays the same.
In the subroutine 10 test logic I made huge changes to rung 4 because of the new way we can pump to pressure. This is not the best way to code this because the scans might be so quick that the transducer just shoots straight to the setpoint. I tried to code it to go to 20% then 40% until the transducer is at setpoint and output pressure is correct.

If anyone has more ideas on how to code rung 4 in the test logic, please let me know, because this code now will probably be too quick.
I will post the pdf now and when I get home later, I can post the actual click file. Thank you so much @drbitboy for making me save time. If I did not realize this, I would probably have a lot of pain later when trying to implement the old code on the actual system.

I definitely need more help in finding a way to pump to pressure, because the way I did it surely won't work, and it will cause damage on the transducer because its jumping from one pressure to another. We need to smoothly gain pressure and slow down once it's close to the inlet pressure we want. I am definitely not done with this but at least I have an idea of how it's going to work.

Also my pressure transducer says its output is 3-120 psig for a 4-20mA input

https://online.flippingbook.com/view/624021369/
 
Last edited:
I feel bad now. If okie is really making that program then the way we pumped to pressure setpoint is going to be worse then what method we have now, hopefully it will be easy to edit in the new way.
 
Try Beauforting Rung 4 of Subroutine 10.

I don't think DF10 will end up at any value other than the 20% value in DF25, unless you go in and manually change it.

Also, two of those branches can never evaluate to True (unless the HMI SP is negative, in which case three of them can never evaluate to True;))
 
Try Beauforting Rung 4 of Subroutine 10.

I don't think DF10 will end up at any value other than the 20% value in DF25, unless you go in and manually change it.

Also, two of those branches can never evaluate to True (unless the HMI SP is negative, in which case three of them can never evaluate to True;))

Lmao idk why I don't realize that. Since my outputs to the transducer is 20%,40% and so on this will not work and will just be stuck in a loop. Do you know any other way to slowly increase the analog input until it reaches the point we want, if so I do not even know where to start, I thought we could input only set values? You want me to convert the transducer setpoint from psig to psiA right? or should I convert the pressure setpoint in the test to psig?
 
Last edited:
Lmao idk why I don't realize that. Since my outputs to the transducer is 20%,40% and so on this will not work. Do you know any other way to slowly increase the analog input untill it reaches the point we want?


Yes, you want to set the analog output from 20mA (full air pressure, maximum pump rate) before (time) and until (time) the liquid pressure is at some offset near SP, and then decrease the analog output linearly with pressure down to stall (SP/16 - 0.919) at (time) around SP+10psi.

The problem then will be detecting when the pump has stalled so you can measure the pressure at start of test.
 
The algorithm in Post #74 is mathematically viable, but whether it works in practice will depend on the relative magnitudes of time constants in the system.

Let me do some more research on transducers, maybe it won't damage or hurt them if we jump from one pressure to another. Maybe the transducer was designed to go from 0 to max pressure in an instant. If so then I can use the method I used but this time with values in between 0 and 20%. I am not sure if the scan time of the PLC will affect how fast this goes, I feel like the scans will be so quick that each percentage will be evaluated in less than a second or 2 and the transducer will go to straight to pressure setpoint. I am not sure if the pump can handle that but I don't think so. A manual operator slowly turns the knob so it's probably best if I slowly increase the value.
 
A manual operator slowly turns the knob so it's probably best if I slowly increase the value.


Okay, I keep asking this: how long does it take to get up to some pressure? Minutes? Seconds?

Does the operator tweak the knob, then wait (how long?) for it to settle, and repeat?

If it's a pressure regulator, then I don't think it matters how fast it is turned, and the only reason to turn it slowly is to avoid too much overshoot when approaching from below.

If I were the impatient operator, I would have the regulator set to max, and then when it gets close I would turn it to 0 quickly, over time and experience I should be able to gauge the in-flight.
 

Similar Topics

Hello. I have been trying to crack this one without success and could not find any hint after several search attempts. I wonder if any CODESYS...
Replies
4
Views
3,925
Hello, I'm pretty sure I know the answer to this, but wanted to verify with the experts. Am I able to write a program using the Micro Starter...
Replies
7
Views
3,158
First off, i am new to ladder logic. I do have some experience programming microcontrollers in C. I will try and give a short version and if more...
Replies
7
Views
2,014
This is a CompactLogix L33ERM, version 30 (31 is too unstable on my machine to work with), with a Kinetix 5500 drive. I have a program where...
Replies
2
Views
2,003
Good morning guys! I have a doubt. I uploaded a program from a S7-200xp on the field and took it to the office. Before doing any test I tried to...
Replies
7
Views
2,155
Back
Top Bottom