How to make a tool changer move to home
Ok let's try:
net x-is-homed halui.joint.1.is-homed halui.mdi-command-00
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.
It has put the 714.ngc file in the remap
o714 sub
M61 Q1.000000
o714 endsub
M2
I have reloaded the gui several times and it is doing the same
as before;-
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 or Create an account to join the conversation.
So this should be correct not halui.joint.1.is-homed:
net x-is-homed halui.joint.0.is-homed halui.mdi-command-00
Anyway comment that line out and the gui should start. then check in hal-show what is happening with halui.joint.0.is-homed.
Then also do a tool change command so the ATC actually moves and check if the script has run and the file 714.ngc updated or created somewhere else.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Hm, strange in you ini you have Joint 0 home_sequence set to 0 so really your Z axis should home then your X axis and after that it should set halui.joint.0.is-homed to true
I am not following here.
It does home x first
Joint 0 is the X axis and has to home first to go up and away from the chuck then Z second.
Edit:
If I home Z first (from the machine tab homing) and then X then put in the MD I m61 q1.000000
It does not show any erors
It seems to brings the correct tool up in the var file. (but not sure as it might be a tool behind)
Please Log in or Create an account to join the conversation.
So we would expect this to true after the homing of the last axis.
net x-is-homed halui.joint.1.is-homed halui.mdi-command-00
Apparently it's not done with the homing quite yet and we are too early issuing our mdi-command. So we need to wait a bit longer say 2 seconds. Let's get that working first.
To do that we use the timedelay component. Add this to your .hal:
loadrt timedelay names=delay.homed
addf delay.homed servo-thread
setp delay.homed.on-delay 2.0
setp delay.homed.off-delay 0
net x-is-homed <= halui.joint.0.is-homed => delay.homed.in
net x-is-homed-dly <= delay.homed.out => halui.mdi-command-00
Please Log in or Create an account to join the conversation.
I had to uncomment the other hal line #net x-is-homed halui.joint.0.is-homed halui.mdi-command-00 just kidding.
Excellent I am glad that I have helped with your vast knowledge.
Than you so much you have taught me a lot.
It now works as planned and much better that having to insert a tool number at boot up .
Edit: erm
We will have to live with this on start-up:-
Attachments:
Please Log in or Create an account to join the conversation.
[edit]
Did that use to come up before we did all this?
Please Log in or Create an account to join the conversation.
At every start-up. So it could be any ware in the bowels of the systemwhen does that come up?
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Yes. It is standard. That is the reminder to have to input the tool that is in position at start-upDid you have that before we did all this?
But now of course because of you're help it is not required
Please Log in or Create an account to join the conversation.