Snglstp, Syntax, Example – Rockwell Automation 1771-DB BASIC MODULE User Manual
Page 150

Chapter
Commands
10
10 -20
Use the SNGLSTP command to initiate single-step program execution.
If the number you specify with this command is zero, single-step execution
is disabled. If the number is not zero, a break point is set before each line
in the program. Start the program with the RUN command (page 10 -19).
After each stop, type CONT (page 10 -3) to execute the next line.
You can inspect variables or assign variables at each break point.
SNGLSTP works only on programs executing from RAM. It does not stop
a program executing from ROM.
Syntax
SNGLSTP
integer
Return
Example
>10 FOR I = 1 TO 5
>20 PRINT I
>30 NEXT I
>40 PRINT “PASSED FOR - NEXT LOOP”
>50 PRINT “THIS IS THE END”
>60 END
READY
>SNGLSTP 20
SINGLE STEP ENABLED
READY
>RUN
STOP - LINE 20
READY
>CONT
1
STOP - LINE 30
READY
>CONT
STOP - LINE 20
READY
>CONT
2
STOP - LINE 30
READY
>SNGLSTP 0
SINGLE STEP DISABLED
READY
>CONT
3
4
5
PASSED FOR - NEXT LOOP
THIS IS THE END
READY
SNGLSTP