subroutine stops without warning

More
13 years 7 months ago #31457 by alan_3301
I am running a probe routine with a o<file> call, which i modified from smartprobe.ngc
At times, seemingly random, it will quit in the middle with no warning or error.
I am using non-triv kins and I am in world mode when clicking the button to call the routine.
In normal operation, after clicking a custom mdi button, when it finishes, it will switch to joint mode, and I have to manually switch back to world mode.
At the point when the routine quits, axis switches back to joint mode, as it would if it finished all the way through.
After that, however, if I do a MDI button, Z- probe for example, instead of doing that, it finishes the move it quit from the previously run subroutine.
If I do the mdi button again, it will do what it should, go to Z- probe for example.

Ok I just wrote all this and I'll leave it there just because, but I have noticed something else while typing.

I have switches to trivkins for further testing to compare how it behaves.
At the point when it quits, I can type G1 X0Y0 F100 in the MDI box. When I click Go, instead of going to X0Y0, it will perform the next line in the subroutine after the hangup. I can the keep calling the same MDI command and click go, it will do the next line in the subroutine.
I can do this over and over again, and it will run the subroutine, line by line, until it is finished.
I can even jog in manual mode, do another mdi command, and it will still do the next subroutine line.
At this point, I have to either quit axis, or finish the subroutine to get back in control.

Now the hard part, How do I figure out what makes it go from executing the subroutine continuously, to stopping, and going line at a time?
It may be a clue, that in non-triv kins only the line after the hangup is executed, before regaining control, while in triv kins I am forced to quit or finish the subroutine one line at a time.
Anyone heard of anything like this before?

Please Log in or Create an account to join the conversation.

More
13 years 7 months ago #31459 by alan_3301
I left out some important info, I am calling the subrouting from a button linked to an mdi_command.
If I run the subroutine directly from mdi, everything works perfect (50 times in a row atleast).

And now after non-stop testing after my last post, I think I have figured this one out..

I remember now reading in the docs about custom mdi buttons, make sure you are in mdi mode before you click the button.
This was my problem. If I make sure I am in mdi mode (F5) I have no problems.

I will update if I have more problems.

Please Log in or Create an account to join the conversation.

More
13 years 7 months ago #31480 by andypugh

alan_3301 wrote: I remember now reading in the docs about custom mdi buttons, make sure you are in mdi mode before you click the button.
This was my problem. If I make sure I am in mdi mode (F5) I have no problems.


Putting something in the docs, contrary to popular belief, does not transform a "bug" into a "feature".

What you are seeing is not what you could reasonably expect to see.

Please Log in or Create an account to join the conversation.

More
13 years 7 months ago #31485 by andypugh

alan_3301 wrote: IAt times, seemingly random, it will quit in the middle with no warning or error.


Which version are you running?

Please Log in or Create an account to join the conversation.

More
13 years 7 months ago #31487 by alan_3301

andypugh wrote: Putting something in the docs, contrary to popular belief, does not transform a "bug" into a "feature".


That made me smile :)

I am using 2.5.1 installed from the livecd

I had placed log comments in many parts of the subroutine to help debug where it was getting stuck, and it seemed to be in different spots of the file each time.

Please Log in or Create an account to join the conversation.

More
13 years 7 months ago #31488 by andypugh

alan_3301 wrote: I am using 2.5.1 installed from the livecd


There is some chance this is fixed in the development branch. Would you be willing to try it and see?

The dev branch (variously called "master" or "2.6") is available from the buildbot at buildbot.linuxcnc.org

At the moment I don't know of many things that are worse in 2.6 than 2.5.1. As you know _exactly_ how to cause the problem it is much easier for you to test than us. As a bonus you get some cool new stuff.
The following user(s) said Thank You: alan_3301

Please Log in or Create an account to join the conversation.

Time to create page: 0.202 seconds
Powered by Kunena Forum