07-22-2014 07:43 PM
I am trying to get a smooth pattern without stopping and starting again with each point. Based on my research, I deduced that my solution is contoured motion (please correct me if I am wrong). I have about 3,000 points per axis, and I have interleaved them in an array. array[0]: x1, array[1]: y1, array[2]: x2, array[3]: y2, and so on. Whenever I attempt to run this motion on the axes, I get a quick jerk from the rotational axis, no movement at all from the linear axis, and then the "Wait for Move Complete" is stuck in a seeimingly endless loop. This motion is not even close to the desired motion. Unfortunately I am not at work to provide a VI, but the portion of the VI that operates the contour motion is identical to NI's example, found here: http://www.ni.com/cms/images/devzone/tut/ContourMove_20120306160814.PNG
I access the contoured motion using an event structure; the rest of the program should be fairly irrelevant to my problem. The only difference is that the Requested Interval is set to 30, not 10, but the problem persists at 10 as well. I have attached my text file that I read in as data, and each coordinate is in encoder counts. Perhaps the problem lies there. Can somebody shed some light on this issue? Thanks!
*Each motor has different encoder factors due to different gearing ratios.
07-23-2014 08:09 AM
Anyone have any idea? I usually have a plan for troubleshooting and debugging but I really have no idea for this one.
07-24-2014 07:53 AM
ntsirak1,
Any chance you will be able to upload a snippet of your code anytime soon? I will try to look at the text file but the VI would be of much help in determining the problem.
Thanks for using our forums!
07-24-2014 10:49 AM
I actually got it working this morning! Thanks for your reply though. For the curious, here's what the problem was:
The points in contoured motion are time-dependent, meaning that you must set a time (10-30 ms) that the motors take between each point. Therefore, if you have points that are fairly far apart, LabVIEW will command the motors to go that distance in 10-30 ms, which is likely too fast for the motors. To correct this, I add to multiply the number of points by about 100. I started with ~4,000 points and ended up with ~200,000 points. I had to use a buffer to handle all these points at once; an example can be found in the "Find Examples..." help menu under "Contoured Motion". I think it's called Two-Axis Smart Buffer or something like that. Once I slowed everything down, the motors worked perfectly.