Execute after homing... AUTORUN METHOD
- Askjerry
- Topic Author
- Offline
- Elite Member
Less
More
- Posts: 313
- Thank you received: 35
23 Jun 2024 04:34 - 23 Jun 2024 04:37 #303602
by Askjerry
Execute after homing... AUTORUN METHOD was created by Askjerry
I built a little robot arm, and when it homes, the G53 locations have it facing 50 degrees backward, at the end of travel, etc.
In my ROUTINES folder there is a program firstrun.ngc that automatically loads because the INI file has the line...
Open_File = ROUTINES/firstrun.ngc
I home the robot and then click the cycle start (play) button.
I'm wondering if the postgui file or similar could have a command that basically says, "Home then run firstrun.ngc"
This file moves it to a PRESET-1 position then uses G10 L20 P0 to set the G54 home where I want it.
It would just be nice if I could hit HOME, have it go a typical home... then execute a file.
Is this possible??
Jerry
In my ROUTINES folder there is a program firstrun.ngc that automatically loads because the INI file has the line...
Open_File = ROUTINES/firstrun.ngc
I home the robot and then click the cycle start (play) button.
I'm wondering if the postgui file or similar could have a command that basically says, "Home then run firstrun.ngc"
This file moves it to a PRESET-1 position then uses G10 L20 P0 to set the G54 home where I want it.
It would just be nice if I could hit HOME, have it go a typical home... then execute a file.
Is this possible??
Jerry
Last edit: 23 Jun 2024 04:37 by Askjerry. Reason: Suscribe
Please Log in or Create an account to join the conversation.
- Aciera
- Offline
- Administrator
Less
More
- Posts: 3970
- Thank you received: 1719
23 Jun 2024 07:22 #303613
by Aciera
Replied by Aciera on topic Execute after homing... AUTORUN METHOD
1. Have you tried using 'HOME_OFFSET' to get the home position to where you want it?
2. You could use an MDI_COMMAND to call a subroutine and connect 'motion.is-all-homed' to the MDI_COMMAND
2. You could use an MDI_COMMAND to call a subroutine and connect 'motion.is-all-homed' to the MDI_COMMAND
Please Log in or Create an account to join the conversation.
- Askjerry
- Topic Author
- Offline
- Elite Member
Less
More
- Posts: 313
- Thank you received: 35
29 Jun 2024 22:03 - 29 Jun 2024 23:07 #304062
by Askjerry
Replied by Askjerry on topic Execute after homing... AUTORUN METHOD
I have used the Home Offset... it's odd.. and I have not experienced it before... but when I made the first axis (A) have a home offset of 50, it went exactly where I thought it would... but then the (A) axis homed in an opposite direction. I don't know why.
My mills... (Monster Mill), (Frankenlab), and (Laguna) all have home offsets. This is the first time I've wired up a 5 DOF robot arm. I will experiment with that more... been out of town over a week now... just got home.
But I had not thought of linking the motion.is-all-homed to an MDI Command... very clever. I'll probably play with that now. It offers more options than the offsets... running routines to check inputs... probe functions, etc... all at the start.
Not sure exactly what I'll do other than the preset location at this time... but yeah... very cool idea.
Thank you!
Jerry
Update: I could NOT find the signal for all homed... or any variant of it. I can find individual axis... but not "all".
My mills... (Monster Mill), (Frankenlab), and (Laguna) all have home offsets. This is the first time I've wired up a 5 DOF robot arm. I will experiment with that more... been out of town over a week now... just got home.
But I had not thought of linking the motion.is-all-homed to an MDI Command... very clever. I'll probably play with that now. It offers more options than the offsets... running routines to check inputs... probe functions, etc... all at the start.
Not sure exactly what I'll do other than the preset location at this time... but yeah... very cool idea.
Thank you!
Jerry
Update: I could NOT find the signal for all homed... or any variant of it. I can find individual axis... but not "all".
Last edit: 29 Jun 2024 23:07 by Askjerry.
Please Log in or Create an account to join the conversation.
- rodw
- Offline
- Platinum Member
Less
More
- Posts: 10754
- Thank you received: 3543
30 Jun 2024 01:36 #304071
by rodw
Replied by rodw on topic Execute after homing... AUTORUN METHOD
halui.home-all bit in
REF: linuxcnc.org/docs/stable/html/man/man1/halui.1.html#Homing
REF: linuxcnc.org/docs/stable/html/man/man1/halui.1.html#Homing
Please Log in or Create an account to join the conversation.
- Aciera
- Offline
- Administrator
Less
More
- Posts: 3970
- Thank you received: 1719
30 Jun 2024 07:30 #304074
by Aciera
Replied by Aciera on topic Execute after homing... AUTORUN METHOD
motion.is-all-homed
linuxcnc.org/docs/2.9/html/man/man9/motion.9.html#MOTION%20PINS
linuxcnc.org/docs/2.9/html/man/man9/motion.9.html#MOTION%20PINS
Please Log in or Create an account to join the conversation.
- Askjerry
- Topic Author
- Offline
- Elite Member
Less
More
- Posts: 313
- Thank you received: 35
30 Jun 2024 16:59 #304091
by Askjerry
Replied by Askjerry on topic Execute after homing... AUTORUN METHOD
RODW -> The pin you specified requests the machine to home, not return when homed.
ACIERA ->
I put a line in the custom_postgui.hal file... <= motion.is.all.homed but when I run it, I get the following...
Debug File Information:
custom_postgui.hal :70: motion.is-all-homed does not exist.
The text you referred to says it should exist... but it's not there. I may have to save my configuration and update...
this is Axis 2.7.14 on this machine.
ACIERA ->
I put a line in the custom_postgui.hal file... <= motion.is.all.homed but when I run it, I get the following...
Debug File Information:
custom_postgui.hal :70: motion.is-all-homed does not exist.
The text you referred to says it should exist... but it's not there. I may have to save my configuration and update...
this is Axis 2.7.14 on this machine.
Please Log in or Create an account to join the conversation.
- Aciera
- Offline
- Administrator
Less
More
- Posts: 3970
- Thank you received: 1719
30 Jun 2024 17:04 - 30 Jun 2024 17:07 #304092
by Aciera
Replied by Aciera on topic Execute after homing... AUTORUN METHOD
Ah, that is probably why but I'm not familiar with versions lower than 2.8.this is Axis 2.7.14 on this machine.
Last edit: 30 Jun 2024 17:07 by Aciera.
Please Log in or Create an account to join the conversation.
- ississ
- Offline
- Senior Member
Less
More
- Posts: 68
- Thank you received: 25
01 Jul 2024 07:20 #304126
by ississ
-> combine all individual axes with an and component to get all_homed bit should work
Another idea: create a simple python hal component that runs the commands after all axes are homed.
I used that in my lathe setup. It has a serial port controlled tool changer and the hal component handles tool changes. But the relevant part here is that you can wait in a loop that all axes are homed and then execute a command. Then sleep forever.
Code is here: forum.linuxcnc.org/24-hal-components/364...trol?start=20#151315
Replied by ississ on topic Execute after homing... AUTORUN METHOD
"Update: I could NOT find the signal for all homed... or any variant of it. I can find individual axis... but not "all"."RODW -> The pin you specified requests the machine to home, not return when homed.
ACIERA ->
I put a line in the custom_postgui.hal file... <= motion.is.all.homed but when I run it, I get the following...
Debug File Information:
custom_postgui.hal :70: motion.is-all-homed does not exist.
The text you referred to says it should exist... but it's not there. I may have to save my configuration and update...
this is Axis 2.7.14 on this machine.
-> combine all individual axes with an and component to get all_homed bit should work
Another idea: create a simple python hal component that runs the commands after all axes are homed.
I used that in my lathe setup. It has a serial port controlled tool changer and the hal component handles tool changes. But the relevant part here is that you can wait in a loop that all axes are homed and then execute a command. Then sleep forever.
Code is here: forum.linuxcnc.org/24-hal-components/364...trol?start=20#151315
Please Log in or Create an account to join the conversation.
- rodw
- Offline
- Platinum Member
Less
More
- Posts: 10754
- Thank you received: 3543
01 Jul 2024 13:07 #304149
by rodw
Replied by rodw on topic Execute after homing... AUTORUN METHOD
BIte the bullet and upgrade to 2.9.2
2.7 is just toooo old.. SO many new features
2.7 is just toooo old.. SO many new features
Please Log in or Create an account to join the conversation.
- Askjerry
- Topic Author
- Offline
- Elite Member
Less
More
- Posts: 313
- Thank you received: 35
08 Jul 2024 22:49 #304710
by Askjerry
Replied by Askjerry on topic Execute after homing... AUTORUN METHOD
RODW - If I save my CONFIG files and reformat the PC with the newest version... will my CONFIG still work... or do I need to redo everything from scratch?
If so... I may still do it... just a lot more work.
Jerry
If so... I may still do it... just a lot more work.
Jerry
Please Log in or Create an account to join the conversation.
Time to create page: 0.079 seconds