- Posts: 2203
- Thank you received: 0
How to make a tool changer move to home
Not sure of the order I need to do.Aciera wrote: I think we'll get it working with axis gui. See edit2 and -3 above.
So try the m61 q#5400 and report back.
fired up gui. tool 1 in position . Homed then m61 q#5400 var=0 then m6t2 normal xz moved but not turret var-0 then m6t3 moved to tool 2 var=2
got the tool back to T1 position closed gui and re-opened twice var =1
entered m61 q#5400 var = 0 then m6t2 no movement var=2 status says tool 2. entered m6t3 turret moved to T2 var= 2
##############
Starting from scratch with T1 in place and homed using M6T1 to set current tool T1 show in status with var=0 then again m6t1 no movement but var=1
Please Log in to join the conversation.
So do this:
1) in your config open folder "remap_subs" and create a new file named "last_tool.ngc" with this in it:
2) in your INI file after the [HAL] section add these two lines:
3) in your .hal file add:
4) change your toolchange.ngc in the folder "remap_subs" to this (add second to last line):
Explanation:
The line "o<last_tool> call" in the toolchange remap should call the last_tool.ngc file and that should create a file named 714.ngc in your remap_subs folder with a complete subroutine that will tell linuxcnc to change the tool to the current toolnumber without actually moving the toolchanger. This subroutine will be run the next time you home your machine and should thus change the active tool to the toolnumber called up in the last toolchange.
I hope this makes sense. I'm not sure if the file 714.ngc will actually be created in your "remap_subs" folder or in your config folder so we might need to tweak that a bit. Anyway give it a try.
Please Log in to join the conversation.
Error. If I comment the line out Lcnc loads
hal:56 pin halui.joint.0.is-homed does not exist
Have I missed something? The ATC does not use joints
Attachment not found
Please Log in to join the conversation.
Maybe delete the line and retype manually.
[edit]
that is the pin that should go true once the X axis is homed and that is when we want the script to run setting the tool number to the last loaded tool
Please Log in to join the conversation.
Aciera wrote: Hm, that pin should exist. Can you comment that line out and look for it in Hal show after linuxcnc has started?
Maybe delete the line and retype manually.
[edit]
that is the pin that should go true once the X axis is homed and that is when we want the script to run setting the tool number to the last loaded tool
I had already commented the line out and tried to find the pin without success.
using halmeter there are no pins starting with "h"
Attachment not found
.
This is the pin that goes true when homed
.
Attachment not found
Please Log in to join the conversation.
[edit]
What version of linuxcnc are you running?
Please Log in to join the conversation.
Aciera wrote: Hm, ok so let's use that pin then:
Code:net x-is-homed joint.0.homed halui.mdi-command-00
[edit]
What version of linuxcnc are you running?
Version axis 2.8.1
error pin halui.mdi-command-00 does not exist
Sorry to be a pain
Please Log in to join the conversation.
[edit]
Maybe add this to your .ini in the [HAL] section
Please Log in to join the conversation.
Aciera wrote: Well there we go again. I'm puzzled as to why your system is missing all the halui pins.
[edit]
Maybe add this to your .ini in the [HAL] section
Code:HALUI = halui
Ok that was it.
We are getting nearer.
The gui loads ok . I used in hal "net x-is-homed halui.joint.0.is-homed halui.mdi-command-00"
Loaded the gui and homed. and only joint O homed . Then the below msg
error can't issue MDI COMMAND when not homed
So pressed home all again. Then it homed joint 1 and put the msg up homing sequence already in progress . Status bar says no tool
Please Log in to join the conversation.
Note that there will be no script written until the first real toolchange. After the first tool change with motion on the ATC there should be a file named 714.ngc and after that you should get the tool number set after homing the machine.
[edit]
Ah and you will need to create an empty file named 714.ngc in the "remap_subs" folder otherwise it will throw an error the first time because there is no file to run.
Please Log in to join the conversation.
