G54 restored at M02?
- terkaa
- Offline
- Elite Member
-
- Posts: 261
- Thank you received: 3
We are using different coordinate systems for different fixtures. This way it is faster to switch between fixtures. Now I have seen that If we use G55 or G56 coordinates(selected at g-code file). Everything is fine until program ends. After program end Linuxcnc changes back to G54. This is not what we want. We would like to have remain coordinate system selected until it is changed by user or G-code. Is this behaviour written in code? Or can it be modified with INI?
Tero
Please Log in or Create an account to join the conversation.
- eFalegname
-
- Offline
- Elite Member
-
- Posts: 253
- Thank you received: 30
% vs M02
I personally use % to wrap my Gcode avoiding the reset of my current coordinate system.
file requirements docs.
However you must have a very complete preamble to avoid dangerous movements.
Please Log in or Create an account to join the conversation.
- terkaa
- Offline
- Elite Member
-
- Posts: 261
- Thank you received: 3
So this:
%
N001....
N002...
%
Is ok?
Tero
Please Log in or Create an account to join the conversation.
- Rick G
-
- Offline
- Junior Member
-
- Posts: 26
- Thank you received: 155
You do need to check everything that M02 was doing and program any you need before the % that ends your program.
Both of these commands have the following effects:
Change from Auto mode to MDI mode.
Origin offsets are set to the default (like G54).
Selected plane is set to XY plane (like G17).
Distance mode is set to absolute mode (like G90).
Feed rate mode is set to units per minute (like G94).
Feed and speed overrides are set to ON (like M48).
Cutter compensation is turned off (like G40).
The spindle is stopped (like M5).
The current motion mode is set to feed (like G1).
Coolant is turned off (like M9).
So if your original program did not use say a M5 to turn the spindle off at the end of the program you would add that to the end of the program. Same for any other command M2 preforms. Also be sure to use a proper preamble at the start of each program to set your machine up.
%
M3
...
....
M5
%
Rick G
Please Log in or Create an account to join the conversation.