Technical Guide: PLCnext and Compactlogix Communication via Node-Red

Technical Guide

Communication PLCnext and Compactlogix via Node-Red

Designed by PHOENIX CONTACT

Introduction and Setup Overview

This technical guide details the communication setup between PLCnext and Allen Bradley Compactlogix controllers using Node-RED. The initial step involves installing Node-RED on the PLCnext platform, for which a dedicated guide is available, outlining all necessary installation procedures.

Diagram Description: A visual representation shows a PLCnext controller and an Allen Bradley Compactlogix controller connected. A central icon labeled "Node-RED" facilitates the communication between them.

Key Components:

  • [PLCnext Control]
  • [PLCnext Engineer]
  • [PLCnext Store]
  • [PLCnext Community]

Configuring Rockwell Logix5000 Controllers

The Rockwell CPU model used for testing in this guide is the L24ER, which features onboard 16 Digital Inputs (DI) and 16 Digital Outputs (DO). Consequently, native local variables are already available, as detailed in the table below. Additional variables of various types will be created to enhance the testing process.

NameValueForce MaskStyleData Type
+Local:1:C{...}{...}AB:Embedded_Discretel01:C:0
Local:1:1{...}{...}AB:Embedded_Discretel01:1:0
+Local:1:1.Fault2#0000_0000_0000_0000...BinaryDINT
+Local:1:1.Data (Native Digital Inputs)2#0000_0000_0000_0000BinaryINT
+Local:1:1.Readback2#0000_0000_0000_0000BinaryINT
Local:1:0{...}{...}AB:Embedded_Discretel01:0:0
+Local:1:0.Data (Native Digital Outputs)2#0000_0000_0000_0000BinaryINT
Tag_0_IN (Variable of type BOOL)0DecimalBOOL
Tag_0_OUT (Variable of type BOOL)0DecimalBOOL
+Data_IN (Variable of type DINT)0DecimalDINT
+Data_OUT (Variable of type DINT)0DecimalDINT
+ arr_IN (Array of 10 positions INT){...}{...}DecimalINT[10]
+ arr_OUT (Array of 10 positions INT){...}{...}DecimalINT[10]

Installing Node-RED Nodes for Communication

Dedicated nodes are available within Node-RED to facilitate communication with Rockwell controllers. The subsequent step involves installing these nodes.

Screenshot Description: The Node-RED interface is shown, with the palette displaying search results for "ethernet-ip". The node node-red-contrib-cip-ethernet-ip is listed and marked as "installed". The command line instruction npm install node-red-contrib-cip-ethernet-ip is visible. Two relevant nodes, eth-ip in and eth-ip out, are presented in the palette.

Configuring the `eth-ip in` Node for Variable Reading

The eth-ip in node is configured to read variables from the PLC. This involves specifying the PLC's IP address, the slot number, and the tags to be read.

Configuration Window: The configuration panel for the eth-ip in node is displayed. Key settings include:

  • PLC: An endpoint for the PLC connection, typically configured with the IP address.
  • IP Address: Set to 192.168.1.150.
  • Mode: Options include "Single tag", "All tags, one per message", and "All tags".
  • Scope: Determines how tags are read.
  • Tag: Allows selection of specific tags.
  • Slot: For Compactlogix controllers, this is typically 0. For Contrologix, it depends on the physical rack configuration.

Tag Selection: The node allows reading native PLC tags (e.g., digital inputs/outputs, DINT, INT arrays) and custom-defined variables. Examples shown include Data_IN, Data_OUT, and array elements like arr_IN[0].

Reading Options Explained:

  • Single Tag: Reads one specific variable. The variable must be explicitly indicated.
  • All tags, one per message: Reads all selected tags, sending each in a separate message.
  • All tags: Reads all selected tags, consolidating their values into a single message.

Debug Output: When the eth-ip in node is configured to read "All tags", the debug pane displays the payload object containing the current values of the read variables. For example: Local:1:I.Data.0: false, Local:1:0.Data.0: true, Data_IN: 111, Data_OUT: 444, arr_IN[0]: 123, arr_OUT[0]: 0.

Configuring Boolean Inject for Writing to PLC Output

This section details the configuration for writing boolean values to a digital output of the PLC using Node-RED. This is achieved using "Inject" nodes.

Node-RED Flow: A Node-RED flow is depicted where two "Inject" nodes are used. One is configured to send a true value, and the other a false value. Both are connected to the PLC's digital output, specifically Local:1:0.Data.0.

Operation: By deploying these inject nodes, a boolean true or false can be sent to the PLC's digital output. The debug pane shows the results of these operations, including updated variable values such as Data_OUT: 444 and arr_OUT[0]: 987 after a write operation.

Conclusion

Thank you for following this guide.

PDF preview unavailable. Download the PDF instead.

Guia-de-Configuracao-PLCnext-e-Compactlogix-via-Node-Red GPL Ghostscript 8.15 PScript5.dll Version 5.2.2

Related Documents

Preview Guia Técnico: Comunicação OPC UA entre Node-RED e PLCnext
Este guia técnico da PHOENIX CONTACT detalha a configuração e implementação da comunicação OPC UA entre o software Node-RED e o sistema PLCnext. Abrange desde a instalação do Node-RED e configuração do servidor OPC UA no PLCnext até a configuração de nós OPC UA Client no Node-RED para leitura e escrita de variáveis.
Preview PLCnext and S7-1200 Communication via Node-Red: Technical Guide
A technical guide from PHOENIX CONTACT detailing the setup and configuration for communication between PLCnext controllers and Siemens S7-1200 PLCs using Node-Red, including Tia Portal and Node-Red configurations.
Preview Guia de Configuração do Node-RED no PLCnext | Phoenix Contact
Aprenda a configurar e integrar o Node-RED com controladores PLCnext da Phoenix Contact para automação industrial, IoT e edge computing. Guia técnico detalhado.
Preview Phoenix Contact PLCnext Technology: Controllers, I/O Systems, and Software
Explore Phoenix Contact's PLCnext technology, featuring advanced PLC controllers, versatile Axioline I/O systems (F, SE, E), and powerful engineering software for industrial automation. Discover open architecture, multi-language programming, and extensive communication protocols.
Preview Phoenix Contact VARIOFACE System Cabling: Efficient Industrial Automation Wiring
Discover Phoenix Contact's VARIOFACE system cabling solutions for industrial automation. Reduce wiring time, errors, and costs with pre-assembled, plug-in components compatible with major PLC systems. Explore front adapters, system cables, and termination boards.
Preview AXL F BK PN TPS - Bus Coupler | Phoenix Contact
Detailed technical specifications and features of the Phoenix Contact AXL F BK PN TPS Bus Coupler, a PROFINET device for industrial I/O systems. Includes dimensions, electrical properties, connection technology, and environmental data.
Preview Phoenix Contact INTERBUS Diagnostics Guide for Generation 4 Controller Boards
Comprehensive guide to diagnosing INTERBUS systems, detailing diagnostic displays, LED indicators, error codes, menu navigation, and troubleshooting for Phoenix Contact Generation 4 controller boards.
Preview Phoenix Contact IL MOD BK DI8 DO4-PAC Inline Bus Coupler Datasheet
Technical datasheet for the Phoenix Contact IL MOD BK DI8 DO4-PAC Inline Bus Coupler, detailing its features, specifications, Modbus/RTU communication, digital I/O, parameterization, and safety information for explosive areas.