Hi,
open the screen editor and open the screen load script. Scan down through the file till about line 225
until you find the GoToWorkZero function:
---------------------------------------------------------------
-- Go To Work Zero() function.
---------------------------------------------------------------
function GoToWorkZero()
--mc.mcCntlMdiExecute(inst, "G00 X0 Y0 A0")--Without Z moves
mc.mcCntlMdiExecute(inst, "G00 G53 Z0\nG00 X0 Y0 A0\nG00 Z0")--With Z moves
end
Note that the active line (mc.mcCntlMdiExecute(inst, "G00 G53 Z0\nG00 X0 Y0 A0\nG00 Z)) has an A axis move.
I'm guessing that you don't have an A axis defined in your machine. So either edit the line to delete the A axis
reference or comment it out and add this line instead:
mc.mcCntlMdiExecute(inst, "G00 G53 Z0\nG00 X0 Y0 \nG00 Z)
To add a physical button....define a pin on your controller as an input, say ISIG_INPUT10 and then put this in the
SigLib{} in the screen load script:
[mc.ISIG_INPUT10]=function(state)
if state==1 then
GoToWorkZero()
end
end,
Note that this is an entry in the signal library table and the second 'end' statement concludes the in line function definition
and the trailing ',' (comma) concludes the table entry. Don't forget the trailing comma!
Craig