This topic describes how to configure and use Allen-Bradley ControlLogix and CompactLogix PLCs to communicate with the RMC via EtherNet/IP I/O. If you are instead using the MSG block command, see the Using Allen-Bradley Controllers via Message Block topic.
The download section of Delta's website contains Studio 5000 programs that are already set up to communicate with an RMC via EtherNet/IP I/O. These programs can be used as a starting point for your application.
The setup steps for RMC to Allen-Bradley communication include:
Configure the PLC Connection Using an EDS File or Configuring the PLC Connection Using a Generic Ethernet Module
Determine Data Size and Number of I/O Connections
The first step is to determine the amount of data to be transferred and the number of I/O connections to set up between the PLC and the RMC:
If you have an RMC75E or RMC150E, you will use one (1) I/O connection that transfers data back and forth between the PLC. See the chart below for the maximum number of registers that can be transferred.
If you have an RMC200, and will be sending 124 registers or less to the RMC, and receiving 125 registers or less from the RMC, then you will use one (1) connection, otherwise, you will need to use multiple connections (maximum of 3), for as much data as you need, as shown in the chart below. See the chart below for the maximum number of registers that can be transferred with each connection. Keep in mind that the connections are independent of each other, and the data will not be transferred at the same time, even when the RPI may be set to the same value.
I/O Connections and Max Data Size (input is to PLC, output is from PLC)
Connection |
RMC75E |
RMC150E |
RMC200 |
Connection#1 |
125 input registers 124 output registers |
125 input registers 124 output registers |
125 input registers* |
Connection#2 |
n/a |
n/a |
125 input registers 124 output registers |
Connection#3 |
n/a |
n/a |
125 input registers 124 output registers |
*The RMC200 supports more registers on the first connection, but the Allen-Bradley controllers support only the listed amount.
Determine I/O Data Locations in the RMC
EtherNet/IP I/O transfers data back and forth between the RMC and PLC at the Requested Packet Interval (RPI). The user must specify which data items in the RMC should be sent and received. Typically, this is data in the Indirect Data Map.
For each connection to the RMC, set up the Indirect Data map so that one part contains all the data coming from the PLC (Incoming Data), and another part contains all the data going to the PLC (Outgoing Data). Make sure the Incoming and Outgoing Data areas in the Indirect Data Map do not overlap, and make sure the areas for a connection do not overlap that for another connection.
The Outgoing Data typically includes RMC status items that the PLC always needs to keep track of, such as actual positions and status bits.
The Incoming Data consists of items that the PLC needs to write to in the RMC. This is typically variables and possibly command registers.
Note:
The Incoming and Outgoing Data locations need not be in the Indirect Data
Map. However, the Indirect Data Map is usually the best choice. Other
options are the Variable Table and the command area.
Setting Up the RMC for EtherNet/IP I/O
Do the following in the RMC:
Set the RMC's IP Address
Set up the RMC's IP Address as for any Ethernet connection. See Setting Up the RMC Ethernet for details.
Set Up the Indirect Data Map
In the Project pane, double-click Address Maps, then click Indirect Data Map.
Beginning at item 0 in the Indirect Data Map, choose the items for the Outgoing Cyclic I/O Data.
At some location in the Indirect Data Map after the Outgoing Cyclic I/O Data area, choose the items for the Incoming Cyclic I/O Data, that is, the items that will be sent to the RMC from the PLC. If you are using another location for your Incoming Data, such as the Variable Table or Command Area, you need not set up the Indirect Data Map for the Incoming Data.
If you are using multiple connections to the RMC, repeat this for each connection.
Example
If you have a 4-axis
controller, you may wish to set up the Outgoing Data at the beginning
of the Indirect Data Map to include the Actual Position and the Status
Bits for each axis, in addition to information on Task 0, which perhaps
runs your user programs.
You may also wish to set the Incoming Data, starting at item 12 in the
Indirect Data Map, to go to 5 variables and some of the Axis 0 command
registers. You could then set up the Indirect Data Map like this:
Set the Cyclic I/O Data Locations in the RMC
In the Project pane, expand the Modules folder, double-click the CPU module, and choose EtherNet/IP.
Under Outgoing Data, enter the starting location for the outgoing cyclic I/O data. In our example, verify that the location is the Indirect Data Map Entry 0 Value.
Under Incoming Data, enter the starting address for the incoming cyclic I/O data. This should be a location in the Indirect Data Map, the Variable Table, or Command Area as discussed in the Determine I/O Data Locations in the RMC section above.
If you are using multiple connections to the RMC, repeat this for each connection, otherwise, ignore the other connection settings.
For example, the EtherNet/IP Settings Page below shows an RMC150 with the Outgoing Data coming from the Indirect Data map starting at item 0 and the Incoming Data going to the Indirect Data starting at item 12.
Choose Whether to Use a Sync Register
The Sync Register provides a method for the PLC to synchronize the Input Data and Output Data. If you will be writing to the Command Area directly or indirectly via the Indirect Data Map, Delta recommends using the Sync Register.
With a Sync Register, the Incoming Data is not written to the RMC until the Sync Register changes. If you prefer to have the Incoming Data be written whenever any value in the Incoming Data changes, choose the option to not use a Sync Register.
For multiple connections, each connection has an individual Sync Register. Keep in mind that the connections are independent of each other, and the data may not be transferred at exactly the same time, even if the Sync Registers are changed simultaneously.
For more details, see Using an EtherNet/IP I/O Connection.
Configuring the PLC Connection Using an EDS File
Configuring the connection using an EDS file is the preferred method, and supports multiple connections. For RSLogix version 19 and earlier, see Configuring the PLC Connection Using a Generic Ethernet Module below.
Install the EDS File
In Studio 5000, on the Tools menu, choose EDS Hardware Installation Tool.
In the wizard:
Choose Register an EDS file.
Browse to the EDS folder in the RMCTools installation location, which is typically C:\Program Files\RMCTools\EDS\.
Choose the highest version number of the .eds files for your RMC (e.g. rmc75e_v3.eds).
Complete the wizard.
If you do not have the most recent version of RMCTools, or have older firmware, see Using the Correct EDS_File for more information.
Configure the Connection
In Studio 5000, open your project.
In the Controller Organization window, in the I/O Configuration folder, if there is not already an Ethernet module, add your Ethernet module.
Right-click the Ethernet module under which you want to add the RMC, and choose New Module.
In the search box, type RMC. Select the RMC from the list, and click Create. For the RMC75E or RMC150E, you may see two options. If this occurs, select the one with Category "Generic Device (keyable)" for RMC firmware 3.62.0 or newer, and select the option Category "Generic Device (deprecated for newer devices)" for older firmware versions.
The New Module dialog opens. On the General tab, enter the Name and IP Address, then click Change, which opens the Module Definition dialog.
In the Module Definition dialog:
Under Connections, in the Name column, select Input/Output.
For the Input/Output connection, set the data type to REAL.
Set the Input to the number of registers to transfer from the RMC to the PLC. If you selected to use the Sync Register, the size should be one plus the number of registers of the RMC's Outgoing Cyclic I/O Data. If you are using multiple connections, this value applies to the first connection.
Set the Output to the number of registers to transfer from the PLC to the RMC. If you selected to use the Sync Register, the size should be one plus the number of registers of the RMC's Incoming Cyclic I/O Data. If you are using multiple connections, this value applies to the first connection.
If you are using multiple connections (RMC200 only), add up to two additional Input/Output connections in the next rows. If you only need input data (from the RMC to the PLC), choose an Input Only connection. For each connection, set the data type to REAL, and set the number of Input and Output registers.
The Revision and Electronic Keying values can generally be left set to their defaults. Notice that the Revision refers to the EtherNet/IP Identity Object revision, not the RMC firmware revision. See Using the Correct EDS_File for details on which Revisions apply to which firmware revisions.
Click OK.
In the New Module dialog, click the Connection tab and make the following settings for each connection:
RPI: Select the desired update rate. A commonly used RPI is 20.0 ms. Very low RPIs may flood the network, and reduce network reliability.
Connection over EtherNet/IP:
Set this to Unicast. This option is very important for reducing network bandwidth required.
Set the remaining items in the New Module dialog as required for your application, and click OK.
The above steps will allocate two tags per connection in the Controller Tags database in Studio 5000, corresponding to the Input and Output data that was set up in the Module Definition dialog section above. Each tag has a Data array that holds the actual data. The input tag also includes a boolean tag that indicates whether the I/O connection is faulted. The following table summarizes the tags created for each connection:
Tag Name |
Description |
|||||||||||||||||||||
[Name]:I.ConnectionFaulted |
This boolean indicates the status of the I/O connection.
|
|||||||||||||||||||||
[Name]:I.Data |
This is the Input Data, where the Outgoing Cyclic I/O Data from the Indirect Data in the RMC will appear. The data type of each array item is REAL. If you selected to use a Sync Register, the first item in this array is the SyncIn Register, followed by the Indirect Data[0], Indirect Data[1], and so on:
|
|||||||||||||||||||||
[Name]:O.Data |
This is the Output Data, which will be sent to the RMC's Incoming Cyclic I/O Data area. The data type of each array item is REAL. If you selected to use a Sync Register, the first item in this array is the SyncOut register, and the data that will be written to the RMC begins at [name]:O.Data[1].
|
Now the communications are set up. See the Performing Communications section below for details on how to use the communications.
Configuring the PLC Connection Using a Generic Ethernet Module
This method supports only a single connection and is required for RSLogix 5000 versions 19 and earlier. For later versions, or for multiple connections, use the procedure listed above using an EDS file.
Do the following in RSLogix 5000:
Start RSLogix 5000 and open the project to which you want to add an RMC I/O connection.
In the Controller Organization window, add a 1756-ENET/B, 1756-ENBT/A, or 1756-EN2T/A module under the I/O Configuration item. If the ControlLogix Ethernet module that you want to use already exists, then skip this step. Otherwise, refer to the Ethernet module's manual for details on adding the module.
In the Controller Organization window, right click on the 1756-ENET/B, 1756-ENBT/A, or 1756-EN2T/A under which you want to add the RMC. The following shortcut menu will be displayed:
In the shortcut menu that appears, click New Module. The following dialog box will be displayed:
Expand the Communications node, click the ETHERNET-MODULE type and click OK. The following dialog box will be displayed:
Fill in the fields in this dialog box as follows:
Name: Type a valid module name for the RMC.
Description: Type a description.
Comm Format: Select Data - REAL.
Address/Host Name: Choose IP Address and enter the IP Address or host name of the RMC. The RMC must have its IP address set up to match this address.
Input: Set the Assembly Instance to 1 and set the Size to the number of registers to transfer. If you selected to use the Sync Register, the Size should be one plus the number of registers of the RMC's Outgoing Cyclic I/O Data.
Output: Set the Assembly Instance to 2 and set the Size to the number of registers to transfer. If you selected to use the Sync Register, the Size should be one plus the number of registers of the RMC's Incoming Cyclic I/O Data.
Configuration: Set the Assembly Instance to 4 and set the size to 0.
Note:
The Input and Output Assembly
instances access the RMC75/150 I/O data, or Connection #1 I/O data on
the RMC200.
To access Connection #2 data on the RMC200, set the Input Assemble Instance
to 5, and the Output Assembly Instance to 6.
To access Connection #3 data on the RMC200, set the Input Assemble Instance
to 7, and the Output Assembly Instance to 8.
See Setting
up an EtherNet/IP I/O Connection for more details.
Click Next. The following dialog box will be displayed:
Enter the desired Requested Packet Interval (RPI). This is the desired update rate. A commonly used RPI is 20.0 ms. Very low RPIs may flood the network, and reduce network reliability.
Make sure to check Use Unicast Connection over EtherNet/IP. This option is very important for reducing network bandwidth required, but is available only in RSLogix version 18.00.00 and newer.
Clear the Inhibit Module check box and set the Major Fault On Controller if Connection Fails While in Run Mode check box as required by your application.
Click Finish.
The above steps will allocate three tags in the Controller Tags database in RSLogix 5000. These tags correspond to the Input, Output, and Configuration data set up for the module under the Connection Parameters section above. The type of each tag is a special module-defined type created by RSLogix. Each special type has a Data field that holds the actual data. The following table summarizes the tags created for each module:
Tag Name |
Type Of Data |
Description |
|||||||||||||||||||||
[Name]:I.Data |
REAL[size] |
This is the Input Data, where the Outgoing Cyclic I/O Data from the Indirect Data in the RMC will appear. If you selected to use a Sync Register, the first item in this array is the SyncIn Register, followed by the Indirect Data[0], Indirect Data[1], and so on:
|
|||||||||||||||||||||
[Name]:O.Data |
REAL[size] |
This is the Output Data which will be sent to the RMC's Incoming Cyclic I/O Data area. If you selected to use a Sync Register, the first item in this array is the SyncOut register, and the data that will be written to the RMC begins at [name]:O.Data[1].
|
|||||||||||||||||||||
[Name]:C |
SINT[400] |
This is not used. Notice that a full 400 bytes is allocated by the ControlLogix regardless of how many are actually configured to be sent to the RMC. |
Export RMCTools Tags to Logix Designer
This step is not required but may reduce the time spent creating tags in the PLC and improve the readability of the EtherNet/IP data in Logix Designer. See Using Logix Designer Export Components for more details.
The Logix Designer Export feature does the following:
Exports the RMCTools input and output tag names into a structure with a tag name for each register.
Includes example synchronization ladder logic.
Supports Sync register or no Sync register. See Performing Communications below for an explanation of the Sync register.
Supports multiple connections (RMC200 only).
The exported components can then be imported to Logix Designer.
To export tags to a Logix Designer Import/Export file:
Before starting, make sure to have the following information:
The name of the RMC as used in your Logix Designer project.
If using the RMC200, the number of I/O connections.
The number of PLC Input Data registers.
The number of PLC Output Data registers.
In the RMCTools Project pane, expand the Modules folder, double-click the CPU module, and choose the EtherNet/IP page.
In the Logix Designer Export section, click Export to Logix Designer.
Complete the Logix Designer Export wizard. It will prompt you to save an .L5K file.
To import the .L5K file to Logix Designer:
In Logix Designer, in a ladder logic routine, right-click a rung and choose Import Rungs.
Browse to the .L5K file and click Open.
The example ladder logic, tags, and user-defined types will be imported.
For a detailed explanation of the logic, see Using Logix Designer Export Components.
This section explains the EtherNet/IP cyclic communication at its basic level. For details on how to use the logic resulting from the Logix Designer Export feature, see Using Logix Designer Export Components.
Once the EtherNet/IP connection is configured and applied to the PLC, the communications will automatically start, assuming the PLC and RMC are both on a properly set up Ethernet network. Notice that the ControlLogix will communicate even when it is in Program mode.
Reading Data from the RMC
The data for each connection will automatically update each Requested packet interval, and you can use the data as you wish. You cannot write to the Input Data. The Input Data will contain the Indirect Data from the RMC. However, if you selected to use the Sync Register, the first item in the Input Data array will be the SyncIn value, followed by the Indirect Data from the RMC.
The SyncIn is used only for synchronizing commands with the logic, as explained below. The SyncIn and SyncOut registers are only visible in the PLC. They are not visible in RMCTools. If you are using multiple connections, keep in mind that the connections are independent of each other, and the data may not be transferred at exactly the same time, even if the Sync Registers are used and are changed simultaneously.
Writing to the RMC - General
For each connection without a Sync Register, the Output Data is written to the RMC when any value in the Output Data changes.
For each connection with a Sync Register, the Output Data for each connection is sent to the RMC at each Requested Packet Interval, but the RMC ignores it until the SyncOut register for that connection changes. The first item in the Output Data array is the SyncOut register, followed by the registers that will be sent to the Incoming Data location in the RMC. Use the following procedure to write to the RMC with a Sync Register:
Wait Until the Sync In and Sync Out Registers Match
If they do not match, then this means that another write is in progress.
Write to the Output Data
Write the desired data to the Output Data array.
Change the Sync Out Register
An easy way to do this is to add one to it. However, you must take care to handle overflowing this register (the Sync register is a REAL). One method is to add one and then MOD it with some large number, such as 10000. This will make the register count from 0 to 9,999, and then wrap back down to 0 without an error.
Wait Until the Sync In and Sync Out Registers Match
This indicates that the RMC has received the data and processed it.
If you are using multiple connections with sync registers, you must change the Sync Register independently for each connection. The connections are independent of each other, and the data may not be transferred at exactly the same time, even if the Sync Registers are changed simultaneously.
Sending Commands to the RMC
If you are writing to the Command Area, either directly or via the Indirect Data Map, Delta recommends using a Sync Register and following the procedure below to send commands to the RMC. The Output Data is sent to the RMC each RPI, but the RMC ignores it until the SyncOut register changes. The first item in the Output Data array is the SyncOut register, followed by the registers that will be sent to the Incoming Cyclic I/O Data location in the RMC.
Wait Until the Sync In and Sync Out Registers Match
If they do not match, then this means that another write is in progress.
Clear Old Commands from the Command Registers
Clear old commands from the command registers in the Output Data. Otherwise, when the Sync Out register is changed, the commands would be re-issued. One method of clearing the old commands is to fill the Output Data array with zeroes (except the SyncOut value).
Write to the Command Registers
Write the Command registers and all required command parameters to the Output Data for all commands you want to issue. You can issue up to one command per axis. Leave the Command register set to 0 for each axis that will not receive a command.
For example, if a portion of the Output Data is going to the Command Area for Axis 0, and you wish to issue a Move Absolute Command (20) to Axis 0 with a position of 6.7, a Speed of 3, and Accel and Decel of 50, you would write the following:
Value |
20 (for a move Absolute Command) |
6.7 (Position) |
3 (Speed) |
50 (Accel) |
50 (Decel) |
0 (Direction) |
Use the online help for each command to find out how many parameters a command has and what they mean. Make sure to write to all the parameters that the command uses. You do not need to write to command parameters that are not used by the command.
Change the Sync Out Register
The easiest way to do this is to add one to it. However, you must take care to handle overflowing this register (the Sync register is a REAL). One method is to add one and then MOD it with some large number, such as 10000. This will make the register count from 0 to 9,999, and then wrap back down to 0 without an error. Take care to ensure that you only update the Sync Out Register once so that the commands do not get re-issued.
Wait Until the Sync In and Sync Out Registers Match
This indicates that the RMC has received the command and issued it. It is important to wait until the SyncIn and SyncOut match before using the status bits in the Input Data (if the Input Data includes any status bits). See the Using an EtherNet/IP I/O Connection topic for how problems can occur if this step is ignored.
For multiple connections to one RMC, each connection has an individual Sync Register. The connections are independent of each other, and the data may not be transferred at exactly the same time, even if the Sync Registers are changed simultaneously. Therefore, it is best practice that if commands need to be sent simultaneously, that they are sent in the same Output Data block.
See Using an EtherNet/IP I/O Connection for further details.
Reading and Writing other registers
To read and write other registers in the RMC that are not included in the Incoming or Outgoing Cyclic I/O Data, you can use MSG blocks (see Using Allen-Bradley Controllers via Message Block). EtherNet/IP I/O and MSG blocks can be used simultaneously.
Another option for writing to other RMC registers is to create user programs that move data from the variable table to other RMC registers.
Reading DWORDs from the RMC
EtherNet/IP I/O will exchange data between the PLC and RMC as if they are all REAL values. However, some data items are of type DWORD or DINT, such as the Status Bits and Error Bits, which are of DWORD type. These values will not be displayed properly in the PLC's I/O Input and Output arrays.
To view DWORD or DINT values properly in the PLC, use the COP instruction to copy them from the Input array (:I) into a tag of DINT type. To write DINT values to the RMC, use the COP instruction to write the values to the Output array (:O).
Handling Broken Connections
See the Handling Broken EtherNet/IP I/O Connections topic for details.
See Also
EtherNet/IP Overview | Setting up an EtherNet/IP I/O Connection | Using an EtherNet/IP I/O Connection | Handling Broken EtherNet/IP I/O Connections | Troubleshooting EtherNet/IP I/O | Multiple EtherNet/IP I/O Connections | EtherNet/IP I/O Performance
Copyright © 2024 Delta Computer Systems, Inc. dba Delta Motion