G2 arc command doesnot seem to follow feedrate commands
Hi,
I am building my own delta printer. I use a MKS GEN L v1 board with repetier firmware v1.0.
For controlling, I use Repetier server 0.93.1 installed on a raspberry pi 3b+ (with repetier image). I have been using the repetier server with my pursa i3 for a while now and it is working good (Great job on all of these. Thank you that). Both pursa and my delta are never on at the same time. So the server is connected to only one printer at any given point.
I have a been testing my delta in cnc mode to see how it works. I am only doing dry runs as of now (no tool is connected to the mks board). All works fine when my gcode does not have G2 commands. When I use G2 commands to create arcs, one the following happens:
- Sometimes the arcs moves as expected - no issues.
- Sometimes the arcs movements speed up (even though I have the same F defined for all the lines of Gcode), but the delta is able to handle this faster movements.
- Sometimes the arcs movements speed up a lot and the stepper motor seems to skip steps.
All three cases can happen in the same job for different arcs and it seems to happen randomly. My printer logs don't should anything unusual (to my knowledge, attached below).
It only happens when there are G2 commands in the gcode. I did run the job after removing the G2 commands manually and it works fine. I havn't run anything with G3 command yet. I am not sure if I am doing something wrong or what is causing the issue. Any help in this case would be highly appreciated.
Below is the gcode I am using, it was generated using Freecad Path Workbench and then modified manually.
Please let me know if you need any additional information. Thank you in advance.
--------------------------------GCODE-----------------------------------------
G28
G0 F900.000
G1 F900.000
M453
G1 Z28
G92 X0 Y0 Z10
G1 Z15
G1 X41.8713 Y39.1046 Z6.0000
G1 X49.0513 Y34.9593 Z6.0000
G2 X54.8013 Y25.0000 Z6.0000 I-5.7500 J-9.9593 F900.000
G1 X54.8013 Y-25.0000 Z6.0000
G2 X49.0513 Y-34.9593 Z6.0000 I-11.5000 J-0.0000 F900.000
G1 X5.7500 Y-59.9593 Z6.0000
G2 X1.5796 Y-61.3910 Z6.0000 I-5.7500 J9.9593 F900.000
G2 X-5.7500 Y-59.9593 Z6.0000 I-1.5796 J11.3910 F900.000
G1 X-49.0513 Y-34.9593 Z6.0000
G2 X-54.8013 Y-25.0000 Z6.0000 I5.7500 J9.9593 F900.000
G1 X-54.8013 Y25.0000 Z6.0000
G2 X-49.0513 Y34.9593 Z6.0000 I11.5000 J0.0000 F900.000
G1 X-5.7500 Y59.9593 Z6.0000
G2 X5.7500 Y59.9593 Z6.0000 I5.7500 J-9.9593 F900.000
G1 X41.8713 Y39.1046 Z6.0000
G1 X41.8713 Y39.1046 Z2.0000
G1 X49.0513 Y34.9593 Z2.0000
G2 X54.8013 Y25.0000 Z2.0000 I-5.7500 J-9.9593 F900.000
G1 X54.8013 Y-25.0000 Z2.0000
G2 X49.0513 Y-34.9593 Z2.0000 I-11.5000 J-0.0000 F900.000
G1 X5.7500 Y-59.9593 Z2.0000
G2 X1.5796 Y-61.3910 Z2.0000 I-5.7500 J9.9593 F900.000
G2 X-5.7500 Y-59.9593 Z2.0000 I-1.5796 J11.3910 F900.000
G1 X-49.0513 Y-34.9593 Z2.0000
G2 X-54.8013 Y-25.0000 Z2.0000 I5.7500 J9.9593 F900.000
G1 X-54.8013 Y25.0000 Z2.0000
G2 X-49.0513 Y34.9593 Z2.0000 I11.5000 J0.0000 F900.000
G1 X-5.7500 Y59.9593 Z2.0000
G2 X5.7500 Y59.9593 Z2.0000 I5.7500 J-9.9593 F900.000
G1 X41.8713 Y39.1046 Z2.0000
G1 X41.8713 Y39.1046 Z0.0000
G1 X49.0513 Y34.9593 Z0.0000
G2 X54.8013 Y25.0000 Z0.0000 I-5.7500 J-9.9593 F900.000
G1 X54.8013 Y-25.0000 Z0.0000
G2 X49.0513 Y-34.9593 Z0.0000 I-11.5000 J-0.0000 F900.000
G1 X5.7500 Y-59.9593 Z0.0000
G2 X1.5796 Y-61.3910 Z0.0000 I-5.7500 J9.9593 F900.000
G2 X-5.7500 Y-59.9593 Z0.0000 I-1.5796 J11.3910 F900.000
G1 X-49.0513 Y-34.9593 Z0.0000
G2 X-54.8013 Y-25.0000 Z0.0000 I5.7500 J9.9593 F900.000
G1 X-54.8013 Y25.0000 Z0.0000
G2 X-49.0513 Y34.9593 Z0.0000 I11.5000 J0.0000 F900.000
G1 X-5.7500 Y59.9593 Z0.0000
G2 X5.7500 Y59.9593 Z0.0000 I5.7500 J-9.9593 F900.000
G1 X41.8713 Y39.1046 Z0.0000
G1 Z15
G0 F900.000
G1 F900.000
M453
G1 Z28
G92 X0 Y0 Z10
G1 Z15
G1 X41.8713 Y39.1046 Z6.0000
G1 X49.0513 Y34.9593 Z6.0000
G2 X54.8013 Y25.0000 Z6.0000 I-5.7500 J-9.9593 F900.000
G1 X54.8013 Y-25.0000 Z6.0000
G2 X49.0513 Y-34.9593 Z6.0000 I-11.5000 J-0.0000 F900.000
G1 X5.7500 Y-59.9593 Z6.0000
G2 X1.5796 Y-61.3910 Z6.0000 I-5.7500 J9.9593 F900.000
G2 X-5.7500 Y-59.9593 Z6.0000 I-1.5796 J11.3910 F900.000
G1 X-49.0513 Y-34.9593 Z6.0000
G2 X-54.8013 Y-25.0000 Z6.0000 I5.7500 J9.9593 F900.000
G1 X-54.8013 Y25.0000 Z6.0000
G2 X-49.0513 Y34.9593 Z6.0000 I11.5000 J0.0000 F900.000
G1 X-5.7500 Y59.9593 Z6.0000
G2 X5.7500 Y59.9593 Z6.0000 I5.7500 J-9.9593 F900.000
G1 X41.8713 Y39.1046 Z6.0000
G1 X41.8713 Y39.1046 Z2.0000
G1 X49.0513 Y34.9593 Z2.0000
G2 X54.8013 Y25.0000 Z2.0000 I-5.7500 J-9.9593 F900.000
G1 X54.8013 Y-25.0000 Z2.0000
G2 X49.0513 Y-34.9593 Z2.0000 I-11.5000 J-0.0000 F900.000
G1 X5.7500 Y-59.9593 Z2.0000
G2 X1.5796 Y-61.3910 Z2.0000 I-5.7500 J9.9593 F900.000
G2 X-5.7500 Y-59.9593 Z2.0000 I-1.5796 J11.3910 F900.000
G1 X-49.0513 Y-34.9593 Z2.0000
G2 X-54.8013 Y-25.0000 Z2.0000 I5.7500 J9.9593 F900.000
G1 X-54.8013 Y25.0000 Z2.0000
G2 X-49.0513 Y34.9593 Z2.0000 I11.5000 J0.0000 F900.000
G1 X-5.7500 Y59.9593 Z2.0000
G2 X5.7500 Y59.9593 Z2.0000 I5.7500 J-9.9593 F900.000
G1 X41.8713 Y39.1046 Z2.0000
G1 X41.8713 Y39.1046 Z0.0000
G1 X49.0513 Y34.9593 Z0.0000
G2 X54.8013 Y25.0000 Z0.0000 I-5.7500 J-9.9593 F900.000
G1 X54.8013 Y-25.0000 Z0.0000
G2 X49.0513 Y-34.9593 Z0.0000 I-11.5000 J-0.0000 F900.000
G1 X5.7500 Y-59.9593 Z0.0000
G2 X1.5796 Y-61.3910 Z0.0000 I-5.7500 J9.9593 F900.000
G2 X-5.7500 Y-59.9593 Z0.0000 I-1.5796 J11.3910 F900.000
G1 X-49.0513 Y-34.9593 Z0.0000
G2 X-54.8013 Y-25.0000 Z0.0000 I5.7500 J9.9593 F900.000
G1 X-54.8013 Y25.0000 Z0.0000
G2 X-49.0513 Y34.9593 Z0.0000 I11.5000 J0.0000 F900.000
G1 X-5.7500 Y59.9593 Z0.0000
G2 X5.7500 Y59.9593 Z0.0000 I5.7500 J-9.9593 F900.000
G1 X41.8713 Y39.1046 Z0.0000
G1 Z15
----------------------------End of Gcode--------------------------------------------
------------------------------Print Log---------------------------------------------
11:30:10.849: N473 G28
11:30:10.853: ok 473
11:30:10.853: N474 G0 F900.000
11:30:12.721: T:-48.82 /0 B:-48.82 /0 B@:0 @:0 (2)
11:30:12.854: busy:processing
11:30:13.820: T:-48.82 /0 B:-48.82 /0 B@:0 @:0
11:30:14.854: busy:processing
11:30:14.918: T:-48.82 /0 B:-48.82 /0 B@:0 @:0
11:30:14.922: SelectExtruder:0
11:30:14.928: FlowMultiply:100
11:30:14.930: X:0.00 Y:0.00 Z:115.000 E:0.0000
11:30:14.930: ok 474
11:30:14.930: N475 G1 F900.000
11:30:14.935: ok 475
11:30:14.935: N476 M453
11:30:14.940: ok 476
11:30:14.940: N477 G1 Z28
11:30:15.118: PrinterMode:CNC
11:30:15.118: ok 477
11:30:15.118: N478 G92 X0 Y0 Z10
11:30:15.124: ok 478
11:30:15.124: N479 G1 Z15
11:30:15.127: X_OFFSET:0.000 Y_OFFSET:0.000 Z_OFFSET:-18.000
11:30:15.127: ok 479
11:30:15.127: N480 G1 X41.8713 Y39.1046 Z6.0000
11:30:15.133: ok 480
11:30:15.133: N481 G1 X49.0513 Y34.9593 Z6.0000
11:30:15.235: ok 481
11:30:15.235: N482 G2 X54.8013 Y25.0000 Z6.0000 I-5.7500 J-9.9593 F900.000
11:30:15.251: ok 482
11:30:15.251: N483 G1 X54.8013 Y-25.0000 Z6.0000
11:30:23.703: T:-48.82 /0 B:-48.82 /0 B@:0 @:0 (8)
11:30:24.527: ok 483
11:30:24.527: N484 G2 X49.0513 Y-34.9593 Z6.0000 I-11.5000 J-0.0000 F900.000
11:30:25.900: T:-48.82 /0 B:-48.82 /0 B@:0 @:0 (2)
11:30:26.136: ok 484
11:30:26.136: N485 G1 X5.7500 Y-59.9593 Z6.0000
11:30:28.096: T:-48.82 /0 B:-48.82 /0 B@:0 @:0 (2)
11:30:28.529: ok 485
11:30:28.529: N486 G2 X1.5796 Y-61.3910 Z6.0000 I-5.7500 J9.9593 F900.000
11:30:29.194: T:-48.82 /0 B:-48.82 /0 B@:0 @:0
11:30:30.121: ok 486
11:30:30.121: N487 G2 X-5.7500 Y-59.9593 Z6.0000 I-1.5796 J11.3910 F900.000
11:30:30.134: ok 487
11:30:30.134: N488 G1 X-49.0513 Y-34.9593 Z6.0000
11:30:31.390: T:-48.82 /0 B:-48.82 /0 B@:0 @:0 (2)
11:30:31.775: ok 488
11:30:31.775: N489 G2 X-54.8013 Y-25.0000 Z6.0000 I5.7500 J9.9593 F900.000
11:30:33.586: T:-48.82 /0 B:-48.82 /0 B@:0 @:0 (2)
11:30:33.803: ok 489
11:30:33.804: N490 G1 X-54.8013 Y25.0000 Z6.0000
11:30:35.782: T:-48.82 /0 B:-48.82 /0 B@:0 @:0 (2)
11:30:36.118: ok 490
11:30:36.119: N491 G2 X-49.0513 Y34.9593 Z6.0000 I11.5000 J0.0000 F900.000
11:30:36.881: T:-48.82 /0 B:-48.82 /0 B@:0 @:0
11:30:37.859: ok 491
11:30:37.859: N492 G1 X-5.7500 Y59.9593 Z6.0000
11:30:40.176: T:-48.82 /0 B:-48.82 /0 B@:0 @:0 (3)
11:30:40.256: ok 492
11:30:40.256: N493 G2 X5.7500 Y59.9593 Z6.0000 I5.7500 J-9.9593 F900.000
11:30:41.274: T:-48.82 /0 B:-48.82 /0 B@:0 @:0
11:30:41.998: ok 493
11:30:41.998: N494 G1 X41.8713 Y39.1046 Z6.0000
11:30:43.470: T:-48.82 /0 B:-48.82 /0 B@:0 @:0 (2)
11:30:44.395: ok 494
11:30:44.395: N495 G1 X41.8713 Y39.1046 Z2.0000
11:30:45.666: T:-48.82 /0 B:-48.82 /0 B@:0 @:0 (2)
11:30:45.968: ok 495
11:30:45.969: N496 G1 X49.0513 Y34.9593 Z2.0000
11:30:45.975: ok 496
11:30:45.975: N497 G2 X54.8013 Y25.0000 Z2.0000 I-5.7500 J-9.9593 F900.000
11:30:45.990: ok 497
11:30:45.990: N498 G1 X54.8013 Y-25.0000 Z2.0000
11:30:47.862: T:-48.82 /0 B:-48.82 /0 B@:0 @:0 (2)
11:30:48.442: ok 498
11:30:48.442: N499 G2 X49.0513 Y-34.9593 Z2.0000 I-11.5000 J-0.0000 F900.000
11:30:48.961: T:-48.82 /0 B:-48.82 /0 B@:0 @:0
11:30:49.934: ok 499
11:30:49.934: N500 G1 X5.7500 Y-59.9593 Z2.0000
11:30:52.156: T:-48.82 /0 B:-48.82 /0 B@:0 @:0 (3)
11:30:52.248: ok 500
11:30:52.249: N501 G2 X1.5796 Y-61.3910 Z2.0000 I-5.7500 J9.9593 F900.000
11:30:53.257: T:-48.82 /0 B:-48.82 /0 B@:0 @:0
11:30:53.991: ok 501
11:30:53.991: N502 G2 X-5.7500 Y-59.9593 Z2.0000 I-1.5796 J11.3910 F900.000
11:30:54.254: ok 502
11:30:54.255: N503 G1 X-49.0513 Y-34.9593 Z2.0000
11:30:55.450: T:-48.82 /0 B:-48.82 /0 B@:0 @:0 (2)
11:30:56.053: ok 503
11:30:56.054: N504 G2 X-54.8013 Y-25.0000 Z2.0000 I5.7500 J9.9593 F900.000
11:30:57.646: T:-48.82 /0 B:-48.82 /0 B@:0 @:0 (2)
11:30:58.094: ok 504
11:30:58.094: N505 G1 X-54.8013 Y25.0000 Z2.0000
11:30:59.842: T:-48.82 /0 B:-48.82 /0 B@:0 @:0 (2)
11:31:00.524: ok 505
11:31:00.524: N506 G2 X-49.0513 Y34.9593 Z2.0000 I11.5000 J0.0000 F900.000
11:31:02.104: T:-48.82 /0 B:-48.82 /0 B@:0 @:0 (2)
11:31:02.105: ok 506
11:31:02.105: N507 G1 X-5.7500 Y59.9593 Z2.0000
11:31:03.137: T:-48.82 /0 B:-48.82 /0 B@:0 @:0
11:31:04.097: ok 507
11:31:04.097: N508 G2 X5.7500 Y59.9593 Z2.0000 I5.7500 J-9.9593 F900.000
11:31:05.333: T:-48.82 /0 B:-48.82 /0 B@:0 @:0 (2)
11:31:05.823: ok 508
11:31:05.823: N509 G1 X41.8713 Y39.1046 Z2.0000
11:31:07.530: T:-48.82 /0 B:-48.82 /0 B@:0 @:0 (2)
11:31:08.107: ok 509
11:31:08.107: N510 G1 X41.8713 Y39.1046 Z0.0000
11:31:09.726: T:-48.82 /0 B:-48.82 /0 B@:0 @:0 (2)
11:31:09.781: ok 510
11:31:09.781: N511 G1 X49.0513 Y34.9593 Z0.0000
11:31:09.841: ok 511
11:31:09.841: N512 G2 X54.8013 Y25.0000 Z0.0000 I-5.7500 J-9.9593 F900.000
11:31:09.981: ok 512
11:31:09.981: N513 G1 X54.8013 Y-25.0000 Z0.0000
11:31:11.922: T:-48.82 /0 B:-48.82 /0 B@:0 @:0 (2)
11:31:12.719: ok 513
11:31:12.719: N514 G2 X49.0513 Y-34.9593 Z0.0000 I-11.5000 J-0.0000 F900.000
11:31:14.126: T:-48.82 /0 B:-48.82 /0 B@:0 @:0 (2)
11:31:14.126: ok 514
11:31:14.126: N515 G1 X5.7500 Y-59.9593 Z0.0000
11:31:16.316: T:-48.82 /0 B:-48.82 /0 B@:0 @:0 (2)
11:31:16.536: ok 515
11:31:16.536: N516 G2 X1.5796 Y-61.3910 Z0.0000 I-5.7500 J9.9593 F900.000
11:31:17.414: T:-48.82 /0 B:-48.82 /0 B@:0 @:0
11:31:18.262: ok 516
11:31:18.262: N517 G2 X-5.7500 Y-59.9593 Z0.0000 I-1.5796 J11.3910 F900.000
11:31:18.511: T:-48.82 /0 B:-48.82 /0 B@:0 @:0
11:31:18.526: ok 517
11:31:18.526: N518 G1 X-49.0513 Y-34.9593 Z0.0000
11:31:19.616: T:-48.82 /0 B:-48.82 /0 B@:0 @:0
11:31:20.326: ok 518
11:31:20.326: N519 G2 X-54.8013 Y-25.0000 Z0.0000 I5.7500 J9.9593 F900.000
11:31:21.806: T:-48.82 /0 B:-48.82 /0 B@:0 @:0 (2)
11:31:22.367: ok 519
11:31:22.367: N520 G1 X-54.8013 Y25.0000 Z0.0000
11:31:24.002: T:-48.82 /0 B:-48.82 /0 B@:0 @:0 (2)
11:31:24.798: ok 520
11:31:24.799: N521 G2 X-49.0513 Y34.9593 Z0.0000 I11.5000 J0.0000 F900.000
11:31:26.206: T:-48.82 /0 B:-48.82 /0 B@:0 @:0 (2)
11:31:26.540: ok 521
11:31:26.540: N522 G1 X-5.7500 Y59.9593 Z0.0000
11:31:28.395: T:-48.82 /0 B:-48.82 /0 B@:0 @:0 (2)
11:31:28.936: ok 522
11:31:28.936: N523 G2 X5.7500 Y59.9593 Z0.0000 I5.7500 J-9.9593 F900.000
11:31:30.591: T:-48.82 /0 B:-48.82 /0 B@:0 @:0 (2)
11:31:30.677: ok 523
11:31:30.677: N524 G1 X41.8713 Y39.1046 Z0.0000
11:31:32.789: T:-48.82 /0 B:-48.82 /0 B@:0 @:0 (2)
11:31:33.075: ok 524
11:31:33.075: N525 G1 Z15
11:31:33.886: T:-48.82 /0 B:-48.82 /0 B@:0 @:0
11:31:34.748: ok 525
11:31:35.077: T:-48.82 /0 B:-48.82 /0 B@:0 @:0
11:31:35.077: @stopLog
11:31:35.749: wait
11:31:36.082: T:-48.82 /0 B:-48.82 /0 B@:0 @:0
11:31:36.749: wait
--------------------End of Log-------------------------------------------------------
Comments
Now the delta has nonlinear kinematics so even a strait line needs to be split into several sublines where we compute coordinates and then we interpolate between them. Last problem is that we only have 8kb RAM to store all this with a AVR 2560 processor. So you end up with 14-16 buffer lines each having 20 subsegments or so (not sure don't use 8 bit for delta any more). With arcs you should try to increase the buffers towards 32 and reduce the subsegments to still have at least 900 byte free ram when you connect or firmware will crash. Then it should move a bit smoother.
But to be honest - for a delta I'd always use a 32 bit boards that is supported. With the due board they have 96kb ram instead of 8kb so no problems having bigger and more buffers plus they are at least 10 times faster so we can make more interpolations as well and move faster. In your case you are really going on the edge of what is doable I guess - never used cnc with 8 bit delta but G2 is also adding quite some computations and many small edges which as explaind make it a bit complicated.