Troubleshooting Snapmaker Ray 40W Issues: Error 22, ALARM:3, and G-code Lockouts

First of all, hello everyone,

I want to use my Snapmaker Ray 40W device with lightburn. I am connected to my device via wifi and all software is up to date.

I installed snapmaker-ray-40w-v1.lbdev by importing it in the first installation.

First mistake I made;

Error:22
Feed rate has not been set or defined.
On or near line 0:

Everything seems normal but I get this error at random times.

Second Error

The axes seem to be different, according to the research I did on the internet, I had to use “G10 L2 P1 X0 Y-400” and if I want to return to luban, I should enter “G10 L2 P1 X0 Y0” again.

What should I do to use my Snapmaker ray 40w device completely smoothly, can anyone who uses it give me the settings?

Translated with DeepL.com (free version)

error:22
The feed rate has not yet been set or defined.
On or near line 0:
error:22
The feed rate has not yet been set or defined.
On or near line 0:
error:22
The feed rate has not yet been set or defined.
On or near line 0:
error:22
The feed rate has not yet been set or defined.
On or near line 0:
error:22
The feed rate has not yet been set or defined.
On or near line 0:
error:22
The feed rate has not yet been set or defined.
On or near line 0:
error:22
The feed rate has not yet been set or defined.
On or near line 0:
work stopped
Stream completed 0:13
error:22
The feed rate has not yet been set or defined.
clear
error:2
Numeric value format is not valid or missing an expected value.
arrow
[I][PLAT]reset coordinateoffset
starting stream
Layer C00



Hi Yunus

The snapmaker Wiki says ‘Gcode undefined feed rate’ for error 22, as well as giving a full list of Error codes.

I have a 20w Ray but not using it yet as I’m building enclosure.
I wonder have you Powered OFF when switching from luban to LB, Or perhaps you meant your first installation was LB!.

If the problem is random does that mean there is a data interuption during transfer. I wonder could it be a computer issue or laser control board…buffering. Is there any possibility of signal interference?

Perhaps an enquiry made to SM would be a good idea and I will also see if I can discover any other info.

Also, Can you select Gcode clustering and also try running lower speeds.

Thank you for your valuable response.
Yes my first use was Luban and then I found Lightburn and downloaded it but this problem appeared, I like the program but it is not stable.
For example 1 engraving sometimes without any problem and sometimes with the above error.
I want to use Lightburn without any problem.
How should my speed settings be
I don’t know what calibrations I have to do.
I did some research and only made the above settings
I type G10 L2 P1 X0 Y-400 into the console and with these settings it at least moves correctly.
If it is not on Lightburn, I write G10 L2 P1 X0 Y0 and switch to luban.

The problem did not change on different computers.

I will be waiting for your return.

Hi Yunus
I found this on the internet search for:-
Error:22 Feed Rate Undefined.

The Error 22 message “Feed rate has not been set or defined. On or near line 0:” typically occurs when a CNC machine or laser engraver is attempting to execute a g-code file, but the feed rate (the speed at which the machine moves along the X, Y, or Z axes) has not been specified or defined.

Possible CausesMissing or incorrect feed rate setting: The g-code file may be missing a feed rate definition or the setting is incorrect. Check the g-code file for the “F” command, which specifies the feed rate. Ensure it is present and set to a valid value.Incompatible post-processor: The post-processor used to generate the g-code file from a design software may not be configured correctly or is incompatible with the CNC machine or laser engraver. Verify the post-processor settings and ensure they match the machine’s requirements.Incorrect machine configuration: The CNC machine or laser engraver may not be configured correctly, or the settings may be incompatible with the g-code file. Check the machine’s settings and ensure they match the requirements specified in the g-code file.ResolutionReview g-code file: Inspect the g-code file for the “F” command and ensure it is present and set to a valid value.Adjust post-processor settings: Modify the post-processor settings to match the CNC machine or laser engraver’s requirements.Verify machine configuration: Check the machine’s settings and ensure they match the requirements specified in the g-code file.Consult documentation: Refer to the machine’s documentation and manufacturer’s guidelines for specific instructions on setting the feed rate and configuring the machine.

By addressing these potential causes and following the recommended resolution steps, you should be able to resolve the Error 22 issue and successfully execute your g-code file.

Also Read this Post & pay attention to comment by Gil about clustering.

Is your start GCode correct: