scripting in linuxcnc (for e.g. homing script)
03 May 2016 16:50 #74186
by arhi
scripting in linuxcnc (for e.g. homing script) was created by arhi
looking at forum.linuxcnc.org/forum/38-general-linu...ng-homing-for-a-mill but it's not what I'm trying to figure out so making a separate thread not to pollute the other one... some background, I'm fairly new with milling but I'm with 3d printing and reprap since the beginning .. I used emc back in the day to try to run printers and some routers with it but gave up on it and moved to custom built electronics (some 8bit mcu's first, then 32bit ones) ... now I need to run my own milling (again to improve on 3d printers that are my main interest) but this time I want to run my mill with linuxcnc... small mill (10x10x10cm alu frame, small motor.. nothing serious) but more then enough to get parts I need made out of alu and more then enough to get some experience with linuxcnc (and maybe copy some of that to 3d printing :D ) ...
so, on my printers I write script, directly in the source of the firmware (in this case it would be linuxcnc), that homes the printer... it follows same procedure for 3 axes - go slowly till button is pressed, retract even slower until button is depressed - mark this as home for axis. now I have M code to home single axes or whole printer, now on my mill, I would like to home each axis using similar technique but I can't for the life of me find out how
.. attm I'm doing homing manually (I attach dmm set on buzzer to toolhead and workpiece and manually move head till i get then lose sound from the beeper) but I'd like to make it more automated.. so any hints how, any pointers to wiki? I'm pretty sure this is a very common issue everyone had to solve so it's probably solved properly and documented somewhere it's just that I'm not searching the forum/wiki properly and not finding the doc I need
so, on my printers I write script, directly in the source of the firmware (in this case it would be linuxcnc), that homes the printer... it follows same procedure for 3 axes - go slowly till button is pressed, retract even slower until button is depressed - mark this as home for axis. now I have M code to home single axes or whole printer, now on my mill, I would like to home each axis using similar technique but I can't for the life of me find out how
![:( :(](/media/kunena/emoticons/sad.png)
![:D :D](/media/kunena/emoticons/laughing.png)
Please Log in or Create an account to join the conversation.
03 May 2016 18:51 #74190
by Rick G
Replied by Rick G on topic scripting in linuxcnc (for e.g. homing script)
The following user(s) said Thank You: arhi
Please Log in or Create an account to join the conversation.
03 May 2016 19:20 #74191
by arhi
Replied by arhi on topic scripting in linuxcnc (for e.g. homing script)
Thanks Rick, yes, I found that page (literary 10sec after I posted the question
). It does solve the homing (I see the homing is done pretty much the same I do it on 3d printer).
Now I'm still interested in "general case script". I went trough M code guide and I see I can easily write a script in any lang I want and call from M command, it even know to pause on start, continue on retval 0 and fail on reval that's not 0 but I don't see how to "move till something happens" from a script
.. halcmd is cool for turning something on/off but I would not use it for stepping ... I just found linuxcnc.org/docs/html/hal/comp.html so I guess that's what I was looking for :D
Thanks!
![:D :D](/media/kunena/emoticons/laughing.png)
Now I'm still interested in "general case script". I went trough M code guide and I see I can easily write a script in any lang I want and call from M command, it even know to pause on start, continue on retval 0 and fail on reval that's not 0 but I don't see how to "move till something happens" from a script
![:( :(](/media/kunena/emoticons/sad.png)
Thanks!
Please Log in or Create an account to join the conversation.
- Todd Zuercher
-
- Away
- Platinum Member
-
Less
More
- Posts: 4978
- Thank you received: 1377
03 May 2016 19:46 #74194
by Todd Zuercher
Replied by Todd Zuercher on topic scripting in linuxcnc (for e.g. homing script)
If you want to move till something happens, maybe you want a probing routine?
linuxcnc.org/docs/2.6/html/gcode/gcode.html#sec:G38-probe
linuxcnc.org/docs/2.6/html/gcode/gcode.html#sec:G38-probe
The following user(s) said Thank You: arhi
Please Log in or Create an account to join the conversation.
03 May 2016 20:18 #74195
by arhi
Replied by arhi on topic scripting in linuxcnc (for e.g. homing script)
wow that's exactly what I need!!!!!!
much obliged
much obliged
![:D :D](/media/kunena/emoticons/laughing.png)
Please Log in or Create an account to join the conversation.
Time to create page: 0.081 seconds