Chapter 7 Usage of Various Functions

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.

2,147,483,647

Carry occurs

 

 

Current value

 

 

Decreasing

0

Increasing

Borrow occurs

-2,147,483,648

 

 

 

(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.

 

 

Carry occurs

Current value

 

 

Decreasing

Borrow occurs

0

Increasing

 

 

7-6

Page 90
Image 90
LG Electronics 120S user manual Parameter Setting