Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: fast89 on November 10, 2013, 09:57:42 AM

Title: ATC macro help
Post by: fast89 on November 10, 2013, 09:57:42 AM
I have an auto tool changer on my mill with a macro that works great. Only problem i have is this. When single blocking thru program, if i hit cycle start one too many times, it tries to execute the line after the tool change while it is trying to tool change. Basically it is turning the spindle on while it is trying to orient the spindle. This crashes the bearing that locks the spindle. Is there some way to disable the cycle start once it enters into the macro. Or make it wait for a finish signal before any other command can be executed? My macro is not setup as a sub routine. Would changing that make it wait for the m99 before allowing the next line to execute?
Title: Re: ATC macro help
Post by: fast89 on November 11, 2013, 10:00:34 AM
nobody???
Title: Re: ATC macro help
Post by: BR549 on November 11, 2013, 11:27:46 AM
Some advice(;-) STOP rushing through the single block mode.

Mach3 does NOT have a suswhiledo() mode for the Single block mode . It depends on the operator to control that function.

(;-) TP
Title: Re: ATC macro help
Post by: fast89 on November 11, 2013, 11:30:12 AM
lol. Yeah i know.....stop pushing the button.
Title: Re: ATC macro help
Post by: cncalex on November 11, 2013, 09:13:56 PM
Hi,
you may try this on the top of your M6 macro

SetVar 100, getoemled(82)
If (getoemled(82) =-1) Then
DoOembutton(1004)
end If


and this at the end


If (GetVar(100)=-1) Then
DoOembutton(1004)
end If
end


looks like is working fine here.
 :)
Alex
Title: Re: ATC macro help
Post by: fast89 on November 12, 2013, 10:27:24 AM
That works well, thanks alex
Title: Re: ATC macro help
Post by: cncalex on November 12, 2013, 02:55:17 PM
glad it works. :)

I prefer it look like this ( without G Code Variable )

At start

SingleStatus = getoemled (82)
If SingleStatus =(-1) Then
DoOembutton(1004)
end If

at the end

If SingleStatus =(-1) Then
DoOembutton(1004)
end If
end

alex