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

Did a test run on wood getting close ran ok, I don't have the steps dialed in 100% yet but heres a pic..

I think most of my problems are with the m6 dialog, I removed all the functions except the close dialog and seems to run a lot better..
It seems to me the dialog when called it pops up but still keeps running past the calling call so still executes every thing after its called till the end of the m6 call..
also found if I put say any engine gcode in the dialog close function it doesn't seem to wait on a MotionStill so if I say jogged to change the tool then exit the dialog and call a close function that wants to return to the Z X Y positions before the tool change all axis's move together  X Y and Z even with MotionStill after each g code move, I would like Z to move finish and then X Y move.. make sense?.
Also not sure what cause's the Z axis when jogging down to touch off top of part, it seems to jog ok but most of the time just before I near touching the part and tap mouse to jog it jogs and doesn't stop, it crashes the tool.. and I have to hit Estop..

But I haven't been getting the rewind problems now that i'm not doing to much with the toolchange dialog just closing it, and using sheetcam  for the gcode
Gary
Attachments
auggieeun.zip
(23.77 KiB) Downloaded 275 times
User avatar
ArtF
Global Moderator
Global Moderator
Posts: 4647
Joined: Sun Sep 05, 2010 6:14 am
Contact:

Re: reading Pokeys pins

Post by ArtF »

Gary:

  It does sound like unexpected results of dialog operation. Never having been used
for the type of thing your doing I think your tests show they dont like running
in the context of a Gcode program.
  Ill schedule some time to run your examples to see if I can separate out their
spaces better. Its a very complex interaction but it may be possible to add in
some sort of wait internally for dialog completion.

  Internally, Auggie tags each 1ms waypoint with data as to what Gcode line
commanded it. As each executes, that data is checked to show what line is actually
running currently. (As you can imagine, the actual line running in the interpreter may be up to 500 lines ahead..).

  Im thinking this may be the root of the problem. As you command a move in the dialog
it is tagged with whatever line the dialog was on, but the interpreter may be several
lines ahead. The m6 dialog may have seen the current line executing as line 0 but was
called on line 10 for example when the interpreter was 10 lines ahead.  Ill take a close look in there to see what I can tag as special and to be ignored in setting the current operation line. Your experience is a good debugging indicator as to where the problem lies.

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

Re: reading Pokeys pins

Post by gburk »

Art

Thanks didn't think you would be back for a few days have a good trip?..

I have another question, it about jogging, is there a way to change jogging distance like micro steps maybe 0.001 0.010 for example
I have a hard time after I inset a new tool to jog down and touch off the part it always seems to move .1 or .200 when jogging and seems to do that always
when tool is just above the part and I hit the final jog button to touch off it jogs continuous  till tool crashes and I have to hit estop or it will keep going

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

Re: reading Pokeys pins

Post by ArtF »

Gary:

  Ill take a look and see what I had put in for that possibility.

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

Re: reading Pokeys pins

Post by gburk »

Thanks Art

I did setup a dro that I can enter a jog distance looks like 0.00000, but not sure how auggie handles real short distance's if I enter 0.00100 auggies X axis dro doesn't show any movement until I have jogged 3 or 4 times then it jumps to around .00630 and its usual 25 to 50 off.
if I have jogged say 3 times and that should be at .00300 auggie's x axis dro would display .00250 sometimes .00225...

haven't tried it on the mill having relay problems so no spindle again...

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

Re: reading Pokeys pins

Post by ArtF »

Gary:

  The granularity is what your describing. What is your steps/mm ( or steps/inch?).

Internally when you command a move it will move the waypoint location to your new
command. So lets say your at .301 and you command a .001 move. The waypoint
pointer increments to .302, but this may or may not move anything as your
steps/unit may have a granularity that says not enough distance has changed to
equal one step of your motor.  In other words if your steps/unit is 157 then your
minimum move distance is 1/157 = .0063 or so.

  Could it be that ? If not maybe I have a bug hiding in there somewhere..

Art



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

Re: reading Pokeys pins

Post by ArtF »

Gary:

When you put in the motions you describe, do you add the motionstill calls
between them as well as a yield so the moves are processed.?
I havent checked this, but the Yield() may be necessary to allow the
engine to start processing the moves so it knows it isn't still so the
block works. Im worried speed makes it simply do it all at once as the
Gcode moves haven't yet started so it is still in MotionStill status...

As in

  Engine.GCode( "G1X10Y10");
  Yield(); //this may be needed to make the next block see its in a move.
  Block("MotionStill");
  Engine.GCode( "G1Z-.5");
  Yield();
  Block("MotionStill");


  Art


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

Re: reading Pokeys pins

Post by gburk »

Thanks art

will try the yield() and let you know how I make out..

as for my steps
X and Y off the top of my head are at 1600
and Z at 1800
The travel distance is real close but haven't really dialed it in yet will do that soon still messing with the forward and reverse relays I think one went bad..

Gary

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

Re: reading Pokeys pins

Post by gburk »

Art

Ran a test with the Z move then X then Y

all like this
I hit the m6 t the my dialog appears I then save the current Z X Y positions, now jog the z x y to a safe tool change position and change tool
jog tool down to the top of part set it to Z = 0 jog up to a safe position, then close the dialog.

Now I run something like this
Engine.GCode(ZStartPos);
yield();
block("MotionStill");
Engine.GCode(XStartPos);
yield();
block("MotionStill");
Engine.GCode(YStartPos);
yield();
block("MotionStill");

But it seems to run then all at the same time, I would like the Z Move to finish before the X and Y start..
Make better sense?.

Hopefully I will not be knocked off the internet when this hurricane hits us down here..

Thanks gary
User avatar
Mooselake
Old Timer
Posts: 531
Joined: Sun Dec 26, 2010 12:21 pm
Location: Mooselake Manor

Re: reading Pokeys pins

Post by Mooselake »

Where are you, Gary?  On the east coast?  We're in SW FL, on Pine Island near Ft Myers/Cape Coral and so far it look like it won't hit us too hard.  Our first hurricane, stocked the pantry and filled the Subaru.

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

Re: reading Pokeys pins

Post by gburk »

Small world kirt

I'm in cape coral near pine island off burnt store road nw cape...

Hoping we don't get hit, last one we had was a lot of flooding, and as usual they don't know exactly the direction its going..


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

Re: reading Pokeys pins

Post by ArtF »

Gary:

  Thx for the test. I see what you mean , Ill do some tests and see why that is so
and attempt a repair.

  Your step numbers show you should move in .000625 intervals. Ill check mine
to see how it matches. I usually just use single line mdi to do incremental jog,
I assume your DRO is just tied to a G1 move button for the dro incrment?

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

Re: reading Pokeys pins

Post by ArtF »

Gary:
 
  I think Ive found our main issue. When reading Gcode there is a strict ordering
condition for execution of the queue, but that function was broken badly , I just didnt
see it as Gcode is restricted in order in other ways. Your scripts show it more clearly.

  Commands meant to be in order were being shoved to the bottom of the queue, instead
of to the top. This means when MotionStill consition was required, the command was simply
postponed to last and the next command allowed to execute.

A new version will be posted in a few minutes with this corrected. Let me know what you see
as a result. This affected everything from dwell to toolchanges so its a pretty dramatic change.

To test your problem I used


Engine.GCode( "g1x10" );
Engine.GCode( "g04P4" );
Engine.GCode( "g1y10" );
Engine.GCode( "g1z10" );

  The dwell happened after the x,y,z moves. (They did happen one after the other though..)

With the fix the dwell occurs after the X move. As this affects most operations, use caution but I suspect
it fixes a great many script ordering functions and troubles youve had.

Ill post when fix in online.

Art

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

Re: reading Pokeys pins

Post by ArtF »

Gary:

Fix is online.

  Let me know how its works out. In regards to a previous question about order
of motion with the x,y and z, you shouldnt need any yields or blocks in that
question, three gcode lines following each other should move only 1 at
a time without any special consideration. Put a dwell between them if the
motions are short as a test. If they are small moves then its possible the DRO's
will all update at once, thats a matter of DRO timing, but the motion of the z
should have always ended before that x,y move. We may need to take
another look at that one.

This version should fix all manner of other errors though on your probing
and toolchanging issues..

Art
User avatar
Mooselake
Old Timer
Posts: 531
Joined: Sun Dec 26, 2010 12:21 pm
Location: Mooselake Manor

Re: reading Pokeys pins

Post by Mooselake »

gburk wrote: Small world kirt

I'm in cape coral near pine island off burnt store road nw cape...

Hoping we don't get hit, last one we had was a lot of flooding, and as usual they don't know exactly the direction its going..


Gary   
So anything we don't bring inside might end up in your yard?  Hope the latest forecast is right and it head up the east coast, will know around Monday.  This is our first hurricane here, and my first since about 1972 in Houston; that one went elsewhere and we only got some heavy rain, 24 inches in 24 hours iirc.

Never been this close to another Gearotic user, other than visiting Tweakie on a trip to England some years back.  We should think about getting together.  I'll try and remember to PM you after the storm is past

Kirk
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest