beautypg.com

Rockwell Automation 1771-IJ_IK IK ENCODER/COUNTER MODULES User Manual

Page 57

background image

7–3

Special Programming

Publication 1771ĆUM006B-EN-P - June 2002

Figure 7.2

Ladder Logic for Extending the Count Beyond 999 (PLC-3 Program)

RUNG NUMBER RMO

RUNG NUMBER RM1

] / [

WN005:0002

17

C0100

( CU )

17

C0100

( DN )

15

C0100

( CD )

16

C0100

( DN )

15

WN005:0002

17

RUNG NUMBER RM2

RUNG NUMBER RM3

MVM
MOVE WITH MASK
A : WB002:0200
0110000101011100
B : WB005:0000
000011111111111111
R : WB005:0001
0000000101011100

MOV

MOVE FROM A TO R
A : WB005:0001
0000000101011100
R : WN005:0000

348

LES

A < B

A : WN005:0002

0

B : WN005:0003

-500

SUB

A - B = R

A : WN005:0000

348

B : WN005:0001

348

R : WN005:0002

0

GRT

A > B

A : WN005:0002

0

B : WN005:0004

500

CTU

COUNTER UP C0100

CP = 32000

CA = 4

CTD

COUNTR DOWN C0100

CP = 32000

CA = 4

MOV

A : WN005:0000

348

348

R : WN005:0001

MOVE FROM A TO R

] [