GearHeads Corner
November 19, 2019, 07:48:37 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
 
   Home   Help Search Login Register  
Pages: 1 ... 34 35 [36]
  Print  
Author Topic: reading Pokeys pins  (Read 12475 times)
0 Members and 1 Guest are viewing this topic.
gburk
Sr. Member
****
Posts: 283


View Profile
« Reply #525 on: November 08, 2019, 07:02:18 PM »

Art

I have ran it many times now, and not seeing any feed rate problems. .
Will let you know how things look when i get the back off's working in the x and y, have it going in z will test x y tomorrow, I think the code I added for back off's is right, but you know how that go's.

>>
>> I guess one way is to check the pin status to see if its hit, I repaired that as well so if you ask
>>the digital level of that probe pin you should get the right answer, it was broken but now reports
>>if the pin is high or low.

forgot to reply to this, what i have been doing is testing pin19
    pinstate = Pokeys1.G etPinDig(19); 
    //print("Pin 19 Changed");
    GlobalSet("ProbeLED",1);
    block( "MotionPin 19");
not the complete script but as far as i know it has not stopped working, i only use it to toggle the probe hit LED on or off..

is there a better or faster way ?.



Thanks
Gary
« Last Edit: November 09, 2019, 08:14:57 PM by gburk » Logged
gburk
Sr. Member
****
Posts: 283


View Profile
« Reply #526 on: November 10, 2019, 02:23:36 PM »

Art

I seem to be having another small issue i can't figure out

right now it the bore or hole probe

I have an 1.5" hole i set the bore size to 1.5 this probe's and centers great every time and ZERO's the axis's
I also tried a .75 hole also worked fine every time.

but if i have one that is to .5 or below after it centers a axis it should Zero it, but this is a hit or miss, it seems to always move to the center but doesn't set the axis to Zero
its random sometimes it doesn't zero the X and sometimes i't's the Y.
I tried a pause before setting the axis to Zero
also tried both  Engine.Se tAxisPos( 0, null, null, null );  and GlobalSet("Axis1CurP os",0);  or Axis2 get the same results.

This one is real strange don't know why it messes up on the smaller holes...

Gary
Logged
ArtF
Administrator
Hero Member
*****
Posts: 5436



View Profile
« Reply #527 on: November 10, 2019, 04:22:41 PM »

Gary:

    pinstate = Pokeys1.G etPinDig(19);
    //print("Pin 19 Changed");
    GlobalSet("ProbeLED",1);  // I suspect you meant ", pinstate" rather than ,1?

  No, looks good.

>>but if i have one that is to .5 or below after it centers a axis it should Zero it, but this is a hit or miss, it seems to always move to the center but doesn't set the axis to Zero

  Strange symptom. Does the zero button work afterward s to set the zero?

Art
Logged
gburk
Sr. Member
****
Posts: 283


View Profile
« Reply #528 on: November 10, 2019, 05:13:14 PM »

Art

I think i figured it out for now, i'm thinking the smaller the hole maybe its moving things to fast and loosing track, just a thought

I never thought to lower the feed rates, they were set at 10 slow probe and 40 for g01 moves, that works good for the holes larger than .5 or so
So i lowered the feed rates to 5 for slow probe and 20 for g01 moves and this seems to have fixed the problem Axis's get set to Zero correctly at these feed rates..

I think you can kill the print's to screen now also.

Gary
« Last Edit: November 10, 2019, 07:15:40 PM by gburk » Logged
gburk
Sr. Member
****
Posts: 283


View Profile
« Reply #529 on: November 14, 2019, 09:03:08 PM »

Art

 xx = Engine.Ge tAxisPos(3); this seems to return a random number if the Z axis is set to 0.
if i set the Z to .5 it will return the correct value, just seems to return a bad number at or around 0.
the x (1) and y (2) are fine they will return a 0 correct number..

GlobalGet Axis3 works corrent returns a 0

Sorry figured it out had to convert ToInt now works...

Thanks gary
« Last Edit: November 14, 2019, 09:34:18 PM by gburk » Logged
ArtF
Administrator
Hero Member
*****
Posts: 5436



View Profile
« Reply #530 on: November 16, 2019, 03:33:34 PM »

Gary:

 Sounds like things are working mostly well. Sorry Ive been only
intermitt ently. Im testing some code for clubfoot escapemen ts, once Im
finished up Ill look in Auggies direction again as I have some things
Id like to flesh out.

Art
Logged
gburk
Sr. Member
****
Posts: 283


View Profile
« Reply #531 on: November 16, 2019, 06:18:25 PM »

Art

No problem thanks for you work and a lot of help..

I'm hoping that removing the latest print statement s may help with not having to slow down feed rates for the smaller holes..

Gary
Logged
gburk
Sr. Member
****
Posts: 283


View Profile
« Reply #532 on: November 18, 2019, 07:17:41 PM »

Art

Having some trouble with dowhile and while loops

maybe i 'm just confused go figure..

Anyway can you call a function from the while loop, and in the function you are call have a while loop also?
And if i call the function is there a way not to reset the variable's each time its called..
say i have a loop counter in the second function, i don't want to reset the counter every time i call that function, there may be 3 or 4 values i don't want to reset..

there is no way to a goto, or use a sub in a script right..

Gary
Logged
Pages: 1 ... 34 35 [36]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!