Hello Guest it is March 28, 2024, 07:10:54 PM

Author Topic: Tool Change macro M56 and T0101 etc. problem  (Read 1244 times)

0 Members and 1 Guest are viewing this topic.

Offline Shaom

*
  •  13 13
    • View Profile
Tool Change macro M56 and T0101 etc. problem
« on: January 10, 2020, 02:30:32 AM »
Hi!

Every time i want to change tool i have to type: M56 T0101 for example.
Command T0101 doesnt work itself :(

What I have to do to make this command work without type every time M56 before command T0101?

Thanks for help!

Offline RICH

*
  • *
  •  7,427 7,427
    • View Profile
Re: Tool Change macro M56 and T0101 etc. problem
« Reply #1 on: January 10, 2020, 08:15:29 AM »
Is your post relative to Mach4 or MAch3?

RICH

Offline Shaom

*
  •  13 13
    • View Profile
Re: Tool Change macro M56 and T0101 etc. problem
« Reply #2 on: January 10, 2020, 09:49:35 AM »
Is your post relative to Mach4 or MAch3?

RICH

Mach4

Offline thosj

*
  •  532 532
    • View Profile
Re: Tool Change macro M56 and T0101 etc. problem
« Reply #3 on: January 10, 2020, 09:56:00 AM »
OK, Mach4. Lathe? Probably because you're using T0101. So what IS M56, a custom macro of some kind?
--
Tom

Offline Shaom

*
  •  13 13
    • View Profile
Re: Tool Change macro M56 and T0101 etc. problem
« Reply #4 on: January 10, 2020, 04:30:54 PM »
OK, Mach4. Lathe? Probably because you're using T0101. So what IS M56, a custom macro of some kind?

Yes Lathe. M56 is a custom macro. I have to put it every time i want to change tool. Without M56 before T01 - tool change doesnt work.

Offline thosj

*
  •  532 532
    • View Profile
Re: Tool Change macro M56 and T0101 etc. problem
« Reply #5 on: January 10, 2020, 06:03:01 PM »
I really don't know how lathe works, but in mill there is an M6 macro that is actually the M6. Did you write that M56 or did you get it from somewhere? Perhaps your tool change is somehow setup to require this M56, or IS this M56. Greater minds than mine will have to chime in here.
--
Tom

Offline RICH

*
  • *
  •  7,427 7,427
    • View Profile
Re: Tool Change macro M56 and T0101 etc. problem
« Reply #6 on: January 11, 2020, 04:59:35 AM »
I don't use Mach4 Lathe or Mill but there are folks in here who do and hopefully someone  will reply.

I didn't see M6 listed in the manual which seemed rather odd. M??? are custom maco's that are user created. M6 is a industry standard for tool change.

See if  there is a configuration setting in Mach4 ( similar to Mach3) which provides option for use of a  tool  change?

Sorry can't be of any further help.......,

RICH

Offline smurph

*
  • *
  •  1,544 1,544
  • "That there... that's an RV."
    • View Profile
Re: Tool Change macro M56 and T0101 etc. problem
« Reply #7 on: January 13, 2020, 05:05:44 PM »
M6 is indeed the standard tool change M code.  It is machine dependent and therefore the machine tool builder (you) have to write one.  :)  M56 is not something that is standard to my knowledge and I do not know why it would be needed.

The T code, selected the tool.  depending on the tool change settings and the type of tool changer on the machine, it can be used to preload the next tool or select the next tool.  For lathes, the common case is the T on the M6 line is the "tool to use".

M6 T0101

This could be written T0101 M6, but by convention, the syntax of M6 T0101 is used.  Basically, T0101 sets the tool to use (selects the next tool) and M6 makes it happen.  No action happens with T0101 by itself.

Now, if preloading tools is needed.  You can write a t.mcs macro and put it in the macro folder.  This will make T0101 actually perform an action, depending on what you put in the script. 
Here is a sample t.msc file:

Code: [Select]
function t(tool)
inst = mc.mcGetInstance();
local msg = "Tool Changer Retrieving tool #" ..  tostring(tool)
mc.mcCntlSetLastError(inst, msg);
-- make tool changer preload the tool
end

if (mc.mcInEditor() == 1) then
    t(1);
end

But tool preloading is only for tool changers that support it.  Like I said, most lathes don't handle tool changes this way. 

T0101  (preload the tool 1)
M6 T0202 (makes tool 1 active and preloads tool 2)
; gcode
; gcode
; gcode
; gcode
; gcode
M6 T0101 (makes tool 2 active and preloads tool 1)
; gcode
; gcode
; gcode
; gcode
; gcode
M6 (makes tool 1 active)

Steve
Re: Tool Change macro M56 and T0101 etc. problem
« Reply #8 on: January 15, 2020, 01:32:23 AM »
Hi
Check in the Control window to be selected on the Lathe (Radius or Diameter), regardless of what profile you have chosen.