1. 4 axis coding

well i've walked myself into a corner that it looks like i need a bit of help getting out of. I'm trying to make an oring groove that wraps around the exterior of a cylinder. My attempts to hand code this have been less than successful so far, and i'm getting a bit pressed for time. So can anyone point me in the right direction here? And for reference this is what i'm trying to produce...

2. What type of machine are you running? Haas has a command G107 called Cylindrical Mapping, probably other machines have the same. This maps Y axis moves onto the periphery of a part mounted on the A axis. The Y axis is used to position the A axis exactly on the spindle centerline and then the G107 converts Y motion into the appropriate rotation of the A axis based on the diameter of the part. The motion is programmed as if it where a Y axis move.

3. i'm actually running a home built mill, running mach3 for a controller. Just took a look, and it doesn't appear that mach3 has any sort of feature like that.

4. trig it out

trig out the circle in the 2d plane so you have a point to point program with X and Y

then use the distance from the center of rotation to the center of the ball end mill and half the distance between Y's to calculate the degrees time 2 for A

then replace the A moves with the Y moves , so you end up with a program with X and A to form the o-ring grove

make sure you changes the signs for the proper A axis reversals

5. if you put X zero and A zero at the center of your o-ring circle all you need is to calculate for one quadrant of the circle and the just change the signs for the others

6. Not sure if this supports G2/G3, but you can code it flat and then wrap it around your part.

7. Originally Posted by holbieone
if you put X zero and A zero at the center of your o-ring circle all you need is to calculate for one quadrant of the circle and the just change the signs for the others
yeah, i tried this method as well, but the result was very "choppy". I suppose I just need to use more points to smooth it out, but i was hoping not to have to sit down and code for 5 hours, lol. I suppose I could make an excel spreadsheet to do all the boring work.

Originally Posted by ger21
Not sure if this supports G2/G3, but you can code it flat and then wrap it around your part.
good find! i'm going to give that a try right now.

8. so...results thus far. tried out that cncwrapping program and it does NOT accept g02 and g03 commands. it's purely an x and y translator. So, I ended up writing an excel file to point several x and y coordinates for the circle that i needed. proceeded to take that code and ran it through the cncwrapping program and this is the result:

it'll work for what I need it for, but it doesn't look like i quite got as much a rotation as it should have. Any ways, thanks for the help guys!

9. Here is a VB program that gives some code.
Can modify if not what you need.