G-codes status changes from G18 to G17 when starting program

More
16 Jul 2019 20:27 #139593 by kostas
I can't understand why programmed ZX plane changes to XY when the program starts.
I have started Linuxcnc with G18 and only X and Z axes are defined in the configuration.

Screenshot attached with program stepped to a few lines of code. You can see the G-codes from Linuxcnc status in the upper left.

I'm using Linuxcnc 2.8.0-pre1
Attachments:

Please Log in or Create an account to join the conversation.

More
16 Jul 2019 20:49 - 16 Jul 2019 20:50 #139597 by fixer
It is a statetags issue. Queued moves will be correct, error is only seen on the displayed modal codes. Interpreter sees M30 at the end and sets an initial modal state.

This is why I like to use % instead of M30.

linuxcnc.org/docs/html/gcode/m-code.html#mcode:m2-m30
Last edit: 16 Jul 2019 20:50 by fixer.
The following user(s) said Thank You: kostas

Please Log in or Create an account to join the conversation.

More
16 Jul 2019 21:05 #139603 by Todd Zuercher
You probably need to add G18 to the startup codes in the [RS274NGC] section of your INI file
[RS274NGC]

# g-code modal codes (modes) that the interpreter is initialized with on startup
RS274NGC_STARTUP_CODE = G18 G20 G90

linuxcnc.org/docs/html/lathe/lathe-user.html

Please Log in or Create an account to join the conversation.

More
16 Jul 2019 21:34 #139608 by kostas
@Todd: Yeah, I have already done this.

@fixer:
"Selected plane is set to XY plane (like G17)."

Ha! I didn't pay attention to this in the documentation. It is a little strange that the interpreter decides to revert to G17, instead of the startup value, though.
I checked this and it does not change to G17 when using %

Please Log in or Create an account to join the conversation.

Time to create page: 0.135 seconds
Powered by Kunena Forum