Page 48 of 59

Re: reading Pokeys pins

Posted: Mon Oct 07, 2019 9:27 pm
by gburk
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

Re: reading Pokeys pins

Posted: Tue Oct 08, 2019 1:41 am
by ArtF
Gary:

Hmm, before I go digging, can you list the Ztouch script here..
Does sound like somethings screwy.. Ill try dropping it in a button to see..

Art

Re: reading Pokeys pins

Posted: Tue Oct 08, 2019 1:50 pm
by ArtF
Gary:

On a side note, I checked your step calibration scripts, math looks right in reading.. :)

Art

Re: reading Pokeys pins

Posted: Tue Oct 08, 2019 5:32 pm
by gburk
Art

Thanks for checking the math..

Here is the Z probe script that has problems with being called twice from a function...

Gary

Re: reading Pokeys pins

Posted: Tue Oct 08, 2019 6:28 pm
by gburk
Art

Not sure if you need the panel but here it is just in case.

Gary

Re: reading Pokeys pins

Posted: Tue Oct 08, 2019 11:06 pm
by gburk
Art

Decided to try not calling the Z probe function from the X center function and just added some of the z probe code to the x centering function so it all was in one function..

I probed down hit the part top and retracted to .250. this worked good
Then I did a G01 X to move off the part but I used a small value so when I Z probed down now to see if I was off the part it would hit the part
and it did hit the part but same problem didn't stop crashed the part..

so not sure why it doesn't like to do a Z g31 correctly twice.. in a lib function..

works fine if I do a button press, it probes z and retracts then exits the function.
Hit the button again and it will Z probe fine tried the button press 10 times in a row and worked every time..

Gary

Re: reading Pokeys pins

Posted: Wed Oct 09, 2019 1:44 pm
by gburk
Art

Last attempt.. for now

I loaded the lib function X centering into the script window
Then I rem // out the global function, and the start and end brackets.

I ran the script in the script window, it seemed to work there.
probed down hit probe retracted, then G01 over in the X axis no problem, now I probed down again in the Z hit part and retracted fine, the second probe on z would show as an error, "that you are not off the parts edge", then it would rapid back to X start position.. it all seemed to work fine..

I don't know of any other test to try..
But to me it all points to the lib function's not probing twice, but probes twice fine in the scripter and button presses... 

Gary

Re: reading Pokeys pins

Posted: Wed Oct 09, 2019 4:53 pm
by ArtF
Thanks Gary..


Ill see what I can find..

Art

Re: reading Pokeys pins

Posted: Fri Oct 11, 2019 2:26 pm
by gburk
Art

Ok thanks,

One new question, how do you change the colors in the panel the background of the panel, other than loading a bitmap image?
Some how one of my panels got changed to a light grey, and i see no color option except to load a new image, and i can't duplicate the default colors if i create a new image..

Thanks gary 

Re: reading Pokeys pins

Posted: Sun Oct 13, 2019 2:38 pm
by ArtF
Ill have to check Gary, Im not sure top of head. Ill post shortly.

Art