beautypg.com

Main routine, Powerflex 525 ethernet/ip multi-drive demo – Rockwell Automation 25-COMM-E2P PowerFlex 25-COMM-E2P Dual-Port EtherNet/IP Adapter User Manual

Page 104

background image

104

Rockwell Automation Publication 520COM-UM003A-EN-E - June 2013

Chapter 7

Using Multi-Drive Mode

Main Routine

The Main Routine reads the network Input Image from the scanner, calls the
various drive control subroutines, and writes the network Output Image to the
scanner. See

Main Routine on page 104

.

Main Routine

0

1

2

3

4

5

6

(End)

Copy File
Source
Dest
Length

PowerFlex_52X_Drive_Multi_Generic:I.Data [0]

Drive_Input_Image[0]

12

Jump To Subroutine
Routine Name Drive0

JSR

COP

Copy File
Source
Dest
Length

Drive_Output_Image[0]

PowerFlex_52X_Drive_Multi_Generic:O.Data[0]

10

COP

Jump To Subroutine
Routine Name Drive1

JSR

Jump To Subroutine
Routine Name Drive2

JSR

Jump To Subroutine
Routine Name Drive3

JSR

Jump To Subroutine
Routine Name Drive4

JSR

Drive 0 control subroutine.

Drive 1 control subroutine.

Drive 2 control subroutine.

Drive 3 control subroutine.

Drive 4 control subroutine.

CompactLogix EtherNet/IP Multi-Drive example program with a PowerFlex 525 on EtherNet/IP.
Four PowerFlex 4M drives are daisy-chained to the main PowerFlex 525 using their RJ45 ports (RS-485). In this mode,
up to five PowerFlex drives can exist on one EtherNet/IP node.

This rung retrieves the Logic Status and Feedback data for all five drives from the scanner (DINTs), and moves it to
specific INT tags for use elsewhere in the ladder program. The input image is as follows:

Drive_Input_Image[2] and Drive_Input_Image[3] = Drive 0 Logic Status and Feedback
Drive_Input_Image[4] and Drive_Input_Image[5] = Drive 1 Logic Status and Feedback
Drive_Input_Image[6] and Drive_Input_Image[7] = Drive 2 Logic Status and Feedback
Drive_Input_Image[8] and Drive_Input_Image[9] = Drive 3 Logic Status and Feedback
Drive_Input_Image[10] and Drive_Input_Image[11] = Drive 4 Logic Status and Feedback

This rung writes the output image to the scanner. The output image is as follows:

Drive_Output_Image[0] and Drive_Output_Image[1] = Drive 0 Logic Command and Reference
Drive_Output_Image[2] and Drive_Output_Image[3] = Drive 0 Logic Command and Reference
Drive_Output_Image[4] and Drive_Output_Image[5] = Drive 0 Logic Command and Reference
Drive_Output_Image[6] and Drive_Output_Image[7] = Drive 0 Logic Command and Reference
Drive_Output_Image[8] and Drive_Output_Image[9] = Drive 0 Logic Command and Reference

PowerFlex 525 EtherNet/IP Multi-Drive Demo