Configuring Allen-Brandly ControlLogix PLC with - Moxa · PDF filePC (RSLogix 5000) MGate...
Transcript of Configuring Allen-Brandly ControlLogix PLC with - Moxa · PDF filePC (RSLogix 5000) MGate...
Copyright © 2014 Moxa Inc. Released on December 26, 2014
About Moxa
Moxa is a leading manufacturer of industrial networking, computing, and automation solutions. With over 25 years of industry experience, Moxa has connected more than 30 million devices worldwide and has a distribution and service network that reaches customers in more than 70 countries. Moxa delivers lasting business value by empowering industry with reliable networks and sincere service for automation systems. Information about Moxa’s solutions is available at www.moxa.com. You may also contact Moxa by email at [email protected].
How to Contact Moxa
Tel: +886-2-8919-1230 Fax: +886-2-8919-1231
Configuring Allen-Brandly ControlLogix PLC with Moxa MGate 5105-MB-EIP
Moxa Technical Support Team [email protected]
Contents 1 Application Description ................................................................... 3
1.1 Objective ................................................................................................. 3
1.2 Goals ....................................................................................................... 3
2 System Topology ............................................................................. 3
3 Hardware and Software Requirements ........................................... 4
4 Configuration .................................................................................. 5 4.1 Hardware Installation ................................................................................. 5
4.2 PowerFlex 4M Settings ............................................................................... 6
4.3 IAQPoint2 Settings .................................................................................... 7
4.4 MGate 5105-MB-EIP Settings ...................................................................... 7
4.5 Allen-Bradley ControlLogix PLC Settings ....................................................... 9
4.6 RSLinx Settings ......................................................................................... 9
4.7 Installing the MGate 5105-MB-EIP EDS File .................................................13
5 Configuring RSLogix 5000 ............................................................. 17 5.1 Creating a New Project .............................................................................17
5.2 Adding a Controller ...................................................................................17
5.3 Adding an EIP Module ...............................................................................18
5.4 Adding MGate 5105-MB-EIP .......................................................................21
5.5 Creating an Ethernet Module ......................................................................21
5.6 Creating an MGate Module .........................................................................23
Moxa Tech Note Configuring Allen-Brandly ControlLogix PLC with Moxa MGate 5105-MB-EIP
Copyright © 2014 Moxa Inc. Page 2 of 36
5.7 Tags Description .......................................................................................25
6 RSLogix Ladder Programming ....................................................... 26 6.1 Adding a Subroutine .................................................................................26
6.2 Editing a Subroutine .................................................................................27
6.3 Editing MainRoutine ..................................................................................27
7 Downloading a Project to PLC ....................................................... 30
8 Communication Test ..................................................................... 33 8.1 Monitor Tags ............................................................................................33
8.2 Changing Tag Values .................................................................................34
9 Appendix ....................................................................................... 34 9.1 PowerFlex 4M Modbus Registers .................................................................34
9.2 IAQPoint2 Modbus Registers ......................................................................36
Moxa Tech Note Configuring Allen-Brandly ControlLogix PLC with Moxa MGate 5105-MB-EIP
Copyright © 2014 Moxa Inc. Page 3 of 36
1 Application Description
1.1 Objective This document describes an application using Allen-Bradley ControlLogix PLC with MGate
5105-MB-EIP.
In this application, Allen-Bradley ControlLogix PLC is used to get input data that MGate
5105-MB-EIP polls from the temperature meter through Modbus Register. Allen-Bradley
ControlLogix PLC evaluates the temperature value and outputs data to MGate 5105-MB-EIP,
which then uses the data to control speed.
1.2 Goals In this document, you will learn the following:
1. Configure Allen-Bradley ControlLogix PLC.
2. Configure MGate 5105-MB-EIP to communicate with a Modbus RTU device.
3. Set up MGate 5105-MB-EIP in RSLogix 5000.
4. Create a basic RSLogix Ladder Programming.
5. Industrial field applications and the job of each role.
2 System Topology
The following figure shows a system architecture in which the Modbus end devices,
PowerFlex 4M and IAQPoint2, are connected to the serial port on MGate 5105-MB-EIP
through RS-485-2W wiring. MGate 5105-MB-EIP and PC (running RSLogix 5000) are
connected to Ethernet switch ports on Allen-Bradley ControlLogix PLC. A fan is connected to
PowerFlex 4M, which powers the fan.
Moxa Tech Note Configuring Allen-Brandly ControlLogix PLC with Moxa MGate 5105-MB-EIP
Copyright © 2014 Moxa Inc. Page 4 of 36
3 Hardware and Software Requirements
Allen-Bradley ControlLogix PLC − Processor: 1756 L71 ControlLogix5571
− Chassis: 1756-A7
− EIP Module: 1756-EN2TR
MGate 5105-MB-EIP − Firmware Version: V1.1_Build_13111222
− EDS File: MOXA_MGate_EtherNetIP_Adapter.eds
PowerFlex 4M PowerFlex 4M is an adjustable frequency AC drive to power the fan in this application.
IAQPoint2 IAQPoint2 is an indoor air quality monitor. It can detect CO2, temperature, and humidity
levels.
PC (RSLogix 5000)
MGate 5105-MB-EIP
Allen-Brandly
ControlLogix PLC
Power Flex 4M IAQPoint2
Information Level
Control Level
Device Level
Fan
Ethernet
Ethernet
RS-485-2W
Moxa Tech Note Configuring Allen-Brandly ControlLogix PLC with Moxa MGate 5105-MB-EIP
Copyright © 2014 Moxa Inc. Page 5 of 36
RS Logix 5000 Allen-Bradley ControlLogix PLC Edit Utility released by Rockwell Automation.
− Rev. : V20
− Operating System Support
RSLogix 5000 V20 has been tested on the following operating systems:
− Microsoft Windows 7 Professional (64-bit) with Service Pack 1
− Microsoft Windows 7 Home Premium (64-bit) with Service Pack 1
− Microsoft Windows 7 Home Premium (32-bit) with Service Pack 1
− Microsoft Windows Vista Business (32-bit) with Service Pack 2
− Microsoft Windows XP Professional with Service Pack 3
− Microsoft Windows Server 2008 R2 Standard Edition with Service Pack 1
− Microsoft Windows Server 2008 Standard Edition with Service Pack 2
− Microsoft Windows Server 2003 R2 Standard Edition with Service Pack 2
RSLinx Communication Utility released by Rockwell Automation.
− Rev. :2.59
4 Configuration
4.1 Hardware Installation PowerFlex 4M and IAQPoint2 Connection
− Use RS-485-2W
− Pin assignment
4 5
3
4
5 6
Modbus Port
Moxa Tech Note Configuring Allen-Brandly ControlLogix PLC with Moxa MGate 5105-MB-EIP
Copyright © 2014 Moxa Inc. Page 6 of 36
PLC Connection
4.2 PowerFlex 4M Settings Serial Port Settings
− Baudrate: 38400
− Set on panel: Command C302 (Comm Data Rate), option 5
Options 0“1200”
1“2400”
2“4800”
3“9600” (Default)
4“19.2K”
5“38.4K”
− Data bit, Parity, Stop bit :8-E-1
− Set on panel: Command C306 (Comm Format), option 1
Options 0“RTU 8-N-1” (Default)
1“RTU 8-E-1”
2“RTU 8-O-1”
3“RTU 8-N-2”
4“RTU 8-E-2”
5“RTU 8-O-2”
Moxa Tech Note Configuring Allen-Brandly ControlLogix PLC with Moxa MGate 5105-MB-EIP
Copyright © 2014 Moxa Inc. Page 7 of 36
Programmable Settings − Start Source: Modbus port
− Set on panel: Command P106 (Start Source), option 5
Options 0“Keypad” (Default)
1“3-Wire”
2“2-Wire”
3“2-W Lvl Sens”
4“2-W Hi Speed”
5“Comm Port”
Speed Reference: Modbus port − Set on panel: Command P108 (Speed Reference), Option 5
Options 0“Drive Pot” (Default)
1“InternalFreq”
2“0-10V Input”
3“4-20mA Input”
4“Preset Freq”
5“Comm Port”
− Modbus Slave ID Setting: 100 (default)
4.3 IAQPoint2 Settings Serial Port Settings Use the touch panel (the default access password is 2967) to configure the following
settings for the serial port:
− Baudrate: 38400
− Parity: Even(Default)
− Address (Slave ID): 1(Default)
4.4 MGate 5105-MB-EIP Settings Configure MGate 5105-MB-EIP as shown in the following figures.
Serial Port Settings
Moxa Tech Note Configuring Allen-Brandly ControlLogix PLC with Moxa MGate 5105-MB-EIP
Copyright © 2014 Moxa Inc. Page 8 of 36
Protocol Conversion Setting
EtherNet/IP Setting
Modbus RTU/ASCII Settings
Master Settings
Modbus Commands
Note: For more information on Modbus registers for PowerFlex and IAQPoint 2, refer to
the appendix
Moxa Tech Note Configuring Allen-Brandly ControlLogix PLC with Moxa MGate 5105-MB-EIP
Copyright © 2014 Moxa Inc. Page 9 of 36
4.5 Allen-Bradley ControlLogix PLC Settings 1. Install 1756-L71 Processor in 1756-A7 Chassis slot 0.
2. Install 1756-EN2TR EIP Module in 1756-A7 Chassis slot 1.
3. Use the key to set the Switch Controller to REM.
4.6 RSLinx Settings 1. Configuring Drivers
a. In the RSLinx Classic Gateway screen, click Communications > Configure
Drivers.
b. In the Configure Drivers screen, select EtherNet/IP Driver from the Available
Driver Types drop-down list and click Add New. Then, enter a driver name and
click OK.
Moxa Tech Note Configuring Allen-Brandly ControlLogix PLC with Moxa MGate 5105-MB-EIP
Copyright © 2014 Moxa Inc. Page 10 of 36
c. In the screen that appears, select the network interface and click OK.
d. The screen shows that driver status is Running. Click Close.
Moxa Tech Note Configuring Allen-Brandly ControlLogix PLC with Moxa MGate 5105-MB-EIP
Copyright © 2014 Moxa Inc. Page 11 of 36
2. Searching for an EIP Device
a. Click Communications > RSWho to start searching for EIP devices on the
network.
The system displays the search result under the AB_ETHIP-1 node.
Moxa Tech Note Configuring Allen-Brandly ControlLogix PLC with Moxa MGate 5105-MB-EIP
Copyright © 2014 Moxa Inc. Page 12 of 36
b. Right-click 1756-EN2TR and select Device Properties.
A screen appears to indicate that the device Revision is 4.004.
Moxa Tech Note Configuring Allen-Brandly ControlLogix PLC with Moxa MGate 5105-MB-EIP
Copyright © 2014 Moxa Inc. Page 13 of 36
4.7 Installing the MGate 5105-MB-EIP EDS File 1. Run the EDS Hardware Install setup wizard and click Add.
Moxa Tech Note Configuring Allen-Brandly ControlLogix PLC with Moxa MGate 5105-MB-EIP
Copyright © 2014 Moxa Inc. Page 14 of 36
2. Select Register a single file and specify the directory for the MGate 5105-MB-EIP
Adapter EDS file; then, click Next.
3. If the EDS file verification is successful, click Next.
Moxa Tech Note Configuring Allen-Brandly ControlLogix PLC with Moxa MGate 5105-MB-EIP
Copyright © 2014 Moxa Inc. Page 15 of 36
4. Accept the default device icon for MGate 5105-MB-EIP or click Change icon to select
a new one. Click Next to continue.
Moxa Tech Note Configuring Allen-Brandly ControlLogix PLC with Moxa MGate 5105-MB-EIP
Copyright © 2014 Moxa Inc. Page 16 of 36
5. Click Next.
6. After the installation process is complete, click Finish.
Moxa Tech Note Configuring Allen-Brandly ControlLogix PLC with Moxa MGate 5105-MB-EIP
Copyright © 2014 Moxa Inc. Page 17 of 36
5 Configuring RSLogix 5000
5.1 Creating a New Project Start RSLogix 5000 and create a new project. Click File > New.
5.2 Adding a Controller In the New Controller screen, make sure that you specify the appropriate controller type,
controller firmware version, chassis type and slot.
In this example, the 1756-L71 ControlLogix5571 Controller is selected with Revision 20,
Moxa Tech Note Configuring Allen-Brandly ControlLogix PLC with Moxa MGate 5105-MB-EIP
Copyright © 2014 Moxa Inc. Page 18 of 36
Chassis Type 1756-A7 7-Slot ControlLogix Chassis, and Slot 0. In addition, specify a
project name (for example, Demo).
5.3 Adding an EIP Module 1. In the Controller Organizer tree menu, right-click 1756Backplane under I/O
configuration and select New Module.
Moxa Tech Note Configuring Allen-Brandly ControlLogix PLC with Moxa MGate 5105-MB-EIP
Copyright © 2014 Moxa Inc. Page 19 of 36
2. In the Select Module Type screen, select 1756-EN2TR and click Create.
Moxa Tech Note Configuring Allen-Brandly ControlLogix PLC with Moxa MGate 5105-MB-EIP
Copyright © 2014 Moxa Inc. Page 20 of 36
3. In the New Module screen, enter a name and the IP address; then, click Change in
the Module Definition area.
4. In the Module Definition screen, select 4 in the Revision fields as shown in the
following figure. Click OK.
Moxa Tech Note Configuring Allen-Brandly ControlLogix PLC with Moxa MGate 5105-MB-EIP
Copyright © 2014 Moxa Inc. Page 21 of 36
5.4 Adding MGate 5105-MB-EIP You can add MGate 5105-MB-EIP by creating a new Ethernet Module or an MGate module.
Note: For an MGate module, connection parameter configuration (assembly
instance path) is not required.
5.5 Creating an Ethernet Module 1. In the Controller Organizer tree menu, right-click Ethernet and select New Module.
Moxa Tech Note Configuring Allen-Brandly ControlLogix PLC with Moxa MGate 5105-MB-EIP
Copyright © 2014 Moxa Inc. Page 22 of 36
2. Select Ethernet module and click Create.
Moxa Tech Note Configuring Allen-Brandly ControlLogix PLC with Moxa MGate 5105-MB-EIP
Copyright © 2014 Moxa Inc. Page 23 of 36
3. In the New Module screen, configure the fields as follows:
− Name: Enter MGate5105.
− Comm Format: Select Data – INT from the drop-down list.
− IP Address: Select this option and enter the IP address.
− Connection Parameters: Set the Size (Input 8 and Output 2) and the Assembly Instance
(Input 110 and Output 100) that is determined by MGate 5105-MB-EIP.
5.6 Creating an MGate Module 1. In the Select Module Type screen, select MGate and click Create.
Moxa Tech Note Configuring Allen-Brandly ControlLogix PLC with Moxa MGate 5105-MB-EIP
Copyright © 2014 Moxa Inc. Page 24 of 36
2. Configure the module name and IP address; then click Change.
Moxa Tech Note Configuring Allen-Brandly ControlLogix PLC with Moxa MGate 5105-MB-EIP
Copyright © 2014 Moxa Inc. Page 25 of 36
3. In the Module Definition screen, Select INT (unit: 16bits) from the drop-down list and
set the input size as 8 and output size as 2.
5.7 Tags Description In the Controller Organizer tree menu, select Controller Tags under Controller Demo to
view all the tags you have created. Verifying that all the required tags are created and
configure the Description fields associated with the input and output data tags.
Moxa Tech Note Configuring Allen-Brandly ControlLogix PLC with Moxa MGate 5105-MB-EIP
Copyright © 2014 Moxa Inc. Page 26 of 36
6 RSLogix Ladder Programming
6.1 Adding a Subroutine 1. In the Controller Organizer tree menu, click Tasks > MainTask. Then, right-click
MainProgram and select New Routine.
2. In the New Routine screen, enter “Init” in the Name field and click OK.
Moxa Tech Note Configuring Allen-Brandly ControlLogix PLC with Moxa MGate 5105-MB-EIP
Copyright © 2014 Moxa Inc. Page 27 of 36
6.2 Editing a Subroutine 1. Click the Init subroutine under Tasks > MainTask.
2. Drag a NEQ instruction to Rung 0; then, set input Source A as
MGate5105:I.Data[3] and input Source B as 2.
3. Drag a MOV instruction to the end of Rung 0; then set Source as 2 and input Dest
as MGate5105:O.Data[0].
The settings for Rung 0 checks the value of the PowerFlex logic command register. If the
register value is not equal to 2, the PLC outputs this register as 2 and sets PowerFlex to
Start Mode.
6.3 Editing MainRoutine 1. Click the MainRoutine task under Tasks > MainTask.
2. Drag a Examine On instruction to Rung 0. The S:FS input indicates that this routine
is run once.
3. Drag a Jump To Subroutine instruction to the end of Rung 0 and set Routine Name
as “Init”.
To remove the Input Par, Input Par, and Return Par parameters that are not required,
right-click on the parameters and select Remove Instruction Parameter.
Moxa Tech Note Configuring Allen-Brandly ControlLogix PLC with Moxa MGate 5105-MB-EIP
Copyright © 2014 Moxa Inc. Page 28 of 36
4. Add Rung 1 and drag a GEQ instruction to Rung 1; then, set Source A as
MGate5105:I.Data[6] and input Source B as “250”.
5. Drag a MOV instruction to the end of Rung 1; then, set Source as “600” and Dest
input as MGate5105:O.Data[1].
The settings for Rung 1 checks the value of the IAQPoint2 Temperature register. If the
register value is not 250, the PLC outputs the PowerFlex speed register as 600. This
means that if the temperature is greater than 25.0 C, PowerFlex speed is changed to 60
Hz.
6. Add Rung 2 and drag a GEQ instruction to Rung 2; then, set Source A as
MGate5105:I.Data[6] and input Source B as “245”.
7. Drag a LES instruction to Rung 2 and set input Source A as MGate5105:I.Data[6]
and input Source B as “250”.
8. Drag a MOV instruction to the end of Rung 1 and set Source as “600” and input Dest
as MGate5105:O.Data[1].
Moxa Tech Note Configuring Allen-Brandly ControlLogix PLC with Moxa MGate 5105-MB-EIP
Copyright © 2014 Moxa Inc. Page 29 of 36
The settings for Rung 2 checks the value of the IAQPoint2 temperature register. If the
range of the register value is between 245 and 250, the PLC would output PowerFlex Speed
register as 500. This means that if the temperature range is between 24.5 C and 25.0 C,
PowerFlex speed is changed to 50 Hz.
9. Add Rung 3~7 as shown in the following figure.
The following table shows the logic of Rung 1~7.
Rung Temperature (C ) Drive Speed (MHz. )
>= <
1 250 - 60
2 245 250 50
3 240 245 40
4 235 240 30
5 230 235 20
Moxa Tech Note Configuring Allen-Brandly ControlLogix PLC with Moxa MGate 5105-MB-EIP
Copyright © 2014 Moxa Inc. Page 30 of 36
Rung Temperature (C ) Drive Speed (MHz. )
6 225 230 10
7 - 225 0
7 Downloading a Project to PLC
1. Select File > Save to save this project.
2. Select Communications >Who Active to search for the target PLC.
Moxa Tech Note Configuring Allen-Brandly ControlLogix PLC with Moxa MGate 5105-MB-EIP
Copyright © 2014 Moxa Inc. Page 31 of 36
3. In the Who Active screen, expand the EtherNet/IP network node and select
Backplane > 00, 1756-L71 LOGIX5571; then, click Download to download the
project to the PLC.
When a message appears to warn you to that you are downloading an offline project to the
PLC, click Download to continue.
Moxa Tech Note Configuring Allen-Brandly ControlLogix PLC with Moxa MGate 5105-MB-EIP
Copyright © 2014 Moxa Inc. Page 32 of 36
The RSLogix 5000 main screen displays green indicators as shown in the following figure.
Moxa Tech Note Configuring Allen-Brandly ControlLogix PLC with Moxa MGate 5105-MB-EIP
Copyright © 2014 Moxa Inc. Page 33 of 36
8 Communication Test
8.1 Monitor Tags Select Controller Tags to view all the tags that you have created. You can monitor the
IAQPoint2 and PowerFlex register values using Input Tags.
For example, if you use a hairdryer to warm up IAQPoint2, this will increase the values of
MGate5105:I.Data[6] and MGate5105:I.Data[4] tags.
Moxa Tech Note Configuring Allen-Brandly ControlLogix PLC with Moxa MGate 5105-MB-EIP
Copyright © 2014 Moxa Inc. Page 34 of 36
8.2 Changing Tag Values You can change the value of Output Tags. For example, if you set the value of
MGate5105:O.Data[0] to 1, PowerFlex changes to Stop Mode.
9 Appendix
9.1 PowerFlex 4M Modbus Registers Logic Command Register
− Address: 8192
− Access: R/W
− Value:
Bit(s) Description
0 1 = Stop, 0 = Not Stop
1 1 = Start, 0 = Not Start
Reference Register: Setting Speed − Address: 8193
− Access: R/W
− Value: A decimal value entered as xxx.x where the decimal point is fixed. For example,
a decimal of 100 equals to 10.0 Hz and 543 equals to 54.3 Hz.
Logic Status Register − Address: 8448
− Access: R
− Value:
Bit(s) Description
0 1 = Ready, 0 = Not Ready
1 1 = Active (Running), 0 = Not Active
2 1 = Cmd Forward, 0 = Cmd Reverse
3 1 = Rotating Forward, 0 = Rotating Reverse
4 1 = Accelerating, 0 = Not Accelerating
5 1 = Decelerating, 0 = Not Decelerating
Moxa Tech Note Configuring Allen-Brandly ControlLogix PLC with Moxa MGate 5105-MB-EIP
Copyright © 2014 Moxa Inc. Page 35 of 36
Bit(s) Description
6 1 = Alarm, 0 = No Alarm
7 1 = Faulted, 0 = Not Faulted
8 1 = At Reference, 0 = Not At Reference
9 1 = Reference Controlled by Comm
10 1 = Operation Cmd Controlled by Comm
11 1 = Parameters have been locked
12 Digital Input 1 Status
13 Digital Input 2 Status
14, 15 Not Used
Feedback Register: Running Speed − Address: 8451
− Access: R
− Value: A xxx.x decimal value where the decimal point is fixed. For example, a decimal
of 123 equals to 12.3 Hz and 300 equals to 30.0 Hz.
Drive Error Codes Register − Address: 8449
− Access: R
− Value:
Value (Decimal) Description
0 No Fault
2 Auxiliary Input
3 Power Loss
4 Under Voltage
5 Overvoltage
6 Motor Stalled
7 Motor Overload
8 Heat sink Over temperature
12 HW Overcurrent (300%)
13 Ground Fault
Moxa Tech Note Configuring Allen-Brandly ControlLogix PLC with Moxa MGate 5105-MB-EIP
Copyright © 2014 Moxa Inc. Page 36 of 36
Value (Decimal) Description
29 Analog Input Loss
33 Auto Restart Tries
38 Phase U to Ground Short
39 Phase V to Ground Short
40 Phase W to Ground Short
41 Phase UV Short
42 Phase UW Short
43 Phase VW Short
63 Software Overcurrent
64 Drive Overload
70 Power Unit Fail
80 AutoTune Fail
81 Communication Loss
100 Parameter Checksum Error
122 I/O Board Fail
9.2 IAQPoint2 Modbus Registers Gas display Register: CO2
− Address: 101
− Access: R
− Value: This reports gas concentration. If the CO2 sensor is fitted, this will report in ppm
from 0 to 5000.
Temperature C Register − Address: 102
− Access: R
− Value: This reports temperature in tenths of a degree Celsius.
Humidity Register − Address: 103
− Access: R
− Value: This reports the relative humidity in percentages from 0 to 100.