4 example slc ladder logic program – Rockwell Automation VSM500 Integrated Drive/Motor DeviceNet Option Board User Manual

Page 47

Advertising
background image

Using Explicit Messaging

6-3

6.4

Example SLC Ladder Logic Program

The example ladder logic program (see figure 6.2) can be used to do explicit
messaging from an SLC. This ladder program will allow the SLC 500 to use explicit
messaging to read and write parameters to a VSM500 Integrated drive/motor.

To run the example program:

Step 1. Enter data into the program.

The request information will be placed in the N10 file. The

first word in N10

will be the TXID and command information, which both receive a value of
one. The

second word will be the port and size information. The port value

will be zero when using an 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 Node Address. The service will 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 node address will be the node address assigned to the slave device
(VSM500 Integrated drive/motor). Finally, the class, instance, and attribute
for the parameter have to be entered. These values can be found in
Appendix B and Appendix C.

Step 2. Run the program.

After entering 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 the address back to zero when the
explicit message is complete.

Step 3. Receive Data from the program.

After the program has been run, the results can be seen in the N11 address.
The SLC program should read/copy the data before performing another
explicit message request. It is important to note that the command byte in
node N10:0/0 is changed when the program executes and must be changed
back to a one before the program can be run again.

Advertising