You are on page 1of 10

Operation Manual for the Debug Operation for Motion Programs

This manual explains the Debug Operation used to debug motion programs.

Preface
Debug operations are used to debug motion programs and to increase efficiency of program
development.
The following machine controller and MPE 720 program software support the debug operations.
Machine Controller MP2000 Series
MPE720 Ver.5.00 or later

Open the Motion Editor in Online Mode to turn ON and OFF the debug operations. With the
Debug Operation, you can:
Set break points and execute a single-block operation
Have an individual debug function for each motion program
View the status of each task in a call tree
Display all of windows for programming and debugging motion programs in the Engineering
Manager Window.

Contents

Preface ...............................................................................................................................................1
Windows for Debugging Motion Programs ....................................................................................2
Motion Task Manager......................................................................................................................3
Motion Editor ..................................................................................................................................5
Break Point List...............................................................................................................................9

-1
Windows for Debugging Motion Programs
The Motion Program Debug Operation Function operates in the Engineering Manager Window.
In the Engineering Manager, the windows for creating and debugging motion programs can be
displayed.
The windows used for debugging motion programs are shown below.

Motion Editor
Motion Task Manager

Quick Reference

Fig 1 Windows for Debugging Motion Programs

-2
Motion Task Manager
By using the Motion Task Manager, you can display a list of motion tasks and their status. For
example, you can:
Display the tasks in execution and stop status in a hierarchical structure.
Set a selected task in debug mode.
Update the display depending on the status of the tasks being performed.
The display is updated only when the task is in debug mode and in single-block hold status.

Fig 2 Example of Motion Task Manager Window

Table 1 shows the icons used in the Motion Task Manager Window.

Table 1 Icons for Motion Task Manager Window

Icon Name Explanation


Root directory Indicates the top-level directory in a tree structure.
Directory of motion task being executed Indicates the directory of the motion task being
executed.
Directory of stopped motion task Indicates the directory of a stopped motion task.
Motion task on hold Indicates the task that has been put on hold or has
been stopped.
Motion task in debugging Indicates the task in debugging.
Motion task in normal operation Indicates the task in normal operation.
Sub-task hierarchy Indicates that a sub-program exists for the task.
Task in single-block hold status Indicates the task for which the debug operation is
stopped.
Error Indicates the task in which an error occurred.

-3
[Procedures]
Opening the Motion Task Manager Window
Select View - Motion Task Manager from the Engineering Manager Menu to open the Motion
Task Manager Window.

Turning ON the Debug Mode


Point to a motion task and click the right mouse button. A shortcut menu appears. Select Debug
Mode.

Turning OFF the Debug Mode


Point to the motion task in debugging and click the right mouse button. A shortcut menu appears.
Select Operation Mode.

Editing a Motion Program


Double-click a task or motion program icon to edit the selected program in the Motion Editor.

Setting to Motion Task


Specify the task from which the motion sub-program is to be called. Move the pointer to the
motion sub-program and click the right mouse button. Select Set to Motion Task from the pop-up
menu.

-4
Motion Editor
A motion program can be edited in the Motion Editor Window.
By using the Motion Editor, you can:
Display the task line numbers and block numbers on the left.
Use icons and keyboard shortcuts for functions and tools.
Display a sub-program in a program with nested loops. Right-click the sub-program and execute
Read Motion Sub-program command to display a sub-program that was written with an MSEE
command.
Set four break points in one motion task.
Note: The set break points are deleted when the debug mode is turned OFF.

Fig 3 Motion Editor Window

[Procedures]
Debugging
To start debugging, select Debug from the Engineering Manager Menu or pop-up menu. In the
Motion Editor, icons and keyboard shortcuts are used for commands for debugging. Table 2
shows the icons and keyboard shortcuts used in the Monitor Editor.

-5
Table 2 Icons and Keyboard Shortcuts for Motion Editor

Debug Menu Commands and Pop-up Keyboard


Icon Shortcut
Explanation
Menu Commands
Debug Mode (D) F1 Turns ON the debug mode.
DBG
Operation Mode (O) F11 Cancels the debug mode and continues
RGL execution of motion program in normal
operation mode.
Break Point Set/Delete (B) F7 Sets or deletes break points.
BP A break point symbol appears in the program on
the screen.
Break Point Enable/Disable (E) - - Enables or disables the break point.
Step Run (G) F8 Runs the motion program in debug mode.
GO
Step In (I) F4 Starts debugging the motion sub-programs. If the
IN specified line is not written using a MSEE
command, the function will be the same as if the
Step Over command was executed.
Step Over (S) F5 Executes the task one block at a time.
OVR
Break (F) F10 Pauses the execution of motion program in
BRK debug mode.
Forced Termination (N) F2 Forcibly quits a motion program.
ABT
Current Value Update (U) - Updates the value of the current coordinates.
Set to Motion Task (T) - Sets a task as the destination for a selected
motion sub-program.
Read Motion Sub-program (F) - - Opens the motion sub-programs that fall within a
specified range.
Call Stack Set (L) - - Selects the number of the parallel line, the
hierarchy level, and the task of the selected
motion sub-program.
Register to Trace Manager (R) - - Saves the registers that fall within the specified
Note: Only available in the pop-up menu range in the Trace Manager to be monitored.
Add to Quick Reference (A) - - Saves the register in the Quick Reference.
Note: Only available in the pop-up menu

-6
Fig 4 Break Point Setting Window

Table 3 shows the icons that are used to indicate the status of lines with break points.

Table 3 Break Point Related Icons

Icon Name Explanation


Break point set Indicates the line where a break point is set.
Line in execution Indicates the line being executed.
Task stopped at break point If the task was interrupted at the set break point, the
symbols for the break point set and task stopped are
displayed one over the other.
Disabled break point Indicates that the break point is temporarily unavailable.

Read Motion Sub-program


Sub-programs written with a MSEE command in the main program are displayed in reversed color.
Click the right mouse button. A shortcut menu appears. Select Read Motion Sub-program on
the menu to open the motion sub-program in the Motion Editor Window.

-7
Read Motion Sub-program

Read Motion Sub-program

Fig 5 Read Motion Program

-8
Break Point List
The break point list displays the status of break points of the program being debugged, and you
can:
Set or delete break points in a line or task.
Open a program with break points from the list.
Read the status of break point in individual motion tasks.
Note: When the debug operation is aborted, the information on the set break points will be cleared.

[Procedures]
Opening the Break Point List
Select Edit - Break Point List (Ctrl+ B) from the menu bar.

Fig 6 Break Point List

Setting Break Points


Click the Add Button. The break point setting dialog box appears. Select the program type,
program name, task name, and block number in the break point setting dialog box, and then click
the Add Button.

-9
Deleting Break Points
In the break point list, select the break point to be deleted, and then click the Delete Button.
Or, click the Add Button to display the break point setting dialog box. Select the program type,
program name, task name, and block number, and then click the Delete Button.

Fig 7 Break Point Setting Dialog Box

Saving the Break Point Setting


Click the OK Button in the break point setting dialog box to save the settings.

-10

You might also like