Verifying position of home switch

More
25 Nov 2016 12:20 #83265 by Wirewrap
I would like, on my stepper motor driven mill, to check the position of the home switch after a lengthy mill operation to see if I have lost steps.

Just rehoming erases the error if here was one. Would be perfect to get a message that the X home switch is now off by 0.15 mm from the initial home position.

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

More
25 Nov 2016 15:06 #83276 by andypugh
It might be possible to capture the offset in HAL using the sample-hold component triggered from the axis "is-homed" pin.
linuxcnc.org/docs/2.7/html/man/man9/sample_hold.9.html
Actually: You can't use that component because it only works with the S32 (signed integer) data type. But you can get the same function from a mux2 component that feeds its output back to one of the inputs (which input you connect it to controls whether it sample-holds in the falling or rising edge of the select pin)
linuxcnc.org/docs/2.7/html/man/man9/mux2.9.html

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

More
27 Nov 2016 20:26 #83384 by Wirewrap
I have made some progress, written a hal component "sample_latch.comp" to sample a float on the home switch signal falling edge.
This component is used in a pyvcp display which shows any error.

BUT, I canĀ“t find the AXIS name for actual machine X position. axis.0.joint-pos-command might be a candidate, but I am not sure.

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

More
29 Nov 2016 13:14 #83427 by andypugh

axis.0.joint-pos-command might be a candidate, but I am not sure.


Was that the right pin? It should probably be the one that shows a step-change in value when the axis homes. Halscope might be a useful tool for watching it.

If you can disable the drives (F2) turn the shaft by hand, then re-enable the drives then re-home you should be able to get a good test at least.

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

Time to create page: 0.062 seconds
Powered by Kunena Forum