Page 1 of 1
Button to switch between coordinate systems
Posted: Sun Nov 06, 2022 5:01 pm
by gui_marchioro
Hello,
In my CNC machine there are two tables, each of them should have its own coordinate system as shown in the picture below.
- tablesCoordinateSystems.png (8.11 KiB) Viewed 3205 times
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
Re: Button to switch coordinate system
Posted: Sun Nov 06, 2022 5:12 pm
by TomKerekes
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.
Re: Button to switch between coordinate systems
Posted: Mon Nov 07, 2022 12:52 pm
by gui_marchioro
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.
- tablesCoordinateSystems-example.png (10.9 KiB) Viewed 3200 times
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
Re: Button to switch between coordinate systems
Posted: Mon Nov 07, 2022 5:51 pm
by TomKerekes
Hi Guilherme,
It seems to me that would result in a horizontally flipped result. Like this:
- flip.png (8.85 KiB) Viewed 3191 times
I suppose for symetrical patterns it works.
All I can think of is what I said earlier.