• If the program is resumed, it will stop at the next STOP statement and the value of Y
can be obtained again.
m
Y S Q
15138
• By repeating this operation, the calculation process can be seen.
This example used a simple program but when actually assembling a complicated
program, checking the process using table top debug is very difficult. So, if the variables
are checked using this kind of STOP statement, programming mistakes can be found and
corrected more easily.
■ Debug using the TR (trace) mode
If program execution is performed using the TR mode (press ® (M) ), execution will
stop at each line and execution debug can be performed easily.
Let's use the TR mode to debug the example which was previously debugged using a
STOP command.
Operation:
Designate the RUN mode.
READY P0
Designate the TR mode.
••• ^[gj
READY P0
RUNBa
TH sTo^
P0-10
?
Check the execution process. ■
^
r H s T o *
?
Continue program execution. •
&
33
TH avo^
P0-2O
' T R " a n d " S T O P " w i l l
7 b e o m i t t e d h e r e a f t e r .
4 3 3 ?
8733
P0-20
QQI P0-30
S23
P0-40
The value of Y
-Y S3
7569
-
m P0-45
Repeated hereafter
Debug using the TR mode is ideal for checking the entire flow and is convenient for
checking to see where mistakes have been made.
-43-