How to set up Communication between an Allen Bradley PLC and LabView, through Ethernet/IP


Industrial Ethernet protocols are basic tools for compatibility and network communication. They add characteristics for reliability with standard Ethernet/IP to communicate over single or interconnected networks (Internet). LabVIEW uses the Ethernet/IP driver to interact with objects in the CIP object module on a PLC. The list of controllers that support this protocol can be verified on the manufacturer’s website.

Step one: define the master device, aka the scanner, and the slave device, aka the adapter.

  • The Scanner Class, the “Master”, will initiate both implicit and explicit communication and commands.
  • The Adapter Class, the “Slave”, only sends data if the data is requested by a scanner (master). The adapter (slave) device does, however, support explicit and implicit messaging.
  • The Messaging class is used for on-demand data transfer applications or setup; this unit initiates data transfers by either device.

To ensure that the LabVIEW driver for Ethernet/IP can communicate with your device, make sure that the device can act as a scanner (master).

Step two: precisely define the type of the application being run:

  • Non-Real Time applications work with a standard TCP/IP, or UDP/IP for PLC to HMI, or PLC to SCADA.
  • Real-Time applications utilize COTS hardware for control data.
  • Hard Real-Time applications add specific hardware, such as distributed motion.

Step three: define the Ethernet/IP Terminology:

The first option, Explicit messages, use TCP/IP and are used to set parameters and initiate implicit communication

The other option, Implicit messages, use UPD/IP Multicast; these messages are used to communicate I/O data and are normally set up for cyclical updates.

Step four: go over Ethernet/IP Allen Bradley protocol considerations:

It is the principal bus for Rockwell Automation, managed by Open Device Vendors Association (ODVA) that allows the DeviceNET concepts to expand to Ethernet, using a transport layer (TCP and UDP), although it can potentially overload networks with UDP messages.

Step five: installing the LabVIEW Ethernet/IP Driver:

In order to establish communication with a Rockwell Automation Logix PLC (or any Allen Bradley PLC), the user has to begin by installing the drivers in an NI Measurement & Automation Explorer, specifically onto the real-time target. When using a real-time controller, use the “Add/Remote” software tab in the “Measurement & Automation Explorer” software.

Use the “Add/Remote” software tab in the “Measurement & Automation Explorer” software
Use the “Add/Remote” software tab in the “Measurement & Automation Explorer” software.

The Ethernet/IP driver interface provides VIs for communication to “Logix” PLC tags; the VIs can both write and read tags on Allen-Bradley CompactLogix and ControlLogix PLCs. This application will run on the LabVIEW program for Windows and the LabVIEW Real-Time OSs (Phar Lap and VxWorks).

Phar Lap and VxWorks
Phar Lap and VxWorks  
PLC Blockchain connection example.
PLC Blockchain connection example
PLC Blockchain connection example no. 2
PLC Blockchain connection example no. 2

This interface offers the simplest method to connect to Rockwell PLCs since LabView starts the communication and there is no need to change the PLC code. This driver has numerous advantages when working with a low number of tags, although it should generally not be used for higher counts. The driver uses TCP/IP and does not actually require IGMP snooping, which is usually used in order to prevent flooding of a network. One drawback of this driver is that it has an inefficient method for the packing of data into Ethernet, producing a slower communication and increased processing loads on the PLC. This driver also does not provide support of third-party EtherNet/IP or SLC devices.

Explicit Messaging

Both I/O data communication and several formats of explicit messaging are supported by this drive. A wide range of Ethernet/IP devices and Allen Bradley PLC devices are supported by this driver for extensive data sharing and communication. To write or read to a target, the VI’s use explicit messaging connections.

To write or read to a target, the VI’s use explicit messaging connections.
To write or read to a target, the VI’s use explicit messaging connections.

Tag Read/Write and SLC500 Read/Write. This option serves to directly access the data fields that are stored on the given PLC. To register files, the target must support Messaging class communications using either Multiple forms of PCCC communication or Logix tag names. Some of the targets that support message formats of this type include a variety of PLCs, such as Rockwell’s CompactLogix series, the ControlLogix series, the MicroLogix series, and the SLC 500 series.

The Get/Set Attribute: single VIs offer channels to interact directly on an Ethernet/IP device with individual instances of objects within the CIP object model. While some classes of objects are standardized, others are device-specific. In order to tell which class and attributes are necessary to operate the controller, the user should utilize the information that is provided in the device’s user manual.

I/O Data

Another option offered by the Ethernet/IP solution is the VI’s on the palette that give the LabVIEW system the ability to function as an adapter for a remote PLC, as well as to create an I/O assembly. This is a kind of communication named “Class 1”, or alternatively, “I/O Server Communication”, in which the device appears to be a remote I/O to the PLC, allowing it to be addressed in the ladder logic application as if it is a local I/O. The PLC is permitted to set up an implicit I/O data connection with LabVIEW through a Class 1 Protocol, which also allows the PLC to exchange assembly data at a specific rate, assemblies being memories that are used to manage data from the PLC. Through this protocol, the data can be exchanged in the background in series.

Implicit I/O data connection with LabVIEW
Implicit I/O data connection with LabVIEW

Several additional VIs can be added for Ethernet/IP scanner and message modes; these can be found listed below.


VI Add-ons
VI Add-ons
VI Add-ons no. 2
VI Add-ons no. 2
  • CIP Sync: this add-on is based on IEEE 1588 and provides a shared clock to devices.
  • CIP Motion: this add-on builds on the previous one, CIP Sync, in order to perform distributed control for motion; this device uses clock sharing as an alternative to QoS.
  • CIP Safety: this add-on builds on DeviceNet safety, intelligent devices with time out parameters.

Step six: Go Over the System Requirements

Before anything else, ensure that your Allen Bradley device will actually be able to communicate over Ethernet/IP. Many of the Allen Bradley devices come with RS485 ports, which is the same port found on most Ethernet cables, but it is used exclusively for Modbus or Series communications rather than Ethernet/IP.

The required Ethernet/IP driver is supported on a Windows device running LabVIEW, as well as LabVIEW Real-Time systems. Some of the supported systems include Compact Fieldpoint, NI Smart Cameras, Desktop PCs, Compact Vision System, NI Industrial Controllers, Embedded Vision System, CompactRIO, and PXI Controllers.

The installation of the driver component into the target should be handled through the “Add/Remote” Software tab in “Measurement & Automation Explorer.” Before beginning, ensure that the correct software is installed on your computer in order to manage the Allen Bradley Controllers. Some software options are RSLogix 500 or RS Linx, or Studio 5000, as well as Drives Executive, Connected Components Work bench, or Studio 5000 for drives.

Step seven: configure the IP address and subnet for your PC

We’re almost finished; before the final step, make sure to connect to the device either through an unmanaged switch or directly. Your PC should also have a static IP address.

Connect through un-managed switch or directly.
Connect through an un-managed switch or directly.

Step eight: configure the IP address and subnet for your PLC

The final step is to set up and configure the Allen Bradley PLC, either using the BootP software utility or manually. Manual setup is typically completed through USB ports, switches, or a logical HMI; manual setup is device specific, although instructions can usually be found in the user manual that comes with the device.

Configure IP address and subnet for the PLC.
Configure the IP address and subnet for the PLC.

Once the processor has been powered up and is connected to your computer, we can begin the process of adding the device’s address. Follow the BootP requests in order to do this; then make an Ethernet/IP driver in RSLinx on a local subnet. This processor will show up in RSLinx, and functions like putting the processor online, or ControlFLASH, will become available at the end of this step.

Once the PC has been configured for a static IP address and the device is configured, a connection should be possible.


For more information or to purchase a PLC, click here.

Leave a Reply

Your email address will not be published. Required fields are marked *