Page 1 of 4

Unexpected motion during a macro.

PostPosted: Sat Nov 25, 2017 1:58 pm
by Derek
Never seen this before and I have run this macro hundreds of times. It's a macro that runs the B axis for my power drawbar. I execute it with a physical button as the input. I fired up the machine and the first thing I did was to change the tool. I pushed the button and the B axis started turning and then the X axis started doing a rapid move in the same direction. Both the macro and the X axis stopped when I pushed the stop button. Without doing anything else I pushed the tool change button again and it worked as expected. I have done probably 20 tool changes since then without a problem.

The only difference was I probably executed the macro a little sooner after starting UCCNC that I normally do. Not looking for a solution just wanted to pass it along.

Thanks
Derek

Re: Unexpected motion during a macro.

PostPosted: Sat Nov 25, 2017 3:18 pm
by cncdrive
It would be helpful to have the macro and profile file and then we will try to reproduce it.

Re: Unexpected motion during a macro.

PostPosted: Wed Dec 06, 2017 10:46 pm
by Derek
Sorry for the delay on this but I was super busy. I'm attaching the .pro and 2 macros. M20001 is the macro that I was running when I got the unexpected X axis movement.

I had a new problem this morning.
M970 is a macro for finding the center of something in the rotary. The motion is move Y+ a programed distance, drop dow a set distance, probe Y- record point, move in Z to clearance plane, return to Y start position and repeat in the Y-. I've been running this macro for a couple years. I ran it yesterday probably 10 times. Ran it this morning and when it lifted the Z and was supposed to return to Y start it just blew right past it. I hit the stop button before it hit the limits. Ran it 3 more times and it did exactly the same thing. Shut down UCCNC. Restarted and ran the macro. Performed exactly as it should and did so throughout the day probably 5 more times.


UCCNC is version V1.2045.

Thanks
Derek

Re: Unexpected motion during a macro.

PostPosted: Thu Dec 14, 2017 11:19 am
by Derek
Bumping this thread. I added macros and a .pro and wanted to make sure you saw them.

Thanks
Derek

Re: Unexpected motion during a macro.

PostPosted: Thu Dec 14, 2017 10:24 pm
by cncdrive
Hi Derek,

Sorry but I missed to see this yet.

Dezsoe, if you reading this, please check Derek's macros and verify if you find any problematic looking code parts.
Also please test the codes.

Re: Unexpected motion during a macro.

PostPosted: Fri Dec 15, 2017 8:49 am
by dezsoe
Hi Derek and Balázs,

I'll test it today and come back with results.

Re: Unexpected motion during a macro.

PostPosted: Fri Dec 15, 2017 10:26 am
by dezsoe
Hi Derek,

Which version of UCCNC do you use?

Re: Unexpected motion during a macro.

PostPosted: Fri Dec 15, 2017 11:06 am
by Derek
UCCNC is version V1.2045.

I've seen unexpected motion like I described with the M970 before. Over many versions. It's a rare occurrence and it is always the same axis that the macro is commanding. The issue with M20000 where the B axis is moving as it should but the X axis moved is something I've never seen.

Re: Unexpected motion during a macro.

PostPosted: Tue Dec 19, 2017 12:14 pm
by dezsoe
Hi Derek,

I think I'm over the 100th run, and didn't have any problem with your code. I think it depends on some special constellation of stars... (I don't say I don't beleive what you wrote, just couldn't reproduce. I also have a jog issue, which happens cca. two times a year, so I could never reproduce it, but sometimes happens.)

Re: Unexpected motion during a macro.

PostPosted: Wed Dec 20, 2017 11:07 am
by Derek
dezsoe wrote:Hi Derek,

I think I'm over the 100th run, and didn't have any problem with your code. I think it depends on some special constellation of stars... (I don't say I don't beleive what you wrote, just couldn't reproduce. I also have a jog issue, which happens cca. two times a year, so I could never reproduce it, but sometimes happens.)


Better try 101 times. That may work :)

These things are terrible to solve. I have run the M20001 hundreds of times and never had an issue. I have seen unexpected movement on probing macros before but it's pretty rare. One thing I will say is that when it glitches it stays glitched until you restart UCCNC. And it behaves the exact wrong way each time. This is a definite problem and macro related. I don't have to restart the computer just UCCNC.

Is there any log info I can save when it does?