ATC persistent position

More
19 Dec 2016 15:34 #84415 by tommylight
Replied by tommylight on topic ATC persistent position
It's all good, thought i was seeing thongs or you where drunk!!! :)

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

More
26 Dec 2016 04:16 #84695 by G21
Replied by G21 on topic ATC persistent position
Thanks for sharing and I think I understand what you did. I assume you generate a signal in Ladder Logic to trigger the MDI 02 command.

I can save the pocket to the var file OK now and tool number is also there after shutting LinuxCNC down. So far so good.

Now I want to use the 'Home All' button to read tool number and pocket number but for some reason I can't get it to work. In Hal Configuration I can see the 'halui.home-all' pin but it does not toggle when I press 'Home All'. Can I use this pin or is it not available to trigger an MDI command?

I added to my postgui.hal:
net tool-load halui.mdi-command-02 <= halui.home-all

LinuxCNC starts up OK but when I press 'Home All' the machine homes normally but it does not load my tool and pocket number.

In my INI I added:
[HALUI]
MDI_COMMAND = M11
MDI_COMMAND = M12
MDI_COMMAND = M61 Q#5451

Tool number does not load but when I manually type M61 Q#5451 into the MDI it does so I am guessing the 'Home All' button does not work the way I intended.

Can anybody see what I am doing wrong or if this this is possible at all?

Thanks and Happy Holidays!

G21

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

More
27 Dec 2016 05:14 #84735 by G21
Replied by G21 on topic ATC persistent position
OK, I figured it out. You cannot issue a MDI command when the machine is not homed yet. I decided to set it up like this to make sure nothing will go wrong.

I went with a Classic Ladder solution to detect each axis is homed or not and when they are, use the output from the Classic Ladder to trigger the MDI_COMMAND = M61 Q#5451 and load the tool number. I used a timer to have this signal only True for 0.5 seconds to avoid loading over and over again.

All OK for now, continue working on the rest now.

G21

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

More
27 Dec 2016 09:21 #84739 by bobobo
Replied by bobobo on topic ATC persistent position
Good.
I don't remember exactly, but I think I have done exacly as you that the ladder trigger when homing is finished.

Be careful about G43 tool length compensation. As I have it now (and you also I suppose), the tool is loaded at start but the tool-length compensation is not updated. This can be dangerous...
I think I would like G43 to be automatically applied always, I am thinking about adding it to the tool change macro, but I have not tested yet.

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

More
27 Dec 2016 09:33 #84740 by G21
Replied by G21 on topic ATC persistent position
Yes I noticed that, also I found that the tool number was not always updated correctly. I fixed this by adding this to the end of my toolchange.ngc:

M61 Q#<selected_tool> ;set current tool number
G43 ; Tool length offset

So far it seems to be working but I had a few instances where the .var file was not updated correctly when shutting down LinuxCNC. I think the reason was that I had the .var file open to see what was being written to it and this caused LinuxCNC on shut-down not to write the values correctly. If the .var file is not open, all works as expected.

Now working on the different tool change scenarios, tool in spindle = tool requested needs to skip the tool change and tool in spindle = 0 just needs to load the tool and not unload a tool first.
Making progress at least.

Thanks again!

G21.

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

Time to create page: 0.996 seconds
Powered by Kunena Forum