Acyclic Communication between Siemens S7-1200 and SINAMICS V20 via Modbus

Introduction

Effective from the firmware version V03.96.00.00 of SINAMICS V20 drive, it supports DS47 in Modbus communication. This enables access to all parameters in the V20 drive via acyclic communication.

The new firmware can be downloaded from the following link: https://support.industry.siemens.com/cs/ww/en/view/109767473

Overview of the Automation Task

Figure 1-1 provides an overview of the automation task. The setup involves a SIMATIC PLC S7-1217C communicating via Modbus with a SINAMICS V20 drive. The V20 drive powers a 3AC Asynchronous motor. A CM1241 module facilitates RS422/RS485 communication between the PLC and the V20. A PC/PG is connected via Ethernet.

Warranty and Liability

Note: Application Examples are not binding and do not claim to be complete. They are intended for typical applications and do not represent customer-specific solutions. Users are responsible for correct product usage and safe practices in application, installation, operation, and maintenance. Siemens is not liable for damages beyond the described liability clause. Changes may be made without prior notice. In case of deviations, other Siemens publications (e.g., Catalogs) take priority.

Siemens accepts no liability for the information in this document. Claims arising from the use of examples, information, programs, or data are excluded, except in cases of mandatory liability (e.g., German Product Liability Act), intent, gross negligence, injury to life, body, or health, warranty for quality, fraudulent concealment of defects, or breach of essential contractual conditions. Damages for breach of substantial contractual obligations are limited to foreseeable, contract-typical damages, unless intent, gross negligence, or injury to life, body, or health is involved. These provisions do not alter the burden of proof. Duplication or distribution of these Application Examples or excerpts requires express consent from Siemens AG.

Security Information

Siemens provides industrial security functions to support secure operation of plants, systems, machines, and networks. A holistic, state-of-the-art industrial security concept, including continuous maintenance, is necessary to protect against cyber threats. Siemens products and solutions are only one part of this concept. Customers are responsible for preventing unauthorized access to their systems. Systems should only be connected to enterprise networks or the internet with appropriate security measures (e.g., firewalls, network segmentation). Siemens' guidance on security measures should be followed. For more information, visit http://www.siemens.com/industrialsecurity.

Siemens continuously improves product security. Applying product updates as soon as available and using the latest product versions is strongly recommended. Using unsupported versions or failing to apply updates may increase exposure to cyber threats. Subscribe to the Siemens Industrial Security RSS Feed at http://www.siemens.com/industrialsecurity for product update information.

Solution

Solution Overview

Figure 2-1 displays the most important components of the solution. The system comprises an IO Supervisor (e.g., PC/PG), an IO controller (SIMATIC S7-1200 PLC), and an IO device (SINAMICS V20 drive).

Required Knowledge

Basic knowledge of TIA Portal, configuration of S7-1200 PLC with Modbus function in TIA Portal, and commission of SINAMICS V20 is assumed.

Hardware and Software Components

Validity

This application example is valid for TIA Portal V15.1 and SINAMICS V20 FW V03.96.00.00.

Used Components

Hardware Components
Component No. Article number Note
SIMATIC S7-1200 1217C DC/DC/DC 1 6ES7217-1AG40-0XB0 V4.1
CM1241 RS422/RS485 1 6ES7 241-1CH32-0XB0 V2.1
SINAMICS V20 1 6SL3210-5BB11-2UV1 V03.96.00.00
Standard Software Components
Component No. Note
TIA Portal 1 V15.1
Sample Files and Projects

Table 2-3 includes all files and projects used in this example.

Component Note
109780737_Acyclic_communication_between_SINAMICS_V20_and_S7-1200_via_DS47 Project file
109780737_Modbus_Acyclic_Communication_between_S7-1200_and_V20_DOC_en Document

Acyclic Data Exchange

Description

The acyclic data exchange mode allows for the exchange of large "user data" using PLC function blocks. The data block structure should follow the DS47 data structure. Communication is realized via Modbus registers 40601 to 40722. Register 40601 controls acyclic communication, register 40602 contains the function code (47), and registers 40603 to 40722 hold user data.

Diagram of Acyclic Data Exchange

Figure 3-1 describes the principle of acyclic data exchange. It shows a Controller/Supervisor initiating a parameter request. The Device processes this request. Communication involves 'Write.req with data' and 'Write.res without data' for writing, and 'Read.req without data' and 'Read.res with data' for reading. The process includes parameter processing and parameter response.

Overview of Acyclic Communication

Table 3-1 shows the overview structure of acyclic communication, detailing values in registers 40601-40722 for writing and activating access, and response data for successful or error requests. It also lists error codes (e.g., 1 hex: Invalid length, 2 hex: Invalid state, 3 hex: Invalid function code, 4 hex: Response not ready, 5 hex: Internal error) and notes that incorrect parameter access is logged in registers 40603 to 40722.

Data Structure for Parameter Reading

Table 3-2 details the data structure for parameter reading tasks, outlining the message header, parameter structure, and register assignments.

Data block Byte n Byte n+1 Register
Message header Reference 80 hex 01 hex: request identifier 40603
01 hex quantity of the parameters (m) 01 hex ... 27 hex 40604
Parameter 1 Properties
10 hex: parameter value
Quantity of the parameter index:
00 hex ... EA hex
(parameter has no index: 00 hex)
40605
Parameter number: 0001 hex ... FFFF hex The first index number: 0000 hex ... FFFF hex
(parameter has no index: 0000 hex)
40606
40607
Parameter 2 ... ... ...
Parameter m ... ... ...

Data Structure for Successful Reading Operation

Table 3-3 shows the data structure for a successful reading operation, similar to Table 3-2 but specific to successful reads.

Data block Byte n Byte n+1 Register
Message header Reference 80 hex 01 hex: request identifier 40603
01 hex quantity of the parameters (m) 01 hex ... 27 hex 40604
Parameter 1 Data format Quantity of the parameter index: 40605
Parameter value Parameter value 40606
40607
Parameter 2 ... ... ...
Parameter m ... ... ...

Data Structure for Non-Successful Reading Operation

Table 3-4 shows the data structure for a non-successful reading operation, detailing the message header and error code.

Data block Byte n Byte n+1 Register
Message header Error code 40603

Data Structure for Writing Parameters

Table 3-5 details the data structure for writing parameters, including message header, parameter properties, number, index, data format, and parameter values.

Data block Byte n Byte n+1 Register
Message header Reference 80 hex 02 hex: request identifier 40603
01 hex quantity of the parameters (m) 01 hex ... 27 hex 40604
Parameter 1 Properties
10 hex: parameter value
Quantity of the parameter index:
00 hex ... EA hex
(parameter has no index: 00 hex)
40605
Parameter number: 0001 hex ... FFFF hex The first index number: 0000 hex ... FFFF hex
(parameter has no index: 0000 hex)
40606
40607
Data format Number of values 40608
Parameter value Parameter value 40609
40610
Parameter 2 ... ... ...
Parameter m ... ... ...

Operation

Hardware Installation

Figure 4-1 illustrates the main power supply diagram for the V20 drive and PLC. It shows AC 200V power connection to the V20 drive and a 24V DC supply to the CM1241 module and S7-1200 CPU. Figure 4-2 details the communication wiring between the CM1241 and V20 drive using RS485 connections (P+ and N-).

V20 Drive Parameter Setting

Table 4-1 lists the Modbus communication parameters to be set in the V20 drive, including baud rate, telegram off time, Modbus address, reply timeout, RS485 protocol selection, parity, and stop bits.

Item Parameter number Parameter value Remarks
1. P2010 6 Modbus baudrate
2. P2014 2000 Modbus telegram off time
3. P2021 2 Modbus address
4. P2022 1000 Modbus reply time out
5. P2023 2 RS485 protocol selection
6. P2034 0 Modbus parity on RS485
7. P2035 1 Modbus stop bits on RS485

PLC Engineering

Configuration and Programming

The configuration and programming steps are detailed in Table 4-2:

No. Action
1. Create Project: Create a TIA project and input the project name. Press the "Create" button to create the project.
2. Project Tree: In the project tree, double-click "Add new device" to open the hardware configuration.
3. Add Controller: Select "Controllers", find the target CPU (e.g., SIMATIC S7-1200 CPU 1217C DC/DC/DC), select the target firmware version (e.g., V4.2), and press "OK".
4. Add Communication Module: Click the "hardware catalog", find the target communication module (CM 1241 RS422/RS485), select its firmware version (e.g., V2.1), and add it to the project.
5. Configure Communication Module: In the properties view of the CM module, select the IO-Link option and set the related communication parameters (e.g., Baud rate, Parity, Data bits, Stop bits).
6. Add Tag Table: In the project tree, double-click "Add new tag table" to create and open a tag table.
7. Create Tags: Create the necessary tags as shown in the tag table, defining Name, Data type, and Address (e.g., LoadRequest, LoadDone, WriteRequest, ReadRequest, Response values).
8. Open OB1: Double-click OB1 in the project tree to open the block.
9. Load Modbus Command: Call the communication load block (MB_COMM_LOAD) and set the related parameters (e.g., REQ, PORT, BAUD, PARITY).
10. Send Request: Call the MASTER function (MB_MASTER) to send the request command to the drive, setting parameters like REQ, MODE, MB_ADDR, DATA_ADDR, DATA_LEN, and DATA_PTR.
11. Receive Response: Call the MASTER function (MB_MASTER) again to receive the response command from the drive, setting parameters like REQ, MB_ADDR, DATA_ADDR, DATA_LEN, and DATA_PTR.
12. Add Watch Table: In the project tree, double-click "Add new watch table" to open it.
13. Create Watch Table: Create the watch table entries as depicted, monitoring relevant tags like "LoadRequest", "WriteRequest", "ReadRequest", and response values.

Read Parameters

This section describes the task of reading parameters from the drive, specifically parameter P1121. Table 4-3 outlines the operation sequence, involving loading the Modbus command, setting parameters like "LoadRequest" and "DataLength", sending read requests, and interpreting the response. For example, setting "LoadRequest" to TRUE loads the Modbus command, and setting "ReadRequest" to TRUE initiates the parameter reading operation. "Response40606" and "Response40607" contain the parameter value, e.g., P1121=10.0.

No. Action
1. Load Modbus Command: Set "LoadRequest" to TRUE.
2. Set "LoadRequest" to FALSE.
3. Set the "DataLength" = 7. Set the values for "Request40601" to "Request40607" as shown in the screenshot.
4. Set the "WriteRequest" = TRUE to send the read parameter command to the drive.
5. Set the "ReadRequest" = TRUE to read the feedback of the parameter reading operation. "Response40606" and "Response40607" contain the parameter value. For P1121, the value is 10.0.

Write Multiple Parameters

This section covers writing parameters to the drive, specifically P1121=12.15. Table 4-4 details the operation sequence, including setting "DataLength" and "WriteRequest" to TRUE, and verifying the change in the drive. For instance, setting "DataLength" to 10 and updating "Request40601" through "Request40610" with specific values, then setting "WriteRequest" to TRUE, changes the drive's P1121 value to 12.15.

No. Action
1. Set the "DataLength" = 10. Set the values for "Request40601" to "Request40610" as shown in the screenshot.
2. Set the "WriteRequest" = TRUE to send the parameter writing command to the drive. Check the value of P1121 in the drive; it is changed to 12.15.

Contact

Siemens Ltd., China

DI MC GMC

No. 18 Siemens Road

Jiangning Development Zone

Nanjing, 211100

China

Email: mc_gmc_mp_asia.cn@siemens.com

History

Table 9-1 shows the document history. Version V1.0 was released in 07/2020 as the first version.

Version Date Modifications
V1.0 07/2020 First version

PDF preview unavailable. Download the PDF instead.

109780737 Modbus Acyclic Communication between S7-1200 and V20 DOC en Microsoft Word für Office 365

Related Documents

Preview Guida Tecnica Pacchetti Hw e Sw Siemens SCE per il mondo EDU
Guida tecnica completa ai pacchetti hardware e software Siemens SCE (Siemens Automation Cooperates with Education) per la formazione nell'automazione industriale. Dettaglia soluzioni per l'educazione all'automazione, coprendo le principali tecnologie Siemens come SIMATIC TIA Portal, SIMATIC PCS 7, LOGO!, SINAMICS, SIMIT e altro.
Preview Siemens Otomasyon ve Sürücü Teknolojileri Fiyat Listesi Ekim 2023
Siemens'in Ekim 2023 tarihli fiyat listesi, Sinamics V20, G120C, G120X, G120, G130, DCM, Micro Drive, V90, S210, S110/S120, SIMOTICS motorlar, SINUMERIK 808D, SIMATIC RFID, SITOP güç kaynakları, LOGO! 8, SIMATIC HMI paneller, SIMATIC S7-1200 PLC'ler ve TIA Portal yazılımları gibi geniş bir otomasyon ve sürücü teknolojileri ürün yelpazesini kapsamaktadır.
Preview Siemens SIMATIC/SINAMICS S7-1500, S7-1200: Trace and Logic Analyzer Function Manual
This function manual from Siemens provides detailed guidance on using the trace and logic analyzer function for SIMATIC S7-1500, S7-1200, and SINAMICS automation systems. Learn about configuration, recording, analysis, and troubleshooting for industrial automation tasks.
Preview SINAMICS G: Axis Positioning with SINA_POS Block - Siemens Application Example
This document provides a comprehensive application example for implementing axis positioning using the SINA_POS function block. It details the integration of Siemens SINAMICS G120 drives with SIMATIC S7-1200 controllers via PROFINET communication, covering configuration, setup, and operation for industrial automation.
Preview Speed Control with SIMATIC S7-1200 and SINAMICS V90PN via PROFINET
A guide detailing the implementation of speed control using Siemens SIMATIC S7-1200 PLC and SINAMICS V90PN drive over PROFINET communication, covering configuration, installation, and operation.
Preview Siemens Industrial Electrical Components Catalog
Comprehensive technical specifications for Siemens industrial, commercial, and building electrical components, including automation, power, protection, control, and signaling devices.
Preview Siemens SCE: Soluciones para Formación en Automatización Industrial
El programa Siemens Coopera con la Educación (SCE) ofrece paquetes de hardware y software para la formación en automatización y digitalización industrial. Estas soluciones, que incluyen TIA Portal, controladores SIMATIC y variadores SINAMICS, preparan a las instituciones educativas y a sus estudiantes para los desafíos de la Industria 4.0.
Preview Siemens Lista de Precios Productos Eléctricos Industriales Julio 2025
Catálogo de precios de Siemens para productos eléctricos industriales, incluyendo automatización industrial, variadores de velocidad SINAMICS, sistemas de alimentación SITOP, instrumentación de procesos, aparatos de maniobra, protección y seccionamiento de sistemas de distribución, y el programa de formación SITRAIN.