- Posts: 60
- Thank you received: 0
Verifying position of home switch
9 years 11 months ago #83265
by Wirewrap
Verifying position of home switch was created 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.
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 to join the conversation.
9 years 11 months ago #83276
by andypugh
Replied by andypugh on topic Verifying position of home switch
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
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 to join the conversation.
9 years 11 months ago #83384
by Wirewrap
Replied by Wirewrap on topic Verifying position of home switch
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.
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 to join the conversation.
9 years 11 months ago #83427
by andypugh
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.
Replied by andypugh on topic Verifying position of home switch
Wirewrap wrote: 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 to join the conversation.
Time to create page: 0.130 seconds
