Hello,
In my CNC machine there are two tables, each of them should have its own coordinate system as shown in the picture below.
I would like to implement a way of switch these two coordinates systems through a button. I first thought that G5X would solve my problem, but then I realize that it would just offset the system, and actually what I need is to reverse the direction of X axis.
Does anyone know a way of reversing an axis direction through C or maybe G code?
Sincerely,
Guilherme
Button to switch between coordinate systems
Moderators: TomKerekes, dynomotion
-
- Posts: 59
- Joined: Sun Aug 21, 2022 11:22 pm
Button to switch between coordinate systems
Last edited by gui_marchioro on Sun Nov 06, 2022 5:18 pm, edited 1 time in total.
- TomKerekes
- Posts: 2676
- Joined: Mon Dec 04, 2017 1:49 am
Re: Button to switch coordinate system
Hi Guilherme,
May I ask why don't you keep the Axis in the standard Cartesian directions and create the proper GCode to do whatever you need to do?
Maybe you could explain what the machine needs to do?
You could create an MCode to execute a C Program that reverses the direction of the KFLOP Axis. But then the GCode Viewer and Jog Buttons wouldn't probably work correctly.
May I ask why don't you keep the Axis in the standard Cartesian directions and create the proper GCode to do whatever you need to do?
Maybe you could explain what the machine needs to do?
You could create an MCode to execute a C Program that reverses the direction of the KFLOP Axis. But then the GCode Viewer and Jog Buttons wouldn't probably work correctly.
Regards,
Tom Kerekes
Dynomotion, Inc.
Tom Kerekes
Dynomotion, Inc.
-
- Posts: 59
- Joined: Sun Aug 21, 2022 11:22 pm
Re: Button to switch between coordinate systems
Hello Tom,
Alright, let me explain.
The idea to reverse the axis direction is that the same G code program could be executed on Table 1 and Table 2 (See image below). That is a commom feature in wood working cnc machines.
In the origin of coordinate systems from table 1 and 2, there is a spot to place and fix the wood material.
When button 1 is pressed the machine executes the program on table 1. Meanwhile the operator will be placing the material on table 2. When the work is done on table 1, the operator press button 2 and the program is executed on table 2.
Sincerely,
Guilherme
Alright, let me explain.
The idea to reverse the axis direction is that the same G code program could be executed on Table 1 and Table 2 (See image below). That is a commom feature in wood working cnc machines.
In the origin of coordinate systems from table 1 and 2, there is a spot to place and fix the wood material.
When button 1 is pressed the machine executes the program on table 1. Meanwhile the operator will be placing the material on table 2. When the work is done on table 1, the operator press button 2 and the program is executed on table 2.
Sincerely,
Guilherme
- TomKerekes
- Posts: 2676
- Joined: Mon Dec 04, 2017 1:49 am
Re: Button to switch between coordinate systems
Hi Guilherme,
It seems to me that would result in a horizontally flipped result. Like this:
I suppose for symetrical patterns it works.
All I can think of is what I said earlier.
It seems to me that would result in a horizontally flipped result. Like this:
I suppose for symetrical patterns it works.
All I can think of is what I said earlier.
Regards,
Tom Kerekes
Dynomotion, Inc.
Tom Kerekes
Dynomotion, Inc.