Execution - Omron SYSMAC CV500-BSC11 Operation Manual

Basic units
Table of Contents

Advertisement

Program Execution and Debugging

4-3-2 Execution

1, 2, 3...
Displaying Execution Result Commands can be input or directly executed from the terminal without assigning
68
By using the above commands, the program is debugged. As an example, the
following sample program is debugged.
10 PARACT 0
20 A = 3 : B = 4
30 FOR I = 1 TO 3
40 A = A + B
50 PRINT A
60 NEXT I
70 END
80 END PARACT
Execution can also be stopped from the keyboard by inputting CTRL-X or
CTRL-C. When CTRL-X is input, all execution, including I/O processing, will be
aborted immediately and "Quit in ..." will be displayed. STEP and CONT cannot be
used after aborting execution with CTRL-X. When CTRL-C is input, execution is
stopped as soon as the current instruction has been executed. If "Break in ..." is
displayed, STEP and CONT can be used. If "Quit in ..." is displayed, STEP and
CONT cannot be used.
Note Data received while program execution is stopped may not be retrievable after
CONT is executed. To avoid this problem, make sure that data has been received
and jump to the address defined with ON PC before setting the BREAK point.
1. To execute the program, use the RUN command.
RUN,ERASEs
2. Specify ERASE to clear the non-volatile variables.
3. Display and confirm the sample program. (LISTs)
4. Execute the program. ERASE can be omitted.
5. Type RUN and press ENTER to execute the program.
LIST
10 PARACT 0
20 A = 3 : B = 4
30 FOR I = 1 TO 3
40 A = A + B
50 PRINT A
60 NEXT I
70 END
80 END PARACT
Ok
RUN
7
11
15
Ok
6. If an error is found on a line of the program while the program is executed,
the execution is stopped at that point, and the line number and an error mes-
sage identifying the nature of the error are displayed. To correct the error,
display the line by using the EDIT command, input the correct command,
and press the carriage return. Then input again and execute the program by
the RUN command. If another error message is displayed, correct the pro-
gram in the same manner and execute it again.
line numbers. The values of variables immediately after the program has been
executed can be displayed and checked by the PRINT command.
Type PRINT A,Is
PRINT A, I
15
Ok
4
Section 4-3

Advertisement

Table of Contents
loading

Table of Contents