Program Debugging; Sequence Of Debugging Programs Executed Simultaneously In Multitasking; Instructions Used When Debugging Programs - Mitsubishi QD51 Programming Manual

Logic controller
Hide thumbs Also See for QD51:
Table of Contents

Advertisement

10 Program Debugging

10 PROGRAM DEBUGGING
Program debugging refers to the operation of checking whether an edited program will run
correctly and revise the program so that it runs correctly. (Debug = removing the bugs)
This section shows the sequence of program debugging and the instructions used in
debugging.

10.1 Sequence of Debugging Programs Executed Simultaneously in Multitasking

When executing multiple programs simultaneously (parallel operation in multitasking),
program debugging is generally performed in the following sequence.
1) Single debugging
2) Combination
3) Overall debugging

10.2 Instructions Used when Debugging Programs

The following are typical instructions used when debugging BASIC programs.
See Chapter 11 for details on each instruction.
(1) TRON and TROFF instructions
10 - 1
• • • •
• • • •
debugging
• • • •
The TRON instruction is used to follow the program flow. When the TRON
instruction is executed, the line numbers of lines that have been executed are
shown enclosed in square brackets. This makes it easy to see how the flow
branches due to the IF~GOTO instruction and how the instructions are repeated
due to the FOR~NEXT instruction.
Execute the TROFF instruction to stop the line number display.
10 C=10
20 FOR I=1 TO 3
30 C=C+1
40 NEXT I
50 TRON
60 FOR I=1 TO 3
70 C=C+1
80 PRINT I;C
90 NEXT I
100 TROFF
110 C=C+1
120 PRINT C
130 END
Execute the programs one at a time, and check each
program to see if it runs properly while specifying
various conditions that change the flow of execution.
Group the programs together in several groups,
each consisting of multiple programs related to the
execution of one process.
Next, execute multiple programs in one group at a
time according to the specifications and check to
see if each program runs properly.
Execute all the programs according to the
specifications and check to see if each program
runs properly.
If each program runs according to the
specifications in an overall debugging, then the
debugging is complete.
RUN
[60][70][80] 1 14
[90][70][80] 2 15
[90][70][80] 3 16
[90][100] 17
OK
MELSEC-Q
10
10 - 1

Advertisement

Table of Contents
loading

This manual is also suitable for:

Ad51h-s3Qd51-r24A1sd51s

Table of Contents