Page 57 of 59

Re: reading Pokeys pins

Posted: Mon Dec 09, 2019 8:21 pm
by gburk

We should most likely move this to the 3d printer subject..
Can they be moved art?.

Gary

Re: reading Pokeys pins

Posted: Tue Dec 10, 2019 1:45 am
by ArtF
Gary:

  Beats me, I try to play with the forum as little as possible. Its under server control so I cant do
real maintenance. Nothing too valuable so far in terms of information on the topic, you might just
reopen it under 3d printers....

Art

Re: reading Pokeys pins

Posted: Fri Dec 13, 2019 7:24 pm
by gburk
Art

Ok for forum..

I was wondering if you had added any thing in the script's to be able to read the Probe Polarity, to see if it's set to true or false?

Gary

Re: reading Pokeys pins

Posted: Fri Dec 13, 2019 9:49 pm
by ArtF
Gary:

I dont think I did, I will check though to see if the variable for the base polarity is available in script.,
comparing that to probeinvert would indicate the actual state of the logic..

Art

Re: reading Pokeys pins

Posted: Fri Dec 13, 2019 11:28 pm
by gburk
Art

Ok Thanks, i was looking to see how it's set in the planer/config true or false, i would like to be able to set the probhit led to the same state as my probes, on my touch plate i have it set to false and on the probe to true
and that make's the led  on when not hit  then off when hit, or  if true off when not triggered and on when hit.. i would like to keep them the same.. make sense?.

Gary

Re: reading Pokeys pins

Posted: Sun Dec 15, 2019 4:45 pm
by gburk
Art

Have a question X=Engine.GetAxisPos(1);

if i run this
X=Engine.GetAxisPos(1);
print(X);
and have the X dro set to .199999
it will print .199999
then if i Zero the Axis now set to 0 and rerun
it prints -6.10352e-008

It only seems to happen after a Engine.GCode move..

am i doing something wrong or miss interpreting things

Gary

Re: reading Pokeys pins

Posted: Sun Dec 15, 2019 6:12 pm
by Mooselake
Art can answer this way better than me, but it looks like floating point roundoff error. -0.000000061 looks pretty darn close to zero.

Kirk

Re: reading Pokeys pins

Posted: Sun Dec 15, 2019 6:58 pm
by ArtF
Gary:

Yup, Kirk has it right. Thats a number so small it is zero. But I'll note to add a line to kill it if its
less than .0000001 or something..


Art

Re: reading Pokeys pins

Posted: Sun Dec 15, 2019 8:54 pm
by ArtF
Gary:

As of next release..should be withing a couple days, you can get the
planner setting for probe level by asking for the global variable
"ProbeSetupLevel"

  You cannot set this, it is read only. It can be set only in the config.

Art

Re: reading Pokeys pins

Posted: Sun Dec 15, 2019 11:59 pm
by gburk
Art

"ProbeSetupLevel" sounds good. Don't thing i need to set it at least for now.

I thought the number may have been a float, i tried a few conversions on it be same affect...

So question is if i am getting this value back after setting the axis to 0, Engine.SetAxisPos(0.null,null,null);
how much if any problem's will i have if i use the value for example to send the X axis to the returned value, of X =  Engine.GearAxisPos(1); Enging.Gcode("G01 X"+X); is say X axis is at .200 before the GCode move.

update
I tried this, last_pos = format("%.5f",(Engine.GetAxisPos( 1 ))); and i seem to always get the number 0 now after resetting setting the dro X axis to 0.. good way or bad?

Thanks
Gary