Debugging Macro program

Overview

Macro program may cause error while it is working, by illegal command call or incorrect value of paramters.
Debugging support function will help you to find out the cause of the error and fix the problem.

System behavior on error

When error happened, system behaves as below :

Show error on macro console
The error information is shown on macro console.


NG result of Macro unit
The measurement result of macro unit will be NG.


Interrupt of Macro
When error occurs in macro program, execution of macro subroutine will be automatically terminated.
However, the rest of the system, for example measurement flow, continues working.

Check error information

Error information is shown on macro console.
The error information contains these data :
Error message shows the cause of the error. For detail, refer to refList of error messages.
Line number is a number to indicate each lines of the program, and automatically added when macro program is saved. The program with line number is shown by executing list command from macro console.
Error statement is a statement causing error. CHeck refMacro command reference to know correct specification.

Debugging method


Break point
(1) Set break point by inserting "Stop" command in the program.

(2) Execution of the program is interrupted on the position of "Stop" command.

Command execution
(3) On interruption status, macro console shows the prompt as "MACRO>".

(4) Check the current status of the program by typing macro statement on macro console.
 Example : MACRO> Print A$


Correction
(5) Type "list" command then macro program with line number is shown.


(6) Correct the program by typing the statement with line number.
If you set existing line number, then the existing line is overwritten.


If you set new line number, then the line is inserted.


If you type only line number, then the specified line is cleared.


Resume program execution
(7) Type "cont" command to resume program execution.

Error messages

You can check list of error messages from refhere.