CalWest ManufacturingRobotics Fontana, CA

Call or text (818) 397-4809

FANUC EtherNet/IP to an Allen-Bradley PLC: adapter setup and mapping

How a CompactLogix or ControlLogix talks to a FANUC R-30iB robot over EtherNet/IP: the robot's adapter settings, the module in Studio 5000, how the bits land on DI, DO, UI and UO, and what the common faults mean.

In most cells that pair a FANUC robot with an Allen-Bradley PLC, the I/O runs over FANUC EtherNet/IP: one Ethernet cable carries the start and stop signals, the part number, the handshake and the robot’s status, instead of a bundle of wires to a process I/O board. Setting it up means matching three things on two machines: the robot’s adapter settings, the module in Studio 5000, and the robot’s I/O map on rack 89. This guide covers each for an R-30iB or R-30iB Plus controller and a CompactLogix or ControlLogix PLC, plus the faults that show up when they don’t match. We program both ends of this link on our own cells, and the details below are from FANUC’s and Rockwell’s documentation.

In short

Set the FANUC robot up as an EtherNet/IP adapter and the Allen-Bradley PLC as the scanner. On the robot, enable an adapter connection with input and output sizes in 16-bit words and power-cycle. In Studio 5000, add the robot with FANUC’s add-on profile or a Generic Ethernet Module with the same sizes. Then map DI, DO, UI and UO to rack 89 on the robot and cycle power again.

Adapter or scanner: which role the robot plays

EtherNet/IP is the industrial Ethernet protocol maintained by ODVA. A scanner opens connections and an adapter answers them. FANUC sells both roles as options. The Adapter option makes the controller a standard EtherNet/IP device that a PLC or HMI can exchange digital, group, UOP and analog I/O with. The Scanner option lets the robot open connections of its own to devices such as remote I/O, vision systems or tooling.

With a PLC running the cell, the robot is the adapter and the PLC is the scanner. A robot talking to a second robot uses one of each: FANUC’s Tech Transfer shows the connection type changed from Adapter to Scanner on one controller, with the other robot’s IP address, vendor ID, device type and instances entered there.

Before you start

Check these first

  1. The robot has the EtherNet/IP Adapter option loaded
  2. An IP plan: robot, PLC and HMI on the same subnet, with no duplicates
  3. Which robot port to use. FANUC's Tech Transfer prefers port 2 for the adapter
  4. A managed switch. FANUC's tips also suggest Class C addressing
  5. FANUC's add-on profile for your Studio 5000 version, or the instance numbers from FANUC's EtherNet/IP manual for a generic module
  6. A backup of the robot and a saved copy of the PLC project, before anything changes

Setting up the adapter on the robot

  1. Set the IP address

    Press MENU, SETUP, F1 TYPE, Host Comm, select TCP/IP and press DETAIL. Use PORT to switch to the port the cable is in, and set the IP address and subnet mask. The PING key on the same screen can test the PLC's address from the robot.

  2. Open the EtherNet/IP screen

    Press MENU, I/O, F1 TYPE, EtherNet/IP. Each line is a connection, and each connection is a slot on rack 89.

  3. Disable before editing

    Set the connection you will use to FALSE in the Enable column before you change its sizes.

  4. Set the sizes

    Open its configuration with CONFIG and enter the input size and output size in 16-bit words.

  5. Enable and restart

    Set the connection back to TRUE and power-cycle the controller. Size changes need the restart.

Sizes: words on the robot, bytes or words in the PLC

The robot counts its connection in 16-bit words. Studio 5000 counts in the units of the comm format you pick. FANUC’s Tech Transfer video makes a point of converting between bytes on the PLC side and words on the robot side.

Robot size (words) Points Bytes (SINT) INT DINT
4 64 8 4 2
8 128 16 8 4
16 256 32 16 8
32 512 64 32 16

The robot’s input size is the PLC’s output size, and the robot’s output size is the PLC’s input size. Leave spare points in both directions. Adding them later means changing both ends and restarting the robot.

Adding the robot in Studio 5000

In the I/O configuration, add a new module under the controller’s Ethernet port.

  • FANUC’s add-on profile. FANUC’s Tech Transfer recommends it for Rockwell software. You pick the robot, enter its IP address and set the input and output sizes.
  • Generic Ethernet Module (ETHERNET-MODULE). You enter the name, IP address, comm format and, for input, output and configuration, an assembly instance and a size. Take the instance numbers from FANUC’s EtherNet/IP manual for your controller. Rockwell’s help notes that the comm format can’t be changed after the module is created; to change it, delete the module and add it again.
  • An EDS file. Rockwell’s software can also describe third-party devices with EDS files. Whichever route you use, the sizes still have to match the robot.

Set the RPI on the Connection tab. FANUC’s Tech Transfer example uses 32 ms on an R-30iB Plus and notes intervals from 8 ms are possible, depending on the connection load. Then download and check the module status online.

Open control cabinet with an Allen-Bradley CompactLogix 5380 controller and a row of I/O modules at lower left, red safety relay modules beside them, an Ethernet switch with yellow cables above, and labeled blue wiring in white duct
Fig. 1A cell panel built and wired in our Fontana shop. The CompactLogix 5380 sits at lower left and the Ethernet switch on the rail above it.

Mapping DI, DO, UI and UO to rack 89

FANUC’s I/O screens give EtherNet/IP rack number 89, and the slot is the connection on the EtherNet/IP screen. Points are numbered from 1 in each direction. A 16-word connection gives in1 to in256 and out1 to out256, which you hand out to logical signals on the Digital, Group and UOP configuration screens. This is one example layout:

Robot signal Rack Slot Start Points INT word in the PLC
UI[1-18] 89 1 1 in1 to in18 Output word 0, word 1 bits 0-1
DI[1-64] 89 1 33 in33 to in96 Output words 2 to 5
GI[1], 16 points 89 1 97 in97 to in112 Output word 6
UO[1-20] 89 1 1 out1 to out20 Input word 0, word 1 bits 0-3
DO[1-64] 89 1 33 out33 to out96 Input words 2 to 5
GO[1], 16 points 89 1 97 out97 to out112 Input word 6

With an INT comm format, point n sits in word (n - 1) divided by 16, at the bit given by the remainder: in33 is output word 2, bit 0. Starting each block on a word boundary keeps that arithmetic easy. Confirm the map before trusting it: with the cell clear, force a DO on the pendant and watch the PLC input change, then toggle a PLC output and watch the robot’s DI. Assignments show PEND until the robot is power-cycled. The screens themselves are covered in our FANUC I/O configuration guide.

Name the robot’s I/O comments and the PLC tag descriptions the same, for what each signal really does. A tech reading either end at 2 a.m. should see the same words.

Starting the robot from the PLC

With UOP on the connection, the PLC can run the robot in automatic. The PLC holds *IMSTP, *HOLD, *SFSPD and ENBL on, resets faults, waits for CMDENBL, selects a program with PNS or another method, and starts it. The order and timing are in our UOP signals guide, and when the robot ignores the start, our won’t run in auto checklist goes through the conditions.

FANUC’s manual is clear that *IMSTP and *SFSPD are software functions. Emergency stops and guard switches go to the controller’s safety inputs, hardwired or over EtherNet/IP Safety. The PLC program should also watch the robot module’s connection status and treat a dropped connection as a stop for the cell sequence.

Common faults and what they usually mean

Studio 5000 code Rockwell’s description Where we’d look first
16#0204 Connection request timed out; the target isn’t responding Wrong IP address, cable in the other robot port, subnet mismatch, or the robot still booting
16#0203 Connection timed out; the target is reachable but I/O data isn’t answered The robot’s connection not enabled or not restarted after a change, or trouble in the switch
16#0109 Invalid connection size PLC sizes don’t match the robot’s words. Convert bytes, words and DINTs
16#0117 Invalid connection point Assembly instance numbers that aren’t what the robot expects
16#0106 Owned by another controller A second PLC, or a test project on a laptop, connected to the same robot connection
16#0111 RPI out of range An interval the robot won’t accept

On the robot side, the EtherNet/IP screen shows the state of each connection, and the PING key on the TCP/IP screen answers whether the PLC is reachable at all. A connection that faults while the robot is power-cycled and comes back once it has restarted is expected, and the PLC logic should handle it.

A link that works on the first day proves the map. It says nothing about what the cell does when the link drops, which is the case that matters on a night shift. With the cell in a safe state and the people around it aware, run these during commissioning:

Failure tests for the robot link

  1. Power-cycle the robot. The PLC should flag a robot fault and wait for a reset, not restart the sequence by itself when the connection returns
  2. Switch the PLC to Program mode and back, and watch what the robot's UI and DI signals do
  3. Unplug the robot's cable at the switch with the cell stopped, and check the operator screen names the fault in plain words
  4. Confirm every e-stop and guard switch stops the robot through the safety circuit, with the EtherNet/IP link up and with it down

What the robot does with its inputs in each case is something to see for yourself on your controller, not to assume. Write down what you saw in the handover notes.

CIP Safety is a separate connection

FANUC’s EtherNet/IP Safety option, R713, carries safety signals to a GuardLogix or Compact GuardLogix over the same network, using CIP Safety and the controller’s DCS Safe I/O. FANUC’s Tech Transfer example uses port 2, notes that only one safety protocol can be active at a time, and builds the PLC side as a generic safety module whose signature has to match the robot’s. After the first download, the PLC gives the robot a Safety Network Number.

FANUC’s operator’s manual warns that the Safety Network Number isn’t set by restoring a full backup or an image, so someone who can run the safety PLC software has to be on hand after a restore. Safety over the network still needs a risk assessment and a validation of every safety function. Our safety PLC programming page covers that side, and our DCS guide covers the robot’s safety settings.

Handing the cell over

Write down the robot’s IP address and port, the connection and slot, the sizes on both ends, the RPI, the rack 89 map and the add-on profile version, and keep a robot backup next to the PLC project. Our Allen-Bradley PLC programming page lists what else to ask for with a Studio 5000 project.

We write both ends of this link, the robot program and the PLC logic, and test them together before a cell ships. For a cell already running, including ones we didn’t build, see our FANUC robot programming page, or call or text (818) 397-4809.

Common questions

Should I use the FANUC add-on profile or a generic Ethernet module in Studio 5000?
FANUC's Tech Transfer recommends its add-on profile for Rockwell software, and it is the easier choice when it is installed. A Generic Ethernet Module also works, but you enter the comm format, assembly instance numbers and sizes yourself from FANUC's EtherNet/IP manual for your controller. With either one, the input and output sizes have to match the robot's adapter settings exactly.
Why is the FANUC robot connection faulted with code 16#0109?
Rockwell's description of 16#0109 is an invalid connection size: the size in the PLC doesn't match what the device expects. On a FANUC robot that almost always means the input or output size in the PLC module doesn't match the robot's adapter configuration. The robot counts in 16-bit words and the PLC module may count bytes or 32-bit words, so convert before you compare.
Is the FANUC robot the scanner or the adapter?
With an Allen-Bradley PLC running the cell, the robot is normally the adapter and the PLC is the scanner that opens the connection. The robot's EtherNet/IP Scanner option is for the opposite job: the robot opening connections to devices of its own, such as remote I/O, tooling or another robot. A controller can do both, on separate connections.
Can safety signals go over the same EtherNet/IP network?
Yes, with FANUC's EtherNet/IP Safety option, R713, which uses CIP Safety and the controller's DCS Safe I/O. It is a separate safety connection to a GuardLogix or Compact GuardLogix, with its own signature and Safety Network Number. FANUC's manual warns that the Safety Network Number isn't restored by a backup or image restore, so someone who can run the safety PLC software has to be available after a restore.
What RPI should I use for a FANUC robot?
Start from what the cell needs, not the fastest number. FANUC's Tech Transfer example for an R-30iB Plus adapter uses 32 ms and notes the controller accepts intervals from 8 ms, depending on how many connections it is carrying. Handshake signals that wait on each other rarely need faster. Rockwell's fault 16#0111 means the requested interval is out of range for the device.

Sources

  1. FANUC America: EtherNet/IP Adapter, Scanner and EtherNet/IP Safety for robot controllers
  2. FANUC Tech Transfer: How to set up an EtherNet/IP adapter on R-30iB Plus controllers
  3. FANUC Tech Transfer: Multiple EtherNet/IP adapter setup
  4. FANUC Tech Transfer: Configure R-30iB Plus EtherNet/IP Safety to a Rockwell safety PLC
  5. FANUC America: Robot support and manuals (R-30iB/R-30iB Plus Operator's Manual Basic Function B-83284EN/12: 3.1 I/O rack numbers, 3.3 Peripheral I/O, 9.17 TCP/IP setup, 8 image backup cautions; via the Customer Resource Center)
  6. Rockwell Automation: Module Properties, General tab for the Generic ETHERNET-MODULE (Studio 5000 Logix Designer)
  7. Rockwell Automation: Module faults 16#0100 to 16#01FF (Studio 5000 Logix Designer)
  8. Rockwell Automation: Module faults 16#0200 to 16#02FF (Studio 5000 Logix Designer)
  9. Control.com: FANUC robot Ethernet tutorial, setting up PLC I/O communication
  10. ODVA: EtherNet/IP

Start a project

Bring us the process. We'll bring the cell.

Send a phone video of the manual process, or a part drawing, by text or email. We come back with a cell concept and a plan: robot, tooling, controls and code.

Call or text
Call or text
(818) 397-4809
Email
sales@calwestmfg.com
Shop
13815 Arrow Rte, Fontana, CA 92335
Hours
Mon–Fri 7:00am – 3:45pm

FANUC Authorized System Integrator (ASI). Part of CalWest Manufacturing, founded 2012: AS9100D and ISO 9001 certified, ITAR registered.