Initial G codes?
- sudocrapo
- Offline
- New Member
Less
More
- Posts: 6
- Thank you received: 0
06 Apr 2022 00:50 #239408
by sudocrapo
Replied by sudocrapo on topic Initial G codes?
Gmocrapy loaded these (main screen lower left.)
MO M5 M9 M48 M53
G8 G17 G20 G40 G49 G54 G64 G80
G90 G91.1 G94 G97 G99
Some are ok, others are strange G8?
Trying to trouble shoot several unexpected movements.
For one, It has unusual Z movements on canned cycles. I want to remove G80.
On every drill hole the Z axis is going all the way up to Z0 in between each hole instead of just going up .1" as set in my .ngc file.
I can put the same g-code file in my mill and it drills as expected.
I would just like to know where these are loaded from.
MO M5 M9 M48 M53
G8 G17 G20 G40 G49 G54 G64 G80
G90 G91.1 G94 G97 G99
Some are ok, others are strange G8?
Trying to trouble shoot several unexpected movements.
For one, It has unusual Z movements on canned cycles. I want to remove G80.
On every drill hole the Z axis is going all the way up to Z0 in between each hole instead of just going up .1" as set in my .ngc file.
I can put the same g-code file in my mill and it drills as expected.
I would just like to know where these are loaded from.
Please Log in or Create an account to join the conversation.
- MaHa
- Offline
- Platinum Member
Less
More
- Posts: 405
- Thank you received: 163
06 Apr 2022 01:49 #239409
by MaHa
Replied by MaHa on topic Initial G codes?
If there is an entry in the .ini file and a file in the subroutine directory on_abort.ngc, you can set there exactly what you want on abort, reset, or even hit esc key.
[RS274NGC]
ON_ABORT_COMMAND=O <on_abort> call
If Z is at 0 when call G81 and use G98 (retract to old_Z), this will happen as you say.
So the retract behaviour is controlled by Z,R and G98
[RS274NGC]
ON_ABORT_COMMAND=O <on_abort> call
If Z is at 0 when call G81 and use G98 (retract to old_Z), this will happen as you say.
So the retract behaviour is controlled by Z,R and G98
Please Log in or Create an account to join the conversation.
- Todd Zuercher
- Away
- Platinum Member
Less
More
- Posts: 4957
- Thank you received: 1441
06 Apr 2022 12:50 #239439
by Todd Zuercher
Replied by Todd Zuercher on topic Initial G codes?
Removing G80 from your preamble will do nothing, it is active any time you are not currently performing a canned cycle. It is a very good code to always have in your preamble, because it will turn off a currently active canned cycle that might have accidentally been left on when you restart your file, such as if you abort a g-code file using a canned cycle during the canned cycle.
G8 is lathe radius mode, are you using a lathe? It is the default setting (weather or not it was specified.) When G8 is set X move the distance as commanded. The alternative being G7 lathe diameter mode where X moves are half of commanded.
The rest of them all look like pretty standard machine initialization states, most if not all being the default state even if not specified in the ini file. (The GUI used having no bearing on it.)
You need to remember almost all modal G-codes are members of groups, where one of them in that group MUST be active, so there is a default active code that WILL be active even if it has not been specified. The defaults are programmed deep inside the source code of Linuxcnc, if any of the defaults are not to your liking that is why the startup codes can be specified in your ini file with "RS274NGC_STARTUP_CODE =". Gmocapy is merely displaying the current active states it is not setting them.
G8 is lathe radius mode, are you using a lathe? It is the default setting (weather or not it was specified.) When G8 is set X move the distance as commanded. The alternative being G7 lathe diameter mode where X moves are half of commanded.
The rest of them all look like pretty standard machine initialization states, most if not all being the default state even if not specified in the ini file. (The GUI used having no bearing on it.)
You need to remember almost all modal G-codes are members of groups, where one of them in that group MUST be active, so there is a default active code that WILL be active even if it has not been specified. The defaults are programmed deep inside the source code of Linuxcnc, if any of the defaults are not to your liking that is why the startup codes can be specified in your ini file with "RS274NGC_STARTUP_CODE =". Gmocapy is merely displaying the current active states it is not setting them.
Please Log in or Create an account to join the conversation.
- sudocrapo
- Offline
- New Member
Less
More
- Posts: 6
- Thank you received: 0
06 Apr 2022 17:18 #239457
by sudocrapo
Replied by sudocrapo on topic Initial G codes?
Thanks for the input, I just like to have full control over which g-codes are called up. Most all of these codes are in my CAM files anyway.
From reading between the lines there is no file calling up these codes, they are default codes from within the software. The only way to control them is creating your own.
For me It looks like MaHa's advise to create a "on_abort.ngc" type file is the way to go.
Coming from years in the the Mach3 world, this has been a steep and frustrating learning curve.
The settings I am use to seeing or changing were just a couple of mouse clicks away. But wait, that SmoothStepper board is...Hmmm
Watching that Z go up to Z0 on a project with over 70 drilling ops was ridiculous. I had to leave the shop and have a beer, if it killed itself so be it.
My CAM should only to rapid to R (G99?) in between ops.
-- I'll double check that G98 heads up.
Ive always set clearance (for holding and features) in CAM and it has followed that, irregardless of canned cycle or other op.
Thanks Guys
From reading between the lines there is no file calling up these codes, they are default codes from within the software. The only way to control them is creating your own.
For me It looks like MaHa's advise to create a "on_abort.ngc" type file is the way to go.
Coming from years in the the Mach3 world, this has been a steep and frustrating learning curve.
The settings I am use to seeing or changing were just a couple of mouse clicks away. But wait, that SmoothStepper board is...Hmmm
Watching that Z go up to Z0 on a project with over 70 drilling ops was ridiculous. I had to leave the shop and have a beer, if it killed itself so be it.
My CAM should only to rapid to R (G99?) in between ops.
-- I'll double check that G98 heads up.
Ive always set clearance (for holding and features) in CAM and it has followed that, irregardless of canned cycle or other op.
Thanks Guys
Please Log in or Create an account to join the conversation.
- Todd Zuercher
- Away
- Platinum Member
Less
More
- Posts: 4957
- Thank you received: 1441
08 Apr 2022 12:24 #239658
by Todd Zuercher
Replied by Todd Zuercher on topic Initial G codes?
You do have full control, it is called your g-code file, all of these important codes should be in the first couple lines of every g-code file you run. This is industry standard practice, on industrial machines. (My day job is setting up g-code files tor machines with Fanuc controls and other commercial controls at a factory.) I have never used Mach3. But relying on settings set by startup options set in the control is dangerous.
Please Log in or Create an account to join the conversation.
Time to create page: 0.120 seconds