Rockwell Automation 1746-HSCE2 Multi-Channel High Speed Counter Module User Manual
Page 100

Publication 1746-UM002B-EN-P - August 2004
6-8 Application Examples
Ladder File 8 - HSCE2
0000
S:1
15
U
B3:0
0
U
B3:0
1
MOV
Move
Source
0
0 <
Dest
N11:0
170<
MOV
MUL
Multiply
Source A
10
10 <
Source B
N11:2
17 <
Dest
N11:1
170<
MUL
0001
S:1
15
B3:0
0
B3:0
1
JSR
Jump To Subroutine
SBR File Number
U:9
JSR
0002
END
FIRST_PASS
FIRST_PASS
HSCE2_INIT_DONE
HSCE2_INIT_DONE
#HSCE2_CFG_BLK
DATA_BLK_PTR
HSCE2_ERROR
HSCE2_ERROR
Fill File
Source
0
Dest
Length
8
#O:1.0
FLL
Prior to use, the programmer sets N11:2 to the total number of data blocks which will be entered into file N10 (not including the Counter Control
Block), adds one rung for each configuration block (including the Counter Control Block), and initializes the data blocks in file N10. Ten integer data
blocks are used (instead of eight) to simplify the display in data windows. Note: The Counter Control Block rung differs from the other rungs
because the Counter Control Block does not require hand-shaking.
The first pass of the program initializes the following values:
1. The HSCE2 initialization done bit (B3/0) is unlatched.
2. The HSCE2 error bit (B3/1) is cleared.
If the HSCE2 initialization is not done, and the HSCE2 has not errored, call the HSCE2 initialization routine.