gSender 1.2.2 error processing circular arc lines

gSender is the only program that chokes on this line, the first instance of a G3 command in the file:

G3 X-27.293048 Y24.907075 I0 J-16.933322

Candle, NC Viewer, and UGS have no problems.

It is the 7th line in the file, but it flags it “Error 20 on line 4-4 Unsupported command”

Here is the file start:
G21 (mm)
G0 Z5
G4 2
G0 X-15.319377 Y29.866733
G1 Z-1 F1000
M3 S250
G3 X-27.293048 Y24.907075 I0 J-16.933322

gSender settings are at default. Suggestions? Thanks.

Well, lets investigate here.

5. G2, G3 Arc Move

Line 3 - Could this be the gSender referenced error? You’ll have to try it. I’m not on a machine.

It is an error if:
the P number is negative or not specified.

3 Likes

G4 2 is not valid GRBL gcode - it needs a P as pointed out by Tex

image

2 Likes

Thanks, I didn’t understand this detail in the many sources I’m reading on my newbie journey. Adding the “P” solved the problem. The test run was failing on previous runs, though, before I added the dwell command, so I may come back with examples from that. I appreciate the speedy response.

Ok. We’ve all been there.

1 Like

So the original title of my post is not accurate. gSender is handling G3 and G4 commands okay. But both the test run and a real run still stop with errors. Here are a few lines that ended with the message, about 20% into the file:

G3 X-1.200308 Y5.411497 I-3.082557 J-1.447048
ok
G3 X-3.063875 Y5.973347 I-1.863568 J-2.809655
ok
G1 X-3.063875 Y5.973347
G0 X-6.127751 Y11.946694
ok
G1 Z#<z_cut> F#<drill_speed>
ok
G3 X-10.917219 Y9.96283 I0 J-6.773328
ok
error:2 on line 47 - (Bad number format)
ok
G3 X-12.901082 Y5.17336 I4.789473 J-4.78947
error:2 on line 48 - (Bad number format)
ok
I am not noticing any change in the number formats where the errors occur. (Incidentally, the line numbers at this point in notepad++ are about 20 higher than the error message calls out. There are only 12 blank lines, so I’ll go back and count the parameter declarations; anyway, I don’t think it is consequential.) Candle still breezes through the project, but I really want to use gSender.

This line is actually in your gcode?
What program are you using to generate the gcode? What post processor?
Can you share your entire gcode file?

1 Like

“G1 Z#<z_cut> F#<drill_speed>” looked funky to me (again, NCViewer and Candle are fine with it), so I spent a lot of time looking for how variables/parameters work in gcode. I have not found a source that lays out the syntax of gcode; only references, definitions, and examples. I don’t see how to attach a file, but heart.ngc is not too large, so I will just paste it below.
G21 (mm)

#<z_safe> = 5
#<drill_speed> = 50
#<cut_speed> = 70

T1
G0 Z#<z_safe>

#<z_cut> = -1
G21

G0 X-1.531938 Y2.986674

G1 Z#<z_cut> F#<drill_speed>
G3 X-2.729305 Y2.490708 I0 J-1.693332 F#<cut_speed>
G3 X-3.225271 Y1.29334 I1.197368 J-1.197367
G3 X-2.873604 Y0.075133 I2.285827 J0
G3 X-2.102799 Y-0.854788 I3.9407 J2.482001
G3 X-1.1305 Y-1.727941 I26.290419 J28.29774
G2 X0 Y-2.986674 I-4.475644 J-5.156722
G2 X1.089662 Y-1.731848 I5.317665 J-3.51721
G3 X2.076049 Y-0.836349 I-36.459061 J41.150394
G3 X2.873007 Y0.109748 I-3.475888 J3.736676
G3 X3.225271 Y1.29334 I-1.812277 J1.183591
G3 X2.729306 Y2.490707 I-1.693334 J0
G3 X1.531937 Y2.986674 I-1.197368 J-1.197367
G3 X0.600155 Y2.705749 I0 J-1.68575
G3 X0 Y2.010361 I0.94113 J-1.418919
G3 X-0.600154 Y2.705748 I-1.541278 J-0.723524
G3 X-1.531938 Y2.986674 I-0.931784 J-1.404828
G1 X-1.531938 Y2.986674

G0 Z#<z_safe>

#<z_cut> = -2
G21

G0 X-3.063875 Y5.973347

G1 Z#<z_cut> F#<drill_speed>
G3 X-5.458609 Y4.981415 I0 J-3.386665 F#<cut_speed>
G3 X-6.450541 Y2.58668 I2.394737 J-2.394735
G3 X-5.747208 Y0.150265 I4.571655 J0
G3 X-4.205597 Y-1.709577 I7.881399 J4.964003
G3 X-2.261001 Y-3.455882 I52.580838 J56.595481
G2 X0 Y-5.973347 I-8.951287 J-10.313446
G2 X2.179325 Y-3.463696 I10.635329 J-7.03442
G3 X4.152098 Y-1.672697 I-72.918121 J82.300787
G3 X5.746014 Y0.219498 I-6.951776 J7.473352
G3 X6.450541 Y2.58668 I-3.624556 J2.367183
G3 X5.458611 Y4.981414 I-3.386667 J0
G3 X3.063874 Y5.973347 I-2.394736 J-2.394733
G3 X1.200309 Y5.411498 I0 J-3.371501
G3 X0 Y4.020722 I1.88226 J-2.837838
G3 X-1.200308 Y5.411497 I-3.082557 J-1.447048
G3 X-3.063875 Y5.973347 I-1.863568 J-2.809655
G1 X-3.063875 Y5.973347

G0 Z#<z_safe>

#<z_cut> = -3
G21

G0 X-6.127751 Y11.946694

G1 Z#<z_cut> F#<drill_speed>
G3 X-10.917219 Y9.96283 I0 J-6.773328 F#<cut_speed>
G3 X-12.901082 Y5.17336 I4.789473 J-4.78947
G3 X-11.494415 Y0.300531 I9.14331 J0
G3 X-8.411195 Y-3.419153 I15.762799 J9.928005
G3 X-4.522 Y-6.911765 I105.161675 J113.190961
G2 X-0.000001 Y-11.946694 I-17.902575 J-20.62689
G2 X4.35865 Y-6.927392 I21.270657 J-14.06884
G3 X8.304196 Y-3.345394 I-145.836243 J164.601575
G3 X11.492028 Y0.438995 I-13.903552 J14.946704
G3 X12.901082 Y5.17336 I-7.24911 J4.734366
G3 X10.917222 Y9.962828 I-6.773334 J0
G3 X6.127749 Y11.946694 I-4.789472 J-4.789466
G3 X2.400619 Y10.822995 I0 J-6.743002
G3 X-0.000001 Y8.041443 I3.76452 J-5.675675
G3 X-2.400615 Y10.822994 I-6.165114 J-2.894095
G3 X-6.127751 Y11.946694 I-3.727135 J-5.619312
G1 X-6.127751 Y11.946694

G0 Z#<z_safe>

#<z_cut> = -2
G21

G0 X-9.191627 Y17.920041

G1 Z#<z_cut> F#<drill_speed>
G3 X-16.375829 Y14.944245 I0 J-10.159994 F#<cut_speed>
G3 X-19.351623 Y7.76004 I7.184209 J-7.184206
G3 X-17.241623 Y0.450796 I13.714965 J0
G3 X-12.616793 Y-5.12873 I23.644199 J14.892007
G3 X-6.783001 Y-10.367648 I157.742516 J169.786446
G2 X-0.000002 Y-17.920041 I-26.853863 J-30.940337
G2 X6.537975 Y-10.391088 I31.905987 J-21.103261
G3 X12.456294 Y-5.01809 I-218.75437 J246.902369
G3 X17.238043 Y0.658492 I-20.855329 J22.420057
G3 X19.351624 Y7.76004 I-10.873666 J7.101548
G3 X16.375833 Y14.944242 I-10.160001 J0
G3 X9.191624 Y17.920041 I-7.184208 J-7.1842
G3 X3.600929 Y16.234493 I0 J-10.114503
G3 X-0.000002 Y12.062166 I5.64678 J-8.513513
G3 X-3.600922 Y16.234492 I-9.247671 J-4.341143
G3 X-9.191627 Y17.920041 I-5.590702 J-8.428967
G1 X-9.191627 Y17.920041
#<z_cut> = -4
G21

G0 X-9.191627 Y17.920041

G1 Z#<z_cut> F#<drill_speed>
G3 X-16.375829 Y14.944245 I0 J-10.159994 F#<cut_speed>
G3 X-19.351623 Y7.76004 I7.184209 J-7.184206
G3 X-17.241623 Y0.450796 I13.714965 J0
G3 X-12.616793 Y-5.12873 I23.644199 J14.892007
G3 X-6.783001 Y-10.367648 I157.742516 J169.786446
G2 X-0.000002 Y-17.920041 I-26.853863 J-30.940337
G2 X6.537975 Y-10.391088 I31.905987 J-21.103261
G3 X12.456294 Y-5.01809 I-218.75437 J246.902369
G3 X17.238043 Y0.658492 I-20.855329 J22.420057
G3 X19.351624 Y7.76004 I-10.873666 J7.101548
G3 X16.375833 Y14.944242 I-10.160001 J0
G3 X9.191624 Y17.920041 I-7.184208 J-7.1842
G3 X3.600929 Y16.234493 I0 J-10.114503
G3 X-0.000002 Y12.062166 I5.64678 J-8.513513
G3 X-3.600922 Y16.234492 I-9.247671 J-4.341143
G3 X-9.191627 Y17.920041 I-5.590702 J-8.428967
G1 X-9.191627 Y17.920041

G0 Z#<z_safe>

#<z_cut> = -2.5
G21

G0 X-12.255502 Y23.893387

G1 Z#<z_cut> F#<drill_speed>
G3 X-21.834439 Y19.92566 I0 J-13.546658 F#<cut_speed>
G3 X-25.802163 Y10.34672 I9.578945 J-9.57894
G3 X-22.98883 Y0.601062 I18.286621 J0
G3 X-16.82239 Y-6.838305 I31.525599 J19.856009
G3 X-9.044002 Y-13.823529 I210.32335 J226.381922
G2 X-0.000002 Y-23.893388 I-35.805149 J-41.253782
G2 X8.7173 Y-13.854784 I42.541316 J-28.13768
G3 X16.608391 Y-6.690787 I-291.672486 J329.20315
G3 X22.984057 Y0.877989 I-27.807105 J29.893408
G3 X25.802165 Y10.34672 I-14.498221 J9.46873
G3 X21.834443 Y19.925656 I-13.546668 J0
G3 X12.255498 Y23.893387 I-9.578943 J-9.578932
G3 X4.801239 Y21.645991 I0 J-13.486004
G3 X-0.000002 Y16.082887 I7.529039 J-11.351351
G3 X-4.801229 Y21.645989 I-12.330228 J-5.78819
G3 X-12.255502 Y23.893387 I-7.45427 J-11.238622
G1 X-12.255502 Y23.893387
#<z_cut> = -5
G21

G0 X-12.255502 Y23.893387

G1 Z#<z_cut> F#<drill_speed>
G3 X-21.834439 Y19.92566 I0 J-13.546658 F#<cut_speed>
G3 X-25.802163 Y10.34672 I9.578945 J-9.57894
G3 X-22.98883 Y0.601062 I18.286621 J0
G3 X-16.82239 Y-6.838305 I31.525599 J19.856009
G3 X-9.044002 Y-13.823529 I210.32335 J226.381922
G2 X-0.000002 Y-23.893388 I-35.805149 J-41.253782
G2 X8.7173 Y-13.854784 I42.541316 J-28.13768
G3 X16.608391 Y-6.690787 I-291.672486 J329.20315
G3 X22.984057 Y0.877989 I-27.807105 J29.893408
G3 X25.802165 Y10.34672 I-14.498221 J9.46873
G3 X21.834443 Y19.925656 I-13.546668 J0
G3 X12.255498 Y23.893387 I-9.578943 J-9.578932
G3 X4.801239 Y21.645991 I0 J-13.486004
G3 X-0.000002 Y16.082887 I7.529039 J-11.351351
G3 X-4.801229 Y21.645989 I-12.330228 J-5.78819
G3 X-12.255502 Y23.893387 I-7.45427 J-11.238622
G1 X-12.255502 Y23.893387

G0 Z#<z_safe>

#<z_cut> = -3
G21

G0 X-15.319377 Y29.866733

G1 Z#<z_cut> F#<drill_speed>
G3 X-27.293048 Y24.907075 I0 J-16.933322 F#<cut_speed>
G3 X-32.252704 Y12.9334 I11.973682 J-11.973675
G3 X-28.736037 Y0.751327 I22.858275 J0
G3 X-21.027987 Y-8.547882 I39.406998 J24.820011
G3 X-11.305001 Y-17.279411 I262.904183 J282.977398
G2 X-0.000003 Y-29.866734 I-44.756436 J-51.567226
G2 X10.896625 Y-17.318479 I53.176643 J-35.1721
G3 X20.760489 Y-8.363484 I-364.590602 J411.503932
G3 X28.730071 Y1.097487 I-34.75888 J37.36676
G3 X32.252706 Y12.9334 I-18.122776 J11.835913
G3 X27.293054 Y24.907069 I-16.933335 J0
G3 X15.319373 Y29.866733 I-11.973679 J-11.973665
G3 X6.001548 Y27.057489 I0 J-16.857504
G3 X-0.000003 Y20.103608 I9.411299 J-14.189188
G3 X-6.001537 Y27.057485 I-15.412785 J-7.235238
G3 X-15.319377 Y29.866733 I-9.317837 J-14.048278
G1 X-15.319377 Y29.866733
#<z_cut> = -6
G21

G0 X-15.319377 Y29.866733

G1 Z#<z_cut> F#<drill_speed>
G3 X-27.293048 Y24.907075 I0 J-16.933322 F#<cut_speed>
G3 X-32.252704 Y12.9334 I11.973682 J-11.973675
G3 X-28.736037 Y0.751327 I22.858275 J0
G3 X-21.027987 Y-8.547882 I39.406998 J24.820011
G3 X-11.305001 Y-17.279411 I262.904183 J282.977398
G2 X-0.000003 Y-29.866734 I-44.756436 J-51.567226
G2 X10.896625 Y-17.318479 I53.176643 J-35.1721
G3 X20.760489 Y-8.363484 I-364.590602 J411.503932
G3 X28.730071 Y1.097487 I-34.75888 J37.36676
G3 X32.252706 Y12.9334 I-18.122776 J11.835913
G3 X27.293054 Y24.907069 I-16.933335 J0
G3 X15.319373 Y29.866733 I-11.973679 J-11.973665
G3 X6.001548 Y27.057489 I0 J-16.857504
G3 X-0.000003 Y20.103608 I9.411299 J-14.189188
G3 X-6.001537 Y27.057485 I-15.412785 J-7.235238
G3 X-15.319377 Y29.866733 I-9.317837 J-14.048278
G1 X-15.319377 Y29.866733

G0 Z#<z_safe>

I forgot to reply that the heart.ngc file was an internet download, the source of which I can’t for the life of me find again.

You can drag and drop a file into a post to upload it. If the file extension is not supported then you can zip the file because zip files are accepted.

@NeilFerreri knows more about this type of stuff than I do but I thought ‘G1 Z#<z_cut> F#<drill_speed>’ looked strange so I did a little searching to see what I could find out. What I found is that it is a variable of some kind. Then when I looked up grbl variables I discovered that variables are not supported by grbl because the chip that grbl was made for doesn’t have enough firmware space to add that functionality.

This is probably not a good idea because there are many different ‘flavors’ of G-Code. Not all G-Code types support the same codes. For example a 3D printer uses G-Code but has many different codes than a CNC router, but even just in CNC routers there are differences between the types.

To explain why Neil probably asked these questions, the way all CAD programs that generate G-Code that I have used work like this. You create a design and use that design to make tool paths. At this stage the tool paths are not tied to any specific G-Code. Then when you save/export the tool paths a post-processor is used. The post-processor tailors the tool path to a specific kind of G-Code.

1 Like