reading Pokeys pins

C Scripting questions and answers
Post Reply
gburk
Site Admin
Posts: 324
Joined: Mon Nov 26, 2018 2:57 am

Re: reading Pokeys pins

Post by gburk »

Art

Thanks

I did a different test with the probing..

I loaded the x center script in the script window, and at the end i add  Xcenter(); to run it

then ran the script.. it did the z probe OK twice both were called with a call to the Z_probe() function.. then exited the xcenter because  the second probe was hit and not off the parts edge.. worked ok..

what i am finding now, even in the script run window..
is if the second probe doesn't hit top of part and is off the edge of the part, then the script continues on.
the next line is for the X to G31 back hoping to hit the parts edge and trigger the probe.
but Its seems like all G0 G01 G31 are not executed now the is no axis movement, all my print statements display but nothing moving..
But if i replace the g01 g31 g0 with a RapidTo FeedTo, the axis's will move..

Just another thing to look at..

Gary
ArtF
Global Moderator
Global Moderator
Posts: 4557
Joined: Sun Sep 05, 2010 5:14 pm
Contact:

Re: reading Pokeys pins

Post by ArtF »

Gary:

  I suspect all those are related. Thx for the clues, they point to the way the system
cancels a probe if its called while already hit..

Art
ArtF
Global Moderator
Global Moderator
Posts: 4557
Joined: Sun Sep 05, 2010 5:14 pm
Contact:

Re: reading Pokeys pins

Post by ArtF »

Gary:

  I used the following as my test function .. it screwed up when the probe was added after the g1's
by erasing the g1's. The new code now injects the probe only after any previous g1's gave been completed.
The block after a probe in a script is still necessary. Ill have it posted in about 20 minutes.

>>global ProbeTest = function()
{
  Engine.GCode("G31Z-10");
  block("MotionStill");
  Engine.GCode("G1X20");
  Engine.GCode("G31Z0");
  block("MotionStill");
  Engine.GCode("G1X0");
 
};

Art
gburk
Site Admin
Posts: 324
Joined: Mon Nov 26, 2018 2:57 am

Re: reading Pokeys pins

Post by gburk »

Art

Been working on it, had some problems with my scripts, was still getting Way off feed rates and after the script finished I was having to hit Estop and then hit it Again or I couldn't jog any axis with your on screen jog buttons...

So I decided to go back to square one, I uninstalled auggie and gear and deleted all the folders, found one strange thing it was also showing auggie 3.6c as installed but couldn't get rid of it, so I deleted all reference's to gear and auggie in the system registers.. that seemed to work..

Reinstalled it again..

Now I'm working on the scripts again from scratch have the Z Touch off working, and about 1/4 way though the X centering, been adding it in small bits and then testing it..
So far so good haven't had a feed rate problem yet, or a jog problem, I guess if I do it this way, if I do run into the jog or feed rate or G1  problems I will be able to point you to were they started..

Hopefully by tomorrow  night I will have the X center finished or Broken..

Gary
ArtF
Global Moderator
Global Moderator
Posts: 4557
Joined: Sun Sep 05, 2010 5:14 pm
Contact:

Re: reading Pokeys pins

Post by ArtF »

Gary:

No rush. :)

Big storm here, I may be offline if the trees' topple..

Art
gburk
Site Admin
Posts: 324
Joined: Mon Nov 26, 2018 2:57 am

Re: reading Pokeys pins

Post by gburk »

Art

Good luck with storm.
Sounds like you need a generator, up there also..
I hate no power.

I will keep messing around..

Gary
Last edited by gburk on Thu Oct 17, 2019 11:41 pm, edited 1 time in total.
gburk
Site Admin
Posts: 324
Joined: Mon Nov 26, 2018 2:57 am

Re: reading Pokeys pins

Post by gburk »

Art

After a little testing the only thing so far I am finding, my be using variable names in the probing function..

I wrote a script to probe Z back off jog X+ off the parts edge then probe Z but now its off parts edge, then probe X- and hit probe retract then jog X- to other side of part probe back X+ hit probe, retract then jog to parts center set X to Zero..
This seems to work now.

As long as I don't use variable names like ProbeFeed = 10; of Xlength = 2.5;
When I use the var name in a Engine.GCode("F"+ProbeFeed+" G1 X"+Xlength);
It works the first 3 or 4 calls in the script, the Axis's move fine, but after 3 or 4th call to Engine() I get no Axis movement...
I printed out the value in Xlength before its move and value was correct just wouldn't move..
This maybe part of the problem that I was having with the way off feedrates..

It works fine with no variable name Engine.GCode("F10 G1 X2.5"); for example

So thinking maybe that could have be some of the problem, seeing I was always reading the DROS I have in my panel to variable names in the scripts..

Just a thought.

Gary 
ArtF
Global Moderator
Global Moderator
Posts: 4557
Joined: Sun Sep 05, 2010 5:14 pm
Contact:

Re: reading Pokeys pins

Post by ArtF »

Gary:

That sounds possible.  Ill look in the translations.. ITs odd though that the print statements are correct.. I cant think of any interaction
top of head that could cause such a thing..

Art
gburk
Site Admin
Posts: 324
Joined: Mon Nov 26, 2018 2:57 am

Re: reading Pokeys pins

Post by gburk »

Art

Thanks I am going to run it a few more times tonight, both ways again var's and none.

will let you know what I find...

Gary
gburk
Site Admin
Posts: 324
Joined: Mon Nov 26, 2018 2:57 am

Re: reading Pokeys pins

Post by gburk »

Art

Did a lot of testing last night,
First, ram the X center script with all values, and no var's used..
It ram fine feed rates were good and travel distances were good, and just didn't see any problems,,
ran it about 20 times and always ended in the center of the part...

Second test, I started adding var's like Xlenght = 2.5; the changing each line in the script form 2.5 to the var Xlenght one line then running the script
it ran fine 5 or 6 times no problem.
Kept adding a var for each value like Retract = .5; Probfeed = 10; and running with each new var's 5 or 6 times entering them also one line at a time..
That also ran fine all runs.

test 3, Started changing the vars form Xlenght = 2.5; to Xlenght = GlobalGet("XlengtDRO");, so now I am reading the DRO values...
one DRO at a time, and running the x center 5 or 6 times for each new entry.
This also worked fine now...

have now tested this 20 or more time no problems...

So shut computer off for the night..

Went back early this morning to test it and see if I am still getting the same results...

booted auggie hit the x center button, and it probed fine ended up back in the x center when done..
ran this 2 or 3 times and it probed fine.
The only problem I have found now was the old problem with wrong feed rates, the feed rate DRO was way off the correct value.
and I could see it was running faster than I what had set the feed rates to. but it still probed fine just faster that I would have liked.
But than I hit the run button from the script window, and everything was good.. feed rats were as I had then set..

So not sure why only the feed rate seems to be effected on the first bootup of auggie, and needing to hit run first..

But at least right now it seems to be working.. after you hit run I don't see any problems...

Gary
 
Post Reply