Statement: reti, Statement: st@ [expr, Statement: stop – Rockwell Automation 1771-DB Basic Module User Manual - Series A User Manual

Page 78

Advertising
background image

Operating Functions

Chapter 5

5–41

Mode: RUN
Type: CONTROL

Use the RETI statement to exit from the ONTIME interrupts that are
handled by a BASIC Module program. The RETI statement functions the
same as the RETURN statement except that it also clears a software
interrupt flag so interrupts can again be acknowledged. If you fail to
execute the RETI statement in the interrupt procedure, all future interrupts
are ignored.

Mode: COMMAND AND/OR RUN

This statement, along with CALL 77, allows you to save/retrieve variables
to/from a protected area of memory. This protected area is not zeroed on
power-up or when the RUN command is issued. The ST@ statement takes
the argument on top of the argument stack and moves it to the address
location specified by [expr]. For more information on protecting variables,
see section 5.11.6, “Protected Variable Storage – CALL 77”.

Mode: RUN
Type: CONTROL

The STOP statement allows you to break program execution at specific
points in a program. After a program is STOPped you can display or
modify variables. You can resume program execution with a CONTinue
command. The purpose of the STOP statement is to allow for easy
program “debugging” More details of the STOP-CONT sequence are
covered in Section 5.3.2 titled, “Command: CONT”.

Example:

u10 FOR I=1 TO 100

u20 PRINT I

u30 STOP

u40 NEXT I

uRUN

1
STOP – IN LINE 40

READY

uCONT

2

5.4.28
Statement: RETI

5.4.19
Statement: ST@ [expr]

5.4.30
Statement: STOP

Advertising