toolchange protocol and manual toolchange touchoff

More
14 Dec 2018 22:45 #122430 by frogandspanner
I have been trying to use python code I found that provides for manual touchoff during toolchange, but it does not work reliably, so I tried to understand a rewrite the code.

I went back to the toolchange documentation: wiki.linuxcnc.org/cgi-bin/wiki.pl?ToolChange

mymill.hal includes a line net tool-prepare-loopback iocontrol.0.tool-prepare => iocontrol.0.tool-prepared
so the tool prepare cycle is self-satisfied.
My understanding of the tool-change/tool-changed stage of the process is that tool-change is set to demand a tool change, *and remains set until tool-changed is set*, but if I set a watch on the pin I see it flash on and off (if I see it at all), even though tool-changed is reset. Am I misunderstanding this part of the protocol?

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

More
15 Dec 2018 12:19 #122440 by andypugh

My understanding of the tool-change/tool-changed stage of the process is that tool-change is set to demand a tool change, *and remains set until tool-changed is set*, but if I set a watch on the pin I see it flash on and off (if I see it at all), even though tool-changed is reset. Am I misunderstanding this part of the protocol?


No, you are right. But it looks like something is resetting tool-changed for you.

Possibly the Python code.

It sounds like you have a remap in effect for M6, if you are calling Python. Is there a REMAP statement in the [RS274NGC] section of the INI?

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

More
15 Dec 2018 14:17 #122443 by pl7i92
Why Dont You use just a Mcode to do this
or even a Side Button to Set Your zero by NGC
o<znullen> sub
G91                 ( relative mode for probing)
G38.2 Z-25 F100     ( trip switch on the way down)
G90                 ( absolute mode)
G92 Z0
G1 Z3.5 F150
o<znullen> endsub
M2

You might set it by G10 L20 P1 Z0 Sets G54 ZZero
needs a reload CAN also be done by Mcode to set the Display

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

More
16 Dec 2018 00:00 #122462 by frogandspanner
"
No, you are right. But it looks like something is resetting tool-changed for you.

Possibly the Python code."

I have been cutting down the Python code to the minimum, then back to failing, to see whether that is responsible, and have discovered that it's a linuxcnc.command.abort that clears the change bit.

linuxcnc.org/docs/2.6/html/code/Code_Notes.html#_abort

suggests that "The ABORT command simply stops all motion" and "It does not . . . change any state information"

so I am confused.

In what source file can I find linuxcnc.command.abort is implemented?
I am relatively new to linuxCNC, and am finding it extremely difficult to navigate the code.

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

More
16 Dec 2018 00:05 #122463 by frogandspanner
"Why Dont You use just a Mcode to do this
or even a Side Button to Set Your zero by NGC"

I wish I understood what you suggested!

Thanks for the pointer - I'll look at your suggestion and see if I can work it out.

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

More
16 Dec 2018 00:18 #122464 by andypugh

suggests that "The ABORT command simply stops all motion" and "It does not . . . change any state information"


I think being in the middle fo a tool change probably counts as a motion.

Where did you get the Python code from? Is it a remap? (and, also. why os it aborting?)

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

More
16 Dec 2018 15:41 #122480 by pl7i92
on Manuel Tool Change it is Just Tx M6 to call the Tool from the Table
As Diameter only is needed
IF there is no Toolchanger

THEN Go to the Part if methal ad a Crocodile clamp to the tool
and MDI
G38.5 Z-5 F40 (5is the absaolute so look at the DRO First)
The Tool Will probe and stop
Set the New Zero and start over

You can Automate that with a button press

IF the Part is not Metall then use a Simple Copper plate PCB Pice to get the Thickness

WORKES FINE

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

More
More
16 Dec 2018 18:18 #122487 by andypugh
Ah, OK. Now it is a little more clear.

Would an automatic tool-length probe work better? It's rather easier to make work, I believe.

The other alternative, and one that actually works pretty well (and is rather more flexible) is to split the G-code up into one file for each tool.
This also gives you the option of using one tool on many parts, as sometimes it is quicker and easier to swap workpieces than tools.

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

More
17 Dec 2018 09:29 #122510 by pl7i92
Not Clear is as He Has a Toolchanger Magazin or even Toolclamps for all the tools
Separate
Or Changes the Tool's into one Clamp

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

Time to create page: 0.257 seconds
Powered by Kunena Forum