Gcode and hal pins values

More
06 Jul 2011 18:25 #11192 by Nick
Hi.

I've got an interesting task, to make something like smartprobe.ngc but without touch probe.

So the guy has machine with X linear and A rotary axis. Also there's Z axis without motor but with encoder. At the bottom of Z axis there's bearing which is riding on the object. And we want to get the table of encoder values at specified x and a.

So I thought of just logging (LOG, X#5420 A#5423 Z5422), but probably it'll raise FError because EMC2 will not touch Z axis but will see that it moving.

So is there any way to echo encoder.0.value via from Gcode (LOG, ....) or any other way?

Please Log in or Create an account to join the conversation.

More
06 Jul 2011 22:18 #11198 by BigJohnT
I kinda did something similar on my THC comp. I hijacked the position feed back and lied to EMC so I could control the Z while burning then restore it back and hand it back to EMC for other moves. Take a look at thc.comp and you will see how I did it.

John

Please Log in or Create an account to join the conversation.

More
06 Jul 2011 23:34 #11200 by andypugh
Nick wrote:

So is there any way to echo encoder.0.value via from Gcode (LOG, ....) or any other way?


net enc encoder.0.value => motion.analog-in-00

M66 E0 L0
(LOG, #5399)

Please Log in or Create an account to join the conversation.

More
07 Jul 2011 06:44 - 07 Jul 2011 06:46 #11209 by Nick
Replied by Nick on topic Re:Gcode and hal pins values
Thanks a lot! M66 is excellent and easy way!

THC comp is interesting too but a little bit complex for newbie :)... The guy who asked me how to do it is just taking his first steps with EMC2.
Last edit: 07 Jul 2011 06:46 by Nick.

Please Log in or Create an account to join the conversation.

Time to create page: 0.069 seconds
Powered by Kunena Forum