Omron C200H Operation Manual page 204

Hide thumbs Also See for C200H:
Table of Contents

Advertisement

Subroutines and Interrupt Control
Limitations
Caution INT(89) cannot be used during execution of step programs or in C2000H Du-
Description
Scheduling the Interrupt
CC = 000
(Interval)
Caution If the scheduled execution time of the subroutine becomes too large, it will
CC = 001
(Time to First Interrupt)
Caution INT(89), with a CC code of 001, can be used to change the scheduled inter-
CC = 002
(Read Interval)
Flags
D may be a constant only when CC is 000 or 001. D must be a word address
when CC is 002. See below for details. INT(89) is used only to control the
scheduled interrupts with the C200H and N must be set to 0004.
plex CPUs. Refer to 5-21 Step Instructions for details on step programs.
INT(89) is used to control the scheduled interrupt. Subroutine 99 can be es-
tablished so that it will be executed repeatedly at a fixed interval through
scheduled interrupts.The actual time at which it is executed is independent of
the cycle time. INT(89) is used to control the scheduled interrupt. If N is 004,
CC is used to designate the desired function as follows:
CC =
000: Setting time interval
001: Setting the time to first scheduled interrupt
002: Reading the current time interval
Even when a subroutine 99 has been written, it will not be executed accord-
ing to scheduled interrupts unless INT(89) is used to set the proper times.
INT(89) should be used to set both the time interval (CC = 000) for the
scheduled interrupt and the time to the first scheduled interrupt (CC = 001.
Unstable operation may result is the time to the first interrupt is not set.
To set the time interval for the scheduled interrupt, set CC to 000 and set D
to any value between 00.01 and 99.99 seconds. The decimal point is not in-
put. The time interval can be changed at any time.
To cancel the scheduled interrupt, set the time interval to 00.00 seconds.
have a serious effect on the overall execution time of the main program.
Therefore, you should take extra care to write a subroutine that is fast and
efficient. INT(89), with a CC of 000, is used to change the scheduled interrupt
time interval, the new time interval is not effective until after the next sched-
uled interrupt. (cf. CC = 001 below)
To set the time to the first interrupt, set CC to 001 and set D to any value be-
tween 00.01 and 99.99 seconds. The decimal point is not entered. If D is set
to 00.00, the interrupt will not occur.
rupt time interval for one cycle. The new time interval is effective immediately.
The scheduled interrupt may never actually occur if the time to the first inter-
rupt is changed repeatedly, i.e., before the interrupt has time to occur.
To access the current time interval for the scheduled interrupt, set CC 002.
The current time interval will be places in D
ER:
CC, D, or N is not within specified values.
Indirectly addressed DM word is non-existent. (Content of *DM word
is not BCD, or the DM area boundary has been exceeded.)
Section 5-20
191

Advertisement

Table of Contents
loading

Table of Contents