51
Mach4 General Discussion / Re: How does G30 work?
« on: January 19, 2023, 03:37:39 PM »
Craig, can you just set the #5351,#5352,and #5353 variables right from the G Code Program?
I'm not quite sure I understand what you are asking for; if it is to get the current location for X and Y, then use the following resource.
https://www.machinetoolhelp.com/Applications/macro/system_variables.html
Look here at starting at #5021 and #5041. These are the system variables for where the machine is currently at (machine position as well as work coordinate positoin)
Just use these to set your positions for X Y.
You can access these from a macro or from the program you are running.
You should be able to set the position from the program itself.... exp: #5351 = #5021
I rarely use Mach 4's api calls for getting positions, I always find the System Variable it is stored in and I use it.
As far as I know, I have only ever used the Machine position for G30... not the work coordinate system I'm currently in....
Are you wanting to add this to the Fusion post?
let me know what you come up with.
I'm not quite sure I understand what you are asking for; if it is to get the current location for X and Y, then use the following resource.
https://www.machinetoolhelp.com/Applications/macro/system_variables.html
Look here at starting at #5021 and #5041. These are the system variables for where the machine is currently at (machine position as well as work coordinate positoin)
Just use these to set your positions for X Y.
You can access these from a macro or from the program you are running.
You should be able to set the position from the program itself.... exp: #5351 = #5021
I rarely use Mach 4's api calls for getting positions, I always find the System Variable it is stored in and I use it.
As far as I know, I have only ever used the Machine position for G30... not the work coordinate system I'm currently in....
Are you wanting to add this to the Fusion post?
let me know what you come up with.