I have autoamted a conventional milling machine with gear motors with enkoders and vfd's.
i have made a program for this lathe that makes a circle, and this has worked quite nicely, but sometimes i get
some irregularities, and today i stumbled over the main culprit of the errors.
in the hmi i can set the start and stop degrees of the circle, for when i only want to mill a section of a circle.
when i start the program it sets the start location as the center of the circle and i calculate the x,y coordinates for positioning before the circle program starts.
x coordinates from x=cos(startradians)*radius of circle
and y coordinates from y=sin(startradians)*radius of circle.
the errors i get is when startdegrees are either 90,180,270,360
example for a startdegree of 90 and a circle radius of 50 i get an x value of 3,06 where it should be 0.
the y value is correct with 50.
am i missing something basic here maybe?