Rockwell Automation DAG6.5.8 APPLICATION GUIDE SCADA SYSTEM User Manual
Page 389
![background image](/manuals/580293/389/background.png)
Publication AG-UM008C-EN-P - February 2005
Sample Ladder Logic E-7
JMP
Q2:2
Jump to
MSG Rung
If the current value comparison finds no differences, increment the index register. As long as the index register (S:24) is still less than the number of words being compared, jump back to the
previous rung to perform the next value comparison. Otherwise, fall out of the routine.
0005
ADD
Add
Source A
S2:24
0<
Source B
1
1<
Dest
S2:24
0<
ADD
Index Register
LES
Less Than (ASource A
S2:24
0<
Source B
5
5<
LES
Index Register
JMP
Q2:1
Jump to
Compare Rung
"Report-by-exception" write instruction to the SLC Master. This MSG block is configured to write 6 elements ( words) from this Slave's Source File N7:0, out channel 0, to the SLC Master's
(Target Node Address 0) Target Destination File N7:10, with a MSG timeout of 10 seconds. Note that the MSG timeout value should be set to at least twice the channel 0 poll timeout value.
0006
LBL
Q2:2
MSG Rung
EN
DN
ER
MSG
Read/Write Message
Type
Peer-To-Peer
Read/Write
Write
Target Device
500CPU
Local/Remote
Local
Control Block
N7:90
Control Block Length
14
Setup Screen
MSG
Write MSG to Master
0007
END
If any values differ between the first five words of B3:0 and N7:0, copy B3:0-5 into N7:0-5, trigger the MSG (which will write N7:0-5 to the SLC Master) and jump out of the routine.
0004
LBL
Q2:1
Compare
Rung
NEQ
Not Equal
Source A
#B3:0
0000011111001110<
Source B
#N7:0
1998<
NEQ
Data Compare Buffer
COP
Copy File
Source
#B3:0
Dest
#N7:0
Length
6
COP
MSG Write Buffer
U
N7:90
15
MSG
Enable