Omron C200H-ASC11 Manual page 186

Ascii units
Hide thumbs Also See for C200H-ASC11:
Table of Contents

Advertisement

Details of BASIC Commands
on alarm
Syntax:
ON ALARM
Statement. An interrupt is generated after the specified time elapses. When the specified time has
Description:
elapsed after execution of
the specified line number.
Remarks:
<time expression> is an integer expression with a result in the range : [1...864000].
The units specified in the time expression are 0.1 seconds. This gives a total alarm range of 24
hours.
<line number> specifies the start of the interrupt subroutine (ISR).
<label> is a BASIC program label. It references a line number somewhere in the BASIC program.
The ISR should be terminated by a
execution will resume at the statement after the statement that was originally interrupted.
ALARM
time specified in the
branches to the defined interrupt subroutine.
The
specified interrupt subroutine, the
until another
interrupts are unlike the
Only one
are set in a single program, only the last
While the
recorded but not executed. These stopped interrupts will be executed in order of their priority after
the
ALARM
For more information on writing interrupts in BASIC, refer to 5-5 Interrupt Functions.
Examples:
> 10 A=0
> 20 ON ALARM 30 GOSUB 1000
> 30 ALARM ON
> 40 IF A=0 THEN GOTO 40
> 50 PRINT "END"
> 60 END
> 1000 PRINT "INTERRUPT OCCURRED"
> 1010 A = 1
> 1020 RETURN
> RUN
INTERRUPT OCCURRED
END
See also:
ALARM
<time expression>
ON ALARM
interrupts are decrementing timer interrupts. The timer begins counting down from the
ON ALARM
interrupts are one-shot interrupts. Once program execution has branched to the
ALARM
statement is executed and its specified time elapses. In this sense,
ON ALARM
TIMER
interrupt can be valid at any one time. If two or more
ON ALARM
interrupt subroutine is being executed, other incoming interrupts will be
ALARM
interrupt subroutine has been completed.
(
|
|
),
ON
OFF
STOP
ON TIMER
(<line number> | <label>)
GOSUB
, program execution branches to the interrupt subroutine at
statement. When the
RETURN
statement. When the timer reaches zero, program execution
interrupt is invalid and another interrupt will not occur
ALARM
interrupts, which are "repetitive" interrupts.
statement's interrupt will be valid.
ON ALARM
Section
statement is reached
RETURN
statements
ON ALARM
7-6
ALARM
177

Advertisement

Table of Contents
loading

This manual is also suitable for:

C200h-asc21C200h-asc31

Table of Contents