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

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
User avatar
ArtF
Global Moderator
Global Moderator
Posts: 4592
Joined: Sun Sep 05, 2010 6:14 am
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
User avatar
ArtF
Global Moderator
Global Moderator
Posts: 4592
Joined: Sun Sep 05, 2010 6:14 am
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
Old Timer
Posts: 324
Joined: Sun Nov 25, 2018 3:57 pm

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

Re: reading Pokeys pins

Post by ArtF »

Gary:

No rush. :)

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

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

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 12:41 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

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 
User avatar
ArtF
Global Moderator
Global Moderator
Posts: 4592
Joined: Sun Sep 05, 2010 6:14 am
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
Old Timer
Posts: 324
Joined: Sun Nov 25, 2018 3:57 pm

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

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

Re: reading Pokeys pins

Post by ArtF »

Gary: 

 
Really strange .. makes it hard to know what to look at.. I hate this type of bug.

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

Re: reading Pokeys pins

Post by gburk »

Art

Yep it something with the feed rate, I have had the same problem running the g code the feeds seem off... mostly faster than I had set it to..
I have run the probing quite a few more times since my last message and still the same results, but probes Good.

But I guess in the probing scripts may be the most affected I have had it set to 40 and it jumps to 112, I can defiantly see the speed difference.
I haven't had the probe mess up yet even though it may run a little fast than I want at times.. so I have been trying to remember to run the script first before I use it in the M6 or with a button press's for probing...

Gary

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

Re: reading Pokeys pins

Post by ArtF »

Gary:

  So does the feedrate ever end up wrong from gcode? OR just in script calls?
Only from button scripts, or have you have it wrong in a  script window?

  I cant seem to make it wrong here as of yet.. Im still looking..

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

Re: reading Pokeys pins

Post by gburk »

Art

It seems to run faster in G code than the feed rate but I may be wrong there had to keep good track of it in a C code the G code runs to fast to see the feed rate changes But my g code has one line set to G1 F4 feed rate the next line is G2 F15 feed rate just seems to be running faster than if I set the feed to 15 in a script..
But this may just because the G code is running so fast. and I not keeping up with it.

But yes the Feed Rate problem seems to be in the script. and from the button calls.

From what I find if I run the script 3 or 4 times the feed rates are messed up...

Then I load the script into the script screen edit window and run it from here once, the feed rates are good now...
Have been testing it like this for a few days now getting the same results..

Art - at least not having an issue with the probing not working.. big plus almost there I think... and the tool always looks centered in the X when script finished..

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

Re: reading Pokeys pins

Post by ArtF »

Gary::

  Well, its good to know we seem to have cracked the rest of it. I cant seem
to find where Feedrate gets screwed. I think what Ill do is add an internal message
on each path that can set feedrate. We'll see what the messages say, may lead us somewhere.

(Nice system ..)

Art
Post Reply

Who is online

Users browsing this forum: No registered users and 66 guests