writing gcode with variables to cut angles

More
4 years 1 month ago #251420 by foam man
is it possible to cut angles through variables in gcode?
in the linux gcode overview it talks about polar coordinates. is that what to use?
eg. 
Code:
F100 G1 @.5 ^90 I need to cut 10 foam pieces, same angle, different lengths would appreciate any help

Please Log in to join the conversation.

More
4 years 1 month ago #251460 by Todd Zuercher
You can do it with a bit of trigonometry.
For example to make a 10inch move at a 30deg angle to the X-axis use the following line of g-code
Code:
G1 X[10COS30]Y[10SIN30]F100.
If that isn't what you had in mind, perhaps you could use G10L2Rn (n=angle of rotation) to rotate the X,Y axis about the Z. (But I've never used it so am abit unsure of all of the ramifications of using it.)

Please Log in to join the conversation.

More
4 years 1 month ago #251496 by foam man
thanks I'll give it a shot

Please Log in to join the conversation.

More
4 years 1 month ago #251497 by Todd Zuercher
Oops I made some mistakes. I think that the expressions above may need a multiplication symbol between the travel distance and the sin/cos terms and needed brackets around the angles.
So should have been this.
Code:
G1 X[10*COS[30]]Y[10*SIN[30]]F100.

Please Log in to join the conversation.

More
4 years 1 month ago #252158 by andypugh
Polar coordinate might be an option, but the origin is always the current coordinate system zero.

I have never tried polar coordinates in incremental motion mode, that might do what you want. Maybe experiment in a simulator?

Please Log in to join the conversation.

More
4 years 1 month ago #252413 by Todd Zuercher
Incremental polar coordinate moves still move about the origin, but step incrementally outward from the origin. This is a good way to approximate/make a spiral, but I'm not sure it is what the original poster was after.

Please Log in to join the conversation.

Time to create page: 0.090 seconds
Powered by Kunena Forum