Sign in to follow this  
Followers 0
CanaanP

SIN/COS Encoder issue - HELP!

22 posts in this topic

Ok, here's my setup: L43 with sercos card, ethernet, 6in/4out combo card. Kinetix 2000 with a 842HR-SJDZ115FWYD (sin/cos encoder), and a MPAI-A3150EM32A (heavy duty electric cylinder). The encoder is mounted to a feed roller on a machine that will accept boards and cut radial arcs into them at specified intervals. The boards are used for stacking pipe. I'm using an MAPC instruction to control the movement of the actuator based on encoder feedback. This has worked great in the shop as I was testing the PLC equipment, without being mounted on the machine itself. This project is a retro-fit of sorts, and I am now on site with all equipment installed. My issue is that as I feed boards through, I never get two that look the same. This is exactly opposite of what PCAM is supposed to do. My only lead is that the slower I run the infeed, the more accurate the system is. At full speed, 60 feet/minute, the arcs are different from each other, they are spaced incorrectly, and no two boards that come out will even be the same. I could understand if it was wrong, but wrong in the same way each time... this is wrong, but randomly. Half of that speed was supposed to be used for boards that will require deeper cuts, so I tried that, but with the same cuts that I was using before, only 3/8" deep. At 30 feet/minute the results were a little better, but far from acceptable to the specifications requested. At 1/4 full speed, 15 feet/minute we got the best results, but still not quite acceptable. I am not sure that I have the proper settings entered for the encoder resolution and conversion constant... My feed roller that the encoder is mounted on has a circumference of 12.89" according to the customer. So I go to Calculate Position Parameters window in the encoder properties of the motion group. I enter in 12.89" for Position Unit Scaling, Per 1 Aux Rev. Then for Position Unit Unwind I enter 150", per 1 Unwind Cycle. When I hit calculate, I get a popup warning that says "Possible truncation error calculating position unwind. Allow Update?" I say yes and it plugs in a drive resolution of 902300, and a conversion constant of 70000. Position unwind is set to 8400000. Ok so to test to see if the measured value from the encoder is accurate, I devised this system: 1. With cutter head retracted and out of the way, I manually jog the feed roller to grab a new board. 2. I make a pencil mark on the side of the board against a piece of the machine frame. 3. I issue MRP command to set encoder to 0.0 4. I then manually jog feed roller again until about 6 or 7 feet of the board has entered the machine. 5. I then make a second mark on the board against the same piece of the machine frame. 6. I take note of the encoder value, then roll the board the rest of the way out. 7. Measure distance between marks on the board and compare to encoder value. Now, at my best trial, the difference was maybe an 1/8" off. But never twice in a row, even when leaving all settings intact. In other words, running a board through this test twice in a row will yield different values between the encoder and actual measurement, and yes - I made new marks the second time and made sure to use them, and not the first ones. I was told that if you are using 70000 as a conversion constant, you can multiply that by the value the encoder claims it traveled, then divide by what it actually traveled and that should be a good value to use as a new conversion constant. Well, I tried this many times, redoing my test after each change. The results were always the same. I may get very close on one run, within an 1/8", but if I run it again without changing anything, I may be 1" off. I contacted rockwell support and explained all of this. All I was told was, email me your project and I will take a look at it. Of course, it was about 4pm est at that time and I'm sure the guy was ready to leave or getting close. So I may not hear anything back until tomorrow afternoon at best. This issue is a deal breaker for this project. We cannot accurately cut arcs into a board repeatedly if our encoder reads different each time. I don't know what to do. Can anyone offer some ray of hope on this issue for me? PLEASE? Thanks for taking the time to read this :)

Share this post


Link to post
Share on other sites
First thing that comes to mind - Are your motion instructions and encoder processing logic in a periodic task or in the main plc program. If not in a periodic task I'd strongly suggest moving them there. This has all the earmarks of being scan time related. Especially since in the shop you probably had only your logic and not the rest of the machine code affecting scan time.

Share this post


Link to post
Share on other sites
Ok, I can try that. I have never used tasks before, so I will have to wing it. There aren't that many rungs of logic though, 31 total in three routines. I have not checked the scan time, but what perhaps you are right. One thing I'm curious about though - if I execute a MAPC instruction, doesn't that instruction carry out it's cam profile entirely once it's been commanded? I mean, the PLC isn't checking back with it every scan cycle to tell it to do the next cam point is it? I thought it was like a fire and forget type thing.

Share this post


Link to post
Share on other sites
Reread you initial post and had a few other thoughts. 1. Don't take the customers word for 12.89 inches circumference on your roller. Reverse Calculation gives me 4.1031 inches roller dia. If i were you i'd grab a set of calipers and check the roller dia and used pi x dia to figure the circumference I was using. And to avoid accumulated error 7 or 8 decimal palces would not be uncalled for.

Share this post


Link to post
Share on other sites
I'm by no means a motion expert, but I would expect a scaling problem to be more repeatable. I can see a badly measured feed roll causing a consistent error, but not necessarily a random one. It probably seems silly, but are you sure the boards aren't slipping as they're being fed?

Share this post


Link to post
Share on other sites
Those were my thoughts too...slippage that occurs more frequently at higher speeds, but not every time, or at least not consistently. Sometimes that can be alleviated by changing the accel/decel mode or rates. I've been there too, when you think you have ruled out slippage, but to be 100% certain, you make alignment marks on the products and their drive/follow rollers, and see an occasional jump. I have had to deal with slippage that was just nearly impossible to detect with the naked eye, and of course slowing the machine down to see the problem made it go away. Edited by OkiePC

Share this post


Link to post
Share on other sites
I agree slippage is most likely causing the problem Commissioning Motion 1) Get the Scaling Correct 2) Verify the scaling is Correct at Very Low Speed - Watch the product/machine looking out for something that will invalidate your test. 3) Verify the scaling is correct at Top Speed - If not then usually it is something mechanical eg the product is slipping, a belt is loose. Most (if not all) Motion projects rely on the scaling being correct and that the product is not slipping You may have the scaling correct and the product slipping during the "Grab" which is putting the arc out of position I have added Registration PE's to find out the position dynamically and used them to adjust when the MAPC "fires" The Registration PE MUST be after all slipping has finished ie program 1) PE detects leading edge of board after grabbed correctly 2) PLC calculates distance to start of MAPC and "fires" a MAPC to start at that time ( I needed up to 60ms to ensure that the MAPC fired at the correct time on a Control logix L55 (much older CPU)) 3) MAPC completes Start cycle for next board or Arc If any slippage occurs after detecting the leading edge and before the start of the MAPC the MAPC will start at the wrong time Can you zip and post your program? Question The Boards are not Repeatable, Is the distance from the start of the board to the start of the Arc longer or less that what you have programmed? Edited by michael G

Share this post


Link to post
Share on other sites
I concur with the Michaels excellent analysis aabove. We used registration with servo FTL (feed to length, and cut applications extensively in the tire industry dealing with stretch rubber, fabrics and wire mesh. I re-programmed one machine that was designed to stretch a precut sheet of tire ply sitting on a coneyro with leading and trailing registration. On the fly using a fast photocell as a registration input as the apply conveyor was electronically geared to a rotating assembly drum. It would adjust the gear ratio slightly durinog high speed application to the drum to ensure the splice was 5mm +-2 every time and fault if the shrinkage exceeded tolerances. When calibrated perfectly (and only when calibrated perfectly) it was impossible to build a tire with an open splice (big problem on the road). Measurements of circumferences and the tools and precision of the data must think of everything, and allow for real error that the physical system can generate. Otherwise, you're building scrap, with a false sense of security until they hit the force machines or the highway...

Share this post


Link to post
Share on other sites
I completely agree... it sure doesn't seem like the boards are slipping because the design seems very solid. However, the results are pointing to that... as you said, it should be repeatable regardless of whether it's wrong or right on the encoder.

Share this post


Link to post
Share on other sites
Well that definitely sounds like a good plan, as far as calibrating at very low speed, then top speed, etc. I know that our full speed was 60 feet per minute, and low speed will be at 30 fpm. I slowed it down to 15 fpm during a test and ran two boards back to back and got this result: This is what the roller looks like that moves the board through the machine: Anyway, I'm attaching the program zipped up as well. I don't remember if I explained this in the OP or not, but I'm using a limit that is located a couple of inches back from the cutter head to issue an MRP to the encoder. I'm putting a -2.125 in there as I recall. This is what we came up with after several tries to get the beginning of the first arc to line up with what we put into the cam profile. Anyone looking at this program, keep two things in mind... 1. I intended to refine this quite a bit after I verified the core components working properly, which never happened. 2. This is my first motion project and I'm kinda feeling around in the dark. RaggleTest.zip I'm currently back home in MO, the job is in OH - 13 hour drive from here. I think we are going to see what can be done about adding a roller that rolls directly off the board for using the encoder. But it may be a little bit before I'm back at the machine again. So I definitely appreciate all of the advice I've been given, I just won't be able to implement any of it until I'm back in OH. Thanks again.

Share this post


Link to post
Share on other sites
Ouch wouldn't want to get myself caught in that. Does the Cutter head approach from the top or the side? Is the auxiliary encoder on the Tooth wheel or the smooth wheel? What is the mechanism to press the wheels together? Looking at the product you made - something that may help you is patterns On one board do the curves have exactly the same separation? - Ignore the Start Position we are looking for slipping during a board. If all curves have the same separation the you have a starting problem - we have methods to fix that If the separation between curves are changing then the aux encoder is slipping as you cut - There are other methods to fix that also (mechanical) Edited by michael G

Share this post


Link to post
Share on other sites
The cutter head approaches from the left side, here's the pic of that: The encoder is on the first feed roller, which is the sprocket roller on the bottom, that was in the pic on the other post. The tension roller on top is spring loaded, and can be adjusted with a jack crank of some type. There is a tension roller above every sprocket roller, and there are about 6 I think, 3 in front of the cutter head and three after with only a few inches in between. The issue with the boards is this, the starting point doesn't really matter too much because I know how to adjust that - putting a different negative value into the MRP instruction. But the distance between the arcs is not consistent, nor is the length of the arcs. Both the length and distance between is obviously related to the encoder because it's all coming from an MAPC instruction. I was told the the actuator can more than handle the force that's being applied and do it with more than enough speed, but now I'm not so sure... I mean our best results are at very low speed - is that because slippage is less or because the actuator has more time to do it's PCAM correctly... I'm unsure. It's very frustrating.

Share this post


Link to post
Share on other sites
Let me be sure that I have this right Three Feed Rollers Cutter Three Exit Rollers All Feed and Exit Rollers are Mechanically Linked together - Large Chain? Encoder is attached to First Infeed Roller The Length Pattern that you are describing is typically slippage To verify 1) I would expect all measurements to be shorter that what you programmed in the MAPC ie the length between curves, size of the curve etc 2) The slower you go the more accurate the lengths become - Try 5% or 10% of Top Speed (Commissioning Only) This gives you confidence in your program and the scaling Also as you speed up the lengths become shorter I have seen this problem on roll forming machines (Purlins), and cardboard box cutting machines The way they get around it is mount the encoder on a idler wheel that is in contact with the product at all times Sometimes they have a second encoder that they swap to while running when the Idler wheel is not in contact with the Product I would also suggest that the encoder Idler is as close to the cutter head as possible and before the head Argh - I do not have V19 control logix at home, someone else will have to check the code sorry. Edited by michael G

Share this post


Link to post
Share on other sites
You have it right sir... but here's the problem - this PLC and actuator, etc is a retro fit job. Originally we had quoted this hardware when the machine was in design phase, but I think the numbers scared the customer. They built the machine using an alternate method, a physical cam system to push the cutter head arm into place. Here is a quick video I took of the machine in action: http://dl.dropbox.com/u/483701/video-2011-06-24-08-27-15.mp4 I don't know why I didn't think to post that sooner, but there it is. Ahh, I started talking about a problem... the customer built the machine as it is shown in the video, they were happy with it except there was a problem in the shape of the arc, I guess a problem that was inherent with the cam system. That is why they came back to us to do this PLC install. Now, the heart of the problem: while outfitted with the cam system, all boards that came off this machine were slightly wrong - i.e. the shape of the arcs, however they were all the same. The only thing that has changed between then and now is the cam being replaced with an actuator, and encoder added to the roller. Now this is a customer claim, and I was there to take a video but had not gotten into this encoder mess yet so I didn't take careful note of the accuracy of the pieces coming out of the machine. So apparently, there was no slippage involved at all, or if there was, it was identical each time a board ran through the machine. The good news is that the machine is on it's way to my shop now. This means I don't have to drive another 13 hours to get onsite and try to resolve the issues :) I think what you were saying about the cuts being too short may not be entirely true, it's not that they are short or long... it's that they are not the same from one board to another. But now that the machine will be here on my turf, I can run some more material through and take careful measurements and try to spot a pattern. We have also recommended the option to have a roller in direct contact with the board, but the problem there is that the positioning of the roller. If it is before the cutter head, the board will leave the roller and still be in a cutting process, therefore encoder value becomes useless - impossible to PCAM. If the roller is after the cutter head then the board will not reach the encoder until after at least the first one or two cuts should have been made. It can not go on the side of the board because some boards will be run through twice to put arcs in both sides (for in between layers of stacked pipe). Therefore the only solution I can think of is to put the roller directly in front of the cutter head, trying to catch a little bit of the board from the top. This is tricky though, since boards will be different size, and cuts will be of different depths. We surely don't want the cutter head to eat into the roller. When the machine is here, I will analyze that scenario a bit more.

Share this post


Link to post
Share on other sites
One way to program with the extra encoder is The PCAM runs on a Virtual Master The Virtual Master is Geared to the Encoder running on the Product When the Product leaves the Encoder the Virtual Master is Geared to the Feed When the product returns the gear swaps back What speed do you think that was running at in your video? There are other slippages that can occur Eg Loosing counts or extra counts due to electrical noise Encoder coupling slipping - vibration This can be seen in a trend of the encoder axis velocity - how noisy is it (also as other servo experts will tell you) The more counts the better There is also a possibility that when the cutter engages that the timber is pulled/pushed by the cutter - I would expect this effect to be repeatable in a length though

Share this post


Link to post
Share on other sites
The machine is here at my shop now, so I will have all the chances I need to mess with this thing. I will try a trend on the encoder velocity to see how that looks... I'd say the speed was about 30 feet per second in that video, which is low speed for this machine, high speed is at 60 fpm.

Share this post


Link to post
Share on other sites
I setup a trend on the encoder actual velocity, with default sampling settings. Here is a screenshot I took of it: I don't know if this is normal or not, but as you can see there is a pretty big spike there, and that occurs randomly about once a second or more (average). Could this be my problem? I tried disconnecting the shield in the encoder cable on the Kinectix 2000 end, but it did not seem to change the trend, so I put it back. This speed is about 5 feet per minute.

Share this post


Link to post
Share on other sites
I do not like the spikes, Lots of causes and tracking them down can be difficult. Before we go further with the spikes we do not know how significant they are the as the default scaling is Auto range on the Y axis On the trend 1) If you stop the Trend then you can save the trend as a TBS or CSV file (All samples) It is then possible to ZIP it and Post it here for us to look at in detail. 2) I do not use the trend defaults as dark blue on black is a poor color for my eyes I usually change the scaling so that I can see 3 decimal points on the y axis and have ms on the x Axis The Sampling time I usually use is the same as the motion group coarse update time I Set the Y axis to use the PEN Preset and in your case for this trend would set the Speed Low to 0 inch/s and Max to 2 inch/s Can you Save the logix file as L5K Zip and post (I maybe can then change the version to 18 which I have)

Share this post


Link to post
Share on other sites
What is the resolution of the encoder? Each count represents how much distance? The y scale on the left shows 1s up along the left side. I would plot the position too and get several plots so they can be compared side by side. If the encoder is slipping you should see spikes like that but rather dips when the encoder isn't moving. This should be easy.

Share this post


Link to post
Share on other sites
We had the machine here most of last week, and our vendor sent a motion guru to help us out... he set up this trend, and it shows a board going through with cuts being made. We have determined that the feed chains that tie all the rollers together is what is causing the encoder noise. You can literally count the spikes in this trend and they coincide with sprocket teeth on the feed system. The customer has picked the machine up, and on our recommendation is going to change to either a cog belt system or possibly individual motors on each roller, controlled by a single VFD. I will be headed back out there to Ohio once they have modified the machine and then we'll see what can be done on this project. Thanks everybody for the advice and for listening :) I'll post an update when there is one.

Share this post


Link to post
Share on other sites
There are more issues than just sprockets. The sampling must be done a regular intervals to get accurate speeds to gear to. You should have turned the press roll with the encoder by hand without any wood under it to see how smooth and accurate the encoder is under ideal conditions. A low pass filter could smooth out the speed fluctuations. A similar application is done with our controller all the time in saw mills. It is called curve or shape sawing where the wood is scanned and the cam table/curve/spline is downloaded on-the-fly for each board after being scanned and the best cutting solution determined. http://www.deltamotion.com/peter/Videos/JAN-04%20VSS_0001.wmv I was out last week at a wood show in Atlanta.

Share this post


Link to post
Share on other sites
Well, that trend was taken after we removed the encoder from the first feed roller and built an arm that holds the encoder against the wood, which was located pretty close to the cutter head. There was a spring in the arm mechanism that allow the encoder to float with about 1/4 - 1/2 inch travel. The encoder is set to 960000 counts per aux rev, which the new roller we put on the encoder was a knurled 12" aluminum roller.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0