Ctrl-c – Rockwell Automation 1771-DB BASIC MODULE User Manual

Page 134

Advertising
background image

Chapter
Commands

10

10 -4

Use the

Ctrl

+

C

command to stop execution of the current program

and return the BASIC module to the Command mode. In some cases you
can continue execution of the program using a CONT (page 10 -3).

Important:

Ctrl

+

C

clears all input and output buffers.

Use CALL 19 (page 12 -12) to disable

Ctrl

+

C

.

Use CALL 18 (page 12 -11) to re-enable

Ctrl

+

C

.

Syntax

Ctrl

+

C

Example

>1 REM EXAMPLE PROGRAM

>10 FOR I = 1 TO 10000

>20 PRINT I

>30 NEXT I

>40 END

>RUN

1

2

3

4

5 -

Ctrl

+

C

STOP - IN LINE 20

READY

>PRINT I

27

>I = 10

>CONT

10

11

12

Notice that after

Ctrl

+

C

is pressed and I is printed the value of

I is 27. The value of I is incremented several times before

Ctrl

+

C

is detected.

CTRL-C

Advertising