Execute after homing... AUTORUN METHOD

More
23 Jun 2024 04:34 - 23 Jun 2024 04:37 #303602 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
Last edit: 23 Jun 2024 04:37 by Askjerry. Reason: Suscribe

Please Log in or Create an account to join the conversation.

More
23 Jun 2024 07:22 #303613 by Aciera
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

Please Log in or Create an account to join the conversation.

More
29 Jun 2024 22:03 - 29 Jun 2024 23:07 #304062 by Askjerry
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".
Last edit: 29 Jun 2024 23:07 by Askjerry.

Please Log in or Create an account to join the conversation.

More
30 Jun 2024 01:36 #304071 by rodw

Please Log in or Create an account to join the conversation.

More
30 Jun 2024 07:30 #304074 by Aciera

Please Log in or Create an account to join the conversation.

More
30 Jun 2024 16:59 #304091 by Askjerry
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.


 

Please Log in or Create an account to join the conversation.

More
30 Jun 2024 17:04 - 30 Jun 2024 17:07 #304092 by Aciera

this is Axis 2.7.14 on this machine.

Ah, that is probably why but I'm not familiar with versions lower than 2.8.
Last edit: 30 Jun 2024 17:07 by Aciera.

Please Log in or Create an account to join the conversation.

More
01 Jul 2024 07:20 #304126 by ississ

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.


 

 

"Update: I could NOT find the signal for all homed... or any variant of it. I can find individual axis... but not "all"."
-> 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.

More
01 Jul 2024 13:07 #304149 by rodw
BIte the bullet and upgrade to 2.9.2
2.7 is just toooo old.. SO many new features

Please Log in or Create an account to join the conversation.

More
08 Jul 2024 22:49 #304710 by Askjerry
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

Please Log in or Create an account to join the conversation.

Time to create page: 0.147 seconds
Powered by Kunena Forum