PLCnext and S7-1200 Communication via Node-Red

This technical guide from PHOENIX CONTACT details the setup and configuration for establishing communication between PLCnext controllers and Siemens S7-1200 PLCs using Node-Red.

PLCnext Technology Introduction

PLCnext Technology offers flexible automation. This guide focuses on integrating PLCnext with Siemens S7-1200 PLCs using Node-Red for industrial IoT applications.

The document illustrates the connection between a PLCnext controller and a Siemens S7-1200 PLC via Node-Red.

Key PLCnext tools are accessible via a sidebar: [PLC Control], [PLC Engineer], [PLC Store], [PLC Community].

PLCnext Controller Setup

The first step is to install Node-Red on the PLCnext controller. A dedicated guide covers this installation process.

Siemens S7-1200 Configuration in Tia Portal

To enable communication, the PUT/GET option must be activated in the Siemens S7-1200 PLC's configuration within the Tia Portal software.

The 'Protection & Security' settings in Tia Portal require enabling the 'Permit access with PUT/GET communication from remote partner' option.

Logic Implementation in Tia Portal

Simple logic involving timers and counters was created for this guide:

  • Network 1: Blink Blink: Utilizes a TON timer to create a blinking output.
  • Network 2: Counter: Employs a CTU counter and a TON timer for a counting sequence.

Node-Red Configuration and Setup

Dedicated nodes are available for communication with Siemens S7 controllers. The 'node-red-contrib-s7' package is required and can be installed via npm: npm install node-red-contrib-s7.

Configuring the 's7 in' Node

The 's7 in' node is configured to read variables from the PLC. Key settings include:

  • PLC Selection: Specify the PLC, e.g., S7_1200.
  • Read Mode: Options include reading a single variable, all variables per message, all variables in one message, or only when values change.
  • Variable Mapping: PLC addresses (e.g., %M1.0, %M1.1, %MW2) are mapped to descriptive names (e.g., LIGA_DESLIGA, LED, CONTADOR).

Configuring the 's7 out' Node

The 's7 out' node is used for writing data to PLC variables. Configuration involves selecting the PLC and the target variable, such as 'LIGA_DESLIGA'.

Configuring 'Inject' Nodes

Boolean 'inject' nodes are set up to send 'true' or 'false' values to the 'LIGA_DESLIGA' variable, controlling PLC outputs.

Application Example Flow

The example demonstrates using the 's7 out' node to write boolean values to the LIGA_DESLIGA variable and the 's7 in' node to read LED and CONTADOR variables from the Siemens PLC.

The Node-Red flow visually represents this interaction, with 'inject' nodes controlling the 's7 out' node and the 's7 in' node reading data. The debug pane logs the variable states, showing the communication in action.

PDF preview unavailable. Download the PDF instead.

Guia-de-Configuracao-PLCnext-e-S7 1200-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 Technical Guide: PLCnext and Compactlogix Communication via Node-RED
Learn how to integrate PHOENIX CONTACT PLCnext and Allen Bradley Compactlogix controllers using Node-RED for industrial automation. This guide covers configuration, variable reading, and writing.
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.