When using lightburn with the Jackpot/ESP32/micro USB when the cut for any form of a circle or curve is initiated the x/y goes to the start position, moves a slight bit and then stops.
An error code is also indicated in the lightburn console screen
error:20
Unsuported or invalid G-code command found in block
On or near line 2:
Job halted
The shape is generated within the lightburn program.
The error is generated when trying to output the shape via the Jackpot’s grbl laser device
The strange item is that Lightburn will output a straight line shape such as a square, triangle, octagon, etc. perfectly.
I am trying to find out how to extract the g-code command that the error is referencing
I powered down all items and powered them up in the correct process
Homed the X and Y using end stops in light burn, that worked as it should
Drew a square (in lightburn) and selected start and the output to the steppers was correct and they moved correctly to generate the square shape.
I then drew a circle (in lightburn) and selected to frame it and that worked correctly as the steppers output the correct movement to frame the circle.
I then selected start and the steppers moved the gantry to the correct starting position, moved a slight bit and stopped.
The following error code was indicated wihtin the lightburn display:
Starting stream
Layer C02
error:20
Unsupported or invalid g-code command found in block.
On or near line 2:
Job halted
Stream completed in 0:00
ok
ok
ok
ok
ok
All of these are straight G1 commands that should not pose a problem, so it is probably here.
If I had to guess, it would be the S500. It appears that lightburn is sending power on a scale from 0 to 1000, which is ok… unless the controller is expecting the scale to be from 0 to 255.
You can test by selecing a lower power. If it comes on near full power when 25% is selected, then that’s it. Or you can tell Lightburn that laser power scales from 0 to 255. This is likely the better option.
K will do
I saw that line that did not look similar to the other G1 lines
I am going to look at the Gcode that is generated when an object is created that has all straight lines and see if the s500 and the f1000 is also in that g code
ok this is the g code for a hexagon that is generated by lightburn and when output to the Jackpot runs the g code and the steppers move correctly and completes the hexagon
G1 code means to move in a straight line to the X and/or Y and/or Z coordinate specified.
G2 (or G02) is to move in a clockwise arc and G3 (G03) will move in a counter-clockwise arc. The code that you posted up there doesn’t use any of these.
In the G1 command: (nnn denotes any number)
Xnnn specifies the X coordinate at the destination
Ynnn specifies the Y coordinate at the destination
Snnn specifies the power. Think of it like router speed as a mnemonic helps. In router mode jt would specify a PWM or voltage (0-10V typical) for control of a spindle. The laser is kind of the same, but turned off for pauses, which you don’t typically do for a spindle.
Fnnn specifies the feed rate, which js the maximum speed that the tool should go to the destination coordinates. Acceleration is applied to that speed, and deceleration if applicable based on the next command in the queue.
Other parameters exist. Any parameter nkt specified is carried over from the pervious commands, so the power (Snnn) and feed rate (Fnnn) are assumed to be the same as whatever was previously used. Similarly something like G1 X100 would retain the same Y, Z, F and S parameters that were used before.
I looked into the short lines as curves in lightburn and this is how lightburn works with curves, the software uses short lines to make the curves. I tried lowering the tolerance for the curve detail but that did nothing to help the issue.
I also tried lowering the laser power setting and that did not help either.
Is it possible that the Jackpot does not like the use of small lines for curves because of the controller having to make many very small movements quickly ?
Copy of the text from the lightburn website regarding curves:
This controls the precision LightBurn uses in displaying curves on the screen. All curves are displayed as a series of short lines, but the higher this value is, the shorter those lines will be. You can see the difference below.
If you’re working with files containing thousands of curves and your computer is lagging you may want to try reducing this value. If you need your curves to be very precise, you may want to increase it.
Ok I have tried about everything I can think of to try to get it to draw anything with a curved portion.
I’ve tried;
A totally different computer
Tried lighburn over WiFi
Tried lightburn on USB
Changed the baud rate for the com port
Tried a different USB cable
The Jackpot will not make a curved motion for an item that is to be cut.
It will frame it as a circle if you select the rubberband frame option but when the g code is run it will start, stop and generate the error code 20
I have tried installing all new files using the web installer via the usb connection in hopes of restoring the controller back to the way it came to me from V1.
There is another person on this forum that has it working with lightburn but I can not get it to function as I need it to.
Error code 20 is an invalid command, so something is going wrong.
The gcode that you showed earlier looks OK, though it was a bit weird that it doesn’t use arcs.
Is it OK with straight lines?
You said it will rubberband frame… is that at a lower power? Have you tried running it at low power?
Can you post your config.yaml?
(Note, whennposting code lime that using 3 back ticks (`) before and after a code block makes.it easier to read on the forum, but shouldn’t really be needed here. It just makes sure that funny things with asterisks don’t put things in italics or bold font)
One item that I did not mention is that the laser is not hooked up as I am just wanting to proof out the X, Y and Z movements prior to powering up the laser.
With the laser disconnected it shouldn’t matter, I say this because :
Yes, it outputs any form of an object that uses only straight lines perfect !
It does not matter if the “line” based object is drawn in lightburn or imported as a dxf into lightburn the output is correct and the steppers perform as they should.
It does not matter if the “curve” based object is drawn in lightburn or imported as a dxf into lightburn, upon the output the stepper moves to the start position, moves slightly then the steppers cease and the error code 20 is indicated.
I think it could be something due to the length of the short lines making up the curved item and how fast the g code is read and then output is sent to the steppers.
I do know there is another guy on the V1 forum that has his MPCNC working with the jackpot and he is not having any troubles.
I did reload all the firmware (3.7.8) and associated files in hopes that it would be put back to what it was when it was shipped to me.
I did have firmware 3.7.9 loaded but removed it by uploading the 3.7.8.
Is it possible that there could be some code residing in the ESP32 that could be causing the issue
I would like to try and get it back to the way it was when I received it to see if that would make a difference.
I might be able to try this later today. I did plenty of vector testing in lightburn with the jackpot and did not have any issues. I tested my logo a lot and it is full of curves, and I was pushing the speeds up pretty high.
Please post your yaml so we can see your laser section.
You have some M8 and M9 in your code, What are you trying to do with those? That is Coolant, do you have a coolant pin defined? Supported Gcodes | Wiki.js
Is that used by lightburn for air assist? I have a 24v solenoid hooked up to mine to control the air to the air assist (kept forgetting to turn it on at the start of the job and didn’t want to mess up the lens) and i didn’t have to change anything in the config for it to work. I saw the light coming on before I ever had it hooked up so I just used that spot lol. I have been exclusively using the first jackpot I got for laser on my Primo and other than some connection over usb errors in the very beginning that were just me not knowing what I was doing it has been completely flawless for me.
I did another fresh install of all files, updated the laser information as per V1’s information and now it is drawing shapes as it should
now to move on to getting the laser to fire up
Sorry for the aggravation
I went thru the previous yaml file used and compared it to the one that I just downloaded and updated
I still don’t see what could have been causing it
I must have had something incorrect in the previous yaml file as that was the only file that I had to modify