Sie sind auf Seite 1von 54

Drive System Application

Commissioning of SINAMICS G120 with CU230P-2


HVAC and MODBUS

Application describtion
for SINAMICS G120 with CU230P-2
Warranty, liability and support

Commissioning of SINAMICS G120 with CU230P-2 HVAC and ID-No:35928944


MODBUS

Note The Application Examples are not binding and do not claim to be complete
regarding the circuits shown, equipping and any eventuality. The Application
Examples do not represent customer-specific solutions. They are only intended
to pro-vide support for typical applications. You are responsible in ensuring that
the de-scribed products are correctly used. These Application Examples do not
relieve you of the responsibility in safely and professionally using, installing,
operating and servicing equipment. When using these Application Examples, you
recognize that Siemens cannot be made liable for any damage/claims beyond
the liability clause described. We reserve the right to make changes to these
Application Examples at any time without prior notice. If there are any deviations
between the recommendations provided in these Application Examples and
other Siemens publications - e.g. Catalogs - then the contents of the other
documents have priority.
Copyright © Siemens AG 2009 All rights reserved
CU230_Modbus_V1_1_en.doc

Version 1.1 Issue January 2010 2/54


Warranty, liability and support

Commissioning of SINAMICS G120 with CU230P-2 HVAC and ID-No:35928944


MODBUS

Warranty, liability and support


We do not accept any liability for the information contained in this document.
Any claims against us - based on whatever legal reason - resulting from the use of
the examples, information, programs, engineering and performance data etc.,
described in this Application Examples shall be excluded. Such an exclusion shall
not apply in the case of mandatory liability, e.g. under the German Product Liability
Act (“Produkthaftungsgesetz”), in case of intent, gross negligence, or injury of life,
body or health, guarantee for the quality of a product, fraudulent concealment of a
deficiency or breach of a condition which goes to the root of the contract
(“wesentliche Vertragspflichten”). However, claims arising from a breach of a
condition which goes to the root of the contract shall be limited to the foreseeable
damage which is intrinsic to the contract, unless caused by intent or gross
negligence or based on mandatory liability for injury of life, body or health The
above provisions does not imply a change in the burden of proof to your detriment.
Copyright© 2009 Siemens A&D. It is not permissible to transfer or copy these
Application Examples or excerpts of them without first having prior
Copyright © Siemens AG 2009 All rights reserved

authorization from Siemens A&D in writing.


If you have any recommendations relating to this document then please send them
CU230_Modbus_V1_1_en.doc

to us at the following e-mail address:


mailto:sdsupport.aud@siemens.com

Version 1.1 Issue January 2010 3/54


Preposition

Commissioning of SINAMICS G120 with CU230P-2 HVAC and ID-No:35928944


MODBUS

Preposition
Aim of the application
This application was created in order to provide the user with an easy introduction
to the subject of commissioning the CU230P-HVAC control unit with MODBUS
interface.
This application contains general instructions on how to connect the CU230P-
HVAC to a MODBUS network.
The application describes each of the steps involved in setting up an S7 project to
control a SINAMIC G120 with the CU230P-HVAC via MODBUS, and how to control
the inverter using a variables table.

Scope
The following core issues are discussed in this application:
Copyright © Siemens AG 2009 All rights reserved

• Instructions for connecting the CU230P-HVAC to a MODBUS network.


• Commissioning the CU230P-HVAC with MODBUS interface
CU230_Modbus_V1_1_en.doc

Exclusion
This description can be applied for SINAMICS G120 frequency inverters with
Control Units CU230P-HVAC.
This application does not include any description of the following
• The SIMATIC STEP 7 programming tool
• The basic commissioning of the frequency inverter
• Commissioning higher-level controls
It is assumed that readers have basic knowledge about these two subjects.

Reference to the Automation and Drives Service & Support


This article is from the Internet Application Portal of the Automation and Drives
Service & Support. You can go directly to the download page of this document
using this link.
http://support.automation.siemens.com/WW/view/en/35928944

Version 1.1 Issue January 2010 4/54


Application description
Table of Contents

Commissioning of SINAMICS G120 with CU230P-2 HVAC and ID-No:35928944


MODBUS

Table of Contents
Warranty, liability and support ................................................................................... 3
Preposition ................................................................................................................... 4
Table of Contents......................................................................................................... 5
Application description ............................................................................................... 7
1 Description ......................................................................................................... 7
2 Connecting CU230P-HVACto the MODBUS network ..................................... 9
2.1 Integrating an inverter into the MODBUS fieldbus system................... 9
2.2 MODBUS cable with connector for connection to CP341.................. 10
2.3 General specifications and requirements for fault-free communication10
2.4 Setting the MODBUS address ........................................................... 10
2.5 Communication settings for MODBUS............................................... 11
3 Prerequisites .................................................................................................... 12
3.1 Hardware components ....................................................................... 12
Copyright © Siemens AG 2009 All rights reserved

3.2 Software components......................................................................... 13


4 Configuration and wiring ................................................................................ 14
CU230_Modbus_V1_1_en.doc

4.1 Hardware configuration ...................................................................... 14


5 Configuring the CU230P-2 HVAC................................................................... 15
6 Set PG/PC interface ......................................................................................... 16
7 Create project and add SIMATIC 300 station................................................ 17
8 Creating the hardware configuration............................................................. 18
8.1 Creating the SIMATIC hardware ........................................................ 18
8.2 Save and compile............................................................................... 20
8.3 Download to Module........................................................................... 20
8.4 Commissioning the MODBUS interface ............................................. 21
8.5 Save and compile............................................................................... 29
8.6 Download to Module........................................................................... 29
9 Creating and Programming SIMATIC Step-7 Blocks ................................... 30
9.1 Insert the required Blocks into the S7 Project.................................... 30
9.2 Programming the OB1 and OB100 .................................................... 33
Modify organisation block OB1 .......................................................... 33
Modify organisation block OB100 ...................................................... 33
9.3 Programming the main Function Block FC3 ...................................... 34
Modify Function Block FC3 NW1 ....................................................... 34
Modify Function Block FC3 NW2 ....................................................... 34
Modify Function Block FC3 NW3 ....................................................... 34
Modify Function Block FC3 NW4 ....................................................... 36
Modify Function Block FC3 NW5 ....................................................... 36
9.4 Programming the Function Block FC7 to store the “Received Data”. 37
Modify Function Block FC7 NW1 ....................................................... 37
Modify Function Block FC7 NW2 ....................................................... 37
9.5 Programming the Function Block FC8 to store the “Sending Data”... 38
Modify Function Block FC8 NW1 ....................................................... 38
Modify Function Block FC8 NW2 ....................................................... 39

Version 1.1 Issue January 2010 5/54


Application description
Table of Contents

Commissioning of SINAMICS G120 with CU230P-2 HVAC and ID-No:35928944


MODBUS

Modify Function Block FC8 NW3 ....................................................... 39


Modify Function Block FC8 NW4 ....................................................... 40
Modify Function Block FC8 NW5 ....................................................... 40
9.6 Data Blocks for “Send” and “Receive”................................................ 41
Contents of DB7 ................................................................................. 41
Contents of DB8 ................................................................................. 42
Contents of DB10 ............................................................................... 43
Contents of DB20 ............................................................................... 44
9.7 Variable Table .................................................................................... 45
Add variable table............................................................................... 45
Load into CPU .................................................................................... 45
9.8 Communication on CP341 module established. ................................ 46
10 Controlling the drive........................................................................................ 47
10.1 MODBUS registers for the CPU230-2 HVAC .................................... 50
10.2 MODBUS Controlword1 ..................................................................... 52
10.3 Statusword 1 ...................................................................................... 53
Apendix and references ............................................................................................ 54
11 References ....................................................................................................... 54
Copyright © Siemens AG 2009 All rights reserved

11.1 Reference data................................................................................... 54


CU230_Modbus_V1_1_en.doc

11.2 History ................................................................................................ 54

Version 1.1 Issue January 2010 6/54


Application description
Description

Commissioning of SINAMICS G120 with CU230P-2 HVAC and ID-No:35928944


MODBUS

Application description
This section provides an overview of how to commission a SINAMICS G120 with a
CU230P-HVAC control unit and MODBUS.

1 Description
The CU230 is a Control Unit that has been optimized for pumps and fans. It can be
operated with all power units of the PM240, PM250 and PM260 series.
The CU230 Control Units are available in three versions:
• CU230P HVAC with USS interface via RS485
• CU230P CAN with CANopen interface
• CU230P DP with MODBUS interface
Copyright © Siemens AG 2009 All rights reserved
CU230_Modbus_V1_1_en.doc

Figure 1-1 CU230P-HVACwith MODBUS interface, doors closed and open

They can be commissioned either using the STARTER commissioning software or


using the optional "Intelligent Operator Panel - IOP“.

Version 1.1 Issue January 2010 7/54


Application description
Description

Commissioning of SINAMICS G120 with CU230P-2 HVAC and ID-No:35928944


MODBUS
Copyright © Siemens AG 2009 All rights reserved
CU230_Modbus_V1_1_en.doc

Figure 1-2 Intelligent Operator Panel (IOP)

This application describes the commissioning of the CU230P-HVAC with MODBUS


interface.
It provides general instructions on how to connect the CU230P-HVAC to a
MODBUS network, and explains how to commission a SINAMICS G120 with
CU230P-HVAC and SIMATIC S7.

It is assumed for the purpose of this application that the motor and inverter (the
power module and the control unit) have been assembled and that the inverter has
undergone the quick commissioning process.
The information required here can be found in the operating instructions for the
SINAMICS G120 and the CU230P-HVAC control units.

Version 1.1 Issue January 2010 8/54


Application description
Connecting CU230P-HVACto the MODBUS network

Commissioning of SINAMICS G120 with CU230P-2 HVAC and ID-No:35928944


MODBUS

2 Connecting CU230P-HVACto the MODBUS


network
2.1 Integrating an inverter into the MODBUS fieldbus
system
To integrate the inverter into the MODBUS fieldbus system, a 5-pin connector can
be found on the underside of the CU230P-HVAC control unit.
Copyright © Siemens AG 2009 All rights reserved
CU230_Modbus_V1_1_en.doc

Figure 2-1 5-pin connector on the CU230P-2 HVAC

You will find the pin assignments in the following table:

Table 2-1 Pin assignments for the 5-pin connector


Contact Designation Description
1 --- ---
2 RS485P Receive and send signal (+), Cable X7/11
3 RS485N Receive and send signal (-), Cable X7/4
4 Shield Cable shield
5
1 …….5

Version 1.1 Issue January 2010 9/54


Application description
Connecting CU230P-HVACto the MODBUS network

Commissioning of SINAMICS G120 with CU230P-2 HVAC and ID-No:35928944


MODBUS

2.2 MODBUS cable with connector for connection to


CP341
MODBUS cable connector
For connecting the SINAMICS G120 frequency inverter, we recommend the
following
MODBUS cable connectors:
• 6ES7902-AB00-0AA0 (15-pin sub D connector, 5m)
• 6ES7902-AC00-0AA0 (15-pin sub D connector, 10m)
• 6ES7902-AG00-0AA0 (15-pin sub D connector, 50m)

Permissible cable lengths


The permissible cable lengths depend on the baud rate and the MODBUS cable.
For more information, visit:
Copyright © Siemens AG 2009 All rights reserved

(http://www.automation.siemens.com/net/html_76/support/printkatalog.htm)
CU230_Modbus_V1_1_en.doc

2.3 General specifications and requirements for fault-free


communication
You can integrate up to 31 slaves into a MODBUS network. You must connect the
bus terminating resistor for the first and last stations of each segment.
You can disconnect one or more slaves from the bus (by unplugging the 5-pin bus
connector) without interrupting the communication for the other stations. It is
important to ensure that a bus terminating resistor is connected to the "first" and
"last" nodes.

Note
Communication with the controller, even when the line voltage is switched
off
You will have to supply the Control Unit with 24 V DC on terminals 31 and 32 if you
require communication to take place with the controller when the line voltage is
switched off.

2.4 Setting the MODBUS address


Before the MODBUS interface is used, the address of the node point (inverter)
must be set.
The following method is available for setting the MODBUS address:
• Using parameter p2021

Version 1.1 Issue January 2010 10/54


Application description
Connecting CU230P-HVACto the MODBUS network

Commissioning of SINAMICS G120 with CU230P-2 HVAC and ID-No:35928944


MODBUS

Note
Important notes for setting the MODBUS address
The fieldbus-address can only be set using p2021. Address 0 is set as default
(factory setting). When setting P2030 = 2 (MODBUS), p2021 is set to „1“ as
default.
The CP341 RS422/485 can only support up to 31 slaves!
A newly set MODBUS address will only come into effect after switching off and on
again. It is particularly important that any external 24 V supply is switched off.

2.5 Communication settings for MODBUS


MODBUS parameters
You can integrate your CU230P-HVAC control unit into a MODBUS communication
system, when the following preconditions are met:

Copyright © Siemens AG 2009 All rights reserved

The MODBUS address is set using P2021


• The communication procedure uses MODBUS Master, RTU
CU230_Modbus_V1_1_en.doc

• Modify the communication settings, the parameters that you can use to make
changes are listed in the table below.

Table 2-2 MODBUS parameters


Parameter Description
P2020 Fieldbus Baud rate, 4800 bit/s to 19200 bit/s can be set for
communication, the factory setting is 19200 bit/s
P2021 Fieldbus Address, selectable slave address from 1 to 247, but max
could be 31 slaves per CP341 RS422/RS485
P2024 MODBUS timing. (Refer to the table Baudrates and Mapping Table,
section 6.2.2 in the Operating instructions)
• Index 0: Message processing time
• Index 1: Inter-char-delay
• Index 2: Inter-frame delay

P2030 Fieldbus telegram selection:


• 0: No protocol
• 1: USS
• 2: MODBUS
• 3: Profibus
• 4: Canbus

P2040 Fieldbus PZD off time, determines the time after which an alarm is
generated if no process data is sent.

Version 1.1 Issue January 2010 11/54


Application description
Prerequisites

Commissioning of SINAMICS G120 with CU230P-2 HVAC and ID-No:35928944


MODBUS

3 Prerequisites
3.1 Hardware components

Table 3-1 Hardware components


Order No. Manufacture
Component Type No.
[MLFB]/ordering data r
S7 control
Power supply PS307 5A 6ES7307-1EA00- 1 SIEMENS
0AA0
S7-F CPU CPU 317F-2 PN/DP 6ES7317-2FK13-0AB0 1
Memory Card MMC 8 MB 6ES7953-8LP11-0AA0 1
SIMATIC S7-300, CP341 6ES7341-1CH02-
COMMUNICATION 0AE0
PROCESSOR
Copyright © Siemens AG 2009 All rights reserved

S7-CP341 WITH RS422/485 1


INTERFACE
CU230_Modbus_V1_1_en.doc

INCL. CONFIG.
PACKAGE ON CD
Drive
SINAMICS G120 Control SIEMENS
CU230P-2 HVAC 6SL3243-0BA30-1HA0 1
Unit
SINAMICS G120 Power
PM240 6SL3224-0BE13-7UA0 1
Module
Intelligent Operator Panel
Operator Panel IOP * 6SL3255-0AA00-4AA0 1
IOP
MODBUS
MODBUS Cable 5 m SIMATIC S7/M7, CABLE 6ES7902-3AB00- 1 SIEMENS
FOR POINT TO POINT 0AA0
CONNECTIONS
RS422 - RS422, 15-POLE
SUBMIN.
D PINS, 5 M LENGTH
Motor / Line
Motor Asynchronous motor 1LA7060-4AB10 1 SIEMENS
Motor cable, 1.5 m Motor cable 6ES7194-1LA01-0AA0 1
Line supply feeder cable Line supply feeder cable - 1 -
PG/PC
PG/PC SIMATIC Field PG M 6ES7712-1BB10- 1 SIEMENS
0AG2

*
The Intelligent Operator Panel IOP is required in order to parameterize the drive. The STARTER
commissioning tool can also be used (refer to the software prerequisites).

Version 1.1 Issue January 2010 12/54


Application description
Prerequisites

Commissioning of SINAMICS G120 with CU230P-2 HVAC and ID-No:35928944


MODBUS

Note:
The functionality was tested using the specified hardware components. Similar
products can be used that deviate from the list above.

3.2 Software components

Table 3-2 Software components

Order No. Manufacture


Component Type No.
[MLFB]/ordering data r
6ES7810-4CC08- SIEMENS
SIMATIC STEP 7 V5.4 + SP4 1
0YA5
*
STARTER To be released, [download the 6SL3072-0AA00- 1
up-to-date version of the 0AG0
website) or Downloads
Copyright © Siemens AG 2009 All rights reserved

S7-MODBUS Master SIMATIC S7, MODBUS 6ES7870-1AA01- 1


V3.1 Software MASTER V3.1 0YA0
CU230_Modbus_V1_1_en.doc

SINGLE LICENSE F.1


INSTALLATION
R-SW, SW AND DOCU. ON
CD,
HW-DONGLE, CLASS A,
EXECUTABLE U. STEP7
FROM V4.2,
REFERENCE-HW: CP341 AND
CP441-2
MS Windows MS Windows 2000 SP3 / MS - 1 Microsoft
Windows XP / Windows 2003
Server

*
The STARTER commissioning tool is required to parameterize the drive. The operator panel
can also be used (refer to the hardware prerequisites).

Version 1.1 Issue January 2010 13/54


Application description
Configuration and wiring

Commissioning of SINAMICS G120 with CU230P-2 HVAC and ID-No:35928944


MODBUS

4 Configuration and wiring


4.1 Hardware configuration
Connect all of the devices as shown in the following Fig.

Motor

SINAMICS G120 with CPU317-2-F-PN/DP


CU230P-2 HVAC + CP341 RS422/485 PG/PC
Copyright © Siemens AG 2009 All rights reserved
CU230_Modbus_V1_1_en.doc

RS485 (Cable X27)


MPI
Figure 4-1 Hardware configuration

Version 1.1 Issue January 2010 14/54


Application description
Configuring the CU230P-2 HVAC

Commissioning of SINAMICS G120 with CU230P-2 HVAC and ID-No:35928944


MODBUS

5 Configuring the CU230P-2 HVAC


The CU230P-HVAC control units are preconfigured for use with MODBUS, i.e.
MODBUS has been selected as the factory setting for the command and setpoint
source (P0700 and P1000).
Use the IOP or STARTER to check parameters P0700, P1000 and in the CU230P-
HVACand, if necessary, adjust them as follows:

Table 5-1 Configuring the CU230P-2 HVAC


Parameter No. Designation Parameter Note / comments
value
P0700[0] Selection of command source 6 6: MODBUS
P1000[0] Selection of frequency setpoint 6 6: MODBUS
P2020 Selection of Fieldbus baud rate 7 7: 19200 bit/s
P2021 Selection of Fieldbus address 1 1: Slave address. In 2-wire
operation it is possible to
connect up to 31 slaves to one
Copyright © Siemens AG 2009 All rights reserved

master in half-duplex operation


P2024 Selection of MODBUS timing
CU230_Modbus_V1_1_en.doc

Index 0: 50 ms Message processing time:


MODBUS Slave telegram
processing time, the time after
which the slave may send a
response to the Master.

Index 1: Inter-char-delay
Character delay time:
Index 1: 2ms Maximum permissible delay
time between the individual in
the MODBUS frame.
(MODBUS standard
processing time is 1.5 bytes)

Index 2: Inter-frame delay:


Maximum permissible delay
time between MODBUS
Index 2:
telegrams. (MODBUS standard
processing time for 3.5 bytes)
P2030 Fieldbus telegram 2 MODBUS
P2040 Fieldbus PZD off time 1000 ms Fieldbus PZD off time,
determines the time after which
an alarm is generated if no
process data is sent.

Version 1.1 Issue January 2010 15/54


Application description
Set PG/PC interface

Commissioning of SINAMICS G120 with CU230P-2 HVAC and ID-No:35928944


MODBUS

6 Set PG/PC interface


Open the SIMATIC Manager and set the PG/PC interface. To do this, press the
button "Options -> Set PG/PC Interface…" in the SIMATIC Manager menu.
From the list, select the MPI Interface and acknowledge your selection with "OK".
Copyright © Siemens AG 2009 All rights reserved
CU230_Modbus_V1_1_en.doc

Figure 6-1 Set PG/PC interface

Acknowledge the alarm "The following access path(s) was (were) changed:
S7ONLINE (STEP 7) => CP5611 (MPI)" with "OK".

Figure6-1 Acknowledge the alarm

This means that the MODBUS interface of your CP´s can be accessed from STEP
7.

Version 1.1 Issue January 2010 16/54


Application description
Create project and add SIMATIC 300 station

Commissioning of SINAMICS G120 with CU230P-2 HVAC and ID-No:35928944


MODBUS

7 Create project and add SIMATIC 300


station
Create a new project and add a SIMATIC 300 station to the project by clicking the
"Insert -> Station -> 2 SIMATIC 300 Station" button in the menu (see Figure 7-1).
Copyright © Siemens AG 2009 All rights reserved
CU230_Modbus_V1_1_en.doc

Figure7-1 Adding a SIMATIC 300 station

Version 1.1 Issue January 2010 17/54


Application description
Creating the hardware configuration

Commissioning of SINAMICS G120 with CU230P-2 HVAC and ID-No:35928944


MODBUS

8 Creating the hardware configuration


8.1 Creating the SIMATIC hardware
Open the hardware configuration by double-clicking the "Hardware" button (see
Figure 8-1).

Double-click

Figure 8-1 Opening HW-Config


Copyright © Siemens AG 2009 All rights reserved
CU230_Modbus_V1_1_en.doc

In the HW-Config:
• insert a SIMATIC S7-300 rack into the configuration,
• and then draw the desired power supply module from the product tree to slot 1
and the CPU to the slot 2 in the SIMATIC rack.
– When you insert the CPU the window for the settings of the Ethernet
interface opens. Close the window with “OK” (Fig. 8-2).

Click

Figure 8-2 Inserting the CPU

Version 1.1 Issue January 2010 18/54


Application description
Creating the hardware configuration

Commissioning of SINAMICS G120 with CU230P-2 HVAC and ID-No:35928944


MODBUS

Result:
Copyright © Siemens AG 2009 All rights reserved
CU230_Modbus_V1_1_en.doc

Figure 8-3 HW Config SIMATIC hardware

Selecting and inserting the CP341 module (Fig. 8-4, Fig 8-5 Fig. 8-6)
To create then the MODBUS interface, you have to install the Software
“Configuration Package for Point to Point Communication”, which is included in the
SIMATIC CP341 Module.
Also you have to install the Software “SIMATIC MODBUS Master V3.1 inc. HW-
dongle”. This Software is required to communicate with the CP341.
May you have to install the new Hardware updates to have access to the new
CP341 modules. These Hardware updates could be automatically downloaded in
Siemens SIMATIC Step 7 from the Siemens Website. “open the Hardware config”,
“< Options, Install HW Updates, Download form Internet”

Version 1.1 Issue January 2010 19/54


Application description
Creating the hardware configuration

Commissioning of SINAMICS G120 with CU230P-2 HVAC and ID-No:35928944


MODBUS

Figure 8-4 HW Config. of the CP341 RS485 module


Copyright © Siemens AG 2009 All rights reserved

Result:
CU230_Modbus_V1_1_en.doc

The CP341-RS422-485 module is integrated into the H/W-config

8.2 Save and compile


After completing the configuration of the SINAMICS G120 the hardware
configuration must be saved and compiled.

Save and compile your configuration by pressing the „Save and compile“
button (Figure 8-5).

8.3 Download to Module

Now load the hardware configuration into the CPU by clicking the "Download
to Module" button (Figure 8-5).

Version 1.1 Issue January 2010 20/54


Application description
Creating the hardware configuration

Commissioning of SINAMICS G120 with CU230P-2 HVAC and ID-No:35928944


MODBUS

8.4 Commissioning the MODBUS interface


The properties window of the CP341-RS422/485 interface opens (refer to Fig. 8-
5).Select the MODBUS interface
Copyright © Siemens AG 2009 All rights reserved
CU230_Modbus_V1_1_en.doc

Double-click

Figure 8-5 CP341 in the H/W-config

Result:
The “Properties” window will be displayed and then select the “Addresses”.
These addresses are used later when we writing the PLC program. For this
example we used as Inputs/Outputs Addresses “Start: 256 and End 271”. (Figure
8-8)

Version 1.1 Issue January 2010 21/54


Application description
Creating the hardware configuration

Commissioning of SINAMICS G120 with CU230P-2 HVAC and ID-No:35928944


MODBUS
Copyright © Siemens AG 2009 All rights reserved
CU230_Modbus_V1_1_en.doc

Figure 8-6 Enter the „Addresses“

Select the “Parameters” for CP341 – RS422/485 RTU (Fig. 8-9).

Click

Figure 8-7 Configure the “Protocol”

Version 1.1 Issue January 2010 22/54


Application description
Creating the hardware configuration

Commissioning of SINAMICS G120 with CU230P-2 HVAC and ID-No:35928944


MODBUS

Result:
In the window Select “MODBUS Master”, because the “RTU” protocol is assign to
“MODBUS Master”. Acknowledge the “Alarm” (Fig. 8.11) with “YES” and “SAVE”
these settings. (click on the Icon “Save”)

Save

Select
Copyright © Siemens AG 2009 All rights reserved
CU230_Modbus_V1_1_en.doc

Figure 8-8 Assign to the MODBUS Master (RTU)

Acknowledge the Alarm "YES" key (Fig. 8-10).

Figure 8-9 acknowledge the alarm

“Treiber Laden –box” has now been added into the H/W-config;
The “Load Drivers – box” is now added into HW Config. Only with downloading
the “Drivers” is a communication with the CP341 module possible.

Version 1.1 Issue January 2010 23/54


Application description
Creating the hardware configuration

Commissioning of SINAMICS G120 with CU230P-2 HVAC and ID-No:35928944


MODBUS

Click
Copyright © Siemens AG 2009 All rights reserved
CU230_Modbus_V1_1_en.doc

Figure 8-10 HW Config - “Load Driver -box”

Load “Driver” into the CP341 module:


“Load Driver to CP341” (downloading the driver to the CP341”.
Click: “Load Driver”.

Click

Figure 8-11 „Load Driver to CP341“

Version 1.1 Issue January 2010 24/54


Application description
Creating the hardware configuration

Commissioning of SINAMICS G120 with CU230P-2 HVAC and ID-No:35928944


MODBUS

Acknowledge the alarm “Load Driver (2248:606)”

Figure 8-12 Alarm „ Load Driver (2248:606)

Result:
„Load Driver to CP341“ is completed. The „Driver name“ (Treiber-Name) and
Copyright © Siemens AG 2009 All rights reserved

„Driver version“ (Treiber-Version) are displayed and the “Off-line and On-line
version should be the same. (Fig. 8-14)
CU230_Modbus_V1_1_en.doc

On-line Version

Off-line Version

Click

Figure 8-13 „ Load Driver to CP341 completed“

Version 1.1 Issue January 2010 25/54


Application description
Creating the hardware configuration

Commissioning of SINAMICS G120 with CU230P-2 HVAC and ID-No:35928944


MODBUS

Select “Protocol”
In the “Protocol” will be the “Interface – parameters listed (Fig. 8-16)
Copyright © Siemens AG 2009 All rights reserved
CU230_Modbus_V1_1_en.doc

Figure 8-14 Select Protocol

Select “Protocol for MODBUS-Master”


Select the “Response delay time”, “Operation:”, “Stopbits:”, “Parity”
“Baudrate”: as shown (Fig. 8-17)

Figure 8-15 Select Protocol for MODBUS Master

Version 1.1 Issue January 2010 26/54


Application description
Creating the hardware configuration

Commissioning of SINAMICS G120 with CU230P-2 HVAC and ID-No:35928944


MODBUS

Select “Interface”
The X27/RS485 is a 2-wire connection. It is possible to create a multipoint
connection (network) connecting up to 31 slaves to one master system. (Fig 8-18)
Copyright © Siemens AG 2009 All rights reserved
CU230_Modbus_V1_1_en.doc

Figure 8-16 Select Interface –„Halbdublex (RS 485) Zweidrahtbetrieb

Schematic Connections: Halve -Duplex, (Fig 8-19)

Figure 8-17 Schematic Connections: Halve -Duplex

Result:
Save Configuration “, safe file” or Click on the “Save” Icon. When saved, then
the “Save Icon” goes gray. (Fig 8-20)

Version 1.1 Issue January 2010 27/54


Application description
Creating the hardware configuration

Commissioning of SINAMICS G120 with CU230P-2 HVAC and ID-No:35928944


MODBUS
Copyright © Siemens AG 2009 All rights reserved
CU230_Modbus_V1_1_en.doc

Figure 8-18 Save Configuration “saving file”

Leaving the “Properties Window” with clicking “OK” (Fig. 8-20)

Figure 8-19 Leaving the “Properties Window”

Version 1.1 Issue January 2010 28/54


Application description
Creating the hardware configuration

Commissioning of SINAMICS G120 with CU230P-2 HVAC and ID-No:35928944


MODBUS

8.5 Save and compile


After completing the configuration of the SINAMICS G120 the hardware
configuration must be saved and compiled.

Save and compile your configuration by pressing the „Save and compile“
button (Figure 8-5).

8.6 Download to Module

Now load the hardware configuration into the CPU by clicking the "Download
to Module" button (Figure 8-5).
Copyright © Siemens AG 2009 All rights reserved
CU230_Modbus_V1_1_en.doc

Version 1.1 Issue January 2010 29/54


Application description
Creating and Programming SIMATIC Step-7 Blocks

Commissioning of SINAMICS G120 with CU230P-2 HVAC and ID-No:35928944


MODBUS

9 Creating and Programming SIMATIC Step-


7 Blocks
9.1 Insert the required Blocks into the S7 Project
The Modbus Master required the FB7 for RECEIVE Data and FB8 for SEND Data.
These FB’s stored in the Libraries. “File – Open Project – Libraries” (Fig. 9-2)
Copyright © Siemens AG 2009 All rights reserved
CU230_Modbus_V1_1_en.doc

Figure 9-1

Select and open the “CP PtP” Library (Fig. 9-2)

Version 1.1 Issue January 2010 30/54


Application description
Creating and Programming SIMATIC Step-7 Blocks

Commissioning of SINAMICS G120 with CU230P-2 HVAC and ID-No:35928944


MODBUS
Copyright © Siemens AG 2009 All rights reserved
CU230_Modbus_V1_1_en.doc

Figure 9-2

Copy FB7 and FB8 of the Library (Fig. 9-3)

Figure 9-3 Copy FB7/FB8

Version 1.1 Issue January 2010 31/54


Application description
Creating and Programming SIMATIC Step-7 Blocks

Commissioning of SINAMICS G120 with CU230P-2 HVAC and ID-No:35928944


MODBUS

Paste FB7 and FB8 into the project (Fig.9.4)


Copyright © Siemens AG 2009 All rights reserved
CU230_Modbus_V1_1_en.doc

Figure 9-4 Paste FB7/FB8

Note:
When the S7 programming is completed, following S7-Program Blocks should be
listed: See Fig. 9-5

Figure 9-5 S7 programming is completed

Version 1.1 Issue January 2010 32/54


Application description
Creating and Programming SIMATIC Step-7 Blocks

Commissioning of SINAMICS G120 with CU230P-2 HVAC and ID-No:35928944


MODBUS

9.2 Programming the OB1 and OB100


Modify organisation block OB1
Add the following entries to OB1 (see Figure 9-6):

Figure 9-6 Text and comments for OB1

Modify organisation block OB100


Add the following entries to OB100 (see Figure 9.7):
Copyright © Siemens AG 2009 All rights reserved
CU230_Modbus_V1_1_en.doc

Figure 9-7 Modify organisation block OB100

Version 1.1 Issue January 2010 33/54


Application description
Creating and Programming SIMATIC Step-7 Blocks

Commissioning of SINAMICS G120 with CU230P-2 HVAC and ID-No:35928944


MODBUS

9.3 Programming the main Function Block FC3


Modify Function Block FC3 NW1
Add the following entries to FC3 NW1 (see Figure 9-8):

Figure 9-8 Modify Function Block FC3 NW1


Copyright © Siemens AG 2009 All rights reserved

Modify Function Block FC3 NW2


Add the following entries to FC3 NW2 (see Figure 9-9):
CU230_Modbus_V1_1_en.doc

Figure 9-9 Modify Function Block FC3 NW2

Modify Function Block FC3 NW3


Add the following entries to FC3 NW3 (see Figure 9-10):
When the syntax “Send: Call FB8 8, DB 8” is entered, then the program asked
you to open a DB8. Confirm with yes
When the syntax “Send: Call FB7 7, DB 7” is entered, then the program asked
you to open a DB7. Confirm with yes

Version 1.1 Issue January 2010 34/54


Application description
Creating and Programming SIMATIC Step-7 Blocks

Commissioning of SINAMICS G120 with CU230P-2 HVAC and ID-No:35928944


MODBUS

Programming these
functions will automatically
create DB7 and DB8
Copyright © Siemens AG 2009 All rights reserved
CU230_Modbus_V1_1_en.doc

Figure 9-10 Modify Function Block FC3 NW3

Version 1.1 Issue January 2010 35/54


Application description
Creating and Programming SIMATIC Step-7 Blocks

Commissioning of SINAMICS G120 with CU230P-2 HVAC and ID-No:35928944


MODBUS

Modify Function Block FC3 NW4


Add the following entries to FC3 NW4 (see Figure 9-11):
Copyright © Siemens AG 2009 All rights reserved
CU230_Modbus_V1_1_en.doc

Figure 9-11 Modify Function Block FC3 NW4

Modify Function Block FC3 NW5


Add the following entries to FC3 NW5 (see Figure 9-12):

Figure 9-12 Modify Function Block FC3 NW5

Version 1.1 Issue January 2010 36/54


Application description
Creating and Programming SIMATIC Step-7 Blocks

Commissioning of SINAMICS G120 with CU230P-2 HVAC and ID-No:35928944


MODBUS

9.4 Programming the Function Block FC7 to store the


“Received Data”

Modify Function Block FC7 NW1


Add the following entries to FC7 NW1 (see Figure 9-13):
Copyright © Siemens AG 2009 All rights reserved
CU230_Modbus_V1_1_en.doc

Figure 9-13 Modify Function Block FC7 NW1

Modify Function Block FC7 NW2


Add the following entries to FC7 NW2 (see Figure 9-14):

Figure 9-14 Modify Function Block FC7 NW2

Version 1.1 Issue January 2010 37/54


Application description
Creating and Programming SIMATIC Step-7 Blocks

Commissioning of SINAMICS G120 with CU230P-2 HVAC and ID-No:35928944


MODBUS

Figure 9-15 Modify Function Block FC7 NW3

9.5 Programming the Function Block FC8 to store the


“Sending Data”
Copyright © Siemens AG 2009 All rights reserved

Modify Function Block FC8 NW1


CU230_Modbus_V1_1_en.doc

Add the following entries to FC8 NW1 (see Figure 9-16):

Figure 9-16 Modify Function Block FC8 NW1

Version 1.1 Issue January 2010 38/54


Application description
Creating and Programming SIMATIC Step-7 Blocks

Commissioning of SINAMICS G120 with CU230P-2 HVAC and ID-No:35928944


MODBUS

Modify Function Block FC8 NW2


Add the following entries to FC8 NW2 (see Figure 9-17):

Figure 9-17 Modify Function Block FC8 NW2

Modify Function Block FC8 NW3


Copyright © Siemens AG 2009 All rights reserved

Add the following entries to FC3 NW3 (see Figure 9-18):


CU230_Modbus_V1_1_en.doc

Figure 9-18 Modify Function Block FC8 NW3

Version 1.1 Issue January 2010 39/54


Application description
Creating and Programming SIMATIC Step-7 Blocks

Commissioning of SINAMICS G120 with CU230P-2 HVAC and ID-No:35928944


MODBUS

Modify Function Block FC8 NW4


Add the following entries to FC3 NW4 (see Figure 9-19):

Figure 9-19 Add the following entries to FC3 NW3 (see Figure 9.18)

Modify Function Block FC8 NW5


Copyright © Siemens AG 2009 All rights reserved

Add the following entries to FC3 NW4 (see Figure 9-20):


CU230_Modbus_V1_1_en.doc

Figure 9-20 Modify Function Block FC8 NW5

Version 1.1 Issue January 2010 40/54


Copyright © Siemens AG 2009 All rights reserved
CU230_Modbus_V1_1_en.doc

Application description
Creating and Programming SIMATIC Step-7 Blocks

Commissioning of SINAMICS G120 with CU230P-2 HVAC and MODBUS ID-No:35928944

9.6 Data Blocks for “Send” and “Receive”


Contents of DB7
The contents of the DB7 are given from the FC7 (see Figure 9-21):

Figure 9-21 Contents of DB7

Version 1.1 Issue January 2010 41/54


Copyright © Siemens AG 2009 All rights reserved
CU230_Modbus_V1_1_en.doc

Application description
Creating and Programming SIMATIC Step-7 Blocks

Commissioning of SINAMICS G120 with CU230P-2 HVAC and MODBUS ID-No:35928944

Contents of DB8
The contents of the DB8 are given from the FC8 (see Figure 9-22):

Figure 9-22 Contents of DB8

Version 1.1 Issue January 2010 42/54


Copyright © Siemens AG 2009 All rights reserved
CU230_Modbus_V1_1_en.doc

Application description
Creating and Programming SIMATIC Step-7 Blocks

Commissioning of SINAMICS G120 with CU230P-2 HVAC and MODBUS ID-No:35928944

Contents of DB10
The contents of the DB10 are used for the FC8 (see Figure 9-23):

Figure 9-23 Contents of DB10

Version 1.1 Issue January 2010 43/54


Copyright © Siemens AG 2009 All rights reserved
CU230_Modbus_V1_1_en.doc

Application description
Creating and Programming SIMATIC Step-7 Blocks

Commissioning of SINAMICS G120 with CU230P-2 HVAC and MODBUS ID-No:35928944

Contents of DB20
The contents of the DB20 are used for the FC7 (see Figure 9-24):

Figure 9-24 Contents of DB20

Version 1.1 Issue January 2010 44/54


Application description
Creating and Programming SIMATIC Step-7 Blocks

Commissioning of SINAMICS G120 with CU230P-2 HVAC and ID-No:35928944


MODBUS

9.7 Variable Table

Add variable table


Add a variable table using the SIMATIC Manager menu item "Insert -> S7 Block -
> 6 Variable Table" (see Figure 9-25).
Copyright © Siemens AG 2009 All rights reserved
CU230_Modbus_V1_1_en.doc

Figure 9-25 adding a variable table

In the variable table, add the following entries for flag words MW100 etc (see
Figure10-1).

Load into CPU

Then load all programmed blocks into the CPU by clicking the "Download"
button.

Version 1.1 Issue January 2010 45/54


Application description
Creating and Programming SIMATIC Step-7 Blocks

Commissioning of SINAMICS G120 with CU230P-2 HVAC and ID-No:35928944


MODBUS

9.8 Communication on CP341 module established.


When the communication between the slaves and the CP 341 are established,
then the two LED’s on the module has to be illuminated in “bright green” (see Fig.
9.26)
Copyright © Siemens AG 2009 All rights reserved
CU230_Modbus_V1_1_en.doc

Figure 9-26 Communication CP341

Version 1.1 Issue January 2010 46/54


Application description
Controlling the drive

Commissioning of SINAMICS G120 with CU230P-2 HVAC and ID-No:35928944


MODBUS

10 Controlling the drive


Control word 1 (STW1) and the main setpoint (HSW) are sent to the drive via the
MODBUS interface. The CP 341 receives the status word 1 (ZSW1) and the main
actual value (HIW).
The typical control word 047E is sent to the drive (all enable signals present). In
order to start the drive, 047F (edge at bit 0: “0” to “1”) must be sent to the drive. In
order to stop the drive again, word 047E must be sent to the drive (signal edge of
bit 0: “1” to “0”). The control word, which is sent with memory word MW110 should
be specified in the variable table VAT_1 (memory word MW100 if MW200 = 99,
refer to Fig. 10-1).
The CP 341 receives “status word 1” (ZSW1) and transfers it to memory word
MW110. Memory word MW110 can be taken from variable table VAT_1 (memory
word MW110 if MW200 = 109, refer to Fig. 10-1).
The main setpoint should be specified in variable table VAT_1 (memory word
MW100 if MW200 = 100, refer to Fig. 10-1). The response – the main actual value
– is saved in MW6 and can be taken from the variable table (refer to Fig. 10-1).
The drive receives the “main actual value” (HIW) and is transferred from memory
Copyright © Siemens AG 2009 All rights reserved

word 112 (MW 112). Memory word MW112 can be taken from variable table
VAT_1 (memory word MW112 if MW200 = 110, refer to Fig. 10-1).
CU230_Modbus_V1_1_en.doc

The frequency setpoint and actual value are normalized so that 4000(Hex)
corresponds to 50 Hz. The highest value that should be sent is 7FFF. The
normalization frequency (reference frequency) can be changed in P2000 (standard
value, 50 Hz).
The MODBUS function code 06 <SEND data> can only send a 16-bit word. The
“SEND address” is listed in various registers that are used in “MW190” (refer to Fig.
10-3).

Version 1.1 Issue January 2010 47/54


Copyright © Siemens AG 2009 All rights reserved
CU230_Modbus_V1_1_en.doc

Application description
Controlling the drive

Commissioning of SINAMICS G120 with CU230P-2 HVAC and MODBUS ID-No:35928944

VAR-Table:
This table will show the values when the inverter has stopped (Fig. 10.1)

Activate values

Enter control word 1

Read-out status word 1

MODBUS Register
Number for
SEND/RECEIVE

Figure 10-1 controlling the drive

Version 1.1 Issue January 2010 48/54


Copyright © Siemens AG 2009 All rights reserved
CU230_Modbus_V1_1_en.doc

Application description
Controlling the drive

Commissioning of SINAMICS G120 with CU230P-2 HVAC and MODBUS ID-No:35928944

VAR-Table:
This table will show the values when the inverter is running (Fig. 10.2)

„SEND“ or „RECEIVE”
are Active

Main actual value

Monitoring the
telegramms

ERROR Code

Figure 10-2 VAR-Table, inverter is running

Version 1.1 Issue January 2010 49/54


Application description
Controlling the drive

Commissioning of SINAMICS G120 with CU230P-2 HVAC and ID-No:35928944


MODBUS

10.1 MODBUS registers for the CPU230-2 HVAC

MODBUS used the registers 40100 and above, see Operation Manual Chapter 6.2

For the “SEND” operation the register address has to be entered in “MW200”

For the “RECEIVE” operation the register address has to be entered in “MW190”

The “Controlword” has the register address “40100”.


The program will not accept, when entering the register address as “40100” in
“MW200”. The “40” has to be taken off und the number “100” is used. The register
starts with the “Register address” – 1.

In this example:
Copyright © Siemens AG 2009 All rights reserved

– For the “SEND” “Control-word”, the register address to enter has to be 99


[100-1]
CU230_Modbus_V1_1_en.doc

– For the “SEND” Main setpoint”, the register address to enter has to be 100
[101-1]
– For the “RECEIVE” “Staus-word”, the register address to enter has to be
109 [110-1]
– For the “RECEIVE” “Main actual value”, the register address to enter has
to be 110 [111-1]

• The value of the “Controlword” or the “Main Setpoint”, depends of the “register
address”, are entered in “MW100”

• The value of the “Statusword” or the “Main actual value”, depends of the
register address, are displayed in “MW110” or “MW112”

Version 1.1 Issue January 2010 50/54


Copyright © Siemens AG 2009 All rights reserved
CU230_Modbus_V1_1_en.doc

Application description
Controlling the drive

Commissioning of SINAMICS G120 with CU230P-2 HVAC and MODBUS ID-No:35928944

Assigning the MODBUS registers to the paramemeters of the CPU230P-2 HVAC (Fig10.3)

Figure 10-3 assigning the MODBUS registers

Version 1.1 Issue January 2010 51/54


Application description
Controlling the drive

Commissioning of SINAMICS G120 with CU230P-2 HVAC and ID-No:35928944


MODBUS

10.2 MODBUS Controlword1


The MODBUS Controlword 1 is different to Profibus DB. (Fig 10-4)
Copyright © Siemens AG 2009 All rights reserved
CU230_Modbus_V1_1_en.doc

Figure 10-4 MODBUS Controlword 1

Version 1.1 Issue January 2010 52/54


Application description
Controlling the drive

Commissioning of SINAMICS G120 with CU230P-2 HVAC and ID-No:35928944


MODBUS

10.3 Statusword 1
The MODBUS Statusword 1 (Figure 10-6)
Copyright © Siemens AG 2009 All rights reserved
CU230_Modbus_V1_1_en.doc

Figure 10-5 MODBUS Statusword 1

Version 1.1 Issue January 2010 53/54


Apendix and references
References

Commissioning of SINAMICS G120 with CU230P-2 HVAC and ID-No:35928944


MODBUS

Apendix and references

11 References
11.1 Reference data
This list is in no way complete and only reflects a selection of suitable references.

Table 11-1
Subject area Title
\1\ Documentation SINAMICS G120
\2\ Application Function block (FC14) to control a drive inverter via
MODBUS-DP
\3\ Application Reading and writing parameters of the frequency
inverters SINAMICS G120/G120D, ET200S FC and
Copyright © Siemens AG 2009 All rights reserved

ET200pro via PROFINET and MODBUS


\4\ FAQ How do I control a G120 using the system functions
CU230_Modbus_V1_1_en.doc

SFC58 and SFC59?


\5\ FAQ How can I use SFC58 and SFC59 to read parameters
from my G120?
\6\ FAQ Are there program examples for the Instruction Manual
of the MICROMASTER MODBUS option module?
\7\ FAQ How do I read / write parameters using MODBUS on
the MICROMASTER 4 and CU240S/D DP/DP-F and
PROFINET on the CU240S/D PN/PN-F?
\8\ FAQ For MM 4 and for G120/G120D frequency inverters,
which parameters can be read-out using PZD?
\9\ Manual Manuals for CP 341
\10\ catalogs Down load catalogs

11.2 History
Table 11-2 History
Version Datum Change
V1.0 April 2009 First edition
V1.1 January 2010 reviewe chapter 2.4

Version 1.1 Issue January 2010 54/54

Das könnte Ihnen auch gefallen