reading Pokeys pins

C Scripting questions and answers
User avatar
ArtF
Global Moderator
Global Moderator
Posts: 4648
Joined: Sun Sep 05, 2010 6:14 am
Contact:

Re: reading Pokeys pins

Post by ArtF »

Gary:
I think I found the major source of all this. Try the version I just uploaded.
I found if I zeroed the axis the next probe wouldnt work, this has been corrected so
now after a jog and zero the probe works fine.
  Let me know of any change.. Good luck

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

Re: reading Pokeys pins

Post by gburk »

Art

Will give the new version a try,

Think I have a few issues to work out first, I had a few minutes and went out to test, I am having homing problem now its will home but not backoff, I will check the pokeys config to see if any thing changed, but I do get the message axis homed, but I can't jog down, once it homed and I try to jog I get the message wrong state for jog on axis so i'm stuck and can't move the axis endless I hit estop and re hit estop..

I'm hoping it just because it not backing off.. I have auggie reverse set to true, or is this option just for the direction of homing and not back off?.
I did run mach4 a few days ago maybe it changed the pokeys config.. but I have homing set to backoff in mach4

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

Re: reading Pokeys pins

Post by ArtF »

  Gary:

  Hmm, you may want to update just in case its that bad version doing it. I took out some changes and fixed
a couple bugs I could prove. I dont think it woudl affect your homing but you never know.

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

Re: reading Pokeys pins

Post by gburk »

Art

I installed the new version, and fixed homing it was a pokeys config that got changed and the logic was wrong and there were no backoff pulse's.. so now backs off, and that also fixed the jogging not working when homed looks like it has to back off and the home switch needs to go off, or jogging does not work.

here is the code I tested it with its in inch

G0X0Y0
M6
G0X2Y2
G0x0y0
m30

Ok first m6 dialog I just hit exit and continue button worked fine the x and y moved good and returned to 0.. no problems
Second run m6 dialog I hit the probe Z touch off button
Its setup to read the probe.panel dros.
It reads the Z Max Travel distance its set to 1, in the engine.gcode  I have the Z set to Z- it should it go down works for me
Also reads Slow and fast feed rates 10 is slow 30 is fast at least what I have them set at
and the Retract if probe not hit will be set to the Probe start position usably = 0  endless you start from a different position

That worked fine did, not hit probe but went to -1 and retracted to 0 and then x and y moved to 2 and back to 0..

I did not do any manual jogging for this test...

Is this what you were looking for..?

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

Re: reading Pokeys pins

Post by ArtF »

Gary:

Yup, thats  what I needed. So all that worked well. Now try it with jogging after the probe, or before
and see if it fails or works..

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

Re: reading Pokeys pins

Post by gburk »

Art

Tested
1 - ran gcode then jogged while M6 dialog displayed, exited without probe and all when good returned to 0 then x2 y2 and back to 0

2 -ran gcode  then jogged with M6 dialog and then hit Z touch off button let it run in air and go to max distance, all went well then went to x0 y0 then x2 y2 and back to 0..

3- ran this test 5 times, ran the gcode at M6 dialog jogged z x y then hit the Z touch off button, and let the probe hit the touch plate, it stopped good and retracted to Z1 correctly it did not seem to mess up at all never seemed to get confused and dive into the part just hit and retract..

I did not use an probeinvert with g31 to backoff the probe I have a g1 or G0 I forget Z-RetractHight, Also I haven't tried the probing yet with the on screen buttons.

It looks good so far, any other test you want to try before I get ahead of us.. it may be a good day for testing cooled off a little at least for 24hours

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

Re: reading Pokeys pins

Post by ArtF »

Gary:

No, Id say test at will now. I think the error I found was instrumental in all your problems.
Thats not to say other problems dont exist, but I like the way its looking so go ahead and play.
If you see a problem, try to isolate it down to a procedure just like you did with these ones,
if I can repeat it, I can find it generally, though Im amazed how complex it is in there..what
was I thinking..lol..

  Thats the problem with a program like Auggie, you soon start to forget exactly how you
did what you did. It has a whole lot of things going on at once and its enough to boggle
my head if I get too scattershot.. :)

  Good work on the testing, Ill have to add you to the credits for probe development.

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

Re: reading Pokeys pins

Post by gburk »

Art

Thanks that sounds good..

I did test it with the Z probe screen button and that worked fine also..

I did find a couple times that the after the probe was hit and retracted, I could not jog with the jog buttons got the message again wrong state for jog on axis
but its had to pin point it only does randomly, I assuming its like the homing if I didn't back off the switch I would not be able to jog.. so my best guess auggie for some reason misses the probe state when it releases but not to often though.

Also not sure if the Feed Rates are changing correctly, when it start the probe G31 F5 it seems to chance to 5 every time but when I do the retract to G01 Z1 F30
the feed rate seems to change to 15.75 not 30 and does this every time.. doesn't effect the probing just letting you know..

One question will auggie loose its home position on estoping , am I still good with the last homed mach position?. when I hit estop again..

Also I though you had said I needed a G0 before the probeinvert,1 is that still correct of can I replace the G0 retract with a G31 to check for a release on the probe..?.

Thanks gary

Last edited by gburk on Fri Sep 20, 2019 10:54 am, edited 1 time in total.
User avatar
ArtF
Global Moderator
Global Moderator
Posts: 4648
Joined: Sun Sep 05, 2010 6:14 am
Contact:

Re: reading Pokeys pins

Post by ArtF »

Gary:

>> I assuming its like the homing if I didn't back off the switch I would not be able to jog..

  Shouldnt affect it really. Unless the home switch is also set as a limit, it will be ignored except in homing.
If it does share as a limit, then yeah, bad things can happen if it doesnt retract. There is a state DRO on the screen
on the right, you may want to take notice and see what it is when it refused to jog, let me know and Ill
see why its sticking in that state.

>>One question will auggie loose its home position on estoping

  No. Homing changes the machine coordinate and is the only thing that does. So Estops dont matter.

>>Also I though you had said I needed a G0 before the probeinve rt,1 is that still correct of can I replac

  No, all thats needed is a block on motionstill after the probe, you can then invert and probe off.

>> when it start the probe G31 F5 it seems to chance to 5 every time but when I do the retract to G01 Z1 F30
the feed rate seems to change to 15.75 not 30

Ill do some checks and see if I can repeat this, so far I cant get it to happen. Its a weird one..I cant imagine how
that feedrate number is changing.. is there a 15.75 anywhere in later code?


Sounds like its getting better, we're close. :)

Art




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

Re: reading Pokeys pins

Post by gburk »

Art

Will let you know what I see, The feed rate may only be in the G01 from the script and not the G31..
and as far as I know there is no other feed rate changes going on.

May take a couple days having computer problems that's connected to the mills, haven't seems this yet, when I power the computer on all the drive lights power the power light comes on and sometimes I here the bios beep, then all power go off, tried booting 20 times or so and shuts off a second or 2 after power on.
if anyone has run into this let me know..

Thanks gary

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

Re: reading Pokeys pins

Post by ArtF »

Gary:

Did over 10,000 holes drilled today with auggie so the base seems ok..

Sorry to hear about the cpu.. it sounds like maybe a device is screwed, Id unplug all the drives and
devices and see what it does..

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

Re: reading Pokeys pins

Post by gburk »

Art

Got to run think its going to be hit or miss now runs once not the next time the only thing I found was the water level was low its water cooled and was not pumping cpu was getting hot right away filled it up and got it to run for now..

The first probe run the g31 f5 was good, the g01 on retract changed to 15.33 instead of 30..
also the first run I got the jogging message and had to hit estop I don't see a state dro on the main screen I do see a run state in the dialogs with the homing limit led's and that was at 0
The dro on the main screen  to the far right that has no name over it showed 3

Not much help..

I don't think the feed rate is off in a loaded gcode file it seems to change ok, so maybe just in the scripts G01.

Going to run the gcode file that crashed in simulator mode and see how that go's on the mill.. cutting air

10,000 holes is there enough time in a day for that many holes ??? ???

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

Re: reading Pokeys pins

Post by gburk »

Art

Ran the gcode file its around 1300 1400 lines, the file ran no crashes, I did see the feed rate dro mess up around line 900 it went to 4.0 that's what I have the z moves set at and 15.0 for the x and y and it stayed at 4.0 the rest of the file run, im not sure if the x and y really slowed down to 4 , its hard to tell when running but maybe just the feedrate dro wasn't getting updated anymore.

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

Re: reading Pokeys pins

Post by gburk »

Art

In probing I was using g01 to retract and no probeinvert,1 with g31 to see the probe release...

Now I added the probeinvert,1 and the G31 Z0.1 F5 then motionstill it doesn't seem to move the Z up at all it stays hit, and seems to skip that code or just not run  it, or because its triggered its reading that line as probe triggered, the lines after that look for if (Global("ProbeHit")).

I assumeing,  it doe's read that line as the probe being hit so it runs the code from there, so I am not sure if probeinvert,1 is switching the logic to wait for the probe to open correctly.

One good thing it still go's up when it reached the g01 so no crashes..

let me know if it should be done differently.

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

Re: reading Pokeys pins

Post by ArtF »

Hi Gary:

  It does sound as if a bug is in the swapping of invert, Ill run some tests here to see why.

As to the feedrate, feedrate is special in that it updates immediately as the queue runs, That means
after each line is placed in the planner, the feedrate is updated to that lines feedrate if commanded.
As the queue can be far ahead, you may see the feedrate of some future line displayed even though the
moves are all properly programmed.

As an example.

G1 X20 F1
G1 X30 F2
  G1 X40 F4
  G0x50
  G1 X60 F60 
...
  G1 X50F100

  If you ran the above code the feedrate dro would read 40 almost instantly, but each move
will be done in the correct feedrates. Its because with lookahead the display may be
100 moves ahead of you. In thgis case the g0 causes the queue to wait till done
so it diosplay 40 until then, and then displays 100 pretty much right away as it queues
up the rest fo the moves.
Im not sure thats whats up with feedrate, but its an oddity you should
be aware of.

  G0's or modal calls terminate a queue until its empty so feedrate will display the feedrate of the line
before any g0 or modal call.

Art


Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest