0% found this document useful (0 votes)
9 views13 pages

Modbus TCP Sinamics v1 0 en

The document provides guidance on speed control of SINAMICS drives using SIMATIC S7-1500 via MODBUS-TCP, detailing the necessary components, configuration, and operation steps. It includes legal disclaimers, security information, and a comprehensive overview of the Modbus TCP communication protocol. Additionally, it outlines the required parameters for establishing a connection and controlling the drive's operation using Modbus registers.

Uploaded by

Firman Andrian
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views13 pages

Modbus TCP Sinamics v1 0 en

The document provides guidance on speed control of SINAMICS drives using SIMATIC S7-1500 via MODBUS-TCP, detailing the necessary components, configuration, and operation steps. It includes legal disclaimers, security information, and a comprehensive overview of the Modbus TCP communication protocol. Additionally, it outlines the required parameters for establishing a connection and controlling the drive's operation using Modbus registers.

Uploaded by

Firman Andrian
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 13

Speed control of a

SINAMICS drive with a


SIMATIC S7-1500 via
MODBUS-TCP
Siemens
SINAMCS / Firmware Version 4.8 Industry
Online
https://support.industry.siemens.com/cs/ww/en/view/35928944 Support
Legal information

Legal information
Use of application examples
Application examples illustrate the solution of automation tasks through an interaction of several
components in the form of text, graphics and/or software modules. The application examples are
a free service by Siemens AG and/or a subsidiary of Siemens AG (“Siemens”). They are non-
binding and make no claim to completeness or functionality regarding configuration and
equipment. The application examples merely offer help with typical tasks; they do not constitute
customer-specific solutions. You yourself are responsible for the proper and safe operation of the
products in accordance with applicable regulations and must also check the function of the
respective application example and customize it for your system.
Siemens grants you the non-exclusive, non-sublicensable and non-transferable right to have the
application examples used by technically trained personnel. Any change to the application
examples is your responsibility. Sharing the application examples with third parties or copying the
application examples or excerpts thereof is permitted only in combination with your own products.
The application examples are not required to undergo the customary tests and quality inspections
of a chargeable product; they may have functional and performance defects as well as errors. It is
your responsibility to use them in such a manner that any malfunctions that may occur do not
result in property damage or injury to persons.

Disclaimer of liability
Siemens shall not assume any liability, for any legal reason whatsoever, including, without
limitation, liability for the usability, availability, completeness and freedom from defects of the
application examples as well as for related information, configuration and performance data and
any damage caused thereby. This shall not apply in cases of mandatory liability, for example
under the German Product Liability Act, or in cases of intent, gross negligence, or culpable loss of
life, bodily injury or damage to health, non-compliance with a guarantee, fraudulent
non-disclosure of a defect, or culpable breach of material contractual obligations. Claims for
damages arising from a breach of material contractual obligations shall however be limited to the
 Siemens AG 2017 All rights reserved

foreseeable damage typical of the type of agreement, unless liability arises from intent or gross
negligence or is based on loss of life, bodily injury or damage to health. The foregoing provisions
do not imply any change in the burden of proof to your detriment. You shall indemnify Siemens
against existing or future claims of third parties in this connection except where Siemens is
mandatorily liable.
By using the application examples you acknowledge that Siemens cannot be held liable for any
damage beyond the liability provisions described.

Other information
Siemens reserves the right to make changes to the application examples at any time without
notice. In case of discrepancies between the suggestions in the application examples and other
Siemens publications such as catalogs, the content of the other documentation shall have
precedence.
The Siemens terms of use (https://support.industry.siemens.com) shall also apply.

Security information
Siemens provides products and solutions with industrial security functions that support the secure
operation of plants, systems, machines and networks.
In order to protect plants, systems, machines and networks against cyber threats, it is necessary
to implement – and continuously maintain – a holistic, state-of-the-art industrial security concept.
Siemens’ products and solutions constitute one element of such a concept.
Customers are responsible for preventing unauthorized access to their plants, systems, machines
and networks. Such systems, machines and components should only be connected to an
enterprise network or the internet if and to the extent such a connection is necessary and only
when appropriate security measures (e.g. firewalls and/or network segmentation) are in place.
For additional information on industrial security measures that may be implemented, please visit
https://www.siemens.com/industrialsecurity.
Siemens’ products and solutions undergo continuous development to make them more secure.
Siemens strongly recommends that product updates are applied as soon as they are available
and that the latest product versions are used. Use of product versions that are no longer
supported, and failure to apply the latest updates may increase customer’s exposure to cyber
threats.
To stay informed about product updates, subscribe to the Siemens Industrial Security RSS Feed
at: http://www.siemens.com/industrialsecurity.

Entry-ID: 35928944, V1.0, 11/2017 2


Table of contents

Table of contents
Legal information ......................................................................................................... 2
1 Introduction ........................................................................................................ 4
1.1 Overview............................................................................................... 4
1.2 Mode of operation ................................................................................ 4
1.3 Components used ................................................................................ 4
2 Engineering ........................................................................................................ 5
2.1 Configuration ........................................................................................ 5
2.2 Operation .............................................................................................. 7
3 Additional information ...................................................................................... 9
3.1 Background .......................................................................................... 9
3.2 Fieldbus monitoring time .................................................................... 11
4 Appendix .......................................................................................................... 12
4.1 Service and Support ........................................................................... 12
4.2 Application Support ............................................................................ 13
4.3 Links and Literature ............................................................................ 13
4.4 Change documentation ...................................................................... 13
 Siemens AG 2017 All rights reserved

Entry-ID: 35928944, V1.0, 11/2017 3


1 Introduction

1 Introduction
1.1 Overview
Since SINAMICS firmware version 4.8 the communication protocol Modbus TCP is
supported by S120, G130 and G150. The application example describes the
communication settings from a SINAMICS S120.

1.2 Mode of operation


Modbus TCP is a connection-oriented communication, where a client-server
session is established before the user data can be transferred. The drive has the
Modbus TCP Server functionality implemented. In the example application, a S7-
1516F is configured as a Modbus TCP client, which connects to a Modbus TCP
server (drive).

1.3 Components used


This application example has been created with the following hardware and
software components:
Table 1-1
Component Number Article number
 Siemens AG 2017 All rights reserved

S7-1516F 1 6ES7516-3FN00-0AB0
CU310-2 1 6SL3040-1LA01-0AA0

Entry-ID: 35928944, V1.0, 11/2017 4


2 Engineering

2 Engineering

2.1 Configuration
Prerequisite for further steps is the successful commissioning of the drive. The
document (follow the link) offers a brief guide to commissioning a sample project
with a simple SINAMICS S120 drive train. By following the instructions in this
document, a beginner will need only a few minutes to engineer and configure the
sample project and start up the motor.

https://support.industry.siemens.com/cs/ww/en/view/109740023

Table 2-1 Configuration

1. For drive object control unit (DO1), set p2030 = 13 (Modbus TCP).
 Siemens AG 2017 All rights reserved

2. Select the DHCP mode using p8924.


If you set the parameter for the onboard interface of the Control Unit by yourself, set
the value to 0. If you use a DHCP mode (p8924 >0) can you proceed with step 6.
3. Set the IP address for the onboard interface of the Control Unit using p8921. Here in
the example : 192.168.214.2

4. Set the standard gateway using p8922.


5. Set the subnet mask using p8923.

Entry-ID: 35928944, V1.0, 11/2017 5


2 Engineering

6. Select "Activate and save configuration" as interface configuration using p8925 = 2.


7. With Modbus TCP, you always address first drive object from the list of drive objects
(p0978[0]). A servo or vector drive object must be in this parameter!
However, Modbus TCP is only activated, if under p0978[0] is a drive object that is
supported by Modbus TCP. If p0978[0] does not contain a valid drive object, then
establishing communication is acknowledged with Alarm A08555.

In the STARTER commissioning tool, check the list of drive object p0978.
The screenshot below is showing a correct configuration
 Siemens AG 2017 All rights reserved

8. Save the settings in the STARTER commissioning tool and carry out a POWER ON.

Entry-ID: 35928944, V1.0, 11/2017 6


2 Engineering

2.2 Operation
For the operation of the application example, the content of this Section is
absolutely necessary. In SIOS you can download the example project.

Before the example function block "Modbus_Communication" can establish the


Modbus TCP connection to the partner, the connection parameters first must be
specified in the user application. All relevant communication parameters can be
found in the data structure configuration.connection.

Table 2-2 Connection parameter


Parameter Data type Description
Connection Struct
interfaceID HW_ANY Hardware identifier of the local interface,
see PLC tags->Default tag table->System
constants
(default: 64)
connectionID CONN_ANY Unique connection identifier
16#0001 .. 16#0FFF
(default: 16#0FFF)
localPort UInt Local port number, see system function
 Siemens AG 2017 All rights reserved

TCON
(default: 3456)
partnerPort UInt Partner port number, see system function
TCON. (default: 502)
partnerIP IP_V4 Partner IP address from the drive

Figure 2-1 Connection parameters example

// Connection parameter
//-----------------------------------------------------------

//hardware identifier of the local interface


"Modbus_Communication_DB".configuration.connection.interfaceID :="Local~PROFINET_interface_1";
//unique connection identifier (16#0001..16#0FFF)
"Modbus_Communication_DB".configuration.connection.connectionID := 500;
//local port number, see system function TCON
"Modbus_Communication_DB".configuration.connection.localPort := 3456;
//drive port number
"Modbus_Communication_DB".configuration.connection.partnerPort := 502;
//IP-address from the cu xxx.xxx.xxx.xxx = [1].[2].[3].[4]
"Modbus_Communication_DB".configuration.connection.partnerIP.ADDR[1] := 192;
"Modbus_Communication_DB".configuration.connection.partnerIP.ADDR[2] := 168;
"Modbus_Communication_DB".configuration.connection.partnerIP.ADDR[3] := 214;
"Modbus_Communication_DB".configuration.connection.partnerIP.ADDR[4] := 2;

Entry-ID: 35928944, V1.0, 11/2017 7


2 Engineering

Figure 2-2 Function block

Modbus_Communication

Bool enable error Bool

Bool request status Word


faultAcknowle
Bool
dge
Int speed

"typeModbus_Config" configuration

Table 2-3 Parameters

Parameter Datentyp Kommentar


enable Bool TRUE: A rising edge activates processing and FB tries to
establish a connection to the drive.

FALSE (default): A falling edge clears the connection.


request Bool TRUE: The axis is switched step by step to operating state
S4 (Operation).
 Siemens AG 2017 All rights reserved

FALSE (default): The drive is switched step by step to


operating state S1 (Switching On Inhibited).
faultAcknowledge Bool TRUE: Acknowledgment of axis error.
speed Int Velocity setpoint in rpm.
configuration typeModbus_Config FB Configuration.
error Bool TRUE: An error is occurred. More detailed information is
provided by output parameter status.

FALSE: No error is occurred.


status Word FB Status, see system function MB_CLIENT.

Entry-ID: 35928944, V1.0, 11/2017 8


3 Additional information

3 Additional information

3.1 Background
Modbus-TCP-Client
The "MB_CLIENT" instruction from the S7-1500 communicates as a Modbus TCP
client via the local interface. With the "MB_CLIENT" instruction, you establish a
connection between the client (S7-1500) and the server (drive), send Modbus
requests, receive responses and control connection termination of the Modbus
TCP client.
For details please look at description of system function MB_CLIENT.

Drive Profile
PROFIdrive is the standard profile for SINAMICS drive technology in conjunction
with the PROFIBUS and PROFINET communication systems. A uniform basic
state machine is defined for all application classes in PROFIdrive. It is used to
bring the drive to a dedicated operating state or switch off the drive in a defined
manner.

The following figure shows the basic state machine (general state diagram) of a
 Siemens AG 2017 All rights reserved

PROFIdrive drive. The blue blocks represent drive axis states S1 to S5 and the
arrows indicate the state transitions that are possible between them. In case of
competing state transitions, priorities are defined by the number of red points
shown. The conditions for the state transitions to the yellow boxes are the
individual control commands, which are transferred from the controller to the drive
axis in the control word with bit coding.

Figure 3-1 general state diagram

Entry-ID: 35928944, V1.0, 11/2017 9


3 Additional information

In the example function block, the state machine was implemented in the
"Modbus_Communication" FB as an example. This example implantation is not
exhaustive, but only serves as a test function.

Modbus-Register and Parameter from the Control Unit


The Modbus protocol contains register or bit numbers for addressing memory.
You must assign the appropriate control words, status words and parameters to
these registers in the slave.
The valid holding register address range extends from 40001 up to 40722. When
trying to access other holding registers, the "Exception code" error is generated.
The process data are transferred into the register range from 40100 up to 40119.
The most important Modbus registers are listed in the following table.

NOTE A detail overview about the assigning Modbus register to the parameters is listed
in the SINAMICS S120 function manual under the chapter 11.4 "Communication
via MODBUS TCP".
https://support.industry.siemens.com/cs/ww/en/view/109740020

Table 3-1 Modbus register


Register Description Access Data/Parameter
 Siemens AG 2017 All rights reserved

Control data
40100 Control word (see SINAMICS S120/150 Process data 1
R/W
List Manual, function diagram 2442)
40101 Main setpoint R/W Process data 2
40102 STW 3 R/W Process data 3
40103 STW 4 R/W Process data 4
40104 PZD 5 R/W Process data 5
4010… PZD … R/W Process data …
40109 PZD 10 R/W Process data 10
Status data
40110 Control word (see SINAMICS S120/150 Process data 1
R
List Manual, function diagram 2452)
40111 Main actual value R Process data 2
40112 ZSW 3 R Process data 3
40113 ZSW 4 R Process data 4
40114 PZD 5 R Process data 5
4011… PZD … R Process data …
40119 PZD 10 R Process data 10
Drive data
40324 2
Reference speed R/W P2000
40400 Failure number, Index 0 R r0947 [0]
40408 Alarm number R r2110 [0]
40409 Actual alarm code R r2132

2) These registers are not supported for linear motors as the unit and value range differ from normal rotary
drives.

Entry-ID: 35928944, V1.0, 11/2017 10


3 Additional information

3.2 Fieldbus monitoring time


The time for monitoring received process data via fieldbus interface is set up via
p2040. If process data is not transferred within one cycle of the fieldbus monitoring
time then the drive shuts down with fault F01910. "Setpoint timeout" (F01910) is
issued by the Modbus if p2040 is set to a value > 0 ms and no process data are
transferred within this time period.

In the application example, a fieldbus monitoring time (p2040) of 150 ms is set


because the controller send new values every 100ms to the drive.

Figure 3-2 Monitoring time


 Siemens AG 2017 All rights reserved

Figure 3-3 Cycle time

Entry-ID: 35928944, V1.0, 11/2017 11


4 Appendix

4 Appendix
4.1 Service and Support
Industry Online Support
Do you have any questions or need assistance?
Siemens Industry Online Support offers round the clock access to our entire
service and support know-how and portfolio.
The Industry Online Support is the central address for information about our
products, solutions and services.
Product information, manuals, downloads, FAQs, application examples and videos
– all information is accessible with just a few mouse clicks at:
https://support.industry.siemens.com

Technical Support
The Technical Support of Siemens Industry provides you fast and competent
support regarding all technical queries with numerous tailor-made offers
– ranging from basic support to individual support contracts. You send queries to
Technical Support via Web form:
www.siemens.com/industry/supportrequest
 Siemens AG 2017 All rights reserved

SITRAIN – Training for Industry


With our globally available training courses for our products and solutions, we help
you achieve with practical experience, innovative learning methods and a concept
that’s tailored to the customer’s specific needs.
For more information on our offered trainings and courses, as well as their
locations and dates, refer to:
www.siemens.com/sitrain

Service offer
Our range of services includes the following:
 Plant data services
 Spare parts services
 Repair services
 On-site and maintenance services
 Retrofitting and modernization services
 Service programs and contracts
You can find detailed information on our range of services in the service catalog:
https://support.industry.siemens.com/cs/sc

Industry Online Support app


You will receive optimum support wherever you are with the "Siemens Industry
Online Support" app. The app is available for Apple iOS, Android and Windows
Phone:
https://support.industry.siemens.com/cs/ww/en/sc/2067

Entry-ID: 35928944, V1.0, 11/2017 12


4 Appendix

4.2 Application Support


Siemens AG
Digital Factory Division
Factory Automation
Production Machines
DF FA PMA APC
Frauenauracher Str. 80
91056 Erlangen, Germany
mailto: profinet.team.motioncontrol.i-dt@siemens.com

4.3 Links and Literature


Table 4-1
No. Topic
\1\ Siemens Industry Online Support
https://support.industry.siemens.com
\2\ Link to this entry page of this application example
https://support.industry.siemens.com/cs/ww/en/view/35928944
 Siemens AG 2017 All rights reserved

4.4 Change documentation


Table 4-2
Version Date Modifications
V1.0 11/2017 First version

Entry-ID: 35928944, V1.0, 11/2017 13

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy