Re: reading Pokeys pins
Posted: Mon Oct 07, 2019 9:27 pm
Art
Just to make sure it wasn't the script I wrote another one to probe the z its a short one not doing much just probing and returning..
and i called it twice for the x centering script..
got the same results probed great the first call, but crashes on the second, the second call to z probe the g31 z- moves the spindle down but doesn't stop on the probe being hit..
I tried yield(); and engine.programstop but no help..
It almost seems to me like if your still running in a function and make the second call to the z probe function something didn't get cleared out from the first call to z probe..
Making any sense?
tried a new approach
Put this in the script run window
This ran fine in the scripter.
probed good on both calls to Z_touch()
Z_touch(); // calls the global touch off function
Engine.GCode("G4 P4");
Z_touch();
then dropped a button on the screen and created a global lib script
and this also crashes the tool on the second call to Z_touch()
global TestP = function()
{
Z_touch(); // calls the global touch off function
Engine.GCode("G4 P4");
Z_touch();
};
Gary
Just to make sure it wasn't the script I wrote another one to probe the z its a short one not doing much just probing and returning..
and i called it twice for the x centering script..
got the same results probed great the first call, but crashes on the second, the second call to z probe the g31 z- moves the spindle down but doesn't stop on the probe being hit..
I tried yield(); and engine.programstop but no help..
It almost seems to me like if your still running in a function and make the second call to the z probe function something didn't get cleared out from the first call to z probe..
Making any sense?
tried a new approach
Put this in the script run window
This ran fine in the scripter.
probed good on both calls to Z_touch()
Z_touch(); // calls the global touch off function
Engine.GCode("G4 P4");
Z_touch();
then dropped a button on the screen and created a global lib script
and this also crashes the tool on the second call to Z_touch()
global TestP = function()
{
Z_touch(); // calls the global touch off function
Engine.GCode("G4 P4");
Z_touch();
};
Gary