Rotary Chuck Using A Axis

I’m using Lightburn to run a Sculpfun based laser engraver. I’m using an aftermarket GRBL board and have X,Y, Z working exactly how I want them to. I want to put my rotary tools on the A axis but I can’t seem to get lightburn to enable rotary on the A axis. I can send the chuck gcodes to rotate it but when I try to do a test of the rotary axis I get the following message.
<Idle|MPos:45.000,25.000,-115.000,0.000|FS:0,0|WCO:0.000,0.000,0.000,0.000>

ok

Starting stream

ALARM:2

G-code motion target exceeds machine travel. Machine position safely retained. Alarm may be unlocked. (Right-click the ‘Devices’ button to reset the connection)

On or near line 4:

Stream completed in 0:00

[MSG:Reset to continue]

ok

Grbl 1.1f [‘$’ for help]

[MSG:‘$H’|‘$X’ to unlock]

Grbl 1.1f [‘$’ for help]

[MSG:‘$H’|‘$X’ to unlock]

[MSG:Caution: Unlocked]

ok

I have a lot of experience with CNC’s using Mach3 but I’m getting frustrated with lightburn. I also can’t find any documentation that tells me how to assign the number of steps to a full rotation for a chuck. Why does it have steps per mm for the A axis but no way to tell it how many steps per 360, wouldn’t that be an important setting for a direct drive motor to an axis?

If someone can tell me what I need to do to make rotary work with the A axis I’d really appreciate it.

Can you confirm that Sculpfun uses A-axis for its rotary or are you trying to go offroad with it?

As far as configuration check this post out from Oz that explains the necessary parameters for different controller and rotary setups:

I’m totally going offroad with this setup. the Sculpfun is a simple 2 axis machine, I’ve replaced the original controller with a different GRBL controller and have added a z axis for the work table and I want to use the A axis of the board to run the rotary.

I was able to get the rotary to work off of A if I disable the soft limits. The problem I have now is that there seems to be ZERO support and documentation for using A for the rotary. When I set A to be the rotary with a chuck it grays out the Degrees per rotation that is visible if I select the Z or Y axis. If I go into the machine setup there is no correct setting to dial in the steps per mm for the A axis. I plugged into the Y axis to test it and I was able to set Y to 26.667 s/mm and do a rotary test with Y selected and it rotated exactly one rev then went back to 0. The rotary is on a 3:1 gear reduction BTW.

This seems like a bug in lightburn with the A axis. Setting the exact same settings on A as I did for Y resulted in 30 seconds of rotation forward and 30 seconds back to zero,

The reason I don’t want to use Y or Z for the rotary is so I can power up the machine, tell it to go to the proper Z height for the rotary chuck, set the chuck on the platform and tell it to move the laser head to align with the rotary. This shouldn’t be that hard, does everyone out there manually setup their rotary axis every time they want to use it?

This is because LightBurn relies on A-axis being calibrated by the controller.

What specific controller and firmware are you running? I’m not familiar with the board listed in your profile. Can you link to a reference for your board and firmware?

Also, can you run this command in Console and return output?

$I
$$

A and Y are not directly comparable specifically because A is considered a dedicated rotary axis.

Using A-axis on g-code controls is relatively rare from what I’ve seen in the forums, however.

$I

[VER:1.1f.20220618:]

[OPT:VMZL,35,254]

Target buffer size found

ok

$$

$0=6

$1=25

$2=7

$3=1

$4=0

$5=0

$6=0

$10=3

$11=0.010

$12=0.002

$13=0

$20=0

$21=0

$22=1

$23=19

$24=40.000

$25=3500.000

$26=250

$27=2.000

$30=1000

$31=0

$32=1

$38=10

$100=80.000

$101=80.000

$102=800.000

$103=26.660

$110=20000.000

$111=20000.000

$112=400.000

$113=8000.000

$120=500.000

$121=500.000

$122=40.000

$123=700.000

$130=355.000

$131=900.000

$132=200.000

$133=6000.000

ok

This is the controller

This is most certainly a lightburn bug because with the 26.6s/mm set for the a axis in the machine setup I can enter A360 and it will do one full rotation so the controller is doing exactly what its supposed to do.
I’m not sure why people don’t want dedicated axis for their stuff, do people like going through extra work to repeat a hardware setup?
I like to be able to attach an add on and punch in a couple of commands and its up and running, not screw with manually locating things and focus and aiming and all the other BS.

I don’t know if it’s that people don’t want it. Traditional GRBL is 3-axis and so many machines likely didn’t even have a choice in the matter so use of Y or Z had become common.

So to understand the current state of the A-axis rotary setting…
If you use the 26.6 steps/mm for A-axis, then push the Test button in Rotary setup for chuck, how many times does the rotary rotate?

Yeah, but the thing is the GRBL part of it seems to be working fine its Lightburn that’s having the issue with the A axis and making the correct calculations.

Hitting test on the rotary results in 25 rotations.
I also divided the 26.6/25 and entered that for the Steps/mm and it gave me one VERY slow rotation. When its doing this it doesn’t matter what I set the max A axis speed to, it won’t run at normal speed. When I enter the A360 in the command windows it rotates at the expected speed.

That’s strange.

Did this result in a single rotation of the chuck at the end?

I don’t have a system to actually test this properly but I ran a test that would make it seem like this should work.

  1. Setup A-axis chuck rotary with circumference of 100 mm
  2. Create 100 mm long rectangular shape in workspace
  3. Save Gcode. Examine code and it shows an A360 move. The relevant bits here:
G1 A360S200F21600
G1 X17F6000
G1 A-360F21600
G1 X-17F6000

This makes me thing this should work in spite of the “Test” on the rotary.

YEAH BUDDY!!! Thats wasn’t the exact solution but it pointed me in the right direction. When I said it was 25 rotations in the test, I didn’t measure exactly, I counted the number of whole times jaw 1 on the chuck went by. It was actually closer to 25.4 rotations… hmmm. i have LB set to use inches and that works for everything else but apparently the bug is that it doesn’t convert the 25.4mm to an inch for the rotary calculations. I set it mm/min instead of inches/min and ran a rotation test and it did one full rotation and then back to zero.
How do I pass this onto the developers to have them fix it? I’d really prefer to operate in Inches instead of mm.

Nice.

Although not sure what you’re seeing. From what I can see this works the same way with inches as it does with millimeters.

  1. Rotary setup:
  2. Design setup:
  3. Gcode:
G1 A360S200F850.394
G1 X0.6693F236.22
G1 A-360F850.394
G1 X-0.6693F236.22

Where does this break down for you?

In theory it works the same but you said you don’t have the hardware to test it. Like i said, in inch mode i can send a “A360” command and it will move one full rotation. Its lightburn that is not converting inches to mm properly for the A axis to generate the gcode being sent for the rotary test.

Is there a way to capture the test gcode being sent to it? Like i said, switching back to mm/min mode works good. Inches/min is the bug.

Oh, and your test example is flawed. What you enter in the A axis diameter on the setup screen is how big your drawing area is, not how far it will rotate for the test.

The test rotation is supposed to be one full rotation of the chuck.

There may be some confusion in units here, but I may have missed it if this was already known or mentioned. The gcode spec dictates angular or rotational axes will have motion specified in degrees, not mm. Thus, G1 Annn.nn is a motion specified where nnn.nn is degrees, and can be positive or negative. The grbl configuration setting $103=26.660 in your case is a specification in steps/degree. Yeah, its different from the other axis values of steps/mm. The conversion from mm to deg in the LB drawing is handled by LB, that’s why LB wants to know the diameter or circumference of the cylinder (work area) held by the chuck, not the diameter of chuck, the diameter of the cylinder held by the chuck.

If you like running with grbl Soft Limits ON, (I do but mainly for XYZ reasons), then after you Home your machine, move the A axis to midway between 0 and the max degrees value, $133=6000 in your case. I like to use multiples of 360 for my max deg value, 2160 is nice one giving 6 full rotations.

Net: $103 value in steps/deg, $113 in deg/min, $123 in deg/sec/sec, and $133 in deg.

One more thing, several grbl implementations have a bug in that the feedrate is not correct when motion involving a combination of linear and angular axes is commanded in G94 motion mode (distance/time), such as G94 G1 X10A10 F1000. G93 motion mode (inverse time) works fine. The bug has been fixed in grblHAL, see more info here: Where in the code is G94 G1 XA feedrate situation assigned to X while A is coordinated to move with it · Discussion #241 · grblHAL/core

and here: Seeking to verify rotary setup is correct - #13 by LightBurn

Can you confirm how you’re switching to inch mode? Are you clicking the units on the Numeric Edits toolbar?

Is it only the Test button that’s not working properly? And regular burning is working correctly?

I was thinking about this. It’s possible that if you push “Show all” in Console window that it may capture the Test output but not sure.

Not following you. The circumference set in the Rotary is equal to the height of the shape on workspace. Since those are the same, that should be the linear distance traveled for one complete rotation of the chuck.

I agree. And the linear distance travelled for one rotation should equal the circumference.

I’m switching between inch and mm mode in lightburn, not changing settings on the controller itself. This is the settings page under Units/Grids. If I’m in mm/min it works fine, if its ticked on Inches/min its a problem.

I think that without having an A axis capable controller yourself or being able to see the live output of the code being sent to the controller you’re not going to be able to verify anything and can only speculate on the problem.
This is certainly a bug in the software because why else would switching form Inches/Min to mm/min be the only difference between working and not. When in mm/min I tell the rotary setup screen to do a test and it does one full 360 rotation. When I switch to inches/min mode and hit test in the rotary setup, I get 25.4 rotations. The exact conversion of mm to inches. It doesn’t matter if the controller is processing the A axis as rotation and not distance if lightburn is outputting 25.4x as many degrees of rotation.

For example if its in mm/min mode and LB says to do a full rotation, it will direct the A axis to move 360 degrees. If its put into inches/min mode and LB doesn’t do the calculation correctly, its actually telling the controller to move 9,144 degrees. If LB is telling it to go 9144 degrees, that’s most likely why its throwing the error because it shouldn’t need to rotate 9144 and that must be a problem so it doesn’t allow it.

To follow up on the diameter setting in the rotary setup with a chuck, when you enter the object diameter or circumference, that setting applies to the work area of your drawing, it doesn’t affect the distance “Test” travels. “Test” in chuck mode is supposed to rotate a full 360 forward and back to zero.
I understand what the Object diameter and Circumference settings are for, that’s so lightburn knows how to calculate how many step/degrees its supposed to rotate to give the correct linear surface area. You should be able to test this yourself. Set your machine to chuck and tell it to test with a diameter of 1" and watch how much it rotates when you hit test. Now change the diameter to 2" and hit test again. its still going to rotate the same number of times. The “test” rotates what it thinks is a full 360 degrees of the chuck, not the object. I hope that makes sense.

Does the problem only manifest when using the Test button? I’m speculating that the rotary should work fine in actual operation and may be a problem only with the Test button even in inches mode.

I’m asking this because LightBurn is still generating A360 when in inches mode for what should be one rotation. And based on what you said earlier, sending A360 to the controller in Console rotates the chuck one revolution irrespective of your current units setting.

The problem is with anything with the A axis, not just the test button. I tried to set this up and test it with a MKS DLC32 v2 board and I’m not able to replicate it because it is only a 3 axis board and gives an error when trying to send A coordinates to it.

Ah. In that case I wonder if this is a problem in the firmware.

Can you try this? Run in Console:

G20
A360

I assume this will rotate 25.4 times instead of once.

G20 sets values specified in inches. I would expect rotary moves not to be affected but seems they are.

Unfortunately I’m at work now so I’ll have to test that tonight when I get home. I was actually just looking at another page that pointed me at the same G20 vs G21 codes that could be an issue so that may make sense.