Rockwell Automation RECOMM-DNET DeviceNet Adapter for use with DPI AC Drives User Manual

Page 77

Advertising
background image

Using Explicit Messaging

7-11

Ladder Logic Program

Figure 7.8 – Sample PLC-5 Ladder Logic Program

0000

I:000

17

ONS

B3:0

0

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

N30:0

Length

64

Continuous

No

MOV

Move
Source

0

0<

Dest

N30:70

257<

0001

BT20:2

DN

CMP

Comparison
Expression N30:70 <> N30:0

BT20:3

EN

EN

DN

ER

BTR

000

0
0

BT20:3
N30:70

64

No

0002

END

Block Transfer Read
Module Type 1771-SDN DeviceNet Scanner Module
Rack
Group
Module
Control Block
Data File
Length
Continuous

When I:000/17 is set to true, a one-time Block Transfer Write sends data to the scanner. The Move
instruction then initializes the first word of the data file that is used by the Block Transfer Read instruction in
the next rung.

When BT20:2.DN is true, the Block Transfer Write is complete. The
compare instruction compares the first word of data sent from the
scanner to the first word of data you send to the scanner. When the
messaging function is complete, the two words are equal.
If the Block Transfer Read is not enabled, this instruction enables it
when BT20:2.DN and the compare are true. The Block Transfer
Read reads 64 words of data.

Advertising