TinyG not reading arc commands correctly?

Home Forums TinyG TinyG Support TinyG not reading arc commands correctly?

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #11681
    dick_deck
    Member

    Hardware: ShapeOKO 2 + TinyG v8
    CAD Software: Fusion 360
    CAM Software: Chilipeppr & CNCjs 1.9.12

    I’m trying to create some alphabet blocks, and I ran into an issue where TinyG seems to not read arc commands correctly. I’ve tried running the same code through ChiliPeppr and CNCjs, and both end up making the same error:
    https://photos.app.goo.gl/janhMX1vAoK3vW448
    (The O should be fully pocketed in the center)

    I isolated the code, and ran just that section, same result:
    https://photos.app.goo.gl/URDpZDdiPNCd2xBy7

    I’ve previewed the code in 3 simulators, and all 3 show the arcs correctly. I can’t read code, so I can’t figure out why the cut keeps skipping to the next section without finishing the pocket. Just in case you can read code, here is the isolated pocket:

    (ALPHABLOCK TOP VIOLET 2X2 SIDEWAYS – INNER O)
    (T1 D=0.125 CR=0. – ZMIN=-0.0625 – FLAT END MILL)
    G0 G90 G94 G17
    G20
    G0 Z0.6

    (2D POCKET14 5)
    M5
    T1
    M3 S5000
    G54
    M8
    G0 X4.7039 Y0.8662
    Z0.6
    Z0.2
    G1 Z0.1 F20.
    Z-0.05 F13.1
    X4.7044 Y0.8654 Z-0.0548
    X4.7062 Y0.8634 Z-0.0588
    X4.7078 Y0.8622 Z-0.0602
    X4.7096 Y0.8612 Z-0.0615
    X4.7119 Y0.8605 Z-0.062
    X4.7143 Y0.8602 Z-0.0625
    G3 X4.7513 Y0.862 I0.0056 J0.2721 F20.
    X4.7876 Y0.8698 I-0.0221 J0.1905
    X4.7896 Y0.879 I-0.0017 J0.0052
    X4.7874 Y0.8803 I-0.0037 J-0.004
    X4.7327 Y0.8899 I-0.0756 J-0.2692
    X4.6772 Y0.8867 I-0.0157 J-0.211
    G1 X4.6708 Y0.8855
    X4.6674 Y0.8847
    X4.6641 Y0.8837
    X4.6607 Y0.8828
    X4.6572 Y0.8822
    X4.6538 Y0.8816
    X4.6504 Y0.8805
    G3 X4.6491 Y0.8705 I0.0022 J-0.0054
    X4.6506 Y0.8697 I0.0035 J0.0046
    X4.682 Y0.8622 I0.0446 J0.1181
    X4.7143 Y0.8602 I0.0403 J0.3846
    G2 X4.7744 Y0.8214 I-0.0014 J-0.0682
    G3 X4.8421 Y0.7979 I0.0454 J0.0217
    X4.8592 Y0.8072 I-0.1153 J0.234
    X4.8927 Y0.8313 I-0.1152 J0.1955
    X4.9152 Y0.8658 I-0.0491 J0.0566
    X4.9156 Y0.8819 I-0.0286 J0.0088
    X4.9094 Y0.8967 I-0.0528 J-0.0133
    X4.8699 Y0.9366 I-0.1022 J-0.0616
    X4.8193 Y0.9611 I-0.1434 J-0.2323
    X4.7035 Y0.9788 I-0.1029 J-0.2846
    X4.5902 Y0.949 I0.0118 J-0.2753
    X4.5601 Y0.9313 I0.1328 J-0.2606
    X4.5343 Y0.9077 I0.0644 J-0.0961
    X4.5356 Y0.8405 I0.0409 J-0.0329
    X4.5802 Y0.8053 I0.1149 J0.0998
    X4.6329 Y0.784 I0.1382 J0.2654
    X4.7485 Y0.772 I0.0895 J0.3
    X4.8421 Y0.7979 I-0.0217 J0.26
    G2 X4.9302 Y0.7899 I0.0375 J-0.0761
    G3 X5.0162 Y0.8112 I0.0342 J0.046
    X5.0203 Y0.8203 I-0.2004 J0.0956
    X5.0234 Y0.9244 I-0.1325 J0.0561
    X4.9774 Y0.9962 I-0.177 J-0.0627
    X4.9087 Y1.0468 I-0.2188 J-0.2247
    X4.8316 Y1.0779 I-0.1719 J-0.3153
    X4.7496 Y1.092 I-0.1128 J-0.4123
    X4.641 Y1.0862 I-0.0315 J-0.4353
    X4.5379 Y1.0516 I0.0656 J-0.3657
    X4.4309 Y0.9559 I0.1277 J-0.2505
    X4.4194 Y0.8128 I0.1243 J-0.082
    X4.4731 Y0.7415 I0.1845 J0.083
    X4.5482 Y0.6933 I0.2178 J0.257
    X4.6546 Y0.6613 I0.162 J0.3466
    X4.7656 Y0.6593 I0.0635 J0.4313
    X4.8677 Y0.6836 I-0.046 J0.4189
    X4.9583 Y0.7365 I-0.1096 J0.292
    X5.0162 Y0.8112 I-0.1426 J0.1702
    G2 X5.0893 Y0.8606 I0.0786 J-0.0375
    G3 X5.1417 Y0.9316 I-0.0036 J0.0575
    G1 X5.134 Y0.9636
    X5.1086 Y1.0169
    X5.0714 Y1.0668
    X5.023 Y1.1116
    X4.9648 Y1.1496
    X4.8983 Y1.1794
    X4.8288 Y1.1989
    X4.758 Y1.2087
    X4.6871 Y1.2091
    X4.6171 Y1.2005
    X4.5492 Y1.1828
    X4.4848 Y1.1559
    X4.4252 Y1.1196
    X4.3748 Y1.0759
    X4.3354 Y1.0269
    X4.3077 Y0.9741
    X4.2918 Y0.9185
    X4.2881 Y0.8756
    X4.2942 Y0.8192
    X4.3124 Y0.7646
    X4.3426 Y0.7125
    X4.3843 Y0.6644
    X4.4368 Y0.6221
    X4.4986 Y0.5872
    X4.5665 Y0.5616
    X4.6367 Y0.546
    X4.7076 Y0.5399
    X4.7783 Y0.543
    X4.8476 Y0.5552
    X4.9143 Y0.5765
    X4.9771 Y0.6071
    X5.0335 Y0.6467
    X5.0797 Y0.6927
    X5.1146 Y0.7434
    X5.1376 Y0.7972
    X5.1485 Y0.8526
    X5.1473 Y0.9084
    X5.1417 Y0.9316
    X5.1409 Y0.9339 Z-0.062
    X5.1397 Y0.936 Z-0.0615
    X5.1384 Y0.9375 Z-0.0602
    X5.1369 Y0.9388 Z-0.0588
    X5.1345 Y0.9402 Z-0.0548
    X5.1336 Y0.9405 Z-0.05
    G0 Z0.6

    M9
    G0 Z0.6
    M30

    #11682
    dick_deck
    Member

    UPDATE:
    I noticed the code that was getting skipped kicked out an error 155, which I couldn’t find. However, in searching for this error I found a suggestion that I should switch to mm from inches. This worked.

    So for anyone in the future that comes to this nearly abandoned forum, if you are having issues with your arc commands, switch to metric.

    #11686
    cmcgrath5035
    Moderator

    You are correct, traffic here has reduced quite a bit and spread across many other forums.

    Switching to mm Gcode is always the first suggestion.
    tinyG does all its calculations in mm, so each inch mode command has to get converted. The CPU only does 8 bit math, rounding errors with small (slight) arcs(large values of I and J in G3 commands) can result is arc end point disconnects.

    If mm mode does not solve your issues, regenerate you Gcode without arcs.

    #11688
    S221B
    Member

    You might find this earlier post informative:

    https://synthetos.comtopics/arc-specification-errors-and-decimal-accuracy

    I had problems with the arc commands myself…now I generally just post-process to make Gcode files that omit the arc commands. Instructions on how I did it are included if it’s helpful.

    Since I did this I haven’t had problems, even if the Gcode files are longer, it doesn’t seem to impact run time or cut quality.

    #11690
    cmcgrath5035
    Moderator

    Thanks for posting the F360 analysis and recommendations.

    #11742
    Reach41
    Member

    My first comment in the forum is to thank you. I have everything all set up, and have been making parts on a Sherline mill converted to CNC for about a month. I use Tinyg, Fusion 360 and Chilipeppr. Every once in awhile there have been difficulties with arcs. I’m currently making 2×8 Legos out of solid brass. On the bottom of them there are three blind holes of .188 diameter, and a pocket with a lot of curves that surrounds them. The pocket works fine, and two of the three holes are cut properly, but the third hole comes out decidedly unround, and the controller kicks out an error stating that a G2 parameter is illegally set. There are three arcs of 120 degrees that machine out the circumference of each hole, and all three G2 codes for the arcs kick up the same error. The other two holes, which are the same size and depth, differing only where the fall along the X axis, work just fine. I’ve run the gcode through two different visualizers, one being Chilipeppr, and everything looks normal, so it’s not Fusion 360 or the Tinyg post processor. I’ve read a couple of times here and there about switching to metric, which I’m about to try, but I hadn’t seen much about avoiding the canned arc cycles in Tinyg with directly coded line segments. Clearly, if all else fails, that will work.

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.