Rockwell Automation 1404-M4_M5_M6_M8 Powermonitor 3000 User Manual, PRIOR to Firmware rev. 3.0 User Manual

Page 295

Advertising
background image

Publication 1404-UM001D-EN-E - October 2004

Sample Applications C-41

Perpare to swap words by copying source to N11 temp file. Initialize the word counter N12:0.

0000

SBR

Subroutine

SBR

COP

Copy File
Source

#N10:0

Dest

#N11:0

Length

64

COP

MOV

Move
Source

0

0<
Dest

N12:0

30 <

MOV

Perform this task until all the words have been swapped. A size of 32 was selected to handle all power monitor files.

0001

LBL

Q3:1

LES

Less Than (A<B)
Source A

N12:0

30 <
Source B

30

30 <

LES

ADD

Add
Source A

1

1<
Source B

N12:0

30 <
Dest

N12:1

29 <

ADD

MOV

Move
Source N11:[N12:1]
0<
Dest

N12:2

0<

MOV

MOV

Move
Source N11:[N12:0]
0<
Dest

N11:[N12:1]

0<

MOV

MOV

Move
Source

N12:2

0<
Dest

N11:[N12:0]

0<

MOV

ADD

Add
Source A

2

2<
Source B

N12:0

30 <
Dest

N12:0

30 <

ADD

JMP

Q3:1

Advertising