Difference btween last home position and new home position?
25 Feb 2021 01:38 #200050
by turbostew
I really would like to know how much I am off from the previous home position when I re-home. Is there a simple way of doing this? It seems this would be a popular feature but my googling is striking out.
Please Log in or Create an account to join the conversation.
25 Feb 2021 02:49 #200054
by MaHa
Replied by MaHa on topic Difference btween last home position and new home position?
If you place a calibrationring on the machining area, centerpoint with dial gauge, G28.1 in MDI, #5161 and #5162 will contain X and Y position, machinecoordinates G53. Save this, then rehome.
G0 G53 X#5161 Y#5162 to the previously saved positions. Maybe select G54 and set X Y to zero. Check the deviation with dial gauge.
G0 G53 X#5161 Y#5162 to the previously saved positions. Maybe select G54 and set X Y to zero. Check the deviation with dial gauge.
Attachments:
Please Log in or Create an account to join the conversation.
25 Feb 2021 02:57 #200055
by JohnnyCNC
Replied by JohnnyCNC on topic Difference btween last home position and new home position?
I have a DRO with glass scales on my mill from it's manual mill days. I just home, zero the DRO, home again. I think any solution is going to involve the addition of some additional measuring hardware.
Please Log in or Create an account to join the conversation.
25 Feb 2021 05:11 - 25 Feb 2021 05:12 #200056
by turbostew
Replied by turbostew on topic Difference btween last home position and new home position?
More hardware if I were concerned about mill accuracy, I am concerned about router accuracy. My accuracy needs are well within my home switch accuracy. I already have "accurate" home switches, why can I not use them for measurement? I wish I could use the home switches as probe inputs easily.....
Last edit: 25 Feb 2021 05:12 by turbostew.
Please Log in or Create an account to join the conversation.
26 Feb 2021 10:21 #200180
by rodw
Replied by rodw on topic Difference btween last home position and new home position?
I think you could write a custom component that monitored joint.N.homed so that when it goes true, save joint.N.pos−cmd
you could then read this_home_pos and copy it to last_home_pos after setting a value to home-pos -error.
linuxcnc.org/docs/2.8/html/man/man9/motion.9.html
you could then read this_home_pos and copy it to last_home_pos after setting a value to home-pos -error.
linuxcnc.org/docs/2.8/html/man/man9/motion.9.html
Please Log in or Create an account to join the conversation.
26 Feb 2021 11:08 - 26 Feb 2021 11:08 #200183
by pippin88
Replied by pippin88 on topic Difference btween last home position and new home position?
I have often thought this function should exist.
For stepper based machines it would be a reasonable way to show that steps have been lost.
Probably should be a separate function than usual homing to avoid confusion.
Just a simple message that says expected home position correct, or home switch triggered too early / late by X mm/steps
For stepper based machines it would be a reasonable way to show that steps have been lost.
Probably should be a separate function than usual homing to avoid confusion.
Just a simple message that says expected home position correct, or home switch triggered too early / late by X mm/steps
Last edit: 26 Feb 2021 11:08 by pippin88.
Please Log in or Create an account to join the conversation.
26 Feb 2021 16:50 - 26 Feb 2021 16:52 #200204
by turbostew
Replied by turbostew on topic Difference btween last home position and new home position?
Thanks all for the feedback!
pippin88,
So joint.N.pos-cmd is never "reset" during a session? It is not simply zeroed on a home? Probably reset on a new session. If it is never zeroed during a session, your idea seems like it could work....
pippin88,
I think you could write a custom component that monitored joint.N.homed so that when it goes true, save joint.N.pos−cmd
you could then read this_home_pos and copy it to last_home_pos after setting a value to home-pos -error.
linuxcnc.org/docs/2.8/html/man/man9/motion.9.html
So joint.N.pos-cmd is never "reset" during a session? It is not simply zeroed on a home? Probably reset on a new session. If it is never zeroed during a session, your idea seems like it could work....
Last edit: 26 Feb 2021 16:52 by turbostew.
Please Log in or Create an account to join the conversation.
26 Feb 2021 19:35 - 26 Feb 2021 19:36 #200217
by turbostew
Replied by turbostew on topic Difference btween last home position and new home position?
I have searched for a couple hours. Can anyone give me a python code snippet to read joint.N.pos−cmd?????
Last edit: 26 Feb 2021 19:36 by turbostew.
Please Log in or Create an account to join the conversation.
01 Mar 2021 22:07 #200743
by andypugh
Typically that isn't how you do it.
You create a HAL component (possibly in Python, possibly in C) which creates its own HAL pins.
Then you connect the HAL pins in HAL, and the values are available inside the component.
Though I second the opinion that this monitoring could much more easily be done internally to LinuxCNC.
I think that you would need to add a "previous_motor_offset" here:
github.com/LinuxCNC/linuxcnc/blob/master.../motion/homing.c#L81
Then set that to the joint->motor_offset here:
github.com/LinuxCNC/linuxcnc/blob/master...motion/homing.c#L220
Then run a check that previous != and new != previous here:
github.com/LinuxCNC/linuxcnc/blob/master...otion/homing.c#L1230
raising a warning if the error is above some configurable limit.
Replied by andypugh on topic Difference btween last home position and new home position?
I have searched for a couple hours. Can anyone give me a python code snippet to read joint.N.pos−cmd?????
Typically that isn't how you do it.
You create a HAL component (possibly in Python, possibly in C) which creates its own HAL pins.
Then you connect the HAL pins in HAL, and the values are available inside the component.
Though I second the opinion that this monitoring could much more easily be done internally to LinuxCNC.
I think that you would need to add a "previous_motor_offset" here:
github.com/LinuxCNC/linuxcnc/blob/master.../motion/homing.c#L81
Then set that to the joint->motor_offset here:
github.com/LinuxCNC/linuxcnc/blob/master...motion/homing.c#L220
Then run a check that previous != and new != previous here:
github.com/LinuxCNC/linuxcnc/blob/master...otion/homing.c#L1230
raising a warning if the error is above some configurable limit.
Please Log in or Create an account to join the conversation.
Time to create page: 0.145 seconds