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

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: 4591
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: 4591
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: 4591
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: 4591
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: 4591
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.]

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

Re: reading Pokeys pins

Post by ArtF »

Gary:

New version online that also logs your decoded GCode line.. so send me a log of where it screws up if you would..

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

Re: reading Pokeys pins

Post by gburk »

Art

Here is the new log with not running the script then running the script..

Also i was thinking and wanted to run this by you..
The reason i have in my mind about having to run a g0 or g01 before say two g31's , like run  g31 X- it triggers the probe and if i have a G31 for the next call it doesn't move, i'm thinking the second G31 see's the probe as triggered and does't move correct ?

Gary
Attachments

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

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

Re: reading Pokeys pins

Post by ArtF »

Gary:

  Probably correct. If the pokeys is commanded to do a probe to
a logic level already in effect, no motion will happen and the pokeys will send the
message its finished and it will be as if the probe happened, and stopped.

  the following log items are weird. The F10 G91 .. line is from your script, and the F10 is completed,
but from somewhere, a feedrate to 2.0 is commanded and completed. Im not sure where the 2.0 came from.

The 22.5 is similar, I see the command coming in, and getting completed, but Im not sure where its coming from..
Is 22.5 used anywhere in the program?

>>18:22:636  F10 G91 G31 Y-0.2
18:22:636  Command Feerate to  10.0000
18:22:636  Command Feerate to  2.0000
18:22:667  Set Feerate to  10.0000
18:22:667  Set Feerate to  2.0000
18:23:245  Y- Probe Hit Now Centering Y 
18:23:245  F35 G90 G01 Y0.633708
18:23:245  Command Feerate to  35.0000
18:23:245  Command Feerate to  22.1798
18:23:277  Set Feerate to  35.0000
18:23:277  Set Feerate to  22.1798

Art

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

Re: reading Pokeys pins

Post by gburk »

Art

The only feed rates in the script are 10 and 35

no 2 or 22

What i see when running
18:23:277  Set Feerate to  35.0000 this is correct feed rate from g code
18:23:277  Set Feerate to  22.1798 this is the feed rate displayed in the onscreen free rate DRO
But i have seen when i have a 40 in the fast feed rate g code for the onscreen DRO to display 80..

but all get corrected when RUN script first

As you question The line F10 G91 ..
the f10 shows 10.000 from the g code  and the onscreen display shows 2.0000
it seems when you are doing the 2 prints its reading the  G code and the onscreen value.
endless you just are reading the onscreen DRO and it changes from 10 to 2 so fast i can't see it..
I don't see any feed rates other that 10 and 35 in the script g code they are read form a DRO so never get changed endless i change the DRO value..

Gary
Post Reply

Who is online

Users browsing this forum: No registered users and 8 guests