Rockwell Automation DeviceNet Communications Module User Manual
Page 72

7-12
DeviceNet Communications Module
Ladder Logic Program
Figure 7.8 – Sample PLC-5 Ladder Logic Program
Explicit Messaging Example
When B3:0/0 is set to ON, a one-time BTW sends the explicit message data (starts at N11:0)
to the scanner. The MOV instruction then initializes the first word of the data file that is
used by the BTR instruction in the next rung.
0003
B3:0
0
Send
Explicit
Message
ONS
B3:0
1
EN
DN
ER
BTW
Block Transfer Write
Module Type
1771-SDN DeviceNet Scanner Module
Rack
000
Group
0
Module
0
Control Block
BT20:2
Data File
N11:0
Length
64
Continuous
No
Setup Screen
BTW
MOV
Move
Source
0
0<
Dest
N11:100
257 <
MOV
When the BTW is complete (BT20:2.DN = ON), the CMP instruction compares the first
word of data sent from the scanner to the first word of data sent by the program to the
scanner. When the messaging function is complete, the two words will be equal. The explicit
message response data is stored starting at N11:100.
0004
BT20:2
DN
CMP
Comparison
Expression
N11:100 <> N11:0
CMP
BT20:3
EN
EN
DN
ER
BTR
Block Transfer Read
Module Type
1771-SDN DeviceNet Scanner Module
Rack
000
Group
0
Module
0
Control Block
BT20:3
Data File
N11:100
Length
64
Continuous
No
Setup Screen
BTR
0005
END