# What would be the correct Gcode for rotary around the workpiece

27 Jan 2024 21:18 #291766
Hi guys

I have been struggling a little to find the correct Gcode to use if i want to use my rotary (A axis - along Y axis) and do the following.

Turn the piece 360 degrees than move the spindle in Y direction 2mm and than go from 360 to 0 degrees and move the spindle again 2mm and so on and so on. So I can create a round piece with the movement around the Y axis and not along the Y axis. If someone could give me the correct syntax to do this kind of movements without having like a zillion G1 moves. I would like to have like a fluent move from 0 to 360.

Thanks

Please Log in or Create an account to join the conversation.

28 Jan 2024 04:30 #291784 by spumco
The toolpath you describe will result in steps when the tool shifts over before each rotation.  You will likely wind up with toolmarks since the tool is plowing in full-diameter before the rotary starts turning.  If that's OK, you can accomplish it with incremental moves using G91:

G91
G1 Y2 Fnnn
A360

Put the above in a subroutine and repeat it for as many revolutions as you want.

Something a little more graceful on the tool would be to program a continuous spiral (ie. like a lathe).  Keep rotating the A-axis while continuously advancing the tool in Y.  If you do some math you can figure out how many revolutions the part needs to make for your tool to advance the distance you want.

Need to know desired stepover, but otherwise it's pretty straight-forward.

Example - if you calculate you need 10 rotations and want to 'turn' 25mm, then set Y0 at the end of the part (A-axis away from you in this example) and then
G1 Y25 A3600 Fnnn

For half the stepover, double the A-value.

You can (probably should) use G93 inverse time mode and calculate the time to make all the revolutions at the feedrate you want.  Without G93, the rotary axis will proceed in degrees per minute.    If you use G93 LCNC will calcualte the Y & A speeds necessary for the move to complete in a certain period of time.

The G93 feedrate you need depends on the diameter/radius of the stock; i.e. for a given time larger diameters will result in faster surface speed of the stock.

I should probably cook up a spreadsheet for myself to do some simple G93 calcs, but in case I dont get around to it here's a cheater way:

github.com/sgano/RapidRotary

The following user(s) said Thank You: Mecanix

Please Log in or Create an account to join the conversation.

28 Jan 2024 07:51 - 28 Jan 2024 07:52 #291786 by Mecanix
[OT] None of my business but I believe Lcnc is sufficiently mature and could see a modern DPM integration rather than this medieval inverse time. All the ctrl I've used recently are rot programmed in dpm if no translations are required.

F = DPM = (feedrate / diameter)*114.5916
Last edit: 28 Jan 2024 07:52 by Mecanix.

Please Log in or Create an account to join the conversation.

28 Jan 2024 21:51 #291840 by spumco
Spreadsheet cooked up in Freedom Units.  Very simplistic, but output values look reasonable to my math-impaired brain.

Change the file extension to ".ods" and use excel or libre office to open.

##### Attachments:

Please Log in or Create an account to join the conversation.

Time to create page: 0.126 seconds