reading Pokeys pins
Re: reading Pokeys pins
ok art will try it, thanks
I think the most annoying part right now is having to run the script first in script RUN before the button press
and I may have to run it again after running probe it seems to random. I may get 2 or 3 probe runs before I have to run in the script RUN.
a couple questions on the screen edit.
if I change the font size it always converts back to 9 doesn't seem to want to stay at the size I entered..
also is there a way for a button to swap to a different screen say I want a button for probing and then that button will show a probing screen...
Ok Tried it out still have to run in script RUN first it reacts a little different now,
if I let run to the end in -25 direction first run engine I get the messge probe stop before complete I then zero the axis and won't run again until I run it again with script run, now say I run the -25 again I go a Radom distance and keep the probe shorted I have the reverse set to 3 and let run till end I get the same message probe stop before complete but funny thing I don't need the run it again with script run just a button click will rerun now.. the only real problem I see reversing is a lot of time if I don't release the probe it seems to just keep going I have it go as far as 20.. not good if maybe a probe got stuck or for some reason stayed grounded won't break probe in that direction but would slam the axis if you didn't have that much travel distance..
when the probe is triggered and released that seems ok
it does stop and zero the dro correctly.. and for the most part a don't have to rerun the script before a button press
hope this helps
thanks gary
I think the most annoying part right now is having to run the script first in script RUN before the button press
and I may have to run it again after running probe it seems to random. I may get 2 or 3 probe runs before I have to run in the script RUN.
a couple questions on the screen edit.
if I change the font size it always converts back to 9 doesn't seem to want to stay at the size I entered..
also is there a way for a button to swap to a different screen say I want a button for probing and then that button will show a probing screen...
Ok Tried it out still have to run in script RUN first it reacts a little different now,
if I let run to the end in -25 direction first run engine I get the messge probe stop before complete I then zero the axis and won't run again until I run it again with script run, now say I run the -25 again I go a Radom distance and keep the probe shorted I have the reverse set to 3 and let run till end I get the same message probe stop before complete but funny thing I don't need the run it again with script run just a button click will rerun now.. the only real problem I see reversing is a lot of time if I don't release the probe it seems to just keep going I have it go as far as 20.. not good if maybe a probe got stuck or for some reason stayed grounded won't break probe in that direction but would slam the axis if you didn't have that much travel distance..
when the probe is triggered and released that seems ok
it does stop and zero the dro correctly.. and for the most part a don't have to rerun the script before a button press
hope this helps
thanks gary
Last edited by gburk on Wed Mar 06, 2019 6:00 am, edited 1 time in total.
Re: reading Pokeys pins
Gary:
>>if I change the font size it always converts back to 9 doesn't seem to want to stay at the size I entered..
Try saving the screen after changing the font, as I recall that can be a bit difficult to keep stuck..
>>also is there a way for a button to swap to a different screen say I want a button for probing and then that button will show a probing screen...
You can use panels with multiple pages...but I dont think I made a facility to swap full screens.
>>Ok Tried it out still have to run in script RUN first it reacts a little different now,
>>if I let run to the end in -25 direction first run engine I get the message probe stop before complete
Thats a normal message if the probe doesnt hit.. though Ill change that to "Probe motion complete, no hit."
>>I then zero the axis and won't run again until I run it again with script run
So this is the button? And it wont run again till after a script run from the script tab?
, now say I run the -25 again I go a Radom distance and keep the probe shorted I have the reverse set to 3 and let run till end I get the same message probe stop before complete but funny thing I don't need the run it again with script run just a button click will rerun now..
So if Im reading this right, you try it and hit the probe after a short distance, it stops and reverses.
You keep the probe held, so it continues raising until end of probe up command, stops with
same termination message, and button now works fine. ?
>> the only real problem I see reversing is a lot of time if I don't release the probe it seems to just keep going I have it go as far as 20.. not good if maybe a probe got stuck or for some reason stayed grounded won't break probe in that direction but would slam the axis if you didn't have that much travel distance..
It shouldn't be possible for it to move more than the commanded motion.. If the probe doesnt
release it should only go back up to start zero?
>>when the probe is triggered and released that seems ok
it does stop and zero the dro correctly .. and for the most part a don't have to rerun the script before a button presshope this helps
So do I have this right, problem only seems to happen still if the probe doesnt hit
during the probe command?
Art
>>if I change the font size it always converts back to 9 doesn't seem to want to stay at the size I entered..
Try saving the screen after changing the font, as I recall that can be a bit difficult to keep stuck..
>>also is there a way for a button to swap to a different screen say I want a button for probing and then that button will show a probing screen...
You can use panels with multiple pages...but I dont think I made a facility to swap full screens.
>>Ok Tried it out still have to run in script RUN first it reacts a little different now,
>>if I let run to the end in -25 direction first run engine I get the message probe stop before complete
Thats a normal message if the probe doesnt hit.. though Ill change that to "Probe motion complete, no hit."
>>I then zero the axis and won't run again until I run it again with script run
So this is the button? And it wont run again till after a script run from the script tab?
, now say I run the -25 again I go a Radom distance and keep the probe shorted I have the reverse set to 3 and let run till end I get the same message probe stop before complete but funny thing I don't need the run it again with script run just a button click will rerun now..
So if Im reading this right, you try it and hit the probe after a short distance, it stops and reverses.
You keep the probe held, so it continues raising until end of probe up command, stops with
same termination message, and button now works fine. ?
>> the only real problem I see reversing is a lot of time if I don't release the probe it seems to just keep going I have it go as far as 20.. not good if maybe a probe got stuck or for some reason stayed grounded won't break probe in that direction but would slam the axis if you didn't have that much travel distance..
It shouldn't be possible for it to move more than the commanded motion.. If the probe doesnt
release it should only go back up to start zero?
>>when the probe is triggered and released that seems ok
it does stop and zero the dro correctly .. and for the most part a don't have to rerun the script before a button presshope this helps
So do I have this right, problem only seems to happen still if the probe doesnt hit
during the probe command?
Art
Re: reading Pokeys pins
..You can use panels with multiple pages...but I don't think I made a facility to swap full screens.
ok I know multiple pages, I thing is when you create one like the Diags pages is if I change the text to Probing I need to make the button big or the text will be cut off
only show the bottom half of the word
thought about creating a dialog but your examples are not in the lib. and I tried messing with it but seems like some of commands you used in the video are not working off the top of my head one was the buttononoff..
.. So this is the button? And it wont run again till after a script run from the script tab?
Correct.
to be clear the button does run on every press all the print statements display the messages on screen just no motor movement till I re run the script tab..
.. So if Im reading this right, you try it and hit the probe after a short distance, it stops and reverses.
..You keep the probe held, so it continues raising until end of probe up command, stops with
..same terminati on message, and button now works fine. ?
.. It shouldn't be possible for it to move more than the commanded motion.. If the probe doesnt
..release it should only go back up to start zero?
That what I would think but I have has the dro's go as far as 20, and the reverse distance is hard coded not a var and is set to 3..
so I have no reason for this one, so far its only if the probe it not released. I will try later and swap the directions go to pos then neg;
.. So do I have this right, problem only seems to happen still if the probe doesnt hit
..during the probe command?
It seems that way so far when probe is hit stops then reverses and when I release the probe it stops and then zero's the axis dro..
Ok I tested it going pos then reversing to neg exactly the same results, except not if if runs all the way to 25 I have to re run the script tab
and if I hit the probe and it reverses to -3 its fine don't need to re run the script tab.
so looks like as long as there is a probe hit its ok.
But this doesn't explain why I need to run the script tab first to get things going I don't see anything in the script that looks like the problem..
are you going to do away with this command GlobalGet("ProbeHit") and stick with the pin19 check?
Gary
ok I know multiple pages, I thing is when you create one like the Diags pages is if I change the text to Probing I need to make the button big or the text will be cut off
only show the bottom half of the word
thought about creating a dialog but your examples are not in the lib. and I tried messing with it but seems like some of commands you used in the video are not working off the top of my head one was the buttononoff..
.. So this is the button? And it wont run again till after a script run from the script tab?
Correct.
to be clear the button does run on every press all the print statements display the messages on screen just no motor movement till I re run the script tab..
.. So if Im reading this right, you try it and hit the probe after a short distance, it stops and reverses.
..You keep the probe held, so it continues raising until end of probe up command, stops with
..same terminati on message, and button now works fine. ?
.. It shouldn't be possible for it to move more than the commanded motion.. If the probe doesnt
..release it should only go back up to start zero?
That what I would think but I have has the dro's go as far as 20, and the reverse distance is hard coded not a var and is set to 3..
so I have no reason for this one, so far its only if the probe it not released. I will try later and swap the directions go to pos then neg;
.. So do I have this right, problem only seems to happen still if the probe doesnt hit
..during the probe command?
It seems that way so far when probe is hit stops then reverses and when I release the probe it stops and then zero's the axis dro..
Ok I tested it going pos then reversing to neg exactly the same results, except not if if runs all the way to 25 I have to re run the script tab
and if I hit the probe and it reverses to -3 its fine don't need to re run the script tab.
so looks like as long as there is a probe hit its ok.
But this doesn't explain why I need to run the script tab first to get things going I don't see anything in the script that looks like the problem..
are you going to do away with this command GlobalGet("ProbeHit") and stick with the pin19 check?
Gary
Last edited by gburk on Thu Mar 07, 2019 7:33 am, edited 1 time in total.
Re: reading Pokeys pins
Gary:
>>are you going to do away with GlobalGet("ProbeHit")...
No, they have different uses. ProbeHit is just and indicator that
the last probe was sucessfull and the cooridnates stored can be validly read
as that hit point. If fals,e the last probe wasnt sucessfull.
Your pin19 check is just a check realtime on pin19. Probehit will work
no matter what pin is used.
It sounds like something bad is still going on if a probe isnt hit..
Ill have to dig into it. it may take a couple days as Im in the middle of some
other code.
Thx
Art
>>are you going to do away with GlobalGet("ProbeHit")...
No, they have different uses. ProbeHit is just and indicator that
the last probe was sucessfull and the cooridnates stored can be validly read
as that hit point. If fals,e the last probe wasnt sucessfull.
Your pin19 check is just a check realtime on pin19. Probehit will work
no matter what pin is used.
It sounds like something bad is still going on if a probe isnt hit..
Ill have to dig into it. it may take a couple days as Im in the middle of some
other code.
Thx
Art
Re: reading Pokeys pins
no problem take you time I'm in the middle of getting the routing done on the board I'm working on want to get it out tomorrow to have a prototype built..
gary
gary
Re: reading Pokeys pins
Got back to testing :
I seem to have a issue with homing also seems when I first boot auggie and then do a home it always seems to set the axis to a value other than 0 then if I home again its ok sets dro to 0..
also I don't think GlobalGet("ProbeHit") works correctly I get the same value if hit or not,, that's the reason I went to checking pin19...
also having problem figuring out the way mach and work cord work...
I created a small global script to move the x-1 and then to x1 I home the x first then jog x to say 2" and then zero the work cord for x, now i run the script then hit the button
it seems to run fine go's to -1 then back up to 1.. now if I zero the x again and press the button it runs to -2 and then back to 0 but the mach cord seems to go -1 and then up 1 they seem to loose sink.
also if I set the work cord to .250 after a move to -1 in a script then send a move to 1 I would think it would move to 1 but not finding that the case... never moves to 1..
also not sure if I am correct but myxmachinecoord = Engine.GetTruePos( 1 ); should return the mach cord
and usercoord = Engine.GetAxisPos( 1 ); the work cord. I find both to return the work cord.. same values..
Thanks gary
I seem to have a issue with homing also seems when I first boot auggie and then do a home it always seems to set the axis to a value other than 0 then if I home again its ok sets dro to 0..
also I don't think GlobalGet("ProbeHit") works correctly I get the same value if hit or not,, that's the reason I went to checking pin19...
also having problem figuring out the way mach and work cord work...
I created a small global script to move the x-1 and then to x1 I home the x first then jog x to say 2" and then zero the work cord for x, now i run the script then hit the button
it seems to run fine go's to -1 then back up to 1.. now if I zero the x again and press the button it runs to -2 and then back to 0 but the mach cord seems to go -1 and then up 1 they seem to loose sink.
also if I set the work cord to .250 after a move to -1 in a script then send a move to 1 I would think it would move to 1 but not finding that the case... never moves to 1..
also not sure if I am correct but myxmachinecoord = Engine.GetTruePos( 1 ); should return the mach cord
and usercoord = Engine.GetAxisPos( 1 ); the work cord. I find both to return the work cord.. same values..
Thanks gary
Last edited by gburk on Wed Mar 13, 2019 9:31 am, edited 1 time in total.
Re: reading Pokeys pins
Hi Gary:
Ive confirmed some of this and fixed it already. It seems I added a few bugs in adding probing,
and in the case of GetTruePos , I had never used it so I missed a section I should have rem'ed out
to stop offset comp. , I will put out a new version tomorrow after I run some verification tests.
Thx
Art
Ive confirmed some of this and fixed it already. It seems I added a few bugs in adding probing,
and in the case of GetTruePos , I had never used it so I missed a section I should have rem'ed out
to stop offset comp. , I will put out a new version tomorrow after I run some verification tests.
Thx
Art
Re: reading Pokeys pins
Gary:
New Auggie is online..
Notes:
I found and fixed a problem with Probehit and with syncing after a probe. Problem was
the planner was syncing before the final position was read. I tested this with a script..
Engine.GCode("G31X50");
block("MotionStill");
if( GlobalGet("ProbeHit") )
{
print("Probe was hit");
}
else
{
print("Probe not hit");
}
Engine.GCode("G1X0");
It is consitant and shows probehit or not, and always returns to
0.
I cant repeat the homing issue, mine homes and reads all zero's afterwards.
The work coordinates seem to be fine here, I tested with a script that
moved from -3 to 3 three times. It stops at 3.0 , if I then zero the script
still moves from -3 to 3 as new coordinated. Work coordinates are the normal view,
the machine coordinates are the raw coordinates the pokeys sees itself at, the
work coordinates are, like in mach3, just that with offsets applied.
Let me know how you make out..
Art
New Auggie is online..
Notes:
I found and fixed a problem with Probehit and with syncing after a probe. Problem was
the planner was syncing before the final position was read. I tested this with a script..
Engine.GCode("G31X50");
block("MotionStill");
if( GlobalGet("ProbeHit") )
{
print("Probe was hit");
}
else
{
print("Probe not hit");
}
Engine.GCode("G1X0");
It is consitant and shows probehit or not, and always returns to
0.
I cant repeat the homing issue, mine homes and reads all zero's afterwards.
The work coordinates seem to be fine here, I tested with a script that
moved from -3 to 3 three times. It stops at 3.0 , if I then zero the script
still moves from -3 to 3 as new coordinated. Work coordinates are the normal view,
the machine coordinates are the raw coordinates the pokeys sees itself at, the
work coordinates are, like in mach3, just that with offsets applied.
Let me know how you make out..
Art
Re: reading Pokeys pins
Ok Seems good haven't run a lot of test but no problem now when axis runs to end with out a probe hit I tested your code in the script run..
and I ran this thought global with a button press it also ran good no problem, running and returning to 1,
still have to run the script in the script run before It will run with a button press but now I only have to run it once, so that's good, but is there a way so it doesn't have to loaded into the script edit and run first?.
I had to invert my probe other wise it was always triggered,,
also when probe is hit the axis doesn't stop dead it moves past the probe hit, it looks like enough to crash into the switch's..
will test some more with some added code to see if backing off will see the switch being released ok.
I'm using Inch not metric.. hence the different numbers from you code.
global ZeroToPlate = function()
{
print("probe test");
GlobalSet("ProbeInvert",0);
Engine.GCode("G31 X-3 F100");
block("MotionStill");
if( GlobalGet("ProbeHit") )
{
ProbePos = Engine.GetAxisPos( 1 ); // Get probe position
print("Probe Position = ",ProbePos); // show probe position
print("Probe was hit");
}
else
{
print("Probe not hit");
};
Engine.GCode("G1X1");
};
gary
and I ran this thought global with a button press it also ran good no problem, running and returning to 1,
still have to run the script in the script run before It will run with a button press but now I only have to run it once, so that's good, but is there a way so it doesn't have to loaded into the script edit and run first?.
I had to invert my probe other wise it was always triggered,,
also when probe is hit the axis doesn't stop dead it moves past the probe hit, it looks like enough to crash into the switch's..
will test some more with some added code to see if backing off will see the switch being released ok.
I'm using Inch not metric.. hence the different numbers from you code.
global ZeroToPlate = function()
{
print("probe test");
GlobalSet("ProbeInvert",0);
Engine.GCode("G31 X-3 F100");
block("MotionStill");
if( GlobalGet("ProbeHit") )
{
ProbePos = Engine.GetAxisPos( 1 ); // Get probe position
print("Probe Position = ",ProbePos); // show probe position
print("Probe was hit");
}
else
{
print("Probe not hit");
};
Engine.GCode("G1X1");
};
gary
Re: reading Pokeys pins
Art
Ok the problem I'm having is - if I have a touch off plate say .250 thick now I probe to plate then set axis dro to .250 at plate then I want to retract to 1.0 when I do a g1 x1 it go's to 1.6 even higher over 2.0, it seems not to know its sitting at .250 after I set the dro to .250, if I remember right that would work in mach3 or you could set axis to 0.0 and move touchplate - 1.. then set dro to 1, making any sense?.
Gary
Ok the problem I'm having is - if I have a touch off plate say .250 thick now I probe to plate then set axis dro to .250 at plate then I want to retract to 1.0 when I do a g1 x1 it go's to 1.6 even higher over 2.0, it seems not to know its sitting at .250 after I set the dro to .250, if I remember right that would work in mach3 or you could set axis to 0.0 and move touchplate - 1.. then set dro to 1, making any sense?.
Gary
Re: reading Pokeys pins
Gary:
>>also when probe is hit the axis doesn't stop dead it moves past the probe hit, it looks like enough to crash into the switch's..will test some more with some added code to see if backing off will see the switch being released ok.
This is typical with probes. You dont want to simply stop, steps could be lost. So typically when the
probe is hit, it trips to a deceleration phase, then stops. That why if you then get the probe hit points
from a script you'll see they are not the final rest position. Two things you can do for that is to either
probe at a lower feedrate, or set axis acceleration to a higher value.
Normally Auggie is 6th order for motion, BUT when a probe trips to hit status during a probe,
the pokeys switches to internal planner and slows down based on the setting of accel. Its a mach3
type of bang bang slowdown trajectory. The slower you go the faster you stop.
That why typically one would feed in a little quick, the plate would be on a spring so allow for the
slight crash, and then you'd withdraw very slowly to stop one step within leaving the plate.That would
be considered zero.
>>k the problem I'm having is - if I have a touch off plate say .250 thick now I probe to plate then set axis dro to .250 at plate then I want to retract to 1.0 when I do a g1 x1 it go's to 1.6 even higher over 2.0, it seems not to know its sitting at .250 after I set the dro to .250, if I remember right that would work in mach3 or you could set axis to 0.0 and move touchplat e - 1.. then set dro to 1, making any sense?.
That ones weird. I specifically tested that here to ensure it still moved to proper position
after a hit. Yes, you should be able to set the dro to .250 and then G1 to x0; Ill test that
again tomorrow to see what might be going on. This is on the work coordinates tab right?
Not the machine coords tab? Sounds like we're close anyway...
Art
>>also when probe is hit the axis doesn't stop dead it moves past the probe hit, it looks like enough to crash into the switch's..will test some more with some added code to see if backing off will see the switch being released ok.
This is typical with probes. You dont want to simply stop, steps could be lost. So typically when the
probe is hit, it trips to a deceleration phase, then stops. That why if you then get the probe hit points
from a script you'll see they are not the final rest position. Two things you can do for that is to either
probe at a lower feedrate, or set axis acceleration to a higher value.
Normally Auggie is 6th order for motion, BUT when a probe trips to hit status during a probe,
the pokeys switches to internal planner and slows down based on the setting of accel. Its a mach3
type of bang bang slowdown trajectory. The slower you go the faster you stop.
That why typically one would feed in a little quick, the plate would be on a spring so allow for the
slight crash, and then you'd withdraw very slowly to stop one step within leaving the plate.That would
be considered zero.
>>k the problem I'm having is - if I have a touch off plate say .250 thick now I probe to plate then set axis dro to .250 at plate then I want to retract to 1.0 when I do a g1 x1 it go's to 1.6 even higher over 2.0, it seems not to know its sitting at .250 after I set the dro to .250, if I remember right that would work in mach3 or you could set axis to 0.0 and move touchplat e - 1.. then set dro to 1, making any sense?.
That ones weird. I specifically tested that here to ensure it still moved to proper position
after a hit. Yes, you should be able to set the dro to .250 and then G1 to x0; Ill test that
again tomorrow to see what might be going on. This is on the work coordinates tab right?
Not the machine coords tab? Sounds like we're close anyway...
Art
Re: reading Pokeys pins
Art
>This is on the work coordinates tab right?
>Not the machine coords tab? Sounds like we're close anyway...
Yes word cords,
also I don't think I can read the mach cords in a script I think I had said this one before
if I use gettruepos not sure if command is correct don't rem off top of my head but it returns the same value as the getaxispos work cords ,,
I will try slowing probe down, and or a higher acceleration..
when probe is it are you returning the probe position with a call, or just using getaxispos?,,
Thanks gary
>This is on the work coordinates tab right?
>Not the machine coords tab? Sounds like we're close anyway...
Yes word cords,
also I don't think I can read the mach cords in a script I think I had said this one before
if I use gettruepos not sure if command is correct don't rem off top of my head but it returns the same value as the getaxispos work cords ,,
I will try slowing probe down, and or a higher acceleration..
when probe is it are you returning the probe position with a call, or just using getaxispos?,,
Thanks gary
Re: reading Pokeys pins
Gary:
I should have mentioned, I fixed also the GetTruePos() to give you back the machine coordinates.
When you probe, if it hits the end position is the actual stop position not the probe position.
To get the probe hit position, you call GetGlobal("ProbePos0"); (for x)
After the axis has decelerated, the planner position is set to the last position of actual motion.
If you wish to go to the point it hit at, you should be able to do a g1 move to the ProbePos0 in
your case. Take note the probe may or may not unactivate as that point in space will be the trigger
position of the probe switch so various factors may make it too close to release.
It sounds to me like you may be hitting some sort of race condition where the last coordinate
hasnt updated to the planner before calling for the G1 after the probe. You might want to add
a yield(); just before the g1. A yield is just a way of lettign auggie catch up with any tasks its
doing so if one suspects your going to fast in commands, a block for "motionstill" or a yield()
is a good way to make sure things sync up.. It may not help, but as I found mine to be accurate
each time I think it may be the speed of my system vs yours perhaps. This type of thing is hard
to find but there are many threads running doing various tasks so I worry about syncing at
times , and a yield may help.
psuedo code example..
{
Engine.GCode("G31X10F50");
block("MotionStill");
if( GlobalGet("ProbeHit")
{
yield();
ProbePos = GlobalGet("ProbePos0");
Engine.GCode("G1X" + ProbePos );
print( "Probe Successfull. Zero Me.");
}
else
{
print( "Probe Failed.Too far away, zero me and try again.");
}
}
Art
I should have mentioned, I fixed also the GetTruePos() to give you back the machine coordinates.
When you probe, if it hits the end position is the actual stop position not the probe position.
To get the probe hit position, you call GetGlobal("ProbePos0"); (for x)
After the axis has decelerated, the planner position is set to the last position of actual motion.
If you wish to go to the point it hit at, you should be able to do a g1 move to the ProbePos0 in
your case. Take note the probe may or may not unactivate as that point in space will be the trigger
position of the probe switch so various factors may make it too close to release.
It sounds to me like you may be hitting some sort of race condition where the last coordinate
hasnt updated to the planner before calling for the G1 after the probe. You might want to add
a yield(); just before the g1. A yield is just a way of lettign auggie catch up with any tasks its
doing so if one suspects your going to fast in commands, a block for "motionstill" or a yield()
is a good way to make sure things sync up.. It may not help, but as I found mine to be accurate
each time I think it may be the speed of my system vs yours perhaps. This type of thing is hard
to find but there are many threads running doing various tasks so I worry about syncing at
times , and a yield may help.
psuedo code example..
{
Engine.GCode("G31X10F50");
block("MotionStill");
if( GlobalGet("ProbeHit")
{
yield();
ProbePos = GlobalGet("ProbePos0");
Engine.GCode("G1X" + ProbePos );
print( "Probe Successfull. Zero Me.");
}
else
{
print( "Probe Failed.Too far away, zero me and try again.");
}
}
Art
Re: reading Pokeys pins
Art
Set the probe speed lower and its a lot better, should be good enough not to go way past the end stop..
You are mostly right the system is not updated fast enough now that the probe is running slower, I can see it better looks like if probe is hit at -0.430 or so when I do a g1 x1 it retracts to +1.4 or so for some reason it seems to be adding the current pos to the 1 for retract make sense ?
will test the new stuff..
tested you code work good but I added so to set axis to .250 and the retract to 1 but still go's past one to 1.3 or more heres the code maybe I am doing something wrong still added another yield for testing but made no difference..
also looks like gettruepos is working now.
GlobalSet("ProbeInvert",0);
Engine.GCode("G31 X-3 F10");
block("MotionStill");
if( GlobalGet("ProbeHit"))
{
yield();
ProbePos = GlobalGet("ProbePos0");
Engine.GCode("G1X" + ProbePos );
block("MotionStill");
xpos = Engine.GetAxisPos( 1 );
print("Probe Successfull. Zero Me. "+xpos+" probe pos "+ProbePos);
Engine.SetAxisPos( .250, null, null, null );
yield();
Engine.GCode("G1 X1 F50");
block("MotionStill");
}
else
{
print("Probe Failed.Too far away, zero me and try again.");
}
Gary
Gary
Set the probe speed lower and its a lot better, should be good enough not to go way past the end stop..
You are mostly right the system is not updated fast enough now that the probe is running slower, I can see it better looks like if probe is hit at -0.430 or so when I do a g1 x1 it retracts to +1.4 or so for some reason it seems to be adding the current pos to the 1 for retract make sense ?
will test the new stuff..
tested you code work good but I added so to set axis to .250 and the retract to 1 but still go's past one to 1.3 or more heres the code maybe I am doing something wrong still added another yield for testing but made no difference..
also looks like gettruepos is working now.
GlobalSet("ProbeInvert",0);
Engine.GCode("G31 X-3 F10");
block("MotionStill");
if( GlobalGet("ProbeHit"))
{
yield();
ProbePos = GlobalGet("ProbePos0");
Engine.GCode("G1X" + ProbePos );
block("MotionStill");
xpos = Engine.GetAxisPos( 1 );
print("Probe Successfull. Zero Me. "+xpos+" probe pos "+ProbePos);
Engine.SetAxisPos( .250, null, null, null );
yield();
Engine.GCode("G1 X1 F50");
block("MotionStill");
}
else
{
print("Probe Failed.Too far away, zero me and try again.");
}
Gary
Gary
Last edited by gburk on Fri Mar 15, 2019 6:15 am, edited 1 time in total.
Re: reading Pokeys pins
Gary:
Try this script for me. I ran it several times with probe hit and no probe hit, it returns to X=0 every time.
Id like to know if your does different. There's a bit of a dance going on when a probe is hit. First, the program stops motion.It clears the planner of any subsequent moves. It then flags the system to refresh the planners current position to wherever it stopped. The next move in the script is to move to x=0.
Now if the move to x=0 happens before the probe internals have reset the planner, it may still think its at
the last commanded position, which is the norm. This means if the probe stopped you at x= .5, but didnt set the planner to .5, it will still think your last move ended at X10, or whatever the stop was. So a move to x1 may move 9 units up. But if the planner knows it stopped at .5, then it should move only .5 to get to zero.Your symptoms seem to show its stopping on the probe, but not resyncing to the actual position the
machine coordinates are now at. Im just not sure why mine works..but perhaps both of ours work
on this script but fail on yours. Let me know what this simple script does..
Engine.GCode("G31X10");
block("MotionStill");
if( GlobalGet("ProbeHit") )
{
print("Probe was hit");
}
else
{
print("Probe not hit");
}
Engine.GCode("G1X0");
Does it always end at x=0 on the work coordinate display?
Thx
Art
Try this script for me. I ran it several times with probe hit and no probe hit, it returns to X=0 every time.
Id like to know if your does different. There's a bit of a dance going on when a probe is hit. First, the program stops motion.It clears the planner of any subsequent moves. It then flags the system to refresh the planners current position to wherever it stopped. The next move in the script is to move to x=0.
Now if the move to x=0 happens before the probe internals have reset the planner, it may still think its at
the last commanded position, which is the norm. This means if the probe stopped you at x= .5, but didnt set the planner to .5, it will still think your last move ended at X10, or whatever the stop was. So a move to x1 may move 9 units up. But if the planner knows it stopped at .5, then it should move only .5 to get to zero.Your symptoms seem to show its stopping on the probe, but not resyncing to the actual position the
machine coordinates are now at. Im just not sure why mine works..but perhaps both of ours work
on this script but fail on yours. Let me know what this simple script does..
Engine.GCode("G31X10");
block("MotionStill");
if( GlobalGet("ProbeHit") )
{
print("Probe was hit");
}
else
{
print("Probe not hit");
}
Engine.GCode("G1X0");
Does it always end at x=0 on the work coordinate display?
Thx
Art
Who is online
Users browsing this forum: No registered users and 3 guests