Hscrf (High-Speed Counter Refresh) - IDEC MICROSmart FC6A Series Ladder Programming Manual

Automation organizer windldr
Hide thumbs Also See for MICROSmart FC6A Series:
Table of Contents

Advertisement

HSCRF (High-speed Counter Refresh)

HSCRF
*
Example: HSCRF
The following example demonstrates a program that updates the current value of high-speed counter HSC1 using the HSCRF
instruction. For the timer interrupt, see Chapter 5 "Functions and Settings" - "Timer Interrupt" in the "FC6A Series MICROSmart
User's Manual".
MOV(W)
M8120
M8125
CMP>(D)
M8125
M8125
When the input is on, the current values of the high-speed counters (select from group 1 to group 6) allocated to
special data registers are updated to the latest values. (The group number of the selected high-speed counter is
displayed under the advanced instruction symbol.)
The current values of six high-speed counters HSC1 through HSC6 are usually updated in every scan. The HSCRF can
be used in any place in the ladder diagram where you want to read the updated high-speed counter current value.
For the high-speed counter function, see Chapter 5
Series MICROSmart User's Manual".
S1 –
D1 –
REP
0
D8036
Main Program
END
LABEL
0
HSCRF
1
S1 –
S2 –
D1 –
REP
D8210
150000
Q1
IOREF
S1
Q1
LRET
FC6A S
MICROS
ERIES
MART
"Functions and Settings"
M8120 is the initialize pulse special internal relay.
D8036 stores 0 to designate jump destination label 0 for timer interrupt.
The interrupt program is separated from the main program by the END
instruction.
While the CPU is running, program execution jumps to label 0 repeatedly
at intervals selected in the Function Area Settings.
M8125 is the in-operation output special internal relay.
HSCRF updates the HSC1 current value in data registers D8210 and
D8211.
When D8210/D8211 exceeds 150,000, Q1 is turned on.
IOREF immediately writes the output Q1 internal memory status to actual
output Q1.
Each time the interrupt program is completed, program execution returns
to the main program at the address where timer interrupt occurred.
L
P
M
ADDER
ROGRAMMING
ANUAL
14: R
EFRESH
- "High-Speed Counter" in the "FC6A
FC9Y-B1726
I
NSTRUCTIONS
14-3

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents