Hi Joe,
To move to GCode Coordinates rather than Machine Coordinate zero you might use GCode instead of C Code. Create a GCode file (MoveToZero.ngc) something like this:I am trying to do c code when adding a button. I want to add three buttons one to move x to 0 one to move y to 0 and one to move z to -.75. I tried the move command but when I move to my zero position and reset the zero then the move command to zero moves the amount i zeroed out not back to the new zero position. Tried other commands and get undeclared error messages.
G0Z-0.75
G0X0Y0
M30
Then configure the User Button to run that GCode File with:
You shouldn't really need to move to zero to set the origin instead simply set the GCode position to 0.75. You could do that with GCode to set the G92 Offset similar to above with:I use a .75 block to adjust z zero then move off the work piece and lower the z .75 and reset zero. I would like a button so I don't have to use the arrow buttons 12 times.
G92Z.75
M30
If you want to also move to the new zero for some reason you could also do this with:
G92Z.75
G0X0
M30
HTH