- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I need cam to output radius, center point, then end point for my G2/g3. How do I get that?
Solved! Go to Solution.
The Autodesk Community Forums has a new look. Read more about what's changed on the Community Announcements board.
I need cam to output radius, center point, then end point for my G2/g3. How do I get that?
Solved! Go to Solution.
Did you flip this switch at posting time?
Yes. I am posting twice. I post once without the check to get my ij values and then once with the switch to get the r values (shows as p value).
I’m hand typing this code right now. I hope to find a post that I can push rs232. This won’t work as is.
So, wait. You are looking for I,J and R values? Do you have a sample bit of code that you could share so we have a better idea of what you are looking for?
Yes, this old controller wants r I j x y.
i can confirm the toolpaths 360 makes work. I just have to post twice and hand type. Here’s a sample.
g0 x0 y0
x1
g2 r1 i0 j0 x0 y-1
that’s how it wants coordinates. Maybe there is a polar work around?
Any ideas? It’s such a pain right now. Ki
My apologies, I got sidetracked and lost focus on this issue.
I spoke with the Post department, and they have some post edits that you can do to your post processor:
In the section of onCircular that handles radius mode, change the writeBlock statement to look like the following.
writeBlock(
gPlaneModal.format(17), gMotionModal.format(clockwise ? 2 : 3),
xOutput.format(x), yOutput.format(y), zOutput.format(z),
iOutput.format(cx - start.x, 0), jOutput.format(cy - start.y, 0),
"R" + rFormat.format(r), feedOutput.format(feed)
);
This is for the XY-plane. You will have modify the output for the ZX and YZ planes also, assuming your control allows for G18/19 arcs
This worked beautifully. I didn't know the first thing about javascript to start so it took me a while. My apologies about being slow.
I had trouble getting my G2 and G3 commands to work right as CAM had them printed. I wanted to make a backup post that outputs the arc angles so I can also try polar coordinate programming. In my output block I'm trying this:
"A" + toDeg(Math.acos((x - cx)/r)), "A" + toDeg(Math.acos((cx - start.x)/r)),
thinking that will give me the angles to the tangencies of the arc. 1. Is that right? 2. how do I format the decimal place?
This can't be right, I never get values over 180. So, is there a function I can call or a point value that I can use the vector for? Otherwise I think I need to make a some conditional statements that puts the value in the right quadrant.