Programming the slc to run explicit messaging, Programming the slc to run explicit messaging -18 – Rockwell Automation 160 DEVICENET (DN1) MODULE FRN 1-2.XX User Manual

Page 53

Advertising
background image

Publication 0160-5.5 - September 1997

6-18

Using 160-DN1 with DeviceNet Scanner

Programming the SLC to Run
Explicit Messaging

The example ladder program (Figure 6.2, page 6-20) can be used to
do explicit programing from the SLC 500. This ladder program will
allow the SLC 500 to use Explicit Messaging to read and write
parameters to a Bulletin 160 drive. There are three steps to executing
this program:

1. Entering Data into the Program

The request information will be placed in the N10 file (refer to the
table on page 6-19 for format). The first word in N10 will be the
TXID and command information, which will both receive a value of
one. The second word will be the port and size information. The port
value will be zero when using a SLC and the size will be the number
of bytes for the class, instance, attribute, and service data. The third
word will contain the service and MAC ID information. The service
can be either a set (write) or a get (read) attribute, the value for a “set”
is 0x10 and the value for a “get” is 0x0E. The MAC ID will be the
node address that was given to the slave device. Next the class,
instance
, and attribute for the parameter have to be entered. These
values can be found in Chapter 5, Appendix B and Appendix C.

2. Running the Program

After formatting the request into the N10 file, the program needs to be
triggered to run. Triggering the program is done by changing the
address N7:0/0 from a zero to a one. The program will change this
address back to zero when the Explicit Message is complete. After the
program has been run, the results can be seen in the N11 address
(refer to the table on page 6-19 for format). It is important to note that
the command byte in node N10:0/0 is changed when the program exe-
cutes and must be changed back to a one before the program can be
run again.

3. Receiving Data From the Program

The response data will be automatically put in the N11 file when the
program has completed the explicit request. The SLC program should
read/copy the data before performing another Explicit Message
Request.

Advertising