
Chapter 5. Application instructions
5-136
2) Program example
-
Program that output the high speed counter output to P002 word.
a) When the input condition turns on, the current value is stored to F14 and setting value of step
0 is stored to F15.
b) When the current value reaches to setting value #0, F070 ~ F077 is set / reset according to
the parameter setting and F15 is updated as setting value of step 1.
c) When the current value reaches to the setting value of last step ( step 5 at the this example ),
F15 is updated as setting value of step 0 and current value (F14) is cleared as 0.
d) If the input condition turns off, current value and HSC output (F070 ~ F077) is cleared as 0.
HSCNT
MOV F07 P02
< Parameter setting with KGL-WIN>