Browse
(440) 299-7778
Menu
(440) 299-7778
One-year parts and labor warranty30-day money-back guaranteeContact

The text of a manual · part 12 of 22

1747-SDN DeviceNet Scanner Module User Manual: 6 - Creating and Running the Example Application Program

Pages 79 to 88 of 160, from 1747-SDN DeviceNet Scanner Module User Manual

The original document is the PDF (3.9 MB). This is its text as extracted, unedited; tables and drawings read best in the PDF, and each page heading opens it at that page.

For the Allen-Bradley 1747-SDN

Page 79

Chapter

6

Creating and Running the Example Application Program

What This Chapter Contains This chapter describes the procedure to create, download, and run an example ladder logic program to test the DeviceNet network. When the processor is put into Run mode, pressing the START button on the network’s RediSTATION operator interface will cause the red indicator light to come on and stay on until the STOP button is pressed. Passing an object in front of the photoeye will increment a counter. Recall that you cannot directly communicate with the SLC 500 processor over the DeviceNet network. This chapter shows how to download and run the program over a ControlNet, Ethernet, or Data Highway Plus network. The SLC 500 I/O chassis used for these examples was set up with the following hardware. Chassis Setup Module

Slot

DH+ Address

Ethernet Address

ControlNet Address

DeviceNet Address

SLC 500 5/04 Processor(1)

0

1

-

-

-

SLC 500 5/05 Processor(2)

0

-

130.130.130.2

-

-

1747-KFC15

1

-

-

16

-

1747-SDN

2

-

-

-

0

(1)

Used for Data Highway Plus and ControlNet examples.

(2)

Used for Ethernet example.

The following table describes what this chapter contains and where to find specific information.

79

Topic

Page

Install the Software

80

Create the Example Application Program

80

Download and Run the Program

82

Publication 1747-UM655B-EN-P - June 2007

Page 80

80

Creating and Running the Example Application Program

Install the Software

Follow these steps to install the software. 1. Insert the software CD-ROM installation disk in the drive. The CD-ROM supports Windows Autorun. If you have Autorun configured, the installation automatically starts when you insert the CD-ROM in your drive. If you do not have Autorun configured, perform steps 2 and 3. 2. From the Windows Start menu, choose Run. 3. Browse for the Setup program on the CD ROM and open it. 4. Follow the prompts that appear as you install the software.

Create the Example Application Program

Follow these steps to create the example application program. 1. Start the RSLogix 500 programming software. You see the following dialog.

Publication 1747-UM655B-EN-P - June 2007

Page 81

Creating and Running the Example Application Program

81

2. From the File menu, choose New. The Select Processor Type dialog opens.

3. Select your processor type from the list (for example, 1747-L542A) and click OK. 4. Enter the following ladder program. Note that the program uses the addresses mapped to the devices by RSNetWorx for DeviceNet software in chapter 4.

5. Save the program by using an appropriate name, for example, 1747-SDN.

Publication 1747-UM655B-EN-P - June 2007

Page 82

82

Creating and Running the Example Application Program

Download and Run the Program

You cannot go online to the processor directly over the DeviceNet network. The following sections provide examples of downloading and running the program by using these networks: • ControlNet • Ethernet • Data Highway Plus

Download and Run the Program via a ControlNet Network Follow these steps to download and run the example program via a ControlNet network. 1. From the RSLogix 500 Communication menu, choose System Comms. The Communication dialog appears. Your dialog may look different depending upon the drivers and other devices you have installed.

2. Click the + next to your ControlNet driver (AB_KTC-1) to expand the tree. 3. Select the 1747-KFC15 module as shown above and click Download. Your program is downloaded to the controller.

Publication 1747-UM655B-EN-P - June 2007

Page 83

Creating and Running the Example Application Program

83

4. Change the SLC 500 processor mode to Run after the download is complete. IMPORTANT

You must also place the 1747-SDN module in Run mode by setting the Run Bit (bit 0) in the scanner’s command register. The command register is located at word 0 in the Output image table.

5. In the Data Files folder, double-click O0-Output. You see the 1747-SDN module’s command register (file O:2.0 below).

6. Set bit 0 in the command register to 1, as shown above. 7. Press and release the START button on the RediSTATION operator interface. The red light should turn on. On your screen, you see rung 1 in your ladder program being energized as you press the button. 8. Pass your hand back and forth over the photoeye several times. On your screen you should see the counter increment. 9. Press and release the STOP button on the RediSTATION operator interface. The red light should turn off. On your screen, you see rung 2 in your ladder program being energized as you press the button. This completes the ControlNet example. Publication 1747-UM655B-EN-P - June 2007

Page 84

84

Creating and Running the Example Application Program

Download and Run the Program via an Ethernet Network

IMPORTANT

To communicate with your SLC 5/05 processor over an Ethernet network you must first configure the processor’s Ethernet communication channel and assign it a unique IP address. See Appendix B for information on configuring the Ethernet communication channel.

Follow the procedure below to download and run the example program via an Ethernet network. 1. From the RSLogix 500 Communication menu, choose System Comms. The Communication dialog opens. Your dialog may look different depending upon the drivers you have installed.

2. Click the + next to your Ethernet driver (AB-ETH-1 above) to expand the tree. 3. Select the SLC 500 processor as shown above and click Download. 4. Put the processor in Run mode after the download is complete.

IMPORTANT

Publication 1747-UM655B-EN-P - June 2007

You must also place the 1747-SDN module in Run mode by setting the Run Bit (bit 0) in the scanner’s command register. The command register is located at word 0 in the Output image table.

Page 85

Creating and Running the Example Application Program

85

5. Double-click the O0 - OUTPUT file under the Data Files folder. You see the 1747-SDN module’s command register (file O:2.0 below).

6. Set bit 0 in the command register to 1, as shown above. 7. Press and release the START button on the RediSTATION operator interface. The red light should turn on. On your screen, you see rung 1 in your ladder program being energized as you press the button. 8. Pass your hand back and forth over the photoeye several times. On your screen you should see the counter increment. 9. Press and release the STOP button on the RediSTATION operator interface. The red light should turn off. On your screen, you see rung 2 in your ladder program being energized as you press the button. This completes the Ethernet example.

Publication 1747-UM655B-EN-P - June 2007

Page 86

86

Creating and Running the Example Application Program

Download and Run the Program via a DH+ Network Follow the procedure below to download and run the example program via a DH+ network. 1. From the RSLogix 500 Communication menu, choose System Communication. RSLinx software starts, and the Communication dialog opens.

2. Select your Data Highway Plus driver (AB_KT-1, Data Highway Plus in the above example). 3. Select the + next to your Data Highway Plus driver (AB_KT-1 above) to expand the tree. 4. Select the SLC 500 processor and click Download. 5. Go Online and put the SLC 500 processor in Run mode after the download is complete.

IMPORTANT

Publication 1747-UM655B-EN-P - June 2007

You must also place the 1747-SDN module in Run mode by setting the Run bit (bit 0) in the scanner’s command register. The command register is located at word 0 in the Output image table.

Page 87

Creating and Running the Example Application Program

87

6. Double-click the O0 - OUTPUT file under the Data Files folder. You see the 1747-SDN module’s command register (file O:2.0 below).

7. Set bit 0 in the command register to 1. 8. Press and release the START button on the RediSTATION operator interface. The red indicator light should turn on. On your screen, you should see rung 0 in your ladder program being energized when you press the button. 9. Pass your hand back and forth over the photoeye several times. On your screen you should see the counter incrementing. 10. Press and release the STOP button on the RediSTATION operator interface. The red indicator light should turn off. On your screen, you should see rung 1 in your ladder program being energized when you press the button. This completes the Data Highway Plus example.

What’s Next?

This concludes the application examples. The following chapter describes how the diagnostic indicators on the 1747-SDN module can be used for troubleshooting.

Publication 1747-UM655B-EN-P - June 2007

Page 88

88

Creating and Running the Example Application Program

Publication 1747-UM655B-EN-P - June 2007