Rockwell Automation 1403-NDNET DeviceNet Communications Card Installation Instructions User Manual

Page 132

Advertising
background image

Publication XXXX-X.X.X - Month Year

C-6 DeviceNet™ Communication Card Sample Ladder Listing

Sample User Configured Ladder Listing

This example ladder program shows a way to configure the
configurable message for the Powermonitor II.

These ladders are subject to change.

Rung-by-Rung Description

Rung 0000 - Turn on the DeviceNet scanner

Rung 0001 - Latch the write for Instance 3 on the first pass. This
write message is only executed once.

Rung 0002 - If the scanner's response queue is empty (I: 1/15 is
low), copy the Explicit Message Transfer Block header for
writing instance 3 into the output file M0:1.224.

Rung 0003 - If the response queue is set (I:1/15 is high) strip off
the lower byte of the TXID/command word and add 4 to the
result. Then move that result to the output file M0:1.224. This
initiates the reset of the response queue.

Rung 0004 - If the response queue is set (I:1/15 is high), the
command code is changed to 4, and moved into the output file
M0:1.224, then compare the [M1] and [M0] files. If they are the
same, the write statement has been confirmed, and the response
queue (I: 1/15 ) will be returned to its empty or low state.

Rung 0005 - If the write portion of the program completed
successfully, unlatch the write portion and latch the reading of
Instance 49.

Rung 0006 - If the scanner's response queue is empty (I: 1/15 is
low), copy the Explicit Message Transfer Block header from File
N10:0 (set for Instance 49 read) to the output file M0:1.224.

Rung 0007 - If the response queue is set (I:1/15 is high), data
was received. Move the data from the input file M1:1.224 (Note:
the length of the data file is determined by the amount of data
contained within the instance being returned) to a temporary
integer file N30:0.

ATTENTION

Proper operation of the ladder program is the
responsibility of the user. No warranty is expressed
or implied by using these ladder configurations.

Advertising