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 10:58 pm

However if the macro is not moving an axis at all, I mean there is no movement for that axis at all anywhere in that macro then the above mentioned issue can't happen on that axis, but again, the macro you posted downloads unreadable for me, so I do not see what it exactly doing.
cncdrive
Site Admin
 
Posts: 2113
Joined: Tue Aug 12, 2014 11:17 pm

Re: Unexpected motion during a macro.

Postby Derek » Fri Mar 02, 2018 11:19 pm

Hi Balazs
The M20001 macro only has B axis motion.
Forget about the M970 macro. I was using it improperly.

Am I understanding you correctly that you can't open the file I uploaded?

Thanks
Derek
Derek
 
Posts: 289
Joined: Mon Sep 05, 2016 9:57 am

Re: Unexpected motion during a macro.

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

I can open it, but it is unreadable, because there are no new line characters and it just takes too much time to figure out where one line ends and where the next starts.
cncdrive
Site Admin
 
Posts: 2113
Joined: Tue Aug 12, 2014 11:17 pm

Re: Unexpected motion during a macro.

Postby Vmax549 » Fri Mar 02, 2018 11:23 pm

Balazs, Derek code only has two simple moves in B axis. 1 G01 move and 1 G00 move. There is no mention of X or Y axis in the macro. X nor Y should NEVER move in that instance.

He has probably used that same macro a 100 times since the problem last occurred without any problems.

(;-) TP
Vmax549
 
Posts: 1104
Joined: Sun Nov 22, 2015 3:25 am
Location: USA

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: 2113
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: 289
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: 2113
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: 289
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: 289
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 1 guest

cron