Checking if machine has been homed during a remapped M6
- footpetaljones
- Offline
- Junior Member
Less
More
- Posts: 22
- Thank you received: 5
20 Jun 2018 02:45 #112603
by footpetaljones
As part of a remapped M6 for a wine rack ATC I'd like to include an error if the machine has not been previously homed.
I have a few ideas on how to do this:
1. If a parameter for "machine has been homed" exists simply read the status of that parameter in the macro.
2. Write a small ladder program to monitor when the home switches have been triggered. A coil activates a hal pin, which is read in the macro.
3. Command a homing routine in the macro.
Is there such a parameter that already exists?
Thank you
I have a few ideas on how to do this:
1. If a parameter for "machine has been homed" exists simply read the status of that parameter in the macro.
2. Write a small ladder program to monitor when the home switches have been triggered. A coil activates a hal pin, which is read in the macro.
3. Command a homing routine in the macro.
Is there such a parameter that already exists?
Thank you
Please Log in or Create an account to join the conversation.
22 Jun 2018 14:49 #112773
by andypugh
That seems advisable. But might not be necessary. By default (ie if NO_FORCE_HOMING is not set) the machine will not allow MDI commands or the execution of G-code.
Each axis has an "homed" HAL pin:
(listed under "debugging pins" here: linuxcnc.org/docs/2.7/html/man/man9/motion.9.html )
I do not think that there is any danger of those being removed even though they are not in the main list. There are also the halui join.N.is-homed pins: linuxcnc.org/docs/2.7/html/man/man1/halui.1.html though those are user-space not realtime. (unlikely to be a problem).
You can "and" those all together in HAL and pass them to a G-code digital input, and check that in the tool-change routine.
Replied by andypugh on topic Checking if machine has been homed during a remapped M6
As part of a remapped M6 for a wine rack ATC I'd like to include an error if the machine has not been previously homed.
That seems advisable. But might not be necessary. By default (ie if NO_FORCE_HOMING is not set) the machine will not allow MDI commands or the execution of G-code.
Each axis has an "homed" HAL pin:
(listed under "debugging pins" here: linuxcnc.org/docs/2.7/html/man/man9/motion.9.html )
I do not think that there is any danger of those being removed even though they are not in the main list. There are also the halui join.N.is-homed pins: linuxcnc.org/docs/2.7/html/man/man1/halui.1.html though those are user-space not realtime. (unlikely to be a problem).
You can "and" those all together in HAL and pass them to a G-code digital input, and check that in the tool-change routine.
Please Log in or Create an account to join the conversation.
23 Jun 2018 18:36 #112799
by cmorley
Replied by cmorley on topic Checking if machine has been homed during a remapped M6
Or use python:
linuxcnc.org/docs/2.7/html/config/python...ding_linuxcnc_status
homed
(returns tuple of integers) - 0 = not homed, 1 = homed.
Chris M
linuxcnc.org/docs/2.7/html/config/python...ding_linuxcnc_status
homed
(returns tuple of integers) - 0 = not homed, 1 = homed.
Chris M
Please Log in or Create an account to join the conversation.
Time to create page: 0.128 seconds