Need a Ladder logic Algorithm for AD 260 CPU

piscis

Member
Join Date
May 2003
Posts
241
I have a 55 Gallon Drum with a PPM sensor inside it. I need to pour water and 3 Concentrates until the drum is filled, indicated by a level sensor. I also have an inline Water flow 4-20ma transmitter.



The liquid Ice Tea concentrates, are poured into the drum according to the each customer’s ratio and PPM selected in the EZ-Touch.



For the sake of this argument let’s say that the customer selects 1,200 PPM along with this ratio;

100% PART A

50% PART B

25% PART C

At the same time the water solenoid opens I also start the 3 peristaltic pumps for parts A-B-C. I can easily take care of the ratio by timing the ON time of each peristaltic pump. 100 seconds for part A, 50 seconds for part B and 25 seconds for part C.

The real challenge comes when trying to meet the 1,200 PPM. Since the strength of this 3 Ice Tea concentrates constantly changes with each batch I need a way to teach the ladder logic how to best prepare this recipe and reach the PPM level required with a plus o minus 5-10% PPM margin of error.

Does anyone have an idea on how to best do this logic?
 
You need to calculate the ratio between PPM and the seconds timing of your pumps. You will do this in your lab, then enter the PPM correction factor into the EZ-Touch.
Use it as a multiplier. Lets say the correction factor is 1 (no error). 100% = 100 seconds * 1. If it' less, say .8, then the formula is 100% = 100 seconds * .8.
Do this in whole numbers (make .8 800) so you can use BCD with the EZ-Touch. Divide by 1000 in the PLC. Depending on your ratios, you may need to invert the math, or just calculate the inverse before entering it into the EZ-Touch.

What your doing is creating a linear correction factor to modify the pump times. You may need 3 correction factors, 1 for each pump.
 
Keithkyll:

Thanks for your answer. The customer does not have a lab available therefore this “correction” has to done by the PLC online as the 4 liquids are being pump.

Another thing, all 3 concentrates must be treated as one once they are pumped into the mixing drum in the ratio called for.

This is what I had in mind.

Since the drum has 55 gallons capacity let’s just say that I pump only 10 gallons of water along with the ratio selected; 100 / 50 and 25 seconds worth of Parts A-B-C. Once I do this I will instruct the PLC to take a PPM reading which, lets say is around 200 PPM.

Having done this small batch run I now know the PPM reading per each 10 gallons water mixed with that concentrate strength in that specific ratio.

Question:

Keithkyll, now knowing this information, how can we tie your “linear correction factor” idea with this Small Batch Test Run?
 
I am probably late and slow with this response but I attempted to understand the process and could not. I am not sure you have the process fully defined enough to determine what to do. Let's see if we can work out more details to fully understand what is happening.

For the sake of this argument let’s say that the customer selects 1,200 PPM along with this ratio;

100% PART A


50% PART B

25% PART C
Does this mean that the "parts" will be added at a selected perecentage of 1200 parts per minute depending on the ingredients involved?

The part that has me confused is where does the 1200ppm come from and what is it in relation too? i.e. are you adding water at the rate of 1 gallon per minute and the associated ingredients are divided into smaller units which are called "parts"?

Another part that confused me is you want to add ingredients at a rate of 1200 parts per minute but used a timing value of 100 seconds which is more than a minute. This part confuses me because the pump should be capable of adding the ingredients at the rate needed i.e. if you need 1200ppm then it should be able to apply it in 60 seconds or less.

Keith offered a good simple solution but I can not tell if it applies..as is.

You need to determine flow rates, timing, and amount of ingredients per unit; example if flow rate is 1 gallon per minute do you need to add the 1200 ppm (or pecentage) per gallon?

It may just be me but I believe you need to define the process in more detail then you, and some of us, will better understand what is needed.
 
Rsdoran:






Thanks for getting into this friendly discussion. I will clarify what PPM means.



Whenever you add a concentrate into pure water the parts per million of that substance you added is measure in PPM. Whenever you add the 3 Ice Tea concentrates they will influence the pure water just the same way Kool-Aid will influence taste when you mix it into a cup of water, too little Kool-Aid will make the taste too watered-down and too much will make it too strong or perhaps sour.



In this application each batch made will always be 50 Gallons capacity. Each customer will decide how strong or how light each Ice Tea batch will be and the way they do that is by selecting first the RATIO (how much of part A-B and C) and the final concentration of the entire batch, which is measure by PPM.



The ratio of parts A-B-C will always be measure in percentages of each other and the PPM will always be measured based on 50 Gallons of pure water.



As I’m pouring pure water into the tank I’m also pouring the 3 concentrates using the selected ratio, while I’m doing this a pump is mixing the ingredients (recirculation). As the tank is filling to capacity I’m constantly measuring the PPM concentration and will make adjustments accordingly until I reach the 1600 PPM the customer requested.
 
Since I do not know, before hand, the strength of the 3 concentrations I need to device a way for the PLC to perform a small batch (10 Gallons perhaps) and figure out how much PPM this small batch resulted in.



Performing this small 10 gallons batch before each run will make for a more precise batch batching sequence.



Example:



Operator request 1,600 PPM with a ratio of 100/50/25 of part A-B-C, then he pushes the start button. The system performs the small 10 gallons batch and the reading of PPM is found to be at 225 PPM. Now I need to finish the remaining 40 Gallons to finish the entire 50 Gallons batch.



QUESTION:



What math logic do I need to use to figure out the ON cycle of each Concentrate pump in order for me to reach 1,600PPM? (Assuming that for the small 10 gallon batch run the ON pumps where 100/50/25 seconds respectively)



Any help will be appreciated.
 
Just a quick observation: if the concentrations of the 3 parts are not known and vary, then you will need to measure them in some way to ensure you meet the recipe criteria. You will also need to know the maximum and minimum concentrations possible to ensure you can always achieve the required ppm.
 
OK the parts per million clarifies one point, I was not sure if you meant per million or per minute.

Lets see if I understand the ratio aspect now. If 1600 PPM is chosen then;
PART A is 1600 ppm if 100% is chosen?
PART B is 800 ppm if 50% is chosen?
Part C is 400 ppm if 25% is chosen?
Have I got this part right? OR?

Here is the part I am still unsure of, parts per million in relationship to what? i.e. 1 millionth of a gallon OR? is it 1600ppm of the 50 gallons of water used?

The problem with what you are asking is the relationship(s) involved have not been stipulated. How fast is the water added to the drum? How fast can the ingredients be added to the drum? What are the flow rates involved?

In other words you should be able to establish a mixture rate that would be closer than adding 1600ppm and reading 225 ppm usually within the +/- 5-10% you stated.

Once you get your mix rates to match you could take readings at 5 gals, 10 gals, or whatever is needed and either slow the mixture or add to it as needed to come closer to the specification.

Are you capable of measuring each ingredients PPM after it is mixed in the water? I am still unclear as to whether the "tested" PPM is a total of the ingredients or individual ingredients.

I am not sure I am explaining this clearly. I am going to try something though.

Lets say the mix is per gallon, that means 1 gallon will have 1 million parts and PART A is the TEA concentrate and per this 1 gallon 1600 ppm must be added.

In this example for simplicity lets say the water can be added to the drum at the rate of 1 gallon per minute and the PART A ingredient could add 6000 ppm per minute. In this situation you would have PART A at 1600ppm pump for 16 seconds.

I did not understand if the PLC would get the tested results or not, if it does and the PPM of an ingredient is too high then the PLC could automatically adjust the timing of the ingredients.

I still do not have the precise process understood but hope what I am saying can help.
 
Last edited:
if the concentrations of the 3 parts are not known and vary, then you will need to measure them in some way to ensure you meet the recipe criteria

You hit the nail in the head. This is precicely why doing the small 10 Gallon batch is necessary to determine the strength of the 3 concentrations which are not known at the time of the Machine Batch Cycle.

Thanks
 
You need to measure the spicific gravity of the concentrations. Run the material through a flow chamber that contains a float & ultrasonic level sensor. The ultrasonic level sensor will allow you to compensate for small changes in level. The position of the float will give you a running analog value of the spicific gravity (concentration).
 
Rsdoran

It is 1600ppm of the 50 gallons of water used.

“How fast is the water added to the drum? How fast can the ingredients be added to the drum? What are the flow rates involved”


There is not need to know this information; it will only clutter our thinking.

[QUOTE
Are you capable of measuring each ingredients PPM after it is mixed in the water?

[/QUOTE]

Next to impossible!



OK!
Here is the Math so far and with some help from you guys we might be able to figure the ladder instructions needed for this batch cycle.

To avoid more confusion lets take one ingredient only.

If I turn ON only the pump for “Part A“ for 100 seconds and poured this ingredient into 10 gallons of pure water and then take a reading of the mixed solution and find that this reading is 225 PPM.

How long do I have to let the pump run for “Part A“ in order for the batch to reach 1,600 PPM?
 
I think I know what you're getting at... lets see if I can help some.

Assuming the three pumps you are using for your additives pump equal amounts per time then the ratio between your three additives can be controlled by how long you let each additive's pump run (this is what you are saying with 100s, 50s, 25s). The total of the three parts' percentages should always be equal to 100%. So if Part A is 100% then Part B and Part C must be 0%, but if Part A is 50% and Part B is 20% then Part C must be 30%.

Now, if I understand you correctly, the PPM (parts per million) is the total ppm of additives in the mixture. So if the customer stipulates
1600 ppm
Part A = 50%
Part B = 20%
Part C = 30%
then in your final mix of 50 gallons you should have 1600 ppm of additives and they would break down like this:
Part A = 800 ppm (50% * 1600)
Part B = 320 ppm (20% * 1600)
Part C = 480 ppm (30% * 1600)

If what I've described is correct then I think I can help you get the logic down pretty easily.
 
I think the % sign is throwing you off Ron. This is what I THINK he means.

A ratio is selected:
4 parts A
2 parts B
1 part C

Then these ingredients are added to the water at this ratio until a concentration of 1200 ppm is reached.

The ppm term is usually used for very small concentraions, that are typically well below 1%, for example 1000 ppm = 0.1%, so 1200ppm would = 0.12% by volume.

So in the example the goal is for the 50 gallon drum to have 99.88% water and .12% of ABC ( in the specified ratio)
 
Forgot to ADD this:

"How long do I have to let the pump run for “Part A“ in order to reach 1,600 PPM in the remaining 40 Gallons batch?
 

Similar Topics

I need to know how to take a schematic like this and solve it for let’s say a run time of 5 seconds By solve I mean determine which rungs are...
Replies
33
Views
9,099
Hi all, Please understand that I am not good at English. I have plan to project with one of our customer have the Ls XGB-XBC-DR60SU PLC. This PLC...
Replies
1
Views
1,478
Has to be implemented on CX Programmer Under PAHH conditions the logic solver closes the S-ESD inlet valve and keeps the S-ESD outlet valve open...
Replies
4
Views
2,420
Draw the print/ladder diagram of the following pneumatic limit switch circuit: double acting cylinder, 2 position, 4way, double solenoid valve...
Replies
17
Views
4,376
hello all i am using siemens s7-200 plc and 4AI 2AO analog module i have a capacitor level transmitter in tank which have liquid in it so i want...
Replies
4
Views
1,965
Back
Top Bottom