Idle, Idle -10, Example – Rockwell Automation 1746-BAS BASIC LANGUAGE User Manual

Page 50: Purpose, Syntax

Advertising
background image

Publication 1746-RM001A-US-P

4-10 BASIC Commands

Example

>ERASE

>ROM 13 ERASED

The last program stored in EEPROM (ROM 13 in this example) is erased.

IDLE

Purpose

Use the IDLE command to force the module to enter wait until Interrupt mode.
Program execution halts until an ONTIME condition is met. The ONTIME
interrupt must be enabled before executing the IDLE command or else the module
enters a wait forever mode.

[CTRL-C]

exits the IDLE command if

[CTRL-C]

is

enabled.

Syntax

IDLE

Example

>1

REM EXAMPLE PROGRAM

>10 TIME = 0

>20 CLOCK1

>30 ONTIME 2,70

>40 IDLE

>50 PRINT “END OF TEST!!!”

>60 END

>70 PRINT “TIMER INTERRUPT AT – ”,TIME,“SECONDS.”

>80 RETI

READY

>RUN

TIMER INTERRUPT AT – 2.005 SECONDS.

END OF TEST!!!

Advertising