Understanding initial gcode in file.

Post anything you want to discuss with others about the software.

Understanding initial gcode in file.

Postby beefy » Wed Dec 27, 2017 12:04 pm

Question for Balazs himself or some gcode heavies.

Decided against going to the local stripper club and instead I'm going over the gcode file produced by Sheetcam and the Neuron (THC system) post processor.

At the beginning it gives this code:

G53 G90 G91.1 G40

Let's go over the meaning of each of these:

G53 MOVE IN ABS COORDS this appears to serve no purpose. It is a non-modal command that needs to be used in each gcode block (line) it applies to. The UCCNC documentation also says it is an error if it is used without a G00 or G01 in the same line. Therefore am I correct in saying the G53 is not only incorrect but meaningless.

G90 ABSOLUTE DISTANCE MODE that seems OK to me.

G91.1 INCREMENTAL IJK MODE no mention of this command in the UCCNC manual. Also is this command necessary at all, because won't UCCNC recognise the G02/03 command in any case when it has the IJ included instead of an R.

G40 CUTTER RADIUS COMP. OFF is this command necessary. I mean won't UCCNC default to this at the beginning of a newly opened gcode file.
beefy
 
Posts: 153
Joined: Mon Sep 05, 2016 10:34 am

Re: Understanding initial gcode in file.

Postby Robertspark » Wed Dec 27, 2017 12:25 pm

Keith,

Andrew used one of the Mach3 postprocessors for sheetcam as a starting point for the uccnc+neuron post processor.

hence G40 was within the post processor but is not used by uccnc {and can be removed or left in, no loss or gain from it being there .... now we have G41+G42, G40 is of use with the uccnc development version {although I've just downloaded it and not used it yet}

G91.1 is also not applicable to uccnc {but a carry over from mach3, of no benefit or loss from it being in as uccnc will just ignore it (unless you change the screenset setting within uccnc as to how it deals with unknown gcodes)
Rob

Einstein ― “If you can't explain it to a six year old, you don't understand it yourself”
UC400eth, UC300eth, UCCNC v1.2046, Neuron Lite.
UCCNC Macro Manual
Robertspark
 
Posts: 617
Joined: Sat Sep 03, 2016 4:27 pm
Location: Nr Liverpool, England

Re: Understanding initial gcode in file.

Postby cncdrive » Wed Dec 27, 2017 1:32 pm

Hi Keith,

Yes, the G53 makes no sense for intialization, because it is non modal code.

The G90 is required, because G91/G90 is not reset on file load, so if you left the controller in G91 and your code is with G90 mode moves, but there is no G90 in the beginning of the g-code file then it will load strange, because then all moves will be incremental. The same is if the g-code file is with G91 moves and the controler is left in G90 and there is no G91 programmed in the beginning of the g-code file.

The G91.1 is not required, because the UCCNC always runs in G91.1 mode.
This mode means that the center coordinates of the arc [IJK] are in increments to the start point of the arc.
The other mode is G90.1 when the center coordinates of the arc IJK is an absolute position in the work coordinate system.
The UCCNC does not support G90.1 and you do not even need it, there is no sense to once use G90.1 and other times G91.1, in our opinion one option is enough to have and since all CAM software which we know support the G91.1 we see no point to implement the G90.1.
So, coding G91.1 is not required, but it does not harm if coded.

The G40 is not required, because for safety the UCCNC always calls a G40 on file load. But ofcourse having the G40 is not a problem either.
cncdrive
Site Admin
 
Posts: 1475
Joined: Tue Aug 12, 2014 11:17 pm

Re: Understanding initial gcode in file.

Postby beefy » Wed Dec 27, 2017 8:29 pm

Thanks very much Rob and Balazs.

That really clears things up for me. I've modified the Sheetcam post processor to get rid of the unnecessary commands.

I always have a quick browse of a gcode file before I run it, so the less commands the better.

Hope you have a good New Year.

Keith.
beefy
 
Posts: 153
Joined: Mon Sep 05, 2016 10:34 am


Return to General discussion about the UCCNC software

Who is online

Users browsing this forum: No registered users and 3 guests

cron