by MMather » Tue Apr 05, 2011 4:57 am
Jacob,
I have used your SineMinMax program as the base of my own program and have had it work well for our linear axis applications. I use similar code to find the Maxes and Mins of the sine wave, but I have run into a problem when working with a rotary axis. I have the rotary axis set up for an 8000 count encoder with a position range of 0-359.9 degrees. When the position rolls over in the middle of a sine wave, the position maxes and mins are obviously effected. I'm pretty sure I can fix the problem with some logic to determine if it will roll over and some simple formulas, but I was wondering if there was an easier fix that you knew of. For instance when dealing with a rotary axis, in the move absolute command, you can choose absolute as the direction and it treats the position as if it was on a number line.
Any suggestions would be appreciated.
Thank You
Mike