Using A Scheduled Interrupt As A High-Precision Timer (Cj1M Only); Setting The Scheduled Interrupt To Units Of 0.1 Ms - Omron CS1G/H-CPUxx-EV1 Programming Manual

Sysmac cs series; sysmac cj series
Hide thumbs Also See for CS1G/H-CPUxx-EV1:
Table of Contents

Advertisement

Using a Scheduled Interrupt as a High-precision Timer (CJ1M Only)

6-5
Using a Scheduled Interrupt as a High-precision Timer
(CJ1M Only)
1,2,3...
Cyclic task
6-5-1

Setting the Scheduled Interrupt to Units of 0.1 ms

PLC Setup
Item
Word
Scheduled inter-
195
rupt unit time set-
ting
When using a CJ1M CPU Unit, the following functions allow a scheduled
interrupt to be used as a high-precision timer.
• The scheduled interrupt timer can be input in units of 0.1 ms (high-preci-
sion interval timer).
• Resetting (i.e., restart) is possible using the MSKS(690) instruction (fixed
time to first interrupt).
• Internal timer PVs can be read using the MSKR(692) instruction (interval
timer PV reading)
These functions allow applications such as that shown in the following exam-
ple of a high-precision one-shot timer, where the input bit turning ON acts as a
trigger, causing the output bit to turn ON, and then turn OFF again after a
fixed interval.
Example:
1. Input interrupt task starts when the built-in input bit turns ON.
2. Output bit A turns ON in the input interrupt task, and the MSKS(690) in-
struction is executed to perform a scheduled interrupt reset start.
3. After a fixed interval, the scheduled interrupt task starts, and output bit A
in the scheduled interrupt task turns OFF, and the MSKS(690) instruction
is executed to prohibit a scheduled interrupt.
Input
Input interrupt task
interrupt
SET
A
ON
MSKS
14
#0005
The scheduled interrupt time is set using the PLC Setup's scheduled interrupt
unit time setting and the MSKS(690) instruction.
With CJ1M CPU Units, the scheduled interrupt time can be set in units of
0.1 ms between a minimum interval of 0.5 ms and the maximum interval of
999.9 ms.
PLC address
Bit
00 to 03
0 hex: 10-ms unit
1 hex: 1-ms unit
2 hex: 0.1-ms unit (CJ1M
CPU Units only)
Output bit A
turns ON.
Scheduled interrupt
reset start.
Scheduled interrupt task
RESET
Fixed interval
Example:
After 0.5 ms)
MSKS
#0000
Set value
Default
0 hex
Section 6-5
Output bit A
turns OFF.
Stop due to fixed
A
interrupt being
prohibited.
4
Refresh timing
When operation starts.
313

Advertisement

Table of Contents
loading

Table of Contents