reading Pokeys pins

C Scripting questions and answers
gburk
Old Timer
Posts: 324
Joined: Sun Nov 25, 2018 3:57 pm

Re: reading Pokeys pins

Post by gburk »

Art

I will also check the globals, I think right now only thing is the probeinvert,1 backoff but works without it, but I got the impression from you that the 0 position could be closer than my results...

Gary
User avatar
ArtF
Global Moderator
Global Moderator
Posts: 4593
Joined: Sun Sep 05, 2010 6:14 am
Contact:

Re: reading Pokeys pins

Post by ArtF »

Gary:

Well, the ProbeHit positions registers tell you the actual position of the hit. It then decelerates to zero speed.
So its all a function of speed. IF your moving very slow, the probe pretty much can stop instantly. If you
query the hit registers and do a g1 to that location, your about as accurate as you can get.

  So the routine should be

1) probe down.
2) If probehit is true, read hit registers and do a g1 to that location.


  Its probe condition at that point is unknowable, it may close or not depending on system flex,
tolerance etc... but thats about as accurate as you can get ..

Art



gburk
Old Timer
Posts: 324
Joined: Sun Nov 25, 2018 3:57 pm

Re: reading Pokeys pins

Post by gburk »

Art

Back to computer power shutting off while booting, think it may be that the water pump died I got into the bios for a few seconds  to I see the cpu temp going to 130 and raising them power shuts off..

any way I had copied all of auggies files and folders to a sd drive a couple days ago.
And I have an old laptop so I installed auggie and then copied all the files folders to laptop, but auggies configs are not being changed.

The steps are staying at installed version and not changing when I copy all the files over, what file stores this info..
I had all the steps set good I was getting very good travel distances, I really am hoping I don't have to recalibrate again..
Seeing I didn't write them down.. :-\

any suggestions..

Gary
gburk
Old Timer
Posts: 324
Joined: Sun Nov 25, 2018 3:57 pm

Re: reading Pokeys pins

Post by gburk »

Art

If I ProbeInvert,1 should that chance it from false to true in the planner config The ProbePolarity doesn't seem to change back and forth from false to turn,
always stays the same as you set it in the config.. so if I want to invert it to back off it doesn't seem to be inverting..

Not sure want you are seeing this but maybe that could be part of my back off problem..

I ran one line of code in the script window to ProbeInvert,1 and them checked the config it was still false.. don't know if you are updating the config on every change or not.. just a thought..

Gary
User avatar
ArtF
Global Moderator
Global Moderator
Posts: 4593
Joined: Sun Sep 05, 2010 6:14 am
Contact:

Re: reading Pokeys pins

Post by ArtF »

Gary:

No, the probeinvert is a modifier. You can GlobalGet its value as its just a global. If set to true, it inverts the config setting as it sends it to the pokeys, telling the pokeys to expect it to trip on the inverse of your config setting. Ill trace to see why it
may not be responding that way.

Art
gburk
Old Timer
Posts: 324
Joined: Sun Nov 25, 2018 3:57 pm

Re: reading Pokeys pins

Post by gburk »

Art

Not sure how to test to see if its set to true or false

tried this but always get a 0 value.

GlobalSet( "ProbeInvert", 1 );
sig = GlobalGet("ProbeInvert");
print("Probe"+sig);

also you didn't say as to what file the config is saved in.

Gary
User avatar
ArtF
Global Moderator
Global Moderator
Posts: 4593
Joined: Sun Sep 05, 2010 6:14 am
Contact:

Re: reading Pokeys pins

Post by ArtF »

Gary:

Think I see the issue.. Ill get back to you soon.

Art
gburk
Old Timer
Posts: 324
Joined: Sun Nov 25, 2018 3:57 pm

Re: reading Pokeys pins

Post by gburk »

Art

Thanks,

I would like you to check out this panel and script for auto calculating the steps, may save me some time recalibrating the axis's, mainly check my math ???
it seems to work just needs some polishing up as long as the math is correct..

Gary
Attachments
StepsCalc.zip
(69.31 KiB) Downloaded 173 times
User avatar
ArtF
Global Moderator
Global Moderator
Posts: 4593
Joined: Sun Sep 05, 2010 6:14 am
Contact:

Re: reading Pokeys pins

Post by ArtF »

Gary:

Can you try this script and tell me if it prints 1 , then 1 ..

GlobalSet("ProbeInvert", 1);
test = GlobalGet("ProbeInvert");
print( test);
GlobalSet("ProbeInvert", 0);
test = GlobalGet("ProbeInvert");
print( test);

Art
User avatar
ArtF
Global Moderator
Global Moderator
Posts: 4593
Joined: Sun Sep 05, 2010 6:14 am
Contact:

Re: reading Pokeys pins

Post by ArtF »

Gary:

Sorry, I meant it prints 1, then 0, repeating each time. IT does that here and Im wondering if its just
a version mismatch between us or something..

Art
gburk
Old Timer
Posts: 324
Joined: Sun Nov 25, 2018 3:57 pm

Re: reading Pokeys pins

Post 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
Last edited by gburk on Wed Oct 02, 2019 10:56 am, edited 1 time in total.
User avatar
ArtF
Global Moderator
Global Moderator
Posts: 4593
Joined: Sun Sep 05, 2010 6:14 am
Contact:

Re: reading Pokeys pins

Post 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


gburk
Old Timer
Posts: 324
Joined: Sun Nov 25, 2018 3:57 pm

Re: reading Pokeys pins

Post 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
User avatar
ArtF
Global Moderator
Global Moderator
Posts: 4593
Joined: Sun Sep 05, 2010 6:14 am
Contact:

Re: reading Pokeys pins

Post 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
gburk
Old Timer
Posts: 324
Joined: Sun Nov 25, 2018 3:57 pm

Re: reading Pokeys pins

Post 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
Post Reply

Who is online

Users browsing this forum: No registered users and 9 guests