Advice

Bob O

Member
Join Date
May 2003
Location
Posts
1,873
I am writing a program to speed up or slow down a packaging machine depending on the weight of product in the container. This machine can run at 42ppm. I am using a SLC 5/03 with a Hardy Waver Saver card, Hardy load cell and an AB Flex 40 drive.

The machine starts out in manual mode (The PLC does not control in this mode) during this time the operator adjusts the volume and the mixture until the container is full and the weight is close to the target (Operator enters this number). At this time the operator will switch the machine into Auto mode.

Inputs:
0-10 VDC from pot to control machine speed in manual mode.
4-20 mA from drive as speed ref.
Analog value from load cell
Target weight (operator enter this)

I am using the above inputs to adjust the machine speed based on this ratio:

(Actual Value from load cell/Target weight) *Speed ref. = New machine speed

This New Machine speed then replaces the Speed ref. in the above equation.

I have read the some of the other threads on PID and it sounds like this may be an application for it.

Any advice or suggestions are welcome

Thanks,
Bob
 
I've done a couple of similar projects. The method that seemed to work best was to:
fast feed to the slow setpoint,
slow feed up to a "flyweight" setpoint,
stop, stabilize and jog if necesary to reach the target weight.

The "flyweight" (a guess of what is in the air at sample time) would be automatically adjusted based on under/overweight condition after the slow feed.

When tuned properly this achieved very reliable, fast weighments.

-Thomas
 
Thank you for the reply but you lost me.
What is a slow setpoint and "flyweight" setpoint.
And when you say tuned properly I assume you are using the PID?

Thanks,
Bob
 
not a pid

Anyone can correct me if I'm wrong, but I believe pid controls are best used on continuous processes not batch processes.

Let's imagine the box is to be filled to 5 kgs.
The setpoint array might look like:

over weight 5.10 kgs
(target) 5.00 kgs
underweight 4.90 kgs
flyweight 4.80 kgs
slow feed 4.50 kgs

You could probably start feed in fast up to 4.50 kgs (slow setpoint).
Then feed in slow to 4.80 kgs (flyweight setpoint). At this point stop feeding and allow time to stabilize.
Evaluate for feedback to the flyweight setpoint. Use brief jog cycles if underweight to reach the target band.

The setpoint values of course must be empircally derived from how the material feeds. Feedback to the flyweight allows the machine to adapt to minor changes in the material or feeders.

This is just a very quick sketch of the idea

I'm sure there are better approaches, but this does work.
 
I would suggest avoiding PID control if you can. The best bet for a system like this is to carefully record the steps an operator would go through in manually controlling the process. Then emulate these steps in ladder logic. By using compares, time delays, and ratios you should be able to get control as good or better than PID with much simpler (i.e. more intuitive) tuning.
 
Re: not a pid

Thomas said:
...
Let's imagine the box is to be filled to 5 kgs.
The setpoint array might look like:

over weight 5.10 kgs
(target) 5.00 kgs
underweight 4.90 kgs
flyweight 4.80 kgs
slow feed 4.50 kgs

You could probably start feed in fast up to 4.50 kgs (slow setpoint).
Then feed in slow to 4.80 kgs (flyweight setpoint). At this point stop feeding and allow time to stabilize.
Evaluate for feedback to the flyweight setpoint. Use brief jog cycles if underweight to reach the target band.
...

Thomas, I think you are on the verge of re-discovering the concept of Fuzzy Logic... ;)
 
Personally I have no concept of fuzzy logic
BUT
Why does the "operator have to determine values"?

Why cant the weight decide the appropriate action?

I have worked on a few "sort" systems that had to weigh items and read barcodes to send to appropriate lanes for shipping.

I say take the "manual mode" away from the operator, use barcodes or weights to send to appropriate places...the weight(s) can react as fast if not faster than human intervention. Quantity may need to be an entered value in some cases.

I to date have not figuered out PID so I avoid it in many cases (NOTE: I have done some things with temp involved) but it is so confusing in so many ways.

Seems to me a batch operation with "weight" being the key may be a more appropriate approach.
 
Another option. Semi closed loop.

I would do this....

Control Output = min(manual input,sqrt(error/E)*C)

Ok, so the SLC doesn't have a minimum function. What is the world coming too? A compare will do.

The manual speed refernce(input) must go to the PLC. The manual reference should use the SCP function to map the 4-20ma to 0 to 10v. The 0-10v signal is what is needed for the manual input since we must be mimnimizing volts with volts.

error is the target - actual weight. Obviously the error can't be negative. A compare is need here too.

C is the control output that will at occur at error E. These are parameters. The parameter C could be the full control signal or 10V. E is error at which the control signal must start ramping down. Make E larger to make the ramp long or more gentle.

This allows manual control like before, BUT now as the actual weight approaches the target weight. The min function will ensure the manual signal is ramped down using a trapezoidal ramp. Not that if the error is greater than E, the computed output will be greater than 10 volts but we don't care because the manual signal can't be greater than 10 volts so the minimum signal will be used.

I can come up with more sophisticated ramping profiles, but they require more math. This will be much better than timers and simple set points.
 
Thanks for all the feedback.

rsdoran-The operator enters the target weight one time at the start of the production run. Once the machine is switched to auto mode the speed of the machine is based on (actual/target)*speep ref. = output machine speed. Hope this clears somethings up. Thanks for time and input.

Bob
 
Bob...

Is this a "filling line" or just a transport line?

Is the container being filled as it moves on the line?

Is it simply a case of setting line speed for a particular weight... and that's it?

There's something missing in this picture... can you fill it in?
 
Terry

The container is fill with product and then moved onto a load cell by a walking beam assm. FYI-The container can't be check while it is filling because the container moves vertically and some times the customer will spin the container for product appearance. When the container is on the load cell I would then get the weight compare and do something with it and then send the new value to the drive to speed up or slow down the machine. Changing the machine speed increases or decreases the amount of product in the container (time fill machine). I am looking for the best way and advice on the above "do something with it".
The density of the product varies and the supply/input of product to the filling machine can vary also. I am just looking to even out the fluctuation in container weights at our customer’s plants.

Thanks again for all the input
Bob
 
I have only done a few weighing applications. Only one tried to do a gross correction to affect how the NEXT filling would take place. If you can't measure the variations in the density and supply of the product then all you'll be able to do is react to the last weight. DON'T try to make up the ENTIRE difference in one step. You'll probably overshoot and start an oscillation. You may want to leave a deadband around the desired weight where you make no corrections. If the feed variations are relatively slow then you may be able to keep a reasonable amount of error. If you can measure the variations in density and supply and take them into account then the error may be lessened further.
 

Similar Topics

I am not sure why this is requested, but it was asked. Currently I have one PLC , with one output to a relay, turning on a field equipment (just...
Replies
3
Views
68
Hi , Where i can find Mitsubishi PLC Card end of line & replacement model details. i am looking for Q02CPU replacement model. Please advice. thanks
Replies
2
Views
107
Hi everyone id like to start by saying im not a PLC programmer so my technical terminology is limited. i would like advice on what software is...
Replies
4
Views
287
Connected Components Help Hi there everyone, I’m recently new to the PLC world and was hoping somebody might steer me in the right...
Replies
3
Views
418
Hello, I'm struggling to learn something on Wonderware, and the distributors are taking days to get through the email chains. I was hoping for...
Replies
1
Views
365
Back
Top Bottom