Page 47 of 59

Re: reading Pokeys pins

Posted: Wed Oct 02, 2019 9:51 pm
by gburk
Art

Ok That seems to works I get 1 then 0..

So it looks the same as the code I was trying and didn't seem to change to one at all, so what is the difference with the code?..

So then it must be working ?, i'm guessing my problem is when I reverse back off to the probe hit position, its not backing off far enough to trigger the probe off, and that's what is messing things up for me, because the next line of code is looking for the probe release and not getting it. so it thinks there is a back off error.
Doe's this sound like possibly the problem..

One other thing should it show a 1 true in the config, till its set to 0 false or auggie is rebooted?

Gary

Re: reading Pokeys pins

Posted: Thu Oct 03, 2019 2:11 am
by ArtF
Gary:

Probe invert will reset to false on startup. I suspect its because
your assuming the probe will stop in the same state that activated it.
Its not unusual for a probe to stop and be "unknown" in its state because its
on the hairy edge of making or not. It can be so close its making and
unmaking with vibration of the machine. Best now to assume a state.
You can ask it though by asking for GetPinDig on whatever the pin is, I fixed
that call so its accurate.

  Try a simpler test, make just a probe that probes down, then dwells for a second,
and then inverts the probe and probes upwards. Id bet the simple script runs fine,
but some logic in the entire script sequence is a bit flawed. You said you always read
0 for probeinvert even if you set it to true, so look for some other script line that is
resetting it to false. It shouldnt go false unless Auggie is reset by script library reset
or restart,,

Art



Re: reading Pokeys pins

Posted: Thu Oct 03, 2019 5:46 pm
by gburk
Art

Ok will give it a shot got the new water pump so putting it in today and hoping the computer will run.

I am not clear on the ProbePriority  in the planner does than change when you probeinvert or does that never change state endless you change it in the planner?

Gary

Re: reading Pokeys pins

Posted: Thu Oct 03, 2019 7:07 pm
by ArtF
Gary:

No, probe polarity never changes. It is the normal state of the probe , the invert only changes when you tell i tto, and always starts false.

Art

Re: reading Pokeys pins

Posted: Thu Oct 03, 2019 11:18 pm
by gburk
Art

Ok understand the priority now..

here is a script I tried

GlobalSet("ProbeInvert",0);
gcode = "F10 G31 Z-1";
Test = GlobalGet("ProbeInvert");
print("Probe 0 = "+Test);
Engine.GCode(gcode);
block("MotionStill");
gcode = "G4 P10";
GlobalSet("ProbeInvert",1);
Test = GlobalGet("ProbeInvert");
print("Probe 0 = "+Test);
Engine.GCode(gcode);
gcode = "F10 G31 Z.1";
Engine.GCode(gcode);
block("MotionStill");

I know a long dwell,
I started at Z0
when probe was hit Z DRO = -.5996
when probe backed off it released and stopped at -.5935

seems to work, like I had said I don't think I can get the probepos when hit and back off to that position, its just not backing off far enough to release the probe trigger.. in the script I set it to .1

it looks like it backed off .0061 before it released am I correct?....

or should I do a back off to where Z probepos was set, then set Z to 0 here, and then retract from here and not do a if ("ProbrHit") good it was hit ,or if not hit then back off error. most likely if I use the probehit position I will always get a back off error if backing off to that position.

It seems there will be a slight bit of difference from where it was first hit to where it was released, so now what value would you use for the Z 0
hit value or release value?.

Most likely not making sense...

Gary

Re: reading Pokeys pins

Posted: Fri Oct 04, 2019 11:26 am
by ArtF
Gary:

>>t looks like it backed off .0061 before it released am I correct?....

  Sounds about right, remember,  whether you back off with probe, or simply go to the hit point, your
within 1 step probably.  Probes are typically accurate to .001 or so, some much
more sensitive. This means you can never be sure if the probe is made or not
after a slow probe, since its that sensitive, the stop point could be a quantum
where the switch is buzzing closed or open due to vibration..
  This is why I just probe down slow ( when I probe which is rare these days),
and accept the hit point as close enough, or pull back to the reported hit point
which is the exact step count where the pokeys saw the hit.
 

Art
 

Re: reading Pokeys pins

Posted: Fri Oct 04, 2019 1:41 pm
by gburk
Art

I think the best results are, to back off to the hit point... and not look for the probe to be released...

I added some code to the script I did a g01 Z +Zprobehitpos and set the dro to 0 then I manually  jogged up a little, and then sent a g01 Z0
The probe led lit when on top of plate  but I still could slide the touch plate without much trouble the tool wasn't so tight that it was forcing into the plate
If I Probeinvert,1 and back off till probe releases then set Z to 0 do a manual jug up and then a g01 Z0 it stops just above plate the probe led doesn't light up
but I can't slide a piece of paper between the tool and plate.

So I am thinking I don't need to probeinvert,1 and back off till release, it seems a little closer at the probe hit position that the back off..

or would you Zero at probe hit position, back off till released then g01 to retract Hight?.

or Zero at back off release position?

Thanks At least I think I have it figured out fairly good right now..

Yes back off with probeinvert,1 was .0061
I also did a test that when I hit the plate i set Z to 0 and them g01 back off to the probe hit position and was getting between .0061 to .0066 on the dro

Gary

Re: reading Pokeys pins

Posted: Fri Oct 04, 2019 1:57 pm
by ArtF
Gary:

Any of those methods I think is fine..

Your tolerance of .006 makes sense, thats one step of your motors. I wouldnt bother with invert myself,
its handy for auto measuring routines maybe, but just probing to stop and g1 to probe hit is about
as accurate as anyone needs.

  Thanks for all the testing, it made the scripting that much more stable..

Art

Re: reading Pokeys pins

Posted: Fri Oct 04, 2019 4:45 pm
by gburk
Art

Thanks for you work, to get it going.

I will work on cleaning up the z script and get the X centering to work for now.
then attach them to a message and you can look them over and leave them up or say OPPS you messed up..

Thanks for all your help..

When you get real board with not to much to do If you want to take on the task for spindle indexing I'll be around..

Gary

Re: reading Pokeys pins

Posted: Mon Oct 07, 2019 6:20 pm
by gburk
Art

I ran into a slight snag in my X center function..

Here's what I have going on now...

I created a new panel that has DRO's for x y and z backlash that of course only works with probing, and my jogging function..
Seems to work good with the Z probe so far got it to .002 now..

Z probing works good with every button press now no crashes...

Now the problem is with the X find center..
My code start off calling the Z probe function, just to make sure I know where the top of part is.. This works fine..

Now I move the X to half the length of the part plus overshoot, this also works good

Now I call the Z probing function again, I'm doing this to make sure you are off the parts edge, if probe is hit your X length is to small if not hit then probe the X..

The problem is when I call the Z probe function for the second time, it seems to ignore the probe hit and crashes into the part... the probe led lights.

I have looked at the code I don't see any reason for this, calling the same z probe function with 5 or 6 button presses works fine.
and the first call from the x centering function works fine, just not the second call from the x center function..

any thought on this one..
bet you where hoping I was done, well so was I, sorry

Gary