Omron C200H-ASC11 Manual page 243

Ascii units
Hide thumbs Also See for C200H-ASC11:
Table of Contents

Advertisement

Debugging
7-8-5
Trace Function (TRON and TRACE)
TRON
TRACE
234
Note Set the variables using the WATCH command after the program has been
compiled for the RUN command.
When the TRON command is executed, the executed program lines are dis-
played at the terminal in order of execution. This allows you to see execution
for programming such as for FOR to NEXT repetitions, and IF GOTO and
GOSUB subroutine branching. When using the TRON command with the M
option, trace data is stored in the trace buffer, and can be displayed at the ter-
minal later using the TRACE command.
The trace buffer can store a maximum of 255 lines (when 255 lines are
exceeded, lines are overwritten starting from the first line executed.)
Note Trace details stored in the trace buffer are backed up by a battery even after
the power supply is turned off. This means that they can be read afterwards
using the TRACE command. The trace buffer is cleared using the NEW or
TROFF command.
Syntax
Meaning
TRON starts a trace of the lines that follow. After RUN, the executed lines are
displayed at the terminal enclosed in brackets [ ]. If the option [M] is used, the
trace is output to the trace buffer. A maximum of 255 lines can be traced.
Example
TRON:
Starts a trace of the lines that follow
TRON[M]: Starts a trace of the lines that follow, and stores the trace in the
trace buffer.
Examples of the Trace Function
RUN
[10][20][30][20][40]....:
Syntax
Meaning
TRACE displays the contents of the trace buffer at the terminal. Executed
lines are displayed sequentially inside square brackets [ ] in the order in which
they were executed.
Examples of the Trace Function
TRON M
TRACE
[10][20][30][20][40].....: Lines were executed in the order [10][20][30][20][40].
Note Only when the execution line number is changed, the line number is added to
the trace buffer. Therefore, if a line such as 100 GOTO 100 is executed,
TRACE will display [100] one time only.
A DEVICE UNAVAILABLE IN PORT X error will occur if line numbers dis-
played for traces are duplicated when displaying program trace results on the
terminal while executing an interrupt subroutine. If this occurs, use the M
option for the TRON command to store trace results in the trace buffer.
TRON[M]
Lines were executed in the order [10][20][30][20][40].
TRACE
Section 7-8

Advertisement

Table of Contents
loading

This manual is also suitable for:

C200h-asc21C200h-asc31

Table of Contents