Page 1 of 2

G-code bug

Posted: Thu May 20, 2021 7:55 pm
by GabrielR922
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!

Re: G-code bug

Posted: Thu May 20, 2021 8:33 pm
by TomKerekes
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?

Re: G-code bug

Posted: Mon May 24, 2021 4:24 pm
by GabrielR922
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!

Re: G-code bug

Posted: Tue May 25, 2021 12:21 am
by TomKerekes
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.

Re: G-code bug

Posted: Wed May 26, 2021 2:42 pm
by GabrielR922
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!

Re: G-code bug

Posted: Wed May 26, 2021 3:53 pm
by TomKerekes
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.

Re: G-code bug

Posted: Thu May 27, 2021 12:31 pm
by GabrielR922
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.

Re: G-code bug

Posted: Thu May 27, 2021 4:34 pm
by GabrielR922
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

Re: G-code bug

Posted: Thu May 27, 2021 8:27 pm
by TomKerekes
Hi Gabriel,

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

Re: G-code bug

Posted: Fri May 28, 2021 2:16 am
by GabrielR922
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.