Omron CP1H CPU Operation Manual page 239

Cp1h cpu unit
Hide thumbs Also See for CP1H CPU:
Table of Contents

Advertisement

Interrupt Functions
Ladder Program
Examples
Example 1: High-speed
Counter (Linear Mode)
1,2,3...
Operand
P
Port specifier
#0000 to #0003 Pulse outputs 0 to 3
#0010
#0011
#0012
#0013
#0100 to #0107 Input interrupts 0 to 7 (in counter mode)
#1000 or #1001 PWM(891) output 0 or 1
C
Control data
#0000
#0001
#0002
#0003
NV
First word of
NV and NV+1 contain the new PV when C is set to #0002
new PV
(change the PV).
New PV Setting in NV and NV+1
New PV (rightmost 4 digits)
New PV (leftmost 4 digits)
Setting range for pulse outputs and high-speed counter inputs:
0000 0000 to FFFF FFFF hex
Setting range for input interrupts (counter mode):
0000 0000 to 0000 FFFF hex
In this example, high-speed counter 0 operates in linear mode and starts
interrupt task 10 when the PV reaches 30,000 (0000 7530 hex).
1. Set high-speed counter 0 in the PLC Setup's Built-in Input Tab.
Item
High-speed counter 0
Counting mode
Circular Max. Count
Reset method
Input Setting
2. Set the target-value comparison table in words D10000 to D10003.
Word
Setting
D10000
#0001
Number of target values = 1
D10001
#7530
Rightmost 4 digits of the target value 1 data Target value =
D10002
#0000
Leftmost 4 digits of the target value 1 data
D10003
#000A
Bit 15: 0 (incrementing)
Bits 0 to 7: A hex (interrupt task number 10)
3. Create the program for interrupt task 10. Always put an END(001) instruc-
tion at the program's last address.
Settings
High-speed counter 0
High-speed counter 1
High-speed counter 2
High-speed counter 3
Start comparison.
Stop comparison.
Change the PV.
Stop pulse output.
Setting
Use counter
Linear mode
---
Software reset
Up/Down inputs
Function
Section 5-1
30,000
(0000 7530 hex)
205

Advertisement

Table of Contents
loading

Table of Contents