reading Pokeys pins

C Scripting questions and answers
User avatar
ArtF
Global Moderator
Global Moderator
Posts: 4647
Joined: Sun Sep 05, 2010 6:14 am
Contact:

Re: reading Pokeys pins

Post by ArtF »

Gary:

  Sounds like a resistive probe, there shouldnt be any conduction when its open..
Perhaps cleaning it well, hard to say.

Im not sure about the jog tap, Ill look into that, essentially the mouse is captured
when you press a jog button, so any release is seen and used to stop. I'll do a couple
tests to see what may cause that ..

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

Re: reading Pokeys pins

Post by gburk »

Art

Think I have the probe letting the signal though and the led lighting dim messed with it awhile and looks like I have that fixed..

Still some probing problems I have to assume there internal to auggie…

If I hit touch off Z it runs fine touches off then backs off and then retracts to the set Z height.. I need to set a slow probe feed rate at 5 no more then 10.
or seems to loose steps mostly on retract.
But if I Zero the z now and then run the touch off Z again the feed rates are off it probes to fast and retracts to fast so it misses steps retracting..
The touch off Z script has the slow feed rate setting in it only, so I don't understand how if the script is run the second time it isn't running at the slow feed rate
it seems to ignore the slow feed rate on the second run, not sure what feed rate its using but way to fast and not the setting in the script..

update: I sleep on it last night and tried again this morning same problem..
It probes down and touches off good, problems seem when its backing off to open the probe signal I set invert probe to 1 and save the probe hit position and then try to back off to that position and open probe contact.
Its had to tell what's  going on from there but I thought it was loosing steps retracting, but in fact motor its skipping but it looks like from the dro  that its still trying to move down so crashing into touch plate.
maybe I should not try to backoff and invert the probe.. and use a different approach

Thinking maybe probe down touch off, then reverse to just for example to 0.02 re probe down touch off again and save that as the top of touch plates position then backup to 1.0,  form what I can see the problem starts trying to back off from the saved probe hit position maybe it didn't overshoot that position enough to backoff and release the trigger.. the BOB probe led does stay on so it looks like it not releasing

I can't test it simulation mode because I don't seem to have a way to simulate a probe hit, would be a safer way to test..

Any thoughts on this approach.   

Gary
Last edited by gburk on Sun Sep 08, 2019 2:18 am, edited 1 time in total.
gburk
Old Timer
Posts: 324
Joined: Sun Nov 25, 2018 3:57 pm

Re: reading Pokeys pins

Post by gburk »

Art

Ran it again by using G31 Z0.2 that should be upwards retract the dro may be sitting at -.6 or -.5 when the probe is hit going down but for some reason still want to move in the neg direction.. during retract do you think there's a problem with the G31 Code? I can't seem to get any consistence one time it may work usable on the first run then it just is all out of wacke doesn't seem to know where it is sitting and wants to move down instead of up.

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

Re: reading Pokeys pins

Post by gburk »

Art

Sorry for all the messages..

I ran a few more test this morning..

The touch probe that has a high signal till its hit, seems to work fine I ran 10 Z touch offs and with no problems back off was good no crashes thank goodness tips are expensive...

It seems the problem is doing a tool touch off to a touch plate, my touch plate is set to low signal.
If I run the z probe hold the plate in my hand and tap the tool it seems to work every time.
But when I place the tool plate on the top of the part solid surface, is when it messes up probe hits and stops like it should but doesn't reverse instead of reversing it plunges down crashes, I'm using a gnd signal for the probe..
all tests were run with the same script..
Touch off plate is isolated.

both probes go to the same connector on the BOB, haven't taken the touch probe apart so not sure of it setup but must be grounded till hit.
don't see how to do that with a solid touch plate..
Endless timing needs to be fast when its hit..
Also the feed rate still doesn't seem to change correct if I set it to 5 it shows 10 or more in the feed rate dro 
I'm not sure what to do now

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

Re: reading Pokeys pins

Post by ArtF »

Sorry Gary, Hurricane had me out of power for awhile..

So the touch probe works.. but the touch plate doesnt? But it does when its in your hand..
Just not when its on the part. Your stumping me as to cause. Must be some sort of ground loop
where your 0vdc isnt the same as ground at that point. You must be in a bit of a floating
ground at that point maybe? What does a meter say across the probe when jogged down to touch it?


  Ill check the feedrate display when changed, what command are you using to change it?
A Gcode command or a SetFeedRate command? Or a Feedrate = xxxx type of thing..

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

Re: reading Pokeys pins

Post by gburk »

art

So you got the hurricane and it missed me sorry. I know what its like not to have power have lost it for over a week a couple times wouldn't mind but when it 95 and no air real tuff to handle..

I found a work around for the Feed rate I removed it form the Engine.GCode and added the Engine.FeedRate() at that seems to set the correct feedrates now.
I don't thing the Feed rate is a problem when running a gcode file only seemed to happen in a script.

Also I seem to have a new problem, here go's if I use auggies jog panel and jog to say .6256 then I zero the axis.
Now I use my jogging panel and set it to travel .02 and hit the jog button the first move is to .6256 and not to .02 the second move will be correct and only move .02 I know it doesn't make sense, telling it to move .02 and jogging to the last jogged position..

as for the probe you have it right holding the plate in air works fine.
I have it attached to a .250 piece of plastic. hoping to isolate it..
The probe does trigger when hit going down and it does stop moving, I have a 0.04 sleep there it seems to get confused and doesn't reverse direction and I don't think it is backing off to invert the probe signal

Thanks gary 
User avatar
ArtF
Global Moderator
Global Moderator
Posts: 4647
Joined: Sun Sep 05, 2010 6:14 am
Contact:

Re: reading Pokeys pins

Post by ArtF »

Gary:

  I think I see the pattern. It has to do with the GCode interpreter not knowing where it is after a script move.
When you issue a G1X.5, it really translates to G1X.5 Y(LastknownY) Z(LastKnownZ)..etc..

  When running Gcode it knows last position, apparently Im missing the resyncing on some script calls.
A Engine.GCode call should get position synced at this point.  After a probe the position should
also be synced. Keyboard jog will sync as of a version or two back, so by your description it may be the zero
axis that isnt. How are you zeroing it? On the screen button?

  Ill check why a Engine.Gcode didnt sync your feedrate as well. Sorry for all these bugs but we havent been
interupting Gcode for script runs till you started along your path. We'll catch them one by one..

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

Re: reading Pokeys pins

Post by gburk »

Art

Thanks hope I'm not being to much of pest, seems for the most part that auggies has been working for what it was intended till I had to mess things up ???

As far as zeroing the axis I am using the button when jogging.. probing I am setting the position in the script
but if I do a Z touch off with the button, and then Zero the axis with the button I don't see the dro move to the wrong distance,  endless when I zero the axis after the z probe its messes something up I can't see?.

I added the Engine.Feedrate() to the probing and that's seems to set it correctly just in the Engine.GCode from a script is where I see the problem..

I made a new wire for the touch off probe but didn't seem to fix it plunging down after the probe hit...

Its may work one time correct then crash on the next 3 runs.. then work correct, I tried feedrates from 5 to 100 not much of a change..

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

Re: reading Pokeys pins

Post by gburk »

Art

Messed with the probe some more, did the probe plate touch in air holding with my hand again
It also messes up if you don't just tap the tool with the plate if you hold the plate so it contacts the plate for any longer than a tap and remove it does the same thing as if plate on top of part..

so from I can see now is if the plate is triggered and not released in a few m seconds it doesn't reverse and release the signal and then retract, it instead plunges down

if you tap and release the plate real fast in air its ok.. Not sure how to correct this on my end seems like some sort of timing problem..

Hopefully this is correct let me know you thoughts on this..

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

Re: reading Pokeys pins

Post by ArtF »

Gary:

Isnt that timing in your scripts? As I recall Auggie only probes to the hit and stops.
So after the hit, the script changes the direction and the probe trigger level, then commands
a move away from the plate. Did you put any prints in there to see if the commands to
reverse are in proper order. It may be for example, that your probe for some reason see's
the hit and stops, but then the hit is released as capacitance in the circuit builds
up a charge so it no longer see a short. I can see where that may screw up the logic of a
script if it checks for the hi or low before changing direction. If the hit only makes it a short
for a short while until it charges up, then the move away may just not move at all as it sees
the reverse probe move as complete. All Auggie will do is probe till hit , whatever hit is defined as..
a short or an open..

Art


  Im not sure anymore what logic was used for the probing in the scripts. Print
statements may help find out whats going on in this one..

Art


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

Re: reading Pokeys pins

Post by gburk »

Art

Hopefully its me, maybe when you figure out the setting the zero button to zero and it jogs or probes to the last jogged position may help..

I am going to try the probing with mach3 and 4 to see if works ok, that may at least tell me it not the BOB or wiring.. haven't had mach hooked up to the pokeys in a long time so anything can happen...

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

Re: reading Pokeys pins

Post by gburk »

Art

Tested with mach4 and all seems fine Z probing worked good both with the touch plate and the probe..
In mach4 the probe was non inverted signal, and with the touch plate I had to invert the signal but ran it 10 times with each probe, and no errors or crashing into the part or touch plate, so I have to assume the BOB and wiring is ok..

Also seems to back with the old problem with the probing script that it doesn't seem to run when auggie loads if I hit one of the probe buttons it prints out all the print lines but doesn't do anything no axis movement, if I run it in the script window it runs with the button presses now and every time till I exit and restart auggie then I have to rerun the script again..

Thanks gary
Last edited by gburk on Fri Sep 13, 2019 12:31 pm, edited 1 time in total.
gburk
Old Timer
Posts: 324
Joined: Sun Nov 25, 2018 3:57 pm

Re: reading Pokeys pins

Post by gburk »

Art

Tested mach3 now also same results as mach4 probe worked ok, the only difference in mach3 was the probe had it be inverted and touch plate no inverted..

Been testing the script in auggie for probing, I even deleted the old script and starting rewriting a new one line by line saving and then rebooting auggie and testing the button but it seems most of the time as I get to the part to set the probe to invert 0 and then the line of engine.gcode  this is when I seem to have the script not running anymore at boot up and have to run it in the editor first...

Also I removed all the sleeps and prints in the script, but still if the probe is contacted for longer than a quick tap it doesn't retract almost seems like it get lost there.

I really don't know what to change in the script to make it correct, only thing I can think of is making a spring release touch plate, to match the probe..
But if it works with 2 other software programs I assume its wiring is correct..
only difference I can see is in mach4 and 3 is the probe can be set to be inverted or not inverted and I assume keeps that logic till changed in the setting..

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

Re: reading Pokeys pins

Post by gburk »

Art

Really sorry for all the messages..

Did a lot more testing with the probe script, and having to run it in the script window first..
You will most likely think I'm crazy  :(
But I reentered the script line by line again, and checked script back in ran it and all was good.
Now I closed auggie,
Do you remember when I said a while back that 3/4 of the time auggie reboots itself after closing. thinking that may be the problem.
If I just continue loading auggie from there is where I think the script that's in the scripter window gets corrupt somehow maybe other scripts also don't know for sure..
the script will not run anymore after booting endless I run it in the scripter window.. and there may be other problems..

Now if I don't boot auggie  and hit exit, wait a couple seconds and then reboot auggie the script will run now, without having to run it in the script window first..

I did this line by line for the complete script and the whole script runs ok without needing to run in the scripter first..
It also seemed to fix the Engine.GCode running with the feed rate, now the feed rate is changing correctly in the script..

Am I making any sense?.

Thanks gary
User avatar
ArtF
Global Moderator
Global Moderator
Posts: 4647
Joined: Sun Sep 05, 2010 6:14 am
Contact:

Re: reading Pokeys pins

Post by ArtF »

Gary:

:), ok. Lets make sure I understand. Your script works properly on reentry, but if you exit auggie it reboots itself,
and the scripts seem to fail.

>>Now if I don't boot auggie  and hit exit, wait a couple seconds and then reboot auggie the script will run now, without having to run it in the script window first..

  How do you mean, "If I dont reboot auggie", is it giving you a choice?

Im wondering the the polarity is getting screwed up. I suspect maybe the polarity setting isnt storing properly,
the way it should work is the setting under config is the permanent polarity at startup. When you call for
an inverted signal its only temporary until next startup or inverted again.

  I have an idea that maybe the polarity is somewhat random based on last setting. It would explain 
a lot as your symptoms seem to agree with the polarity not being as expected..

Ill check that..

Let me know what you mean by not rebooting auggie, Im curious as to how that works as it fixed
the feedrate as well.. thats kinda weird..

Art
 
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests