beautypg.com

Loopbackexampletagwritesynced.l5k – Comtrol UP DeviceMaster User Guide User Manual

Page 105

background image

DeviceMaster UP EtherNet/IP User Guide: 2000424 Rev. L

Chapter 5. Programming the PLC - 105

loopbackExampleTagWriteSynced.L5K

5.3.4. loopbackExampleTagWriteSynced.L5K

This example program demonstrates an RSLogix 5000 loopback PLC program using the Write-to-Tag-Synced
receive
method. This program configures a DeviceMaster UP 1-port at startup and then loops data through
the loopback plug on the serial port. The Com1_RxData tag transmits and receives the data, increments the
sequence numbers, and sends the consumed receive sequence number to the DeviceMaster UP after each
received data packet.

You can configure and run the loopbackExampleTagWriteSynced.L5K program through RSLogix 5000. For
additional information on the RSLogix 5000, see

5.3.7. RSLogix 5000 Screen Examples

on Page 108.

1.

Attach a loopback plug to the serial port. (If necessary, see the

DeviceMaster UP Hardware Installation

and Configuration Guide

.)

2.

Open RSLogix 5000.

3.

Import the loopbackExampleTagWriteSynced.L5K file.

Note: If you have problems loading the PLC program example, see

5.3.8. Modifying an RSLogix 5000 PLC

Program Example (Older Versions)

on Page 114 for a solution.

4.

Modify the PLC program (loopbackExampleTagWriteSynced.L5K) for your system.

2.3. EtherNet/IP Interface Profile (ControlLogix)

on Page 14 provides a description of the objects in the

PLC program. This PLC program is configured to run on a ControlLogix 5550 controller, so you may need
to make the following changes:

a.

From the Controller Organizer panel, click Controller ComtrolCLX and select Properties.

b.

Click Change Controller, select your PLC controller and revision.

c.

Right-click the I/O Configuration, select New Module, and add your EtherNet/IP interface to the
project.

d.

Double-click MainRoutine under Tasks > MainTask > MainProgram in the Controller Organizer panel and
modify the message communication paths. Click each message and change the communication path
to:

,2,

Where specifies the name of your Ethernet interface and IP Address> specifies the IP address for this device.

5.

Use one of the following procedures:

For embedded Web page configuration (recommended): Perform the steps outlined in

5.3.6. Configuring

the DeviceMaster UP for the RSLogix 5000 Example Programs Using the Web Page

on Page 107.

For the optional PLC Configuration:

a.

Double-click Controller Tags and click the plus sign (+) next to Com1_SetConfigData to expand the
option and change the serial port configuration tag.

b.

Change the plcSlotNumber parameter to match the PLC slot number on your PLC chassis.

c.

Change the plcIPAddress parameter to match the IP address of your PLC EtherNet/IP card. (The
value must be entered in 32-bit h

ex

format.

d.

Enable DoSetConfig on rung one of the example PLC program.

6.

Download the PLC program to your PLC and run the program.