How to make a tool changer move to home

More
18 Dec 2020 12:41 #192327 by Clive S

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.

More
18 Dec 2020 13:09 #192329 by Aciera
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

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.

More
18 Dec 2020 13:31 #192330 by Aciera
Ok I have reproduced the issue with the MDI command not possible ... looks like we need to change that a little maybe with a time delay.

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

More
18 Dec 2020 14:08 - 18 Dec 2020 14:46 #192332 by Clive S

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)
Last edit: 18 Dec 2020 14:46 by Clive S.

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

More
18 Dec 2020 14:46 #192333 by Aciera
Yes, sorry. i wrote nonsense trying to do too many things at the same time.


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
The following user(s) said Thank You: Clive S

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

More
18 Dec 2020 15:04 - 18 Dec 2020 15:28 #192335 by Clive S
Sorry you're slipping you must be getting tired B)

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:
Last edit: 18 Dec 2020 15:28 by Clive S.

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

More
18 Dec 2020 15:29 - 18 Dec 2020 15:36 #192337 by Aciera
when does that come up?

[edit]
Did that use to come up before we did all this?
Last edit: 18 Dec 2020 15:36 by Aciera.

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

More
18 Dec 2020 15:32 #192338 by Clive S

when does that come up?

At every start-up. So it could be any ware in the bowels of the system

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

More
18 Dec 2020 15:36 #192339 by Aciera
Did you have that before we did all this?

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

More
18 Dec 2020 15:41 #192340 by Clive S

Did you have that before we did all this?

Yes. It is standard. That is the reminder to have to input the tool that is in position at start-up

But now of course because of you're help it is not required :)

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

Time to create page: 0.122 seconds
Powered by Kunena Forum