PC-DMIS Tech Tip: This video demonstrates the use of Breakpoints in PC-DMIS. Breakpoints are a useful de-bugging tool that allows you to run your program one block at a time.
Click Here to learn more about our affordable Software Support Packages - the same group that makes these Tech Tips!
In this video, I want to show you how to use a breakpoint. What's a breakpoint? A breakpoint is a debugging tool, something that you would use to prove out a program. It just lets you edit on the fly as you're proving your program out.
Breakpoints are found in the menu under Edit, Breakpoints. We're just going to Toggle one Breakpoint in this demo. You can see the keyboard shortcut, Ctrl+B. Okay, so the way it works is, typically you might want to put a breakpoint at a TIP change or an area of concern.
And what happens when PC-DMIS encounters the breakpoint during execution, is that the program will pause, and then you use the execution box to step through the program. It's like block-by-block proving out from that point forward.
I'll just demonstrate and show you how it works. I have a pretty simple program. I have three TIP changes. Once I encounter my second TIP change right here, I want to insert a breakpoint. I'll use a keyboard shortcut, Ctrl+B. and you can see that little red dot there in the Edit window. Once it encounters that red dot, we will be doing block-by-block programming until I decide to just continue with the program.
Let's run it. I'll just hit the Play button here. You can see in the Edit window that as each feature is being executed is shown in red. Whatever is being executed, or what the software is currently on is shown in red. It's encountered the breakpoint. Now, what I need to do with the execution box is Step Next. There's a little button here called Step Next. Every time I press that, it will execute wherever the cursor is.
Let's hit it once, so you can see it's done the TIP change. Imagine you're proving out a program, and you're a little nervous. You're not sure what it's going to do, or you wanna make sure it's safe. This is a nice safe way to do that. Now you can see, in the Edit window, my CIR1 is red, so that is waiting to be executed.
My CIR1 is actually on the backside. I can actually rotate and take a look. Or if I was actually live doing this, I could, you know, step around the back of the machine, take a look. When I'm ready, I'll just press Step Next, and then it executes my circle. We're still paused and the other thing you can do with this breakpoint is that I can actually program on the fly, like, I can add commands here. I can add move points. I can add comments. And I'll just show you, I'll just demonstrate that.
While this is paused, I can just put my cursor before the TIP change and actually add an operator Comment. Let's go ahead and do that. I'll just say, "Tip is about to rotate." Just add it there. When I click OK, you can see, it's actually...well, it's actually put it in the wrong spot. But that's fine, I can just cut and paste. Cut that. Put my cursor here, just like that.
Let's carry on. I'll just hit Step Next. Whenever I add something on the fly, like edit on the fly, you'll see this box pop up, "A New Feature Has Been Added!" In this case, all I wanted...it's actually just a comment. I'm just going to Continue. And then, Step Next, so it should go to the CIR2 next. Or actually, it should go to the new TIP change.
Another warning. Again, at this point, if this is unsafe with the clearance cube motion activated, I can actually insert an incremental move. Let's do that. I'll put it... Well, clear the warning first and before I forget, I'll just put my cursor before the operator comment and do an incremental move.
I'll just come up in Zed, say 200 millimeters. You can see that's inserted there. We'll see the comment. It'll come up, it'll rotate, and then measure my circles. The rest of my program should be good. I'm just going to not step through, but actually just press Continue and it'll just do the rest.
There we go. A really useful debugging tool. It's not something we talk about in training too often, but it recently came up in a training session, so I thought I'd share it with you. I hope you found that useful. Thanks for joining me and we'll see you next time.