RMCTools Online Help

Using Allen-Bradley Controllers via EtherNet/IP I/O

Using Allen-Bradley Controllers via EtherNet/IP I/O

Several Allen-Bradley controllers support EtherNet/IP I/O communication. This topic describes how to configure and use the Allen-Bradley ControlLogix and CompactLogix PLCs to communicate with the RMC via EtherNet/IP I/O. If you are looking for details on using the MSG block command, see the Using Allen-Bradley Controllers via Message Block topic.

The download section of Delta's website contains RSLogix 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.

Determine I/O Data Locations in the RMC

EtherNet/IP I/O sends 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. This is the first decision that must be made when configuring the EtherNet/IP I/O connection.

Outgoing Cyclic I/O Data

For most applications, the data sent from the RMC to the PLC should come from the Indirect Data Map. The user must set up the Indirect Data Map to specify the data items that should be sent from the RMC to the PLC.

Incoming Cyclic I/O Data

For most applications, there are three possible locations in the RMC that work well as the destination for data sent from the PLC. Only one location can be selected.

  • Indirect Data Map
    Using the Indirect Data Map as the destination allows the PLC to write to any item in the RMC that the Indirect Data maps to. This can include registers in the Variable Table and the Command Area. The disadvantages are that the size of the Indirect Data Map is less than the maximum EtherNet/IP I/O data size on the RMC75E, which may affect large projects, and that additional setup is required.
    If this option is chosen, the user should set up the Indirect Data map so that one part contains all the data coming from the PLC, and another part contains all the data going to the PLC. Make sure the Incoming and Outgoing Data areas in the Indirect Data Map do not overlap.

  • Variable Table
    Using the Variable Table as the destination allows the PLC to write to the RMC's variables. Variables can be used for data in user programs, and can be used to start user programs. This method requires making user programs for any action to be performed in the RMC.

This method is generally an efficient method for communications. Starting a user program can be done by writing to a single variable, and if variables must be updated before running the user program, it can be done in the same write that starts the user program. See Using an EtherNet/IP I/O Connection for details.

  • Command Area
    Using the Command Area as the destination allows the PLC to directly issue any command to the RMC. The disadvantage is that the PLC cannot write to other locations via the EtherNet/IP I/O.

Setting Up the RMC for EtherNet/IP I/O

Do the following in the RMC:

  1. 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.

  2. Set Up the 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.

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:

 

  1. 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.

    In the Outgoing Cyclic I/O Data section, 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.

In the Incoming Cyclic I/O Data section, enter the starting address for the Incoming Cyclic I/O Data. Click the Browse button and browse to the desired RMC location for the outgoing 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.

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.

 

 

  1. 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 change. 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 more details, see Using an EtherNet/IP I/O Connection.

Configuring the ControlLogix Connection

Note:
If you are using RMC firmware 3.41.0 or newer, and a Rockwell Automation Ethernet module with older firmware, there may be communication problems. See Troubleshooting EtherNet/IP I/O for a description of the problem and solutions.

Do the following in the Allen-Bradley's RSLogix 5000 software:

  1. Start RSLogix 5000 and open the project to which you want to add an RMC I/O connection.

  2. 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.

  3. 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:


     

  4. In the shortcut menu that appears, click New Module.  The following dialog box will be displayed:


     

  5. Expand the Communications node, click the ETHERNET-MODULE type and click OK. The following dialog box will be displayed:


     

  6. 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.

 

  1. Click Next.  The following dialog box will be displayed:


     

  2. Enter a Requested Packet Interval (RPI) between 2.0 and 3200.0 ms in steps of 1.0 ms. The RMC ignores fractions of a millisecond and cannot support an RPI below 2.0 ms. A commonly used RPI is 20.0 ms. Very low RPIs may flood the network.

  3. 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.

  4. 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.

  5. 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

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:

 

Tag

With Sync Register

Without Sync Register

[name]:I.Data[0]

SyncIn Register

Indirect Data [0]

[name]:I.Data[1]

Indirect Data [0]

Indirect Data [1]

[name]:I.Data[2]

Indirect Data [1]

Indirect Data [2]

[name]:I.Data[3]

Indirect Data [2]

Indirect Data [3]

[name]:I.Data[4]

Indirect Data [3]

Indirect Data [4]

etc.

etc.

etc.

 

[Name]:O

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].

 

Tag

With Sync Register

Without Sync Register

[name]:O.Data[0]

SyncOut Register

Incoming Data Item[0]

[name]:O.Data[1]

Incoming Data Item[0]

Incoming Data Item[1]

[name]:O.Data[2]

Incoming Data Item[1]

Incoming Data Item[2]

[name]:O.Data[3]

Incoming Data Item[2]

Incoming Data Item[3]

[name]:O.Data[4]

Incoming Data Item[3]

Incoming Data Item[4]

etc.

etc.

etc.

 

[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.

Performing Communications

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

This data 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.

Writing to the RMC - General

If you selected to not use a Sync Register, the Output Data is written to the RMC when any value in the Output Data changes.

If you selected to use a Sync Register, the Output Data is sent to the RMC at each Requested Packet Interval, 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 Data location in the RMC. Use the following procedure to write to the RMC with a Sync Register:

  1. Wait Until the Sync In and Sync Out Registers Match
    If they do not match, then this means that another write is in progress.

  2. Write to the Output Data
    Write the desired to the Output Data array.

  3. 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.

  4. Wait Until the Sync In and Sync Out Registers Match
    This indicates that the RMC has received the data and processed it.

See Using an EtherNet/IP I/O Connection for further details.

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.

  1. Wait Until the Sync In and Sync Out Registers Match
    If they do not match, then this means that another write is in progress.

  2. 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).

  3. 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.

  1. 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.

  2. 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.

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 DWORD type. To write DWORD or DINT values to the RMC, use the COP instruction to write the values to the Output array (:O).

 

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 (c) 2005-2013 by Delta Computer Systems, Inc.

\n\n\n\n\n\n