reading Pokeys pins

C Scripting questions and answers
User avatar
ArtF
Global Moderator
Global Moderator
Posts: 4586
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: 4586
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: 4586
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: 4586
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: 4586
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
gburk
Old Timer
Posts: 324
Joined: Sun Nov 25, 2018 3:57 pm

Re: reading Pokeys pins

Post by gburk »

Art

Thanks so I assume you got the video ?.

I have made another one after running the script in the script window, and it does show the correct feed rates if you want to see this one also. let me know..

but as you can see its probing good...

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

Re: reading Pokeys pins

Post by gburk »

Art

Think I got it going good now, here's a couple pic's of a test part cut in wood with tabs..

I had 2 tool changes during cutting, and I used the m6 dialog for both.

I jogged the z to a height I could swap out the tool, then jogged back down, I put the touch plate on parts top and hit the z touch button in the dialog. it hit and retracted to the correct distance off part. then hit the RUN button and all went well...

so all is good and working just need to remember to run script in window first so feed rates are good...

have X centering going good working on Y now, then X and Y together..


Thanks gary
Attachments
Auggiepic.zip
(9.07 MiB) Downloaded 215 times
gburk
Old Timer
Posts: 324
Joined: Sun Nov 25, 2018 3:57 pm

Re: reading Pokeys pins

Post by gburk »

Art

This is a request to add a way to home in a different order and not to home all at once... i don't see and scripts for your home all button so i assume its built in.

Don't know if you can add it to the motor cofigs axis x y z option for homing sequence x 1 2 or 3, 1 = move home first 2 = move second 3 = last, also wait till one axis is finished before starting next axis...

I know i can home one at a time but sometimes i forget and hit home all, and the way i have the home switches mounted the Y has to be homed before the X , X will not hit a switch till Y is homed, just they way they are mounted, will fix this when i rebuild the machine in the near future..

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

Re: reading Pokeys pins

Post by ArtF »

Gary:

  Have you tried changing the homeall button to a script of your own
calling the HomeZ, then Home X, then HomeY with a block on motionstill
between each?

    It should be possible to home in any order that way. (I havent tried it though..)

Art
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests