Hello Guest it is April 23, 2024, 02:02:33 AM

Author Topic: Rotary axis (steps/unit variable)  (Read 739 times)

0 Members and 1 Guest are viewing this topic.

Rotary axis (steps/unit variable)
« on: May 30, 2019, 12:57:11 PM »
I'm trying to build a laser tube cutter that will use a rotary to represent the Y-axis.  I have defined the motor axis "steps/unit" to be 24,000/pi (8000 motor steps / rev and a 3:1 gear ratio) and then within the G-code I was using a scaling factor (1/diameter) for the Y axis.  When I try to cut a tube my circles are turning out to be ellipses.  I noticed that the G-code instruction manual had this caution statement regarding scaling (G51 command)

Exercise caution when using scaling, the results can be unpredictable depending on program complexity.

For example if G52 X2 Y4 is programmed followed by an arc move in the XY plane, the arc will NOT be

scaled 2x in the X axis and 4x in the Y axis to obtain an ellipse. The start and end positions will be as

expected, but the motion from one to the other may not be. Check and double check the tool path

display before running the program.



Is there an easy way to make the "steps/unit" a variable that is based on the diameter of the tube I'm processing.  Ideally this variable would be within the G-code or alternatively it would be input on the screen.  I have done some screen updates and custom M-codes but I'm not too familiar with LUA scripting so any assistance would be appreciated. 

I found this in the forum that seems appropriate but I'm not sure how to implement it.
https://www.machsupport.com/forum/index.php?topic=36321.40