G-code bug

Moderators: TomKerekes, dynomotion

GabrielR922
Posts: 79
Joined: Thu Aug 13, 2020 10:07 pm

G-code bug

Post by GabrielR922 » Thu May 20, 2021 7:55 pm

Hi Tom.

Found a bug with the code attached.

At the line N170 it simple stops.

Changed the code to have 0.1mm of stock and it run perfect.

The console just prints:

Following Error Disabled Axis:1
Following Error Disabled Axis:0

Thanks Tom!
Attachments
gamela3 - Cópia.txt
(32.34 KiB) Downloaded 92 times

User avatar
TomKerekes
Posts: 2679
Joined: Mon Dec 04, 2017 1:49 am

Re: G-code bug

Post by TomKerekes » Thu May 20, 2021 8:33 pm

Hi Gabriel,

It seems to run ok for me.

It seems you are getting a Following Error. What are your Max Following Errors set to?

What Version are you running?

What do you mean by: "0.1mm of stock"

What are your KFLOP and Trajectory Planner settings?
Regards,

Tom Kerekes
Dynomotion, Inc.

GabrielR922
Posts: 79
Joined: Thu Aug 13, 2020 10:07 pm

Re: G-code bug

Post by GabrielR922 » Mon May 24, 2021 4:24 pm

Hi Tom.

Lastest version with this dll: viewtopic.php?f=11&t=1359

TP settings attached.

Max following error is set to 100. |In the step response I get a max error of ~40 steps. At about 5x times the feed of the cutting program.

What I tried:

Cutting the piece with the program setted feed.
Lowering the feed about 50%
Removed the piece and tried again.

Then:
Changed the CAM setting to add 0.1mm stock between the tool and the workpiece, the program runned fine without stop. (same feed as first program).

changed to the old program, had problem in the exact same spot as before.

Thanks Tom!
Attachments
TP.PNG

User avatar
TomKerekes
Posts: 2679
Joined: Mon Dec 04, 2017 1:49 am

Re: G-code bug

Post by TomKerekes » Tue May 25, 2021 12:21 am

Hi Gabriel,
What I tried:

Cutting the piece with the program setted feed.
So the part was positioned to be cut? What happened?

Lowering the feed about 50%
Was a new part to be cut loaded? What happened?

Removed the piece and tried again.
So the machine was then cutting air? What happened?

Changed the CAM setting to add 0.1mm stock between the tool and the workpiece, the program runned fine without stop. (same feed as first program).
I still don't understand what this means? All Z coordinates shifted up by 0.1mm? Please Post the GCode that runs and the GCode that stops.


What are your KFLOP settings? Post any programs that are running. We need to duplicate your environment to see if we can duplicate the problem.
Regards,

Tom Kerekes
Dynomotion, Inc.

GabrielR922
Posts: 79
Joined: Thu Aug 13, 2020 10:07 pm

Re: G-code bug

Post by GabrielR922 » Wed May 26, 2021 2:42 pm

Hi Tom,

As this part is small, I need to use slower feeds or cutting force as normal, otherwise it start to move on the cnc table. So cutting forces and speed are low for the machine to disable or trigger a following error.

I placed a stock at the machine, referenced it and started machining.
The machine started cutting very well, the commanded feed is around 5000mm/min, then it suddenly stopped at the line N170.

I restarted the program again using 50% feedrate, to check if it disable because of load. The machine stopped again.
Then I removed the part from the table and run the program again, without any load, it stopped again.

So I went to Autodesk Fusion 360 and added 0.1mm radial stock. (photo attached)
FUSION.PNG
The program runned fine without cutting any stock.
I placed the stock at the machine, and the machine cut all part fine.

Attached my init program. (TP config already sent.)

Hope everything is better explained.

Thanks Tom!
Attachments
GRU.c
(10.38 KiB) Downloaded 94 times

User avatar
TomKerekes
Posts: 2679
Joined: Mon Dec 04, 2017 1:49 am

Re: G-code bug

Post by TomKerekes » Wed May 26, 2021 3:53 pm

Hi Gabriel,

You didn't Post SCMDefs.c

I'm not familiar with Fusion 360 or what that parameter does.

Please Post the GCode that runs and the GCode that stops.
Regards,

Tom Kerekes
Dynomotion, Inc.

GabrielR922
Posts: 79
Joined: Thu Aug 13, 2020 10:07 pm

Re: G-code bug

Post by GabrielR922 » Thu May 27, 2021 12:31 pm

Hi Tom.

Radial stock adds material between your tool and your material.
e.g. you are doing a roughing operation, you give a 0.5 radial stock and then you come and finish that 0.5mm of material.
I just used it to change the way g-code was post processed, so would not bet the same lines and g-code.

A easier way to reproduce the error:

Using the g-code attached and the TP configs attached it runs perfect.
Reduce FACET ANGLE to 0.5 degrees and it triggers a following error. ( even if i use feed reduced by 50%)

Hope this way is easier to reproduce.

Thanks Tom.
Attachments
TP.PNG
SCMDefs.c
(2.97 KiB) Downloaded 93 times
GRU.c
(10.38 KiB) Downloaded 82 times
budsTEST1.txt
(165.26 KiB) Downloaded 87 times

GabrielR922
Posts: 79
Joined: Thu Aug 13, 2020 10:07 pm

Re: G-code bug

Post by GabrielR922 » Thu May 27, 2021 4:34 pm

Hi Tom.

Just another feedback.

Setted the machine to double the feed and the acceleration, 55 in/sec2 and 10000mm/min.

The program runned fine using 0.8 facet angle.

Also, whats a reasonable value for acceleration ? considering a machine that weights total 7ton.

I couldn't been able to override 35 in/sec in last tests, some days ago I tunned servos better and today I achived 55 in/sec.
Also, need to do more tests with different g-codes and operations to check if this value won't put me in trouble.

Video at this speed, g0 is 35m/min:
https://youtu.be/sFh7uPS0gSY

User avatar
TomKerekes
Posts: 2679
Joined: Mon Dec 04, 2017 1:49 am

Re: G-code bug

Post by TomKerekes » Thu May 27, 2021 8:27 pm

Hi Gabriel,

Thanks I was able to reproduce the bug. Please give us some time to investigate.
Regards,

Tom Kerekes
Dynomotion, Inc.

GabrielR922
Posts: 79
Joined: Thu Aug 13, 2020 10:07 pm

Re: G-code bug

Post by GabrielR922 » Fri May 28, 2021 2:16 am

Hi Tom.

No hurry as a simple temporary solution is to raise the facet angle.

Whats a reasonable facet angle using a high range of radius and length of 90deg? Example R1mm to R120mm as woodworking is more artistic, it varies a lot.

Thanks Tom.

Post Reply