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

Re: reading Pokeys pins

Post by gburk »

Art

Haven't tried that thought about it but thinking if it was an easy fix on your end, i was going with that a porch getting lazy i guess after messing with all the other scripts..
But i can give it a shot, not totally sure how you are reading the triggers on the home switches and setting the led's when hit.

if i do a block"MotionStill" i'm not sure how to check the switches while the axis is moving, you may have a few commands built in i could use But not sure what..

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:
 
  Oh, you dont need to do anything that complex. The call to home an axis does it all, moves the axis, stops on the switch, moves off if you have the pokeys config'ed to move off and then stops and the home led will light. Its all automatic once
you call the home for that axis.

  I intend to add feedrate calls in the morning, Ill check the command for you , its something like Home( axis) where
axis is a bit field of axis to home I think..

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

Re: reading Pokeys pins

Post by gburk »

Thanks Art

I though is wouldn't be to hard
But i am not getting something right i have tried Home1 though Home3 didn't seem to work for me also tried HomeAll() endless i'm calling them wrong..

If i add Home1 as the var in a on screen button press, it seems to work, i just haven't figured out how to call it from within a  script..


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 »

Hi Gary:

My fault , it wasnt clear how to do it.

GlobalSet( "Home1" , 1); //will home the X axis
GlobalSet( "Home2" , 1); //will home the Y axis
GlobalSet( "Home3" , 1); //will home the Z axis
GlobalSet( "Home4" , 1); //will home the A axis

  You likely need a block on MotionStill after a call, but just setting the variable should
start , run and finish the home cycle. The home will happen as programmed in the pokeys on the motors tab where
you can tell it to move off, or just stop.

Art


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

Re: reading Pokeys pins

Post by gburk »

Art

I'm a pain i know it ???

but i thought i already tried the GlobalSet("Home1",1); so went back and tried again but no go.. nothing no movement don't even get the bitfield # message also added a motionstill

its does still work when i drop a button on the screen and give the var name as Home1.. i also get the bitfiled message displayed..

i don't get any compiler Error's.

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:

Ill let you know shortly how to access that , Ill trace it out.. :)

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:

Try it with the new version online now. Turns out it was disabled during any running, even if a script,
so buttons worked, scripts didnt.

  Also, feedrates are traced on the print output. It will show commanded feedrate and implemented rate.
Id like to know if their different..

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

Re: reading Pokeys pins

Post by gburk »

Art

Thanks will check it out...

Have another question, not a major thing but may cause tool crash while probing.
On my bore or circle centering script, i put the tool as close to the parts center as i can by eye.
I run the probe 31 x dir half the bore dia plus some overshoot..
Then Zero X and g01 half the bore dia back..

heres my question if for some reason maybe the bore size is way to large, and the tool touches the parts edge after the g01 move and the probe is triggered, now my next move is a g31 to probe it will not see that the probe is already triggered and keep moving crashing the part and i have to hit Estop..

One problem that i have come across is i need to have a g0 or a g01 in between some of the g31 moves, if not sometimes the script will finish running but not make any moves after the last move and its random..
it will show all the print message to end of script but axis will move till the point they stop, and never move on any g31 g01 calls after where it stops, and it seems to be random.
 

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

Re: reading Pokeys pins

Post by gburk »

Art

Ran some feed rate test in probing..

!) Booted auggie did not run any script in script window
Slow feed rate set to 10
Fast feed rate set to 35

Hit probe bore button
printing on screen slow was 9.5
fast was 21.9756
then slow = 10
fast 35
slow 9.5
fast 22.286
they were off and not consistence.

So now i ran the script in the script window
Slow was 10
fast was 35
They stayed consistence though the complete script slow 10 fast 35

And the Global("Home1",1);
is working now thanks

let me know if you need any other feed rate test, i read them the best i could but values scowl off screen fast and hard watching screen and feed rate dro, no way to save the print screen to a txt file is there?.
 

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:

The log should contain all messages. IT gets overridden when you startup, but I believe its in
log.txt or errors.txt in the main folder.

  Thx, I will run some tests to see why a script affects the rate... hard to figure...

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

Re: reading Pokeys pins

Post by gburk »

Art

Here is a copy of the log or error txt, it shows the first run 10.00 and 1.75

then i ran the script and and it show 10.00 and !0.00

maybe it will be clearer here..

gary
Attachments

[The extension txt has been deactivated and can no longer be displayed.]

Post Reply

Who is online

Users browsing this forum: No registered users and 51 guests