Unexpected motion during a macro.

If you think you've found a bug post it here.

Re: Unexpected motion during a macro.

Postby cncdrive » Fri Mar 02, 2018 11:31 pm

Then I don't know what the problem is. And I also can't figure it out, because I can't read the macro.
cncdrive
Site Admin
 
Posts: 4887
Joined: Tue Aug 12, 2014 11:17 pm

Re: Unexpected motion during a macro.

Postby Derek » Sat Mar 03, 2018 1:10 am

Try this on for size:)


Code: Select all
// this macro releases tool from spindle

if(AS3.GetLED(50) == true || AS3.GetLED(51) == true)  // Spindle is still active, so we need to stop here...
{
  MessageBox.Show("The Spindle is still active");
  exec.Stop();
  return;
}
exec.Clroutpin(5,8); // Deactivate resistor
  exec.Wait(1000); // Wait one 1000msec
 
   AS3.Setfield(0,230);     // set b axis dro to zero
 AS3.Validatefield(230);
 
   exec.Code("G01 F100 B-3 M07");        // rotate b axis negative XX turns
   

exec.Setoutpin(5,7);    // lower drawbar slide
  exec.Wait(1000);       // Wait one 1000msec
 

 

 
   exec.Code("G00 B-100");        // rotate b axis negative XX turns
    while(exec.IsMoving()){}

  // End macro
 
 
 
Derek
 
Posts: 341
Joined: Mon Sep 05, 2016 9:57 am

Re: Unexpected motion during a macro.

Postby cncdrive » Mon Mar 05, 2018 11:06 am

I just ran this in a 100x loop to see what is happening, but only the B axis is moving.
I also looked through the code and I see no problem with it.
I will try to run it a few more times later today to see if I find anything.

Isn't it possible that something else is causing the other axis movement?
I'm thinking of a macroloop or plugin which running in the background and getting triggered to move other axis?
cncdrive
Site Admin
 
Posts: 4887
Joined: Tue Aug 12, 2014 11:17 pm

Re: Unexpected motion during a macro.

Postby Derek » Mon Mar 05, 2018 12:14 pm

The only macroloop I'm running has to do with tool length offset. No motion at all.

The first time it happened it was the X axis. The second was the Y axis.

The first time it happened was in December and I ran it a lot more than 100 times before it happened again. It's a macro that releases the tool from the spindle. I ran it over 100 times last week alone.

It happened the first time with a UC-300 ETH and the second time with a UC-300 USB.

It has only happened twice.
Derek
 
Posts: 341
Joined: Mon Sep 05, 2016 9:57 am

Re: Unexpected motion during a macro.

Postby Derek » Mon Mar 05, 2018 12:21 pm

One other thing. Both times the X and the Y were moving in the same direction as the B. The Macro commands B-. Both the X and Y were moving in a minus direction.
Derek
 
Posts: 341
Joined: Mon Sep 05, 2016 9:57 am

Previous

Return to Report a bug

Who is online

Users browsing this forum: No registered users and 6 guests