Stop behaviour while toolchange macro M6

Post anything you want to discuss with others about the software.

Stop behaviour while toolchange macro M6

Postby johu » Wed Feb 03, 2021 9:38 pm

Hi there,

I have a problem with an ATC on a milling machine.

I'm writing a automatic toolchange (M6) macro.
I use the UC300ETH-5LPT.

During the toolchange I need to activate several outputs to move a toolholder and the spindle. When I leave the machine alone, toolchange is fine, but...
I noticed that when I press the FEEDHOLD and then STOP button during a toolchange (M6 macro), the UC300ETH-5LPT output's get "reset" to their default state.

I my case the toolchange (of course) isn't completed, but the toolnumber IS changed to the new tool. And this is a big no-no because the state of the machine differs from the software.

E.g.:
Current tool: #1
Run a file with line: "T2 M6"
UC300ETH-5LPT activates several pneumatic cylinders to move the tool-grippers, and move the spindle.
During toolchange macro, before the macro executes "exec.Setcurrenttool(2)", press Feedhold followed by Stop, then the cylinders move to their "idle" state and the macro is aborted.
The active tool shows #2, while the machine still has tool #1 in the cone.

Executing a second toolchange e.g. "T3 M6" initiates a tool crash, because the machine thinks it needs to put away tool #2, while it still has tool number #1 in the cone.

Does anyone have an idea how I can fix this behaviour?
johu
 
Posts: 35
Joined: Fri Jan 08, 2021 3:57 pm

Re: Stop behaviour while toolchange macro M6

Postby dezsoe » Wed Feb 03, 2021 11:44 pm

After (or before, depends on your macro) every critical move, output change or current tool change you have to check exec.Ismacrostopped(). If it returns true then stop was pressed. Reset also presses stop. Reset and stop will not cancel your macro: you have to handle the stop state.
dezsoe
 
Posts: 2093
Joined: Sun Mar 12, 2017 4:41 pm
Location: Csörög, Hungary


Return to General discussion about the UCCNC software

Who is online

Users browsing this forum: Google [Bot] and 28 guests