PF525 Positioning Control

I have a belted conveyor which conveys a 20 ft length of pipe (12 inch nominal diameter; after the 12 inch unit I will be doing another for 24 inch pipe) from the tester downstream to the stacking unit. The pipe has to be positioned accurately for the stacking unit to operate. The pipe position can vary by several feet when it is placed on the conveyor so I can't just run the conveyor a set distance.

I originally designed this using a PF525 in open loop, and wired the conveyor encoder to a 1734-VHSC card. There is a laser sensor approximately where the midpoint of the pipe should stop for the stacking unit to accept the pipe. When a pipe is placed on the conveyor, it runs until that laser sensor is blocked. When the sensor is blocked, the PLC calculates the stop position and slows down the conveyor as it approaches the stop position, ultimately stopping the pipe. This logic is working and I am positioning the pipe to the desired position +/- 0.5 inch. I believe this is sufficient for the application (I am in process of confirming that with the customer), but in the interest of self-growth and a desire to produce the best equipment I can I am interested in pursuing greater accuracy.

I believe a large portion of the variance in positioning is due to the communication delays between the PLC and the PF525 and I am wondering if I could get more accurate positioning by getting the encoder option card for the PF525, wiring the encoder and the laser to the PF525, and utilizing the positioning steplogic to position the pipe at the stop location. This would eliminate a lot of back-and-forth communication between the PLC, I/O, and PF525 to control this process, and could theoretically make calculating the stop position and stopping more accurate.

My first question: can anyone that has experience with the PF525 positioning logic estimate whether they think this alternate method is likely to improve the accuracy? I realize you can't give a precise answer without more specific details of the system, but I'm really just looking for a ballpark answer. With that said, I can provide more system details if requested.

My second question: assuming the answer to the first question is yes, can anyone provide any advice on how to program the conveyor in the manner described? I need it to run indefinitely until the positioning sensor is blocked, calculate the stop position based on the current position, and then run to that stop position. I've been going through the PF525 manual and so far I'm not sure how I would program this.

Thank you in advance for any advice or guidance you are able to provide.
 
Simple question... can you relocate the sensor to the pipe's stop position, or add another sensor? I wouldn't want to rely on an encoder attached to a conveyor motor for precise locating.

I haven't done any type of Position control with a 525 and the encoder card, only closed loop speed control (aka Velocity).
Have quick look at the configuration page in CCW. There are certainly position step controls.
 
Simple question... can you relocate the sensor to the pipe's stop position, or add another sensor? I wouldn't want to rely on an encoder attached to a conveyor motor for precise locating.

I haven't done any type of Position control with a 525 and the encoder card, only closed loop speed control (aka Velocity).
Have quick look at the configuration page in CCW. There are certainly position step controls.
I wish I could but I can't really relocate the sensor. I said the pipes are 20 ft, but they can actually be a little longer or shorter depending on the customer's recipe and this machine can also process 14 ft lengths as well. So if we tried to place the sensor at the stop position the customer would have to move it for each different size pipe and they wanted to avoid that. Placing the sensor at the midpoint and using the encoder, we can calculate the stop setpoint based on the recipe which includes the actual length of the pipe.

I'll take a look at CCW and see if that gives me any inspiration for how this can be set up. I've only ever used CCW to program a few Micro850's.
 
The error will probably be the RSS of the various errors
  • the scan/measurement cycle time multiplied by the speed when the pipe edge is first detected
  • the scan/measurement cycle time of the encoder multiplied by the speed just before stopping in the middle
    • this can be reduced by slowing down as the encoder count get closer to the calculated midpoint
  • the scan/measurement cycle time of the encoder multiplied by the time it takes the conveyor to stop
    • estimating in-flight time can model, and reduce this error
  • the accuracy and/or resolution of the encoder
  • maybe I missed some?
It would be a Good Idea to make those calculations to estimate what accuracy is possible and/or likely.
 
The error will probably be the RSS of the various errors
  • the scan/measurement cycle time multiplied by the speed when the pipe edge is first detected
  • the scan/measurement cycle time of the encoder multiplied by the speed just before stopping in the middle
    • this can be reduced by slowing down as the encoder count get closer to the calculated midpoint
  • the scan/measurement cycle time of the encoder multiplied by the time it takes the conveyor to stop
    • estimating in-flight time can model, and reduce this error
  • the accuracy and/or resolution of the encoder
  • maybe I missed some?
It would be a Good Idea to make those calculations to estimate what accuracy is possible and/or likely.
This is pretty much my thought process, what I didn't know is if putting all of that in the drive itself would eliminate some of the delays. Would the scan time of the PLC still be a factor if the drive is receiving the encoder signal and using the position steplogic?

I'm working on calculating the errors in your list. I will post them when I've got it. Might take me a day as I need to power up the machine and record the actual belt speed with a tachometer.
 
I've had mixed results with putting code in drives like that. It may work out in your favor, but I doubt it will save enough time to be worth the trouble. I also have a strong bias towards having as much control as possible in as few brains as possible. I like drives and HMIs to just do their own thing and let the PLC handle the rest.

That's just my gut feeling, though. I still have some PTSD from a few Phase 1 DriveLogix systems at my last place.....

I'm also concerned with relying on an encoder on the conveyor. Is the encoder on a conveyor shaft or driven by a wheel that rides on the conveyor? Is it possible that the pipe might slip on the conveyor? It may be just fine now, but as the conveyor belt wears out, I wouldn't be surprised to find out that things start slipping, either the belt on the drive shaft or the pipe on the belt.
 
I've had mixed results with putting code in drives like that. It may work out in your favor, but I doubt it will save enough time to be worth the trouble. I also have a strong bias towards having as much control as possible in as few brains as possible. I like drives and HMIs to just do their own thing and let the PLC handle the rest.

That's just my gut feeling, though. I still have some PTSD from a few Phase 1 DriveLogix systems at my last place.....
That's generally been my gut feeling too which is why I designed it with the PLC controlling all the logic. I just wanted to at least do a thought experiment to see if there were any realistic options to increase the accuracy.

I've been looking at the Position Steplogic wizard and I think I would need to set it up to switch between speed references so I could run the drive continuously to the sensor, then switch to the position reference. This means the PLC still has to be involved in the process even if I did use the steplogic so I'm thinking it's not going to be practical given I've already got it set-up and running off the PLC.

Thank you for the feedback based on your experience using similar drives. That is very helpful information.

I'm also concerned with relying on an encoder on the conveyor. Is the encoder on a conveyor shaft or driven by a wheel that rides on the conveyor? Is it possible that the pipe might slip on the conveyor? It may be just fine now, but as the conveyor belt wears out, I wouldn't be surprised to find out that things start slipping, either the belt on the drive shaft or the pipe on the belt.

I hear you with respect to the encoder. It's on the drive shaft itself (Nord motor with integrated encoder) so there's definitely risk of slippage. These decisions are out of my control so I'm making it work the way they want it now. If the belt starts slipping or the pipe starts slipping in the future we may have to revisit it, and I won't be surprised if we end up changing the control process to use the positioning sensor to mark the end position of the pipe and move it around for different lengths of pipe.
 
A mathematician and an engineer were each put in a separate room and told to go kiss their spouse on the other side of the room, with the constraint that, while they could take an unlimited number of steps, each step could be no more than half the remaining distance. The mathematician sat down and wept. The engineer started stepping across the room, knowing they would get close enough for all practical purposes.

My second question: assuming the answer to the first question is yes, can anyone provide any advice on how to program the conveyor in the manner described?

Speed is proportional to remaining distance to target, so it slows as it gets closer. Calculate the target encoder value, and on each scan cycle adjust the speed to be proportional to the difference between the current encoder value and the target value, and scale the difference to speed.

Of course, this has the mathematician's problem in that the approach is exponential over time so it never gets there. So add a minimum speed offset to the calculated speed; the offset to use will be determined empirically. Now it is a trade-off between how long it takes and accuracy. When to kick in with the distance-driven speed is probably the result of more experimentation.

If the encoder could drive a count-down counter, then the counter accumulator could be intialized and the speed controlled proportional to the accumulator value.

This could also be implemented with a PID using a CV that is the speed, a SP that is the target encoder value, a PV that is the current encoder value, a KP value that controls the scaling, and a fixed CV bias for the speed offset. Integral and Derivative actions should be zero. There would also need to be logic to detect "close enough" at which point it puts the PID in SWM and uses 0 as a SWM value, or perhaps make an in-flight calculation. Anti-windup introduces an offset and so should be disabled, or at least taken out of the picture by the scaling.

Either of those approaches are most certainly overkill, but they would be simple. @Peter Nachtwey might see this an mock me, and rightfully so. Still, it might be worth the effort, in the interest of self-growth, to do this manually, and then to do it properly with built-in position control functions to see how much better and simpler it can be. I suspect the latter is less than few dozen minute's work once the secret handshakes are learned.

There is a thread with several hundred posts somewhere on this forum with a similar problem ;), which could have been solved in about a dozen posts.
 
If RPI is a concern, use the 1734-VHSC high speed output and wire it directly as a stop to the drive. You can set the window for the output based on your calculations. Still preemptively slow the drive, but let the 1734 output stop the drive. That'll eliminate scan and two RPIs.

I haven't fully engineered this, but just an avenue to research.
 
Speed is proportional to remaining distance to target, so it slows as it gets closer. Calculate the target encoder value, and on each scan cycle adjust the speed to be proportional to the difference between the current encoder value and the target value, and scale the difference to speed.

This could also be implemented with a PID using a CV that is the speed, a SP that is the target encoder value, a PV that is the current encoder value, a KP value that controls the scaling, and a fixed CV bias for the speed offset. Integral and Derivative actions should be zero. There would also need to be logic to detect "close enough" at which point it puts the PID in SWM and uses 0 as a SWM value, or perhaps make an in-flight calculation. Anti-windup introduces an offset and so should be disabled, or at least taken out of the picture by the scaling.
Velocity should be proportional to the square root of the distance to go for a linear ramp.
This could be so easy with the right equipment unless the pipe slides on the conveyor.
 
If you have a known and/or limited range of pipe diameters, you might also try attaching an encoder to a wheel that rides along the top/side of the pipe. That way you're tracking actual pipe movement and slip won't matter (much).

If they have a reasonable number of possible pipe lengths (like 5 or 6), you can just have 5 or 6 end-of-pipe sensors that the PLC can choose from. If you have limited PLC inputs and don't mind getting a little bit into the Rube-Goldberg arena, you can have a selector switch choose which sensor is active. I don't like that idea, but I've seen it done successfully with potentiometers on systems that didn't have PLCs.
 
If RPI is a concern, use the 1734-VHSC high speed output and wire it directly as a stop to the drive. You can set the window for the output based on your calculations. Still preemptively slow the drive, but let the 1734 output stop the drive. That'll eliminate scan and two RPIs.

I haven't fully engineered this, but just an avenue to research.
I think many here are providing good answers, but missing more directly what your actual issue stems from. Standard Rockwell RPI is 20ms to the VHSC and 20ms to the VFD. 0-40ms unpredictable delay. Everything else is pretty consistent math and easily dealt with in PLC. Going all-drive would eliminate comms delay, hence the post?

Roberts idea is pretty smart and not something I had thought of that would cut the drives 20ms variable out of the loop but allow you to retain ethernet speed control.

I've dealt with the same application you are and ran through similar thoughts. Didn't end up attempting all-drive control because I was able to achieve satisfactory results with the below tricks, though I've also wondered if it would be the ticket to pseudo-servo control.

Goal was to reduce RPIs and scan times as low as possible. Can set RPI statically, but depending on processor comms overhead this becomes a problem. During positioning step, I dynamically inhibited all ethernet modules not necessary during positioning step, set RPI to drive and VHSC very low, and stopped calling all but machine start/stop and positioning routine to reduce scan times. Actually worked surprisingly well despite being 'hokey logic', but when the hardware bucket doesn't provide, the labor bucket must overcome.
 
That's actually a pretty interesting solution. I assume the positioning phase was a relatively small part of the machine's operation.

I've written code before to dynamically inhibit/enable modules and such but it was so a prototype machine could be installed in place of another and removed if needed. That's actually a pretty clever technique.
 

Similar Topics

Had a weird one yesterday. A motor had a pinched wire shorting to ground. The power flex 525 line side breaker was tripping instantly when the...
5
Replies
341
Views
Hi, Anyone had a go at using a PF525 and reading the position through a 25-ENC-1 over DeviceNet? I've been tasked with reinstating a 20 year...
4
Replies
278
Views
I currently have a CIP System in place that some uses return Pumps that are essential for a return path back to CIP tanks. Problem is Operators...
3
Replies
376
Views
Really need to figure out it it’s possible to control a PF525 with Ethernet through a Prosoft. Spent hours today trying to figure it out and...
13
Replies
538
Views
Hey just recently left a site and last minute found a Corner grounded 480v supply for our VFDs. About 8 525s then a 755T on the same circuit with...
10
Replies
806
Views
Top