
Chapter 7 Usage of Various Functions
7-6
8) Parameter Setting
(1) Format setting
(a) Linear counter
•
If HSC is designate as Linear counter, it can counts from -2,147,483,648 to 2,147,483,647.
•
The carry flag F18*(* is channel number) turns on when the current value of high speed counter is overflow during up
counting and HSC stop counting.
•
The borrow flag F19*(* is channel number) turns on when the current value of high speed counter is underflow during
down counting and HSC stop counting.
•
Carry and borrow flags can be reset by preset operation and HSC can re-starts its operation.
(b) Ring counter
•
If HSC is designate as Ring counter, it can counts from 0 to set value.
•
The carry flag turns on when the current value of high speed counter reaches set value during up counting and current
value is changed to 0.
•
The borrow flag turns on when the current value of high speed counter is reaches 0 during down counting and current
value is changed to ‘set value –1’.
•
When set value is out of range(2 ~ 2,147,483,647), Ring counter setting error(h’11) occurs and HSC operates as linear
counter.
•
When current value is changed to out of range(2 ~ 2,147,483,647) by preset operation, Ring counter setting error(h’11)
occurs and HSC operates as linear counter.
•
The ring counter setting error can be corrected by re-start of instruction(HSCST) only.
Increasing
Decreasing
Carry occurs
Borrow occurs
0
Current value
Increasing
Decreasing
Carry occurs
Borrow occurs
0
Current value
2,147,483,647
-2,147,483,648