A question about homing in LinuxCNC
29 Jan 2015 15:28 #55440
by sdfzz
A question about homing in LinuxCNC was created by sdfzz
Hi all,
I'm trying to build a 3-axis CNC using LinuxCNC. I setup my system so that I can jog 3 motors (X, Y, Z) and receive the encoder feedbacks.
However, when I set 'axis.0.home-sw-in' to 0 and press home button on AXIS GUI, the joint would not move.
When I set 'axis.0.home-sw-in' to high, homing is completed (I actually added a check button to set 'home-sw-in' from low to high)
I'm doing homing on switch only mode, and homing-related settings in my INI file are:
HOME_OFFSET = 0.0
HOME_SEARCH_VEL = 10.0
HOME_LATCH_VEL = 10.0
HOME_USE_INDEX = NO
HOME_SEQUENCE = 0
1. Is there anything wrong in my setup?
2. Currently, I'm only using position control. So, my 'axis.N.joint-vel-cmd' is not connected. Can this cause a problem in homing?
3. When I checked my halmeter, home-state was 7 while joint is not moving and 'home-sw-in' is 0....does anyone know that 7 means?
Regards,
Steve
I'm trying to build a 3-axis CNC using LinuxCNC. I setup my system so that I can jog 3 motors (X, Y, Z) and receive the encoder feedbacks.
However, when I set 'axis.0.home-sw-in' to 0 and press home button on AXIS GUI, the joint would not move.
When I set 'axis.0.home-sw-in' to high, homing is completed (I actually added a check button to set 'home-sw-in' from low to high)
I'm doing homing on switch only mode, and homing-related settings in my INI file are:
HOME_OFFSET = 0.0
HOME_SEARCH_VEL = 10.0
HOME_LATCH_VEL = 10.0
HOME_USE_INDEX = NO
HOME_SEQUENCE = 0
1. Is there anything wrong in my setup?
2. Currently, I'm only using position control. So, my 'axis.N.joint-vel-cmd' is not connected. Can this cause a problem in homing?
3. When I checked my halmeter, home-state was 7 while joint is not moving and 'home-sw-in' is 0....does anyone know that 7 means?
Regards,
Steve
Please Log in or Create an account to join the conversation.
30 Jan 2015 07:31 #55470
by andypugh
I am a bit confused as to why you are setting the home-sw-in values rather than connecting those inputs to home switches.
Do you actually have home switches?
Replied by andypugh on topic A question about homing in LinuxCNC
When I set 'axis.0.home-sw-in' to high, homing is completed
I am a bit confused as to why you are setting the home-sw-in values rather than connecting those inputs to home switches.
Do you actually have home switches?
Please Log in or Create an account to join the conversation.
30 Jan 2015 08:13 #55474
by sdfzz
Replied by sdfzz on topic A question about homing in LinuxCNC
Thank you for the reply
I do have a home switch wired to my system...I used check button for 'debugging purposes'
My problem is that the motor won't move to search for the home switch...any idea why it is not moving?
Regards,
Steve
I do have a home switch wired to my system...I used check button for 'debugging purposes'
My problem is that the motor won't move to search for the home switch...any idea why it is not moving?
Regards,
Steve
Please Log in or Create an account to join the conversation.
30 Jan 2015 10:40 #55476
by joekline9
Replied by joekline9 on topic A question about homing in LinuxCNC
You need to have things setup in your .ini file.
under each [AXIS..] section you need something like below:
[AXIS_0]
HOME_OFFSET = 0.000000
HOME_SEARCH_VEL =1.0
HOME_LATCH_VEL = 0.050000
HOME_FINAL_VEL = 0.000000
HOME_USE_INDEX = YES
HOME_SEQUENCE = 1
The VEL s can be positive or negative to determine the direction.
I believe the Integrator's manual explains this.
I hope this helps.
under each [AXIS..] section you need something like below:
[AXIS_0]
HOME_OFFSET = 0.000000
HOME_SEARCH_VEL =1.0
HOME_LATCH_VEL = 0.050000
HOME_FINAL_VEL = 0.000000
HOME_USE_INDEX = YES
HOME_SEQUENCE = 1
The VEL s can be positive or negative to determine the direction.
I believe the Integrator's manual explains this.
I hope this helps.
Please Log in or Create an account to join the conversation.
30 Jan 2015 11:51 #55477
by sdfzz
Replied by sdfzz on topic A question about homing in LinuxCNC
Thank you for your help
I have added homing-related settings under [AXIS_n] of my ini file. But, the motor still won't move...
Is there any possible reason why the motor is not moving while homing?
Do I need to enable velocity command for homing?
Regards,
Steve
I have added homing-related settings under [AXIS_n] of my ini file. But, the motor still won't move...
Is there any possible reason why the motor is not moving while homing?
Do I need to enable velocity command for homing?
Regards,
Steve
Please Log in or Create an account to join the conversation.
30 Jan 2015 18:34 #55480
by andypugh
There must be, your motors are not moving![:-) :-)](/media/kunena/emoticons/smile.png)
No, use of that pin is optional.
Start Axis, then open a terminal window and type "halcmd -kf"
You can now view and modify HAL pin values manually.Will show you whether any joints are in the homing sequence, though that is a one-time check.
To pop up a window with the live homing status in it use(and the same for the other axes)
You can do the same for the homing state, if you wish. To answer the earlier question about homing state, I am afraid you need to look at the homing code state machine:
The state machine is here: git.linuxcnc.org/gitweb?p=linuxcnc.git;a...=refs/heads/2.6#l240
The constants are defined here: git.linuxcnc.org/gitweb?p=linuxcnc.git;a...=refs/heads/2.6#l402
State 7 is
So at that point the axis _thinks_ it is moving, and is waiting for a home switch to trigger.
Are the stepgen / pid / physical amps enabled properly in this state? Does the machine think it is on a limit switch by any chance?
Replied by andypugh on topic A question about homing in LinuxCNC
Is there any possible reason why the motor is not moving while homing?
There must be, your motors are not moving
![:-) :-)](/media/kunena/emoticons/smile.png)
Do I need to enable velocity command for homing?
No, use of that pin is optional.
Start Axis, then open a terminal window and type "halcmd -kf"
You can now view and modify HAL pin values manually.
show pin *homing*
To pop up a window with the live homing status in it use
loadusr halscope -s pin axis.0.homing
You can do the same for the homing state, if you wish. To answer the earlier question about homing state, I am afraid you need to look at the homing code state machine:
The state machine is here: git.linuxcnc.org/gitweb?p=linuxcnc.git;a...=refs/heads/2.6#l240
The constants are defined here: git.linuxcnc.org/gitweb?p=linuxcnc.git;a...=refs/heads/2.6#l402
State 7 is
411 HOME_INITIAL_SEARCH_WAIT, // 7
So at that point the axis _thinks_ it is moving, and is waiting for a home switch to trigger.
Are the stepgen / pid / physical amps enabled properly in this state? Does the machine think it is on a limit switch by any chance?
Please Log in or Create an account to join the conversation.
02 Feb 2015 09:51 #55573
by sdfzz
Replied by sdfzz on topic A question about homing in LinuxCNC
Thank you for your answer..
I've checked the hal meter as you've recommended, and I can see that my home switch is working properly.
Also, as I can jog my joints, I believe my pins are connected properly...
Regards,
Steve
I've checked the hal meter as you've recommended, and I can see that my home switch is working properly.
Also, as I can jog my joints, I believe my pins are connected properly...
Regards,
Steve
Please Log in or Create an account to join the conversation.
02 Feb 2015 17:35 #55576
by andypugh
I wasn't suggesting this to check the switch but to see what LinuxCNC thinks is happening. For example if it thinks it is homing an axis.
Do you have non-zero velocities in the INI for all phases of the homing process?
If you Halscope axis.N.motor-position-cmd do you see that LinuxCNC is trying to move the axes?
Replied by andypugh on topic A question about homing in LinuxCNC
I've checked the hal meter as you've recommended, and I can see that my home switch is working properly.
I wasn't suggesting this to check the switch but to see what LinuxCNC thinks is happening. For example if it thinks it is homing an axis.
Do you have non-zero velocities in the INI for all phases of the homing process?
If you Halscope axis.N.motor-position-cmd do you see that LinuxCNC is trying to move the axes?
Please Log in or Create an account to join the conversation.
Time to create page: 0.170 seconds