Hi, here are two methods to scale the rotary axis when using grbl.
Method 1: scale by modifying firmware
Calculate the steps for one revolution of rotary axis =
gear ratio * micro steps * steps revolution
My rotary axis gives 4 revolutions for every 9 revolution of stepper motor so
9/4 *16 * 200 =7200
Divide by diameter in inches as entered in job size * pi * 25.4
=7200/1.3 * 3.14159 * 25.4 = 69.407
Enter this result in firmware setting $100(X) or $101(Y)
---------------------------------------
Method 2: scale by modifying post processor
Calculate the steps for one revolution of rotary axis =
gear ratio * micro steps * steps revolution
My rotary axis gives 4 revolutions for every 9 revolution of stepper motor so
9/4 *16 * 200 =7200
Calculate steps per inch. This is firmware setting $100(X) or $101(Y) * 25.4
800 * 25.4 = 20320
Divide 7200/20320 = 0.35433
Divide your result by diameter in inches as entered in job size * pi
0.35433 / (1.3 * 3.14159) = 0.086759
This result is the scale factor.
In Vcarve Machine>Post-Processor Management select Grbl(inch)(*.gcode) then
right click Customize.
Grbl(inch)(*.gcode) will be added to top of Post-Processor list so can click to go to folder
and edit.
I changed POST_NAME = "Grbl (inch) (*.gcode)" to POST_NAME = "GrblRot (inch) (*.gcode)" so know when using rotary.
The POST_NAME is the name for selections in Vcarve, not the filename.
Restart Vcarve so name change will take effect.
If using X axis as rotary axis change to your scale factor.
VAR X_POSITION = [X|C|X|1.4] to
VAR X_POSITION = [X|C|X|1.4|0.086759]
VAR X_HOME_POSITION = [XH|A|X|1.4] to
VAR X_HOME_POSITION = [XH|A|X|1.4|0.086759]
This method will not work with arc moves so delete:
VAR ARC_CENTRE_I_INC_POSITION = [I|A|I|1.4]
VAR ARC_CENTRE_J_INC_POSITION = [J|A|J|1.4]
+---------------------------------------------------
+ Commands output for the first clockwise arc move
+---------------------------------------------------
begin FIRST_CW_ARC_MOVE
"G2[X][Y][J][F]"
+---------------------------------------------------
+ Commands output for clockwise arc move
+---------------------------------------------------
begin CW_ARC_MOVE
"G2[X][Y][J]"
+---------------------------------------------------
+ Commands output for the first counterclockwise arc move
+---------------------------------------------------
begin FIRST_CCW_ARC_MOVE
"G3[X][Y][J][F]"
+---------------------------------------------------
+ Commands output for counterclockwise arc move
+---------------------------------------------------
begin CCW_ARC_MOVE
"G3[X][Y][J]"
Vcarve will then only use G1 commands instead of G2 or G3.