M61 seems not to be working

More
15 Jul 2013 12:10 #36655 by garymcrobertpdx
When I attempt to use M61 Qnnn to set a tool number at start up there is no change
in the tool number. Is this a known bug or is there some thing else i have to do?

At the present I am using 2.6.0 because I need the remapping function

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

More
15 Jul 2013 17:13 #36659 by ArcEye
Replied by ArcEye on topic M61 seems not to be working
Hi

It is not something I have ever used, but I understood it to work.

I just tried it in sims for 2.5.2 and master and it did nothing, even if followed by G43

See if anyone else has any ideas, looks like it is broken, assuming it did work previously.

regards

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

More
15 Jul 2013 19:07 #36670 by andypugh

When I attempt to use M61 Qnnn to set a tool number at start up there is no change
in the tool number.


Where is there no change? (How are you reading the tool number?)

If you issue an M61 T3 then a normal M6T3 are you prompted to change the tool?

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

More
15 Jul 2013 20:06 - 16 Jul 2013 23:17 #36674 by ArcEye
Replied by ArcEye on topic M61 seems not to be working
Hi

Just playing with a sim, what seems to be happening is this.

M61 Q2 will set iocontrol.0.tool-number to 2, it does nothing else
If you issue a G43 H2, offsets will be adjusted to tool 2

The tool number display in Axis is not updated and either shows the tool previously selected or 'None'

Doing a M6T2 sets iocontrol.0.tool-prep-pocket and tool-prep-number to 2 also
Because tool-number is already 2, there is no tool-change signal, so nothing happens and the tool displayed in Axis is unchanged

Only issuing a M6Tn command to a tool number not already in iocontrol.0.tool-number , will bring about a toolchange and update of the number shown in axis

(this is all using axis_mm sim with the hal_manual_toolchange component as standard)

So M61 is changing the toolnumber, but only at one pin in iocontrol.
It updates iocontrol as to the current tool, to prevent needless toolchanges, but Axis does not read it so does not display that number.
It also does not adjust offsets, you have to specifically change them with G43 Hn

regards

PS
Does make me wonder if this was a stub for implementation in user component toolchangers as required, or just an incomplete implementation.
The obvious place to do it would be inside ioControl.cc, but this may be all superseded soon so not point wasting too much time on it.
Last edit: 16 Jul 2013 23:17 by ArcEye.

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

More
15 Jul 2013 23:45 #36676 by garymcrobertpdx
OK I am not sure how to attack this problem. What I wish to achieve is this

I manually place a CAT40 tool holder in the spindle MDI enter the tool number
M61 Qn Then issue a T0 M6 Thus Linux CNC now knowing tool Qn is in the
spindle would return the tool to the proper pocket and then leave the spindle
empty. Thus a convenient method to load my tool rack

The M6 has been remapped to execute a G code tool change routine which
uses variables #<_selected_pocket> and #<_current_pocket> to determine
which pockets to access.

So is there a way to trick Axis into doing a update or a way to access the
iocontrol.0.tool-number, iocontrol.0.tool-prep-pocket or another variables
in the G code tool change routine to load the tool into the rack pocket?

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

More
16 Jul 2013 00:01 - 16 Jul 2013 00:09 #36677 by ArcEye
Replied by ArcEye on topic M61 seems not to be working
To get the tool number updated at startup, I have changed iocontrol, which is what tld70 and cncbasher are using.

If you want to use the modified iocontrol to do it, a rip build version and install build version for 2.6 are on this thread
www.linuxcnc.org/index.php/english/forum...-tool?start=30#28977

regards
Last edit: 16 Jul 2013 00:09 by ArcEye.

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

More
16 Jul 2013 22:25 #36713 by garymcrobertpdx
Thanks for the fix to the software!

I have looked at the discussion in the thread I see the ioControl-2-6-mk2.zip file.

Is there a doc to guide me? I think I have done this process before but enough
time has passed that I do not remember how to go about it.

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

More
16 Jul 2013 23:08 - 16 Jul 2013 23:09 #36714 by ArcEye
Replied by ArcEye on topic M61 seems not to be working
HI

There are 2 zips on that page of the thread.

Because some hard coding of paths goes on, depending upon whether the build is a RIP or /usr install, I produced 2 binaries, plus the source.

If building from source, delete /linuxcnc-dev/bin/io and substitute the source for /linuxcnc-dev/src/emc/iotask/ioControl.cc

This version was to suit tld70's toolchanger, but sounds like it should work for you

There are 2 new pins, iocontrol.0.current_tool and iocontrol.0.tool_altered
current_tool receives the number of the tool which has been manually loaded or otherwise altered
tool_altered is the trigger to prompt a tool change, which if the toolchanger holds the same tool number as current_tool, (it should do ,it sets it!), the tool number is updated without a change

The other wrinkle with this version is that it automatically updates to current_tool when first loaded.
This sets the tool number in Axis at start up.
If your toolchanger is not going to be setting current_tool straight away and you are manually doing it through a panel or something, that will need changing.

Normally both these pins would be connected to the tool changer component, albeit they could connect to pyVCP widgets or anything else that can provide the right tool number and trigger an update.

See how you get on, changing the startup behaviour is trivial if that needs doing

regards
Last edit: 16 Jul 2013 23:09 by ArcEye.

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

More
17 Jul 2013 12:30 #36731 by garymcrobertpdx
OK but I am not clear as to the procedure. I think last time I used the build bot to create 2.6 rt
then Pncconf to create my_LinuxCNC_machine. After that all I had to do is add a few lines to
the LinuxCNC_machine.inii file to provide some path info and enable remapping of M6.

But I gather this time I will have to get the 2.6 source code and replace the IO routine with the
IoControl.cc you provided, compile, then proceed as before. Is this correct? If so where
do I find the source and I assume there is a make file to direct the compile process.

Sorry about all the newbie questions I do this sort of thing so infrequently that I fail to remember
all the details as to how to go about it. I will take notes for the next time I have to do this.

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

More
17 Jul 2013 15:27 - 17 Jul 2013 15:29 #36737 by ArcEye
Replied by ArcEye on topic M61 seems not to be working
garymcrobertpdx wrote:

But I gather this time I will have to get the 2.6 source code and replace the IO routine with the
IoControl.cc you provided, compile, then proceed as before. Is this correct? If so where
do I find the source and I assume there is a make file to direct the compile process.


Not at all, as I said

I produced 2 binaries, plus the source


Use the binary in the later zip and replace /usr/bin/io with that (save the old file as io.old in case you need to revert)

If you needed to make other changes you would need to get the source, ( or you might just be able to compile it with comp, haven't tried) but this should work as is for master on 10.04

regards
Last edit: 17 Jul 2013 15:29 by ArcEye.

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

Time to create page: 0.251 seconds
Powered by Kunena Forum