G2 code, in path. Error on machine. 3D pocket.

Here's the place for discussion related to CAM/CNC and the development of the Path module.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
ModestModest
Posts: 44
Joined: Tue Mar 14, 2023 12:11 pm

G2 code, in path. Error on machine. 3D pocket.

Post by ModestModest »

Here is shape.

Using old machine CnCut C-3 CNC for stone
I generated code using uncnc
Tool stone tooling tip Diameter 20mm L 20mm

Code: Select all

G1 Y-0.632 Z0.000 F72.000
G2 X-9.978 Y-0.511 I0.962 J0.103 F960.000
G1 X-9.972 Y-0.632
G1 Z-1.000 F72.000
G2 X-9.978 Y-0.511 F960.000
G1 X-9.972 Y-0.632
G0 Z5.000
G0 X-9.972
When G2 line with no "I" or "J" machine compiler says missing parameter (example: G2 X-9.978 Y-0.511 F960.000)

And it's says it will take 27 hour to finish job... it's normal or my model preparing are wrong for "3D pocket" ?

Thanks
Attachments
Error ON G2.jpg
Error ON G2.jpg (292.29 KiB) Viewed 739 times
File where is issue generated.FCStd
(659.35 KiB) Downloaded 14 times
Test_code.txt
(696.66 KiB) Downloaded 13 times
chrisb
Veteran
Posts: 53919
Joined: Tue Mar 17, 2015 9:14 am

Re: G2 code, in path. Error on machine. 3D pocket.

Post by chrisb »

Your machine needs obviously a different way of defining arcs. You may look at the philips post processor, it can do different ways of defining circles, and you may adapt your post processor.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
ModestModest
Posts: 44
Joined: Tue Mar 14, 2023 12:11 pm

Re: G2 code, in path. Error on machine. 3D pocket.

Post by ModestModest »

Idk how to do it, they do have CnCutCam you can generate Gcode from DFX, is there are library that I can copy and use as post processor for FreeCad ? CNC use Windows XP OS
chrisb
Veteran
Posts: 53919
Joined: Tue Mar 17, 2015 9:14 am

Re: G2 code, in path. Error on machine. 3D pocket.

Post by chrisb »

There is also a dxf postprocessor.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
jbraun
Posts: 252
Joined: Fri Sep 18, 2020 5:41 pm

Re: G2 code, in path. Error on machine. 3D pocket.

Post by jbraun »

The code posted should fail on any control. Without a radius vector the arc is ambiguous.
example: an arc starting at X0 Y1 and ending at X1 Y0
G2 X1 Y0 J-1
or
G2 X1 Y0 I-0.5 J-1.5
both define an arc but not the same arc, it looks like your machine uses the standard G2/G3 definitions and gives the expected error.

That post looks mostly generic but with differences. Like what's the purpose of G71 ?
For English help on youtube check out Joko Engineering or Mango Jelly Solutions.
Look for recent videos, this software is updated at a rapid pace.
ModestModest
Posts: 44
Joined: Tue Mar 14, 2023 12:11 pm

Re: G2 code, in path. Error on machine. 3D pocket.

Post by ModestModest »

It's default settings from FreeCad.

So today I have tried to use philips processor. HEre is code and error from machine.
IS there a G code that switch Y and Z, I usually get code where Z are depth but philips processor use Y for depth

P.S. DXF don't even want to work
Attachments
New Text Document.txt
(584 Bytes) Downloaded 12 times
Crossmid_complex_left.txt
(600.98 KiB) Downloaded 13 times
Last edited by ModestModest on Fri Mar 24, 2023 8:55 am, edited 1 time in total.
chrisb
Veteran
Posts: 53919
Joined: Tue Mar 17, 2015 9:14 am

Re: G2 code, in path. Error on machine. 3D pocket.

Post by chrisb »

I rather thought to look at the philips postprocessor and take usable stuff from it to build your own.
If you want to use it anyway, you can edit it and set SWAP_Y_Z=False. This value is now written in brackets in the postprocessor and I don't really understand why, so you may try as mentioned above or use SWAP_Y_Z=(False).
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
ModestModest
Posts: 44
Joined: Tue Mar 14, 2023 12:11 pm

Re: G2 code, in path. Error on machine. 3D pocket.

Post by ModestModest »

What about feed rate it's swapped somewhere too ?

Edit: Added code that Native CAM App generate

Edit+: I tried write fro swap False, but it's still swap it

Edit++: Doe some issues I installed 2 times freecad so I have edited wrong post processor. Now It's looks okay, and closer to native Gcode
Attachments
Mattsson.txt
(11.1 KiB) Downloaded 16 times
ModestModest
Posts: 44
Joined: Tue Mar 14, 2023 12:11 pm

Re: G2 code, in path. Error on machine. 3D pocket.

Post by ModestModest »

Btw I needed turn of G2/G3 swap too :lol:
Attachments
Swap_error.jpg
Swap_error.jpg (272.62 KiB) Viewed 472 times
Post Reply