3 . I n s t r u c t i o n S e t
M N050 03003E F or mo re infor ma tio n vi sit:
w w w. e a t o n . c o m
3 - 119
Set /res et
Count
value
Count
value
Set /res et
Set /res et
Set /res et
Hardware
counter
Hardware
counter
Hardware
comparator
Hardware
comparator
A
A
B
B
A x 4
B x 4
B4
B1
A4
A1
A1
A4
B1
B4
I010
I040
I050
I080
6.
Differences between software and hardware comparators:
a) 6 comparators are available for software counters while 8 comparators are available for 2
groups of hardware counters ( 4 comparators for each group)
b) Output timing of software comparator
Æ
count value equals the compare value in both count
up and down modes.
c) Output timing of hardware comparator
Æ
count value equals the compare value+1 in
count-up mode; count value equals the compare value -1 in count-down mode.
Program Example 4:
1.
Set/reset M0 by utilizing the software comparator
M1000
DCNT
C235
K100
DHSCS
C235
K100
M0
DHSCR
C235
K100
M0
2.
When the accumulated value in C235 increments from 99 to100, the DHSCS instruction sets
M0 ON. (M1235 = OFF, C235 counts up)
3.
When the accumulated value in C235 decrements from 101 to100, the DHSCR instruction
resets M0. (M1235 = ON, C235 counts down)
4.
Timing diagram for the comparison:
Counting
No.
Time
Count up
Count down
M0
101
100
99
98
101
100
99
98
1
2
Summary of Contents for ELC-PB
Page 1: ......
Page 5: ...For more information visit www eaton com MN05003003E iv...
Page 29: ...ELC Programming Manual For more information visit www eaton com MN05003003E 1 24 MEMO...
Page 502: ...3 Instruction Set MN05003003E For more information visit www eaton com 3 333...
Page 601: ...ELC Programming Manual For more information visit www eaton com MN05003003E 3 432...
Page 625: ...ELC Programming Manual For more information visit www eaton com MN05003003E 3 456...