Setting up communications from a MicroLogix to a PowerFlex 40 via Ethernet
 This document details how to control a PowerFlex 40 drive over Ethernet using a MicroLogix processor.
 
  1. Devices used

These were the materials used in the set up:

  • PowerFlex 0 (22B-D2P3N104 Series A Firmware 1.01)
  • PowerFlex 40 Ethernet/IP Adapter (22-COMM-E Series A Firmware 1.004)
  • DF1 to Ethernet/IP converter (1761-NET-ENI Series B)
  • 8pin mini din to 8 pin mini din cable (1761-CBL-AM00 Series C)
  • MicroLogix 1500 (1764-LRP Series C Firmware 11 with 1764-24BWA base)
  • Ethernet Cables / Switch
  • Laptop
  • 9pin Dshell to 8 pin mini din crossover cable (1761-CBL-PM02 Series C)
  • RSLogix 500 Pro Version 7.00.00
  1. Setting up the Network

image001

3. Setting up the PLC

Right click on the network Icon for your Local Area Network in the bottom right hand corner of the screen, and follow these steps to set your Computers IP address.
Click Properties
image002
Select “Internet Protocol (TCP/IP) and press properties.
image003
Type in the IP address for your computer.  This should be an unused address on your Ethernet networkimage0044. Setting up the PowerFlex 40Drive ParamatersUsing the HIM, you might want to set P036 [Start Source] = 5 “Comm Port” and P038 [Speed Reference] = 5 “Comm Port” to allow the MicroLogix to Start the drive, and control the speed.This however can be done from the MicroLogix.Drive IP Address VIA BOOTPStraight out of the box the 22-COMM-E should be set for bootp. 

Run BOOTP-DHCP Server from the “StartAll ProgramsRockwell SoftwareBOOTP-DHCP Server” directory.

If this is the first time using the software, you will have to set Network Settings.  The only thing required is the Subnet mask.

image005

If set up for BOOTP the 22-COMM-E will be broadcasting BOOTP requests.  These requests can be seen in the “Request History”.

Select on of the requests, and press the Add to Relation List button.

image006
A box will pop up allowing you to enter the IP address of the drive.  Again use an IP address not already in use
 
 
image007
 

You should then see the entry in the relation list as below.  If you want the Drive to retain this IP address permanently, then select the “Disable BOOTP/DHCP” button.  Otherwise the Drive will lose it’s IP address on Power Cycle.image008

5. Setting up the ENI

Connect the 1761-CBL-PM02 from your computer’s comm.Port to the ENI’s 8 pin mini DIN port.  Start up the ENI utility.

Configure your COM port number from the utilities tab.

image009

Go to the ENI IP Addr tab, and select Load from ENISet the IP address and subnet maskDisable BOOTPimage010

Go to the Message Routing tab and configure one of the nodes to be the IP address of the DriveSelect Save To ENI ROM to write this data to the ENIimage011

The ENI is now configured and can be plugged back into the MicroLogix

image012

6. Setting up MSG’s

Page C-17 to Page C-20 of the 22-COMM-E user manual contains all the N files we can reference in our MSG instructions from the MicroLogix.  Appendix D of the 22-COMM-E user manual details the Logic Command and Logic Status words. This example reads and writes some of the drive parameters and also the Control I/O messages. The S:1/15 bit will trigger the messages that you wish to send to initialize the drive.            S:1/15 is true for the first scan of the program. MG10:5 sets the timeout value for the 22-COMM-E. This register (N42:3) must be set to a non zero value in order to use the Logic command words.  If the adapter does not receive a message in the specified time, it performs the fault action configured in its [Comm Flt Action] parameter.            MG10:4 and MG10:6 set up parameters in the drive needed for MicroLogix Control of the drive. These values could however be set from the Drive’s HIM.image013
This is the setup to write to parameter 36 of the drive.N10:xxx is the register corresponding to parameter xxx in the drive.You can read or write these parameters.image014

The remaining messages read or write the Logic Command / Logic Status / Reference / Feedback for the drive.They are set to be triggered every time the INTERVAL_TIMER is done.  I have also set them so that multiple instances of the message can’t be triggered at once (using the message’s /EN bit).  This prevents the communications locking up due to message overflows.image015

Logic command message set up.

Note that we are messaging to node 2, as set up in the routing table of the ENI.

image016

Download examble PLC code here:
http://www.mediafire.com/view/4ed6r222ltlwxp3/Ml22come.rss