Announcements

The Autodesk Community Forums has a new look. Read more about what's changed on the Community Announcements board.

G2/g3 milltronics centurion 4 issue

craigbossard
Explorer

G2/g3 milltronics centurion 4 issue

craigbossard
Explorer
Explorer

I need cam to output radius, center point, then end point for my G2/g3.  How do I get that?

0 Likes
Reply
Accepted solutions (1)
506 Views
7 Replies
Replies (7)

seth.madore
Community Manager
Community Manager

Did you flip this switch at posting time?

2019-03-19_18h48_26.png


Seth Madore
Customer Advocacy Manager - Manufacturing
0 Likes

craigbossard
Explorer
Explorer

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. 

0 Likes

seth.madore
Community Manager
Community Manager

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?


Seth Madore
Customer Advocacy Manager - Manufacturing
0 Likes

craigbossard
Explorer
Explorer

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?  

0 Likes

craigbossard
Explorer
Explorer

Any ideas?  It’s such a pain right now. Ki

0 Likes

seth.madore
Community Manager
Community Manager
Accepted solution

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


Seth Madore
Customer Advocacy Manager - Manufacturing
1 Like

craigbossard
Explorer
Explorer

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.  

0 Likes