0% found this document useful (0 votes)
15 views

Session 112-Setting Up and Using Basic Debugging Tools

This session covers the use of basic debugging tools in VERICUT, including the Variable window, Call Stack Window, and VERICUT Logger Window, to troubleshoot common errors in simulations. It demonstrates how to resolve a work offset error and track variables and subroutine calls to ensure correct tool changes. The session concludes with a successful simulation run after utilizing these debugging tools effectively.

Uploaded by

Diogenes Cardoso
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views

Session 112-Setting Up and Using Basic Debugging Tools

This session covers the use of basic debugging tools in VERICUT, including the Variable window, Call Stack Window, and VERICUT Logger Window, to troubleshoot common errors in simulations. It demonstrates how to resolve a work offset error and track variables and subroutine calls to ensure correct tool changes. The session concludes with a successful simulation run after utilizing these debugging tools effectively.

Uploaded by

Diogenes Cardoso
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

Session 112

Setting up and using basic debugging tools


This session will introduce you to some of the tools that are available in VERICUT to
help you troubleshoot (debug) and correct common errors that you might encounter.
These basic tools can give you clues as to what is needed to resolve a problem.

In this session we will discuss how the Variable window, Call Stack Window and
VERICUT Logger Window can be used in debugging your simulation.

The Welcome Screen has opened file


session_112_setting_up_and_using_basic_debugging_tools.vcproject

VERICUT V9.3 Session 112 1


1. The VERICUT Logger window

• Play

The simulation will stop at the first error:


Error: Work Offset table entry not found: Subsystem = 1, Register = 54, SubRegister
=1

Note: The VERICUT Logger displays all errors, warnings, and informational
messages to assist you during a simulation session. Error and warning messages are
preceded with the label Error or Warning and information messages have no
preceding label.

From the start we realize that we have a problem with our work offset.

• In the Project Tree, highlight 1:Program Zero

• In Configure Program Zero change:


• Offset Name = Work Offsets
• Register = 54, then press Enter

• Reset
• Play

Notice that the work offset error is resolved, now the simulation stops at the tool
change
• Reset

VERICUT V9.3 Session 112 2


2. G-code Log File
• Ribbon Bar > Project tab > Project group > Settings > G-Code
Outputs

Note: The G-code log file is used to track what macro(s) each NC code is calling
and its associated value. When debugging a control configuration, this log file is the
first thing you want to set. Setting up a G-code Log file

• G-code Log File = debug.log


• From the Debug section

Note: The features on the Debug section of the G-Code Outputs tab enable you to
select what debug messages to send to output. Debug messages can provide
additional information that may be helpful debugging development of files used to
simulate G-Code NC programs and simulate machine tool motions.

• Debug Macro Arguments = Yes


• Debug Variables = Yes
• OK

Note: we will use this log file very shortly

VERICUT V9.3 Session 112 3


3. Variable and Call Stack Window
The variable window is used to track all sort of variables, control or local variables,
and user defined variables. The Call Stack Window is used to easily jump from a
subroutine back to main program.

• Reset Model
• Play

Simulation stops at tool change, but no tool shows up in spindle, why?


The tool change subroutine is trying to do a tool change for a tool ID that is defined
as a variable CURRENT_TOOL, but what is the value of that variable?

• From the NC Program window select View G-Code Log File

• Close Log file

VERICUT V9.3 Session 112 4


• Ribbon Bar > Project tab > Project group > Variables > All

Note: the Features on the Variables panel, are used to monitor, initialize, and
maintain G-Code variables. Most Variables windows are “read only” in that they
display information.

• Scroll through the variables and notice that variable CURRENT_TOOL is not
defined, but tool variable 4120 is defined.

To verify that the tool ID for call out tool is 17 we need to see what the main
program is calling

VERICUT V9.3 Session 112 5


• Ribbon Bar > Info tab > Debug group > Call Stack …

Note: The Call Stack panel enables you to track information like subroutine calls
and which subsystem is currently active. The picture below shows the current
status of three subsystems.

• Select Subroutine 1000 M6

Notice that the NC Program window jumps back to Main program. Also notice that
the tool being called has an ID=17

VERICUT V9.3 Session 112 6


4. Variable and Call Stack Window
• In Call Stack window select subroutine ToolChange
• In NC Program window, highlight #CURRENT_TOOL, hit the backspace to
delete it and replace it with #4120

Note: If you highlite a variable (example #4120), VERICUT will display it value
(example 17).

• In NC Program window, File > Save As


• Shortcut = Training
• File = Debug.sub
• Select Yes to Replace your current NC Program message
• Reset Model
• Play

VERICUT V9.3 Session 112 7


• From the NC Program window select View G-Code Log File
• Notice the value for macro “ToolCode” is 17

• Close Log file

5. Process the NC program


• Right mouse click on Play to open the Start/Stop Options
• Un-check all Stop At options
• Play

Conclusion
In this session you saw how to use Variable window, Call Stack Window, VERICUT
Logger Window and G-code log file in debugging a simulation. From the information
gathered from all these tools we were able to correct the problem and run the simulation
to its completion.

VERICUT V9.3 Session 112 8

You might also like