Sunteți pe pagina 1din 38

ADVANCED PLC PROGRAMMING - SIEMENS S7-300 + Danfoss FC300 VFD

VLT® AutomationDrive FC 301 / FC 302 + PROFIBUS DP MCA 101

Advance PLC
Summary of Contents
Programming Course Chapter 2

SIEMENS S7-300 with Introduction -----------------1~1


Purpose of the manual, About PROFIBUS
Danfoss FC300 VFD
VLT FC301/FC302 ----------------------2~5
Specification and ratings, PROFIBUS DP MCA101
VLT®AutomationDrive FC 301 / FC 302 Technical Overview, Bus Topology
PROFIBUS DP MCA101
Installation ------------------ 6~8
MCA101, Bus line connection, PROFIBUS
network configuration

Drive Configuration and Programming-------------


-------------------- 9~11
Designed & Developed by: Parameters

PLC Programming ----------------- 12~36


Melchor R. Vasquez GSD files, Hardware Configuration, Ladder
Programing, Controlling the Drive via Profibus
Systems Design Engineer

-V 2019

1—1
VERSION 2019
ADVANCED PLC PROGRAMMING - SIEMENS S7-300 + Danfoss FC300 VFD
VLT® AutomationDrive FC 301 / FC 302 + PROFIBUS DP MCA 101

1. INTRODUCTION

1.1 Purpose of the Manual

The VLT® PROFIBUS DP Programming Guide provides information about:


• Configuring the system.
• Controlling the frequency converter.
• Parameter access.
• Programming.

Be sure to properly set/configure/install the basic Electrical wiring and jumpers, and
Parameters needed for the Drive to control and operate the motor/load. The
Reference should be in unit RPM with a range of 0 to 1675 RPM.

1.2 About Profibus

PROFIBUS is standardized in the international standards


IEC 61158 and IEC 61784, and supported by the member
companies of the PROFIBUS International user
community.

PROFIBUS International (PI) is the umbrella organization


for all Regional PROFIBUS Associations (RPA) worldwide. PI has engaged PNO (PROFIBUS
Nutzerorganisation e. V.), Germany, a non-profit organization based in Karlsruhe, Germany,
to establish Technical Committees and Working Groups in order to define and maintain the
open and vendor independent PROFIBUS technology. Any member of PROFIBUS International
may take an active part in maintenance and further development of the PROFIBUS
technology. This guarantees openness and vendor independence of the PROFIBUS
technology.

1.2.1 Profibus Terms

PROFIBUS-PA (Process Automation)


• Non RS-485, bus powered, “Safe environment”

PROFIBUS-DP (Dezentrale Preipherie)


• DP-V0: Cyclic Data Exchange
• DP-V1: Acyclic Data Exchange
• DP-V2: Broadcast Data exchange (peer-to-peer) [Resource sharing/Server Client]
• DP-V3: PROFInet...

1—2
VERSION 2019
ADVANCED PLC PROGRAMMING - SIEMENS S7-300 + Danfoss FC300 VFD
VLT® AutomationDrive FC 301 / FC 302 + PROFIBUS DP MCA 101
2. VLT FC301/FC302

Versatile and reliable


Built to last, this robust drive
operates effectively and
reliably even with the most
demanding applications and
in the most challenging
environments.

VLT® AutomationDrive takes


full advantage of all that the
new digital age has to offer to
ensure it completely fulfills
the requirements of your
applications and optimizes
your processes throughout the
entire lifecycle. Its cutting-edge thermal design and unique back-channel cooling make VLT®
AutomationDrive one of the most compact and cost-efficient drives in the market. And new
intelligent maintenance features and a range of DrivePro® services proactively improve
productivity, performance and up time.

Supply voltages and power range


• 3 x 200-240 V...0.25-37 kW
• 3 x 380-500 V...0.37 kW – 1.1 MW
• 3 x 525-600 V...0.75-75 kW
• 3 x 525-690 V...1.1 kW – 1.4 MW

Low harmonic drive


• 3 x 380-480 V...132-450 kW

12-pulse drive
• 3 x 380-500 V...250 kW – 1 MW
• 3 x 525-690 V...250 kW – 1.4 MW

2—3
VERSION 2019
ADVANCED PLC PROGRAMMING - SIEMENS S7-300 + Danfoss FC300 VFD
VLT® AutomationDrive FC 301 / FC 302 + PROFIBUS DP MCA 101

2.1 VLT PROFIBUS DP MCA 101

• Provides wide compatibility, a high


level of availability, support for all
major PLC vendors and
compatibility with future versions

• Fast, efficient communication,


transparent installation, advanced
diagnosis and parameterization and
auto-configuration of process data
using GSD-file

• Acyclic parameterization using


PROFIBUS DP-V1, PROFIdrive or
Danfoss FC profile state machines,
PROFIBUS DP-V1, Master Class 1
and 2

2—4
VERSION 2019
ADVANCED PLC PROGRAMMING - SIEMENS S7-300 + Danfoss FC300 VFD
VLT® AutomationDrive FC 301 / FC 302 + PROFIBUS DP MCA 101
2.2 Technical Overview

2.2.1 Bus Topology

Single master

• PLC communicates with telegrams


of constant length
• Fits time-critical requirements
• Cyclical transmission via PPO types
• Extended diagnosis

Profibus DP V0

Multiple master

Features of a Master class 1


connection
• Cyclical data exchange (DP V0)
• Acyclical read/write on parameters
• Extended diagnosis

The acyclical connection is fixed and


cannot be changed during operation.

Features of a Master class 2


connection:

Profibus DP V1
• Initiate / Abort acyclical connection
• Acyclical read/write on parameters

The acyclical connection can be established (Initiate) or removed (Abort) dynamically


even when a master class 1 is active on the network. The DP V1 acyclical connection can be used
for general parameter access as an alternative to the PCV parameter channel.

The PROFIBUS DP extension DP V1 permits acyclical as well as cyclical data communication. This
feature can be used by a DP master class 1 (e.g. PLC), as well as a DP master class 2 (e.g. PC tool).

2—5
VERSION 2019
ADVANCED PLC PROGRAMMING - SIEMENS S7-300 + Danfoss FC300 VFD
VLT® AutomationDrive FC 301 / FC 302 + PROFIBUS DP MCA 101
3. INSTALLATION

3.1 How to Install Option A (MCA 101) in Drive

To install a fieldbus option in the drive you will need:


• The fieldbus option (MCA 101)
• Fieldbus option adaptor frame for the FC 100, 200 and 300. This frame is deeper than
• the standard frame, to allow space for the fieldbus option beneath
• Cable holders

Instructions:

1. Remove the LCD panel from the


frequency converter

2. Remove the frame located beneath and


discard

3. Push the option into place. Two positions


are possible, with cable terminal facing
either up or down. The cable up position
is often most suitable when several
frequency converters are installed side
by side in a rack, as this position permits
shorter cable lengths.

4. Push the fieldbus option adaptor frame


into place.

5. Place the LCD panel.


6. Fasten the cable in place using cable
holders.
7. The FC 100, 200 and 300 top surfaces
have pre-bored threaded holes for
attaching the
cable holders to the unit.

3—6
VERSION 2019
ADVANCED PLC PROGRAMMING - SIEMENS S7-300 + Danfoss FC300 VFD
VLT® AutomationDrive FC 301 / FC 302 + PROFIBUS DP MCA 101
3.2 Connecting the Bus Line

3.2.1 Drive Side

Terminal 62 = Red Wire (Siemens B)


Terminal 63 = Green Wire (Siemens A)

MCA101-FC300 Series PROFIBUS Option

3.2.2 PLC Side (Siemens)

6ES7 972-0BA41-0XA0
Terminal A1 = Green Wire (Siemens A)
Terminal B1 = Red Wire (Siemens B)

DP/MPI Port

Siemens PLC

3—7
VERSION 2019
ADVANCED PLC PROGRAMMING - SIEMENS S7-300 + Danfoss FC300 VFD
VLT® AutomationDrive FC 301 / FC 302 + PROFIBUS DP MCA 101
3.3 Configure the PROFIBUS Network

All PROFIBUS stations that are connected to the same bus network must have a unique station
address.

The PROFIBUS address of the frequency converter can be selected via:


• Hardware switches
• Par. 9-18 Node address
• The PROFIBUS command SSA “Set Station Address”

3.3.1 Setting the PROFIBUS Address using the Hardware Switches

Using the hardware switches, it is possible to select an address range from 0 to 125 (factory
setting 127) according to the table below:

The address change will come into


effect at the next power-up and can be
read in par. 9-18 Node address.

Note the location and sequence of the


hardware switches as illustrated in the
figure opposite.

Node address “5” will be used for the purpose of this manual.

3—8
VERSION 2019
ADVANCED PLC PROGRAMMING - SIEMENS S7-300 + Danfoss FC300 VFD
VLT® AutomationDrive FC 301 / FC 302 + PROFIBUS DP MCA 101
4. DRIVE CONFIGURATION AND PROGRAMMING

4.1 Drive Parameter Configuration using Option A (MCA 101) for PROFIBUS

4.1.1 Configure Par. 0-2 LCP Display.

3
2
1

Pressing “Main Menu” button on the LCP Display


Navigate to:

1. Par. 0-** Operation / Display → 0-2* LCP Display → 0-20 Display Line 1.1 Small
Set the value to: “[1613] Frequency”
2. Par. 0-** Operation / Display → 0-2* LCP Display → 0-21 Display Line 1.2 Small
Set the value to: “[1614] Motor Current”
3. Par. 0-** Operation / Display → 0-2* LCP Display → 0-22 Display Line 1.3 Small
Set the value to: “[1610] Power [kW]”
4. Par. 0-** Operation / Display → 0-2* LCP Display → 0-23 Display Line 2 Large
Set the value to “[1617] Speed [RPM]”
5. Par. 0-** Operation / Display → 0-2* LCP Display → 0-24 Display Line 3 Large
Set the value to “[1617] Reference [Unit]”

4.1.2 Checking the Drive’s Node Address

Pressing “Main Menu” button on the LCP


Display, navigate to:
• Par. 9-** PROFIdrive → 9-18 Node Address

Node Address of
the Drive

4—9
VERSION 2019
ADVANCED PLC PROGRAMMING - SIEMENS S7-300 + Danfoss FC300 VFD
VLT® AutomationDrive FC 301 / FC 302 + PROFIBUS DP MCA 101
4.1.3 Configure Par. 8-01 Control Site

Pressing “Main Menu” button on the LCP Display,


Navigate to:
• Par. 8-** Comm. and Options → 8-0* General
Settings → 8-01 Control Site
Set the value to: “[0] Digital and ctrl. word”
This enables the Drive to be controlled
remotely either by Control Word Source or by
built-in Digital Inputs.

4.1.4 Configure Par. 8-02 Control Word Source

Pressing “Main Menu” button on the LCP


Display, Navigate to:
• Par. 8-** Comm. and Options → 8-0*
General Settings → 8-02 Control Word Source
Set the value to: “[3] Option A”

This sets the Drive as a PROFIBUS Slave device


using the Option A (MCA 101) which enables the
PROFIBUS Master device to control the Drive
remotely.

Notice the “!Fieldbus fault [W34]”, this happens when there’s no PROFIBUS Master
device communicating with the Drive. This fault/warning will be resolved under topic
5 PLC Programming PLC.

4.1.5 Configure Par. 8-10 Control Word Profile

Pressing “Main Menu” button on the LCP Display,


Navigate to:
• Par. 8-** Comm. and Options → 8-1* Ctrl. Word
Settings → 8-10 Control Word Profile
Set the value to: “[0] FC Profile”

4—10
VERSION 2019
ADVANCED PLC PROGRAMMING - SIEMENS S7-300 + Danfoss FC300 VFD
VLT® AutomationDrive FC 301 / FC 302 + PROFIBUS DP MCA 101
4.1.6 Configure Par. 3-15 Reference Resource 1

Pressing “Main Menu” button on the LCP Display, Navigate to:


• Par. 3-** Reference / Ramps → 3-1* References → 3-15 Reference Resource
1
Set the value to: “[11] Local bus reference”

To prevent the summation of Par. “3-15 Reference Resource 1”, “3-16


Reference Resource 2” and “3-17 Reference Resource 3”, and to avoid
confusion, the value of Par. “3-16 Reference Resource 2” and “3-17
Reference Resource 3” should be set to “[0] No Function”.

4—11
VERSION 2019
ADVANCED PLC PROGRAMMING - SIEMENS S7-300 + Danfoss FC300 VFD
VLT® AutomationDrive FC 301 / FC 302 + PROFIBUS DP MCA 101
5. PLC PROGRAMMING

5.1 Hardware Configuration (PLC as PROFIBUS Master Device)

5.1.1 Installing GSD

In order to configure a PROFIBUS Master device, the configuration tool needs a GSD (General
Station Description) file for each type of slave on the network.

The GSD file is a “standard” text file containing the necessary communications setup data for a
slave.
1

1. Enter the website below on the web browser:


https://www.danfoss.com/en/products/ac-drives/dds/vlt-automationdrive-fc-301-fc-
302/#tab-software
2. Click the download icon align with the row “Fieldbus Configuration Files - VLT® Drives
PROFIBUS GSD. The download file is a .zip file named “VLT_PROFIBUS_GSD_2010-11-
03_2.zip”.

Extract the downloaded .zip file and copy the extracted folder to your Desktop to
browse/locate the file easily during the GSD installation.

Installing the GSD File

5—12
VERSION 2019
ADVANCED PLC PROGRAMMING - SIEMENS S7-300 + Danfoss FC300 VFD
VLT® AutomationDrive FC 301 / FC 302 + PROFIBUS DP MCA 101
Follow the steps below;
1
1. Install the GSD file in the Hardware
Configuration tool. Click the
“Options” tab.
2. Select and click “Install GSD File…”.
3. Under “Install GSD Files” window, 2
Click the “Browse …” button and
locate the folder “\Desktop\VLT_
PROFIBUS_GSD_2010-11
-03\Danfoss Drives GSD 3
Files\FC 100 200 300”
4. Click to highlight the file
“DA02040A.gsd” on the file
selection panel.
5. Click “Install”.
6. Click “OK”. 4

The files will be imported into the 6


Hardware catalogue.

5—13
VERSION 2019
ADVANCED PLC PROGRAMMING - SIEMENS S7-300 + Danfoss FC300 VFD
VLT® AutomationDrive FC 301 / FC 302 + PROFIBUS DP MCA 101
5.1.2 Inserting the Drive

1. Click and expand “PROFIBUS DP” on the Library panel.


Click and expand “Additional Field Devices” folder.
Click and expand “Drives” folder.
Click and expand “Danfoss” folder.
Click and expand “FC100/200/300” icon.
2. Click and Drag + Drop the “FC100/200/300” icon to “PROFIBUS(1): DP master system (1)”.
3. Click the “Address:” drop down selector.
4. Select the address “5”. This corresponds to the Drive’s node address.
To recheck the Drive’s node address, refer to 4.1.2 Checking the Drive’s Node Address.
5. Click OK.

5—14
VERSION 2019
ADVANCED PLC PROGRAMMING - SIEMENS S7-300 + Danfoss FC300 VFD
VLT® AutomationDrive FC 301 / FC 302 + PROFIBUS DP MCA 101
5.1.3 Inserting PPO (Parameter Process data Objects) Type

1. Click the “DP Slave FC100-300


Drive” icon under
“PROFIBUS(1): DP master
system (1)”. 2
2. Click and expand
“FC100/200/300” icon.
3. Click then Drag + Drop the
“PPO Type 3 Word Consistent 1 3
PCD” to DP Slave’s slot 1.
4. Double click on the DP Slave’s
slot 1 to open its properties
window.
5. In this manual, the given
Addresses:
Output: 256-259 and Input:
256-259 will be used. 4
6. Notice that there are only 2
lengths of words for both
Output and Input. This data range is enough to control
the drive using the basic option.
7. Click the “OK” button to exit
the window.

5
8 6

10 7
9

8. Click VFD icon.


9. Right click “Slot 1”.
10. Select “Edit Symbol”
11. Encode the Symbols
11 as illustrated.
Address Symbol Data type Comment
PIW256 VFD_STW WORD VFD PROFIBUS, Status Word [VFD-PLC]
PIW258 VFD_MAV_raw_data WORD VFD PROFIBUS, Main Actual Value [VFD-PLC]
PQW256 VFD_CTW WORD VFD PROFIBUS, Control Word [PLC-VFD]
PQW258 VFD_MRV_raw_data WORD VFD PROFIBUS, Main Reference Value [PLC-VFD]
12
12. Click “Apply”, then click “OK”.

5—15
VERSION 2019
ADVANCED PLC PROGRAMMING - SIEMENS S7-300 + Danfoss FC300 VFD
VLT® AutomationDrive FC 301 / FC 302 + PROFIBUS DP MCA 101
Different PPO Type can be selected depending on the application of the project or the range of
data needed by the programmer for data collection, to and from the Drive via PROFIBUS protocol.
In this manual, only the basic data to control the Drive via PROFIBUS will be covered.
These data are listed below:

PCD Write (PLC to Drive)


• CTW (Control Word)
• MRV (Main Reference Value)

PCD Read (Drive to PLC)


• STW (Status Word)
• MAV (Main Actual Value)

The Input and Output area of “PPO Type 3 Word Consistent PCD” have the following
configuration:

PCD (Process Data) write (PLC to Drive)


PCD Word Number 1 2
Output Address (PQW) 256 - 257 258 - 259
Drive FC Profile CTW MRV

PCD (Process Data) read (Drive to PLC)


PCD Word Number 1 2
Input Address (PIW) 256 - 257 258 - 259
Drive FC Profile STW MAV

5—16
VERSION 2019
ADVANCED PLC PROGRAMMING - SIEMENS S7-300 + Danfoss FC300 VFD
VLT® AutomationDrive FC 301 / FC 302 + PROFIBUS DP MCA 101

CTW (Control Word) FC Profile STW (Status Word) FC Profile


Bit Bite value = 0 Bit value = 1 Bit Bite value = 0 Bit value = 1
00 Reference value External selection Isb 00 Control not ready Control ready
01 Reference value External selection msb 01 Drive not ready Drive ready
02 DC brake Ramp 02 Coasting Enable
03 Coasting No coasting 03 No error Trip
04 Quick stop Ramp 04 No error Error (no Trip)
05 Hold output frequency Use ramp 05 Reserved -
06 Ramp stop Start 06 No error Triplock
07 No function Reset 07 No warning Warning
08 No function Jog 08 Speed ≠ Reference Speed = Reference
09 Ramp 1 Ramp 2 09 Local operation Bus control
10 Data invalid Data valid 10 Out of frequency limit Frequency limit OK
11 No function Relay 01 active 11 No operation In operation
12 No function Relay 04 active 12 Drive OK Stopped, autostart
13 Parameter set-up Selection Isb 13 Voltage OK Voltage exceeded
14 Parameter set-up Selection msb 14 Torque OK Torque exceeded
15 No function Reverse 15 Timer OK Timer exceeded

5—17
VERSION 2019
ADVANCED PLC PROGRAMMING - SIEMENS S7-300 + Danfoss FC300 VFD
VLT® AutomationDrive FC 301 / FC 302 + PROFIBUS DP MCA 101
5.1.4 Parameter Assignment.

It is essential to check the Parameter


Assignment of the DP slave to confirm
the data sent to the drive and the data
read from the drive are correct.

To check the “Parameter Assignment”,


follow the steps below;

1. Double click the VFD DP Slave Icon to


open the properties window.
2. Click “Parameter Assignment” tab.
3. Expand and check the “Device-
specific parameters”.

PCD (Process Data) write (PLC to Drive)


PCD Word Number 1 2
Output Address (PQW) 256 - 257 258 - 259
Drive FC Profile CTW MRV

PCD (Process Data) read (Drive to PLC)


PCD Word Number 1 2
Input Address (PIW) 256 - 257 258 - 259
Drive FC Profile STW MAV Drive’s LCP Display
See set-up on 4.1.1Configure Par. 0-2 LCP Display

MAV
(Main Actual Value)

MRV
(Main Reference Value)

5—18
VERSION 2019
ADVANCED PLC PROGRAMMING - SIEMENS S7-300 + Danfoss FC300 VFD
VLT® AutomationDrive FC 301 / FC 302 + PROFIBUS DP MCA 101

After checking, save the “Hardware Configuration”, and then close


the window to download the PLC program.

When the PLC download is completed, the “!Fieldbus fault [W34]” warning will go off. This
means that the PROFIBUS communication between the PLC and the Drive is now active and
enabled.

PLC downloaded with the Drive


inserted and configured in the
“Hardware Configuration” tool

5—19
VERSION 2019
ADVANCED PLC PROGRAMMING - SIEMENS S7-300 + Danfoss FC300 VFD
VLT® AutomationDrive FC 301 / FC 302 + PROFIBUS DP MCA 101
5.2 Ladder Programming

5.2.1 Add and Call a Function (FC)

Add the Function for the ladder logic as per information below;

1 2

1. Absolute Block Name : FC101


Symbolic Name : VFD PROFIBUS IO Transfer

Absolute Block Name : FC102


Symbolic Name : VFD PROFIBUS Read/Write

2. Call the Function (FC101) in OB1.


Transfer of VFD Address to Data Block will be in FC101 – VFD PROFIBUS IO Transfer.

Call the Function (FC102) in OB1.


Reading and Writing of VFD data will be in Function FC102 – VFD PROFIBUS Read/Write.

5—20
VERSION 2019
ADVANCED PLC PROGRAMMING - SIEMENS S7-300 + Danfoss FC300 VFD
VLT® AutomationDrive FC 301 / FC 302 + PROFIBUS DP MCA 101
5.2.2 Add Data Block (DB) for Writing and Reading data on VFD

Add 3 Data Blocks as storage data for VFD – PLC Data Mapping and Control.

1. Name : DB101
Symbolic Name : VFD PROFIBUS IO Transfer

2. Name : DB102
Symbolic Name : VFD PROFIBUS Write

3. Name : DB103
Symbolic Name : VFD PROFIBUS Read

2
3

Configure DB101 – VFD PROFIBUS IO Transfer

This DB will be the data storage for VFD PPO Address.


Open, configure and encode DB101 as per illustration below;

• Leave +0.0 DB_VAR(INT) as is.

5—21
VERSION 2019
ADVANCED PLC PROGRAMMING - SIEMENS S7-300 + Danfoss FC300 VFD
VLT® AutomationDrive FC 301 / FC 302 + PROFIBUS DP MCA 101
Configure DB102 – VFD PROFIBUS Write
This DB will be the data storage to control/write the Drive’s;
• MRV (Main Reference Value) – Speed Setpoint in unit RPM.
• CTW (Control Word) - Start and Stop command of the motor/load.

Open, configure and encode DB102 as per illustration below;

• The highlighted “Initial value” is 650.0 in Floating Point data format. Every time DB102 is
initialized, the PLC will send 650 in RPM unit to the drive as an initial speed setpoint by
default.
• Leave +0.0 DB_VAR(INT) as is.

Configure DB103 – VFD PROFIBUS Read


This DB will be the data storage for monitoring/reading the Drive’s;
• MAV (Main Actual Value) – Speed feedback in unit RPM.
• STW (Status Word) – Status and health of the Drive.

Open, configure and encode DB1 as per illustration below;

• Leave +0.0 DB_VAR(INT) as is.

5—22
VERSION 2019
ADVANCED PLC PROGRAMMING - SIEMENS S7-300 + Danfoss FC300 VFD
VLT® AutomationDrive FC 301 / FC 302 + PROFIBUS DP MCA 101
5.2.4 Transfer VFD PPO Address to DB101 – VFD PROFIBUS IO

Using FC101- VFD PROFIBUS IO Transfer, program the Ladder Logic as per illustration below;

5—23
VERSION 2019
ADVANCED PLC PROGRAMMING - SIEMENS S7-300 + Danfoss FC300 VFD
VLT® AutomationDrive FC 301 / FC 302 + PROFIBUS DP MCA 101
5.2.5 Sending Main Reference Value [MRV] (Speed Setpoint RPM) to the Drive

The MRV(Main Reference Value) in unit RPM, is mapped to the PLC Output address
“PQW258”.

PCD (Process Data) write (PLC to Drive)


PCD Word Number 1 2
Output Address (PQW) 256 - 257 258 - 259
Drive FC Profile CTW MRV

The PLC setpoint MRV data (0.0 to 1675.0 RPM) is unscaled to Raw Data (PQW258) with 0 to
16384 in Decimal range. In this manual, the range of the Drive’s MRV is set to 0 to 1675 in unit
RPM.

PLC Setpoint MRV → Unscale → PQW258 → Drive MRV

PLC Setpoint Integer(Decimal) as Drive’s MRV [RPM]


MRV [RPM] Raw Data of PQW258
Max Value 1675.0 16384 1675
Min Value 0.0 0 0

In the Simatic Manager, there is no standard FB’s or FC’s to Unscale the PLC Setpoint MRV (0 to
1675) to Raw Data (PQW258) with 0 to 16384 in Decimal range.
The solution is to Unscale the data manually using the equation below;

Out : Result HI_Lim : Max Reference (1675 RPM)


PMRV : PLC SP Main K2 : Max Raw Data (16384)
Reference Value
Out=((PMRV/HI_Lim)*K2), derived as; PQW258 = ((PMRV/1675.0)*16384.0)

Using “FC102”, the figure below shows the derivation of the equation above in Ladder Logic;

5—24
VERSION 2019
ADVANCED PLC PROGRAMMING - SIEMENS S7-300 + Danfoss FC300 VFD
VLT® AutomationDrive FC 301 / FC 302 + PROFIBUS DP MCA 101
Tags and Symbols

1 Divide Real Multiply Real Round to DInt

3
2 4 5
16384.0

1675.0

Mapped as VFD Remote Signal in Chapter 1

FC102 – Network 1 Tags and Symbols


Symbol/Name Address Data Type Comment
1 DB1.DBX0.2 BOOL VFD Main Reference Value, Setpoint 0 - 1675 RPM
2 “VFD PROFIBUS Wire”.VFD_MRV_SPD DB102.DBD2 REAL
3 MD100 REAL
4 MD104 REAL
“VFD PROFIBUS IO”.PQW258_VFD_MRV DB101.DBW8 WORD VFD PROFIBUS, Main Reference Value RPM [PLC - VFD]

Memory DWord MD100 and MD104 are used as Data Buffers (way of storing output data from
Logic Instructions). There are tons of different approach in using Data Buffers depends on the
knowledge and mindset of the Programmer. For the purpose of this manual, using the Memory
address is much of an easier approach.

5—25
VERSION 2019
ADVANCED PLC PROGRAMMING - SIEMENS S7-300 + Danfoss FC300 VFD
VLT® AutomationDrive FC 301 / FC 302 + PROFIBUS DP MCA 101
5.2.6 Receiving Main Actual Value [MAV] (Speed Feedback RPM) from the Drive

The MAV(Main Actual Value) in unit RPM, is mapped to the PLC Input address
“PIW258”.

PCD (Process Data) read (Drive to PLC)


PCD Word Number 1 2
Input Address (PIW) 256 - 257 258 - 259
Drive FC Profile STW MAV

The Raw Data (PIW258) with 0 to 16384 in Decimal range, is scaled to PLC reference MAV with
0.0 to 1675.0 in unit RPM. In this manual, the range of the Drive’s MAV is set to 0 to 1675 in unit
RPM.

Drive MAV → PIW258 → Scale → PLC reference MAV

Drive’s MAV Integer(Decimal) as PLC reference MAV


[RPM] Raw Data of PIW258 [RPM]
Max Value 1675.0 16384 1675
Min Value 0.0 0 0

In the Simatic Manager, there is no standard FB’s or FC’s to Scale the Raw Data (PIW258) with 0
to 16384 to PLC reference MAV with 0.0 to 1675.0 in unit RPM.
The solution is to Scale the data manually using the equation below;

PMAV : PLC ref Main Actual HI_Lim : Max Reference (1675 RPM)
Value K2 : Max Raw Data (16384)
In : Input

PMAV=((In/K2)*HI_Lim), derived as; PMAV = ((PIW258/16384.0)*1675.0)

Using “FC102”, the figure below shows the derivation of the equation above in Ladder Logic;

5—26
VERSION 2019
ADVANCED PLC PROGRAMMING - SIEMENS S7-300 + Danfoss FC300 VFD
VLT® AutomationDrive FC 301 / FC 302 + PROFIBUS DP MCA 101
Tags and Symbols

DI to Floating Point Divide Real Multiply Real


3

1 4
2
1675.0
16384.0

FC102 – Network 2 Tags and Symbols


Symbol/Name Address Data Type Comment
1 “VFD PROFIBUS IO”.PIW258_VFD_MAV DB101.DBW4 WORD VFD PROFIBUS, Main Actual Value RPM [VFD-PLC]
2 MD110 REAL
3 MD114 REAL
4 “VFD PROFIBUS Read”.VFD_MAV_Speed DB103.DBD2 WORD VFD Main Actual Value, 0 – 1675 RPM

Memory DWord MD110 and MD114 are used as Data Buffers.

5—27
VERSION 2019
ADVANCED PLC PROGRAMMING - SIEMENS S7-300 + Danfoss FC300 VFD
VLT® AutomationDrive FC 301 / FC 302 + PROFIBUS DP MCA 101
5.2.7 Reading the Drive’s Status – STW (Status Word)

The STW(Status Word), is mapped to the PLC Input address


“PIW256”.

PCD (Process Data) read (Drive to PLC)


PCD Word Number 1 2
Input Address (PIW) 256 - 257 258 - 259
Drive FC Profile STW MAV

The Hex value of 0F07 sent from the Drive to the PLC indicates;
1. The Drive/Control is ready and enabled.
2. No errors and warnings.
3. In operation or the motor/load is running in normal operation.
4. The motor is running in correct speed as per Speed Reference/Setpoint.
5. PIW256 receives a value of “W#16#0F07” in Siemens Hex Word format.

STW (Status Word) FC Profile


Bit Bite value = 0 Bit value = 1 Bit value Hex Value PIW256
00 Control not ready Control ready 1
01 Drive not ready Drive ready 1
02 Coasting Enable 1 7
03 No error Trip 0
04 No error Error (no Trip) 0
05 Reserved - 0
06 No error Triplock 0 0
07 No warning Warning 0
08 Speed = Reference 1 W#16#0F07
Speed ≠ Reference
09 Local operation Bus control 1
10 Out of frequency limit Frequency limit OK 1 F
11 No operation In operation 1
12 Drive OK Stopped, autostart 0
13 Voltage OK Voltage exceeded 0
14 Torque OK Torque exceeded 0 0
15 Timer OK Timer exceeded 0

5—28
VERSION 2019
ADVANCED PLC PROGRAMMING - SIEMENS S7-300 + Danfoss FC300 VFD
VLT® AutomationDrive FC 301 / FC 302 + PROFIBUS DP MCA 101
The Drive sends data to the PLC in “Little Endian” data order.
There are two types of data order (Endianness) used in computing/programming;
1. Big Endian – ordering places the most significant byte first and the least significant byte
last.
2. Little Endian – ordering places the least significant byte first and the most significant byte
last.

Note: The Increasing memory direction is from Right to Left.


Memory
N*8 N*4 N*2 N
Example:
The Drive’s PROFIBUS node address via Hardware Switch.
Please refer to 3.3 Configure the PROFIBUS Network.

The data transfer from the Drive to the PLC in “Little Endian” data order is illustrated below;
STW (Status Word) FC Profile
Byte Order Bit Bit value Hex Value
00 1
01 1
02 1 7
Least 03 0
Significant 04 0
Byte 05 0
06 0 0
07 0
08 1
09 1
Most 10 1 F
Significant 11 1
Byte 12 0
13 0
14 0 0
15 0

Hex Value 0 F 0 7
Bit Value 0 0 0 0 1 1 1 1 0 0 0 0 0 1 1 1
Bit 15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00

Hex Value 0 F 0 7
Siemens Word Value W#16#0F07
(Hex)
PLC Address PIW256

The Drive sends the Least Significant Byte first and the Most Significant Byte last. In short, the
data transfer is in “Little Endian” data order since the increasing memory direction is from right
to left.

5—29
VERSION 2019
ADVANCED PLC PROGRAMMING - SIEMENS S7-300 + Danfoss FC300 VFD
VLT® AutomationDrive FC 301 / FC 302 + PROFIBUS DP MCA 101
In the PLC, the order and placement of Bits in a Word (2 Bytes, 16 Bits) is in “Big Endian” data
order. This is the opposite of the Drive’s data order.

The illustration below shows the data order of Bits in a Word in Siemens Standard.

Address PIW256
Hex Value W#16#0F07
0 F 0 7
Binary Value 0000 1111 000 0111

Hex Value 0 F 0 7
Bit Value 0 0 0 0 1 1 1 1 0 0 0 0 0 1 1 1
PIW256 in Bits 256.7 256.6 256.5 256.4 256.3 256.2 256.1 256.0 257.7 257.6 257.5 257.4 257.3 257.2 257.1 257.0
Byte Order Least Significant Byte Most Significant Byte

The illustration below shows the final data mapping from the Drive’s Status Word(STW) to
PIW256 by Bits.

STW (Status Word) FC Profile


Byte Bit Bite value = 0 Bit value = 1 Bit PIW256 Byte Order
Order No. In Bits
00 Control not ready Control ready 0.0 I256.0
01 Drive not ready Drive ready 0.1 I256.1
02 Coasting Enable 0.2 I256.2 Least
Least 03 No error Trip 0.3 I256.3 Significant
Significant 04 No error Error (no Trip) 0.4 I256.4 Byte
Byte 05 Reserved - 0.5 I256.5
06 No error Triplock 0.6 I256.6
07 No warning Warning 0.7 I256.7
08 Speed ≠ Reference Speed = Reference 1.0 I257.0
09 Local operation Bus control 1.1 I257.1
Most 10 Out of frequency limit Frequency limit OK 1.2 I257.2 Most
Significant 11 No operation In operation 1.3 I257.3 Significant
Byte 12 Drive OK Stopped, autostart 1.4 I257.4 Byte
13 Voltage OK Voltage exceeded 1.5 I257.5
14 Torque OK Torque exceeded 1.6 I257.6
15 Timer OK Timer exceeded 1.7 I257.7

The tabulation of data in Siemens PLC, the Least Significant Byte is always placed in the upper
part of the table, while Most Significant Byte seats in the lower part. This contrasts the data
order in Siemens standard and can cause confusion in data tracing and data mapping.

5—30
VERSION 2019
ADVANCED PLC PROGRAMMING - SIEMENS S7-300 + Danfoss FC300 VFD
VLT® AutomationDrive FC 301 / FC 302 + PROFIBUS DP MCA 101
To visualize the data in the PLC data table the same as the representation of the Data mapped
from the Drive, a simple solution is to swap the Least Significant and Most Significant Bytes of
PIW256.

Using FC102, follow the steps below to execute the idea above into Ladder logic;

1. Add “Network 4”. 1


2. Insert “MOVE” instruction in the Rung.
3. Input “DB101.DBB3” address in the “IN”
attribute. 2
This means that the Source Block is the
Most Significant Byte of “DB101.DBW2”
(PIW256_VFD_STW).
4. Input “DB103.DBB6” in the “OUT”
attribute. 3 4
This means that the Destination Block to
store the source data is the Least Significant Byte of “DB103.DBW6” [STW].

DB101.DBW2 “ VFD PROFIBUS IO”.VFD_STW_PIW256” DB103.DBW6


Byte Order Byte Address Byte Address Byte Order
Least Least
Significant DB101.DBB2 DB103.DBB6 Significant
Byte Byte
Most Most
Significant DB101.DBB3 DB103.DBB7 Significant
Byte Byte

STW (Status
Word) FC DB103.DBB6
Profile PIW256 → DB101.DBW2
Byte Bit Bit PIW256 DB101.DBW2
Order No.
00 0.0
01 0.1
02 0.2
Least 03 0.3
Significant 04 0.4 IB256 DB101.DBB2
Byte 05 0.5
06 0.6
07 0.7
08 1.0
09 1.1
Most 10 1.2
Significant 11 1.3
Byte 12 1.4 IB257 DB101.DBB3
13 1.5
14 1.6
15 1.7

5—31
VERSION 2019
ADVANCED PLC PROGRAMMING - SIEMENS S7-300 + Danfoss FC300 VFD
VLT® AutomationDrive FC 301 / FC 302 + PROFIBUS DP MCA 101

5. Add “Network 4” 5
6. Insert “MOVE” instruction in the Rung.
7. Input “DB101.DBB2” address in the “IN”
attribute. 6
This means that the Source Block is the Least 0
Significant Byte of “DB101.DBW2”
(“PIW256_VFD_STW).
8. Input “DB103.DBB7” in the “OUT” attribute.
This means that the Destination Block is 7 8
“DB103.DBB7”.

DB101.DBW2 “ VFD PROFIBUS IO”.VFD_STW_PIW256” DB103.DBB6


Byte Order Byte Address Byte Address Byte Order
Least Least
Significant DBB101.DBB2 DB103.DBB6 Significant
Byte Byte
Most Most
Significant DB101.DBB3 DB103.DBB7 Significant
Byte Byte

STW (Status
Word) FC DB2.DBB7
Profile PIW256 → DB101.DBW2
Byte Bit Bit PIW256 DB101.DBW2
Order No.
00 0.0
01 0.1
02 0.2
Least 03 0.3
Significant 04 0.4 IB256 DB101.DBB2
Byte 05 0.5
06 0.6
07 0.7
08 1.0
09 1.1
Most 10 1.2
Significant 11 1.3
Byte 12 1.4 IB257 DB101.DBB3
13 1.5
14 1.6
15 1.7

5—32
VERSION 2019
ADVANCED PLC PROGRAMMING - SIEMENS S7-300 + Danfoss FC300 VFD
VLT® AutomationDrive FC 301 / FC 302 + PROFIBUS DP MCA 101
The illustration below shows the result data mapping of STW (Status Word) from Drive’s Data
Table to PLC Data Block.

DB103.DBW6
STW (Status Word) FC Profile
Byte Bit Bite value = 0 Bit value = 1
Order
00 Control not ready Control ready
01 Drive not ready Drive ready
02 Coasting Enable
Least 03 No error Trip
Significant 04 No error Error (no Trip)
Byte 05 Reserved -
06 No error Triplock
07 No warning Warning
08 Speed ≠ Reference Speed = Reference
09 Local operation Bus control
Most 10 Out of frequency limit Frequency limit OK
Significant 11 No operation In operation
Byte 12 Drive OK Stopped, autostart
13 Voltage OK Voltage exceeded
14 Torque OK Torque exceeded
15 Timer OK Timer exceeded

5—33
VERSION 2019
ADVANCED PLC PROGRAMMING - SIEMENS S7-300 + Danfoss FC300 VFD
VLT® AutomationDrive FC 301 / FC 302 + PROFIBUS DP MCA 101
5.2.8 Start and Stop Command

The CTW(Control Word), is mapped to the PLC Input address


“PQW256”.

PCD (Process Data) write (PLC to Drive)


PCD Word Number 1 2
Output Address (PQW) 256 - 257 258 - 259
Drive FC Profile CTW MRV

Start Command
To start the drive, sending Hex value of 047C will start the drive with the transmitted reference,
as shown below;

CTW (Control Word) FC Profile


Bit Bite value = 0 Bit value = 1 Bit Value Hex Value
00 Reference value External selection Isb 0
01 Reference value External selection msb 0
02 DC brake Ramp 1 C
03 Coasting No coasting 1
04 Quick stop Ramp 1
05 Hold output frequency Use ramp 1
06 Ramp stop Start 1 7
07 No function Reset 0
08 No function Jog 0
09 Ramp 1 Ramp 2 0
10 Data invalid Data valid 1 4
11 No function Relay 01 active 0
12 No function Relay 04 active 0
13 Parameter set-up Selection Isb 0
14 Parameter set-up Selection msb 0 0
15 No function Reverse 0

Stop Command
To stop the drive, sending Hex value of 043C will stop the drive with the transmitted reference,
as shown below;

CTW (Control Word) FC Profile


Bit Bite value = 0 Bit value = 1 Bit Value Hex Value
00 Reference value External selection Isb 0
01 Reference value External selection msb 0
02 DC brake Ramp 1 C
03 Coasting No coasting 1
04 Quick stop Ramp 1
05 Hold output frequency Use ramp 1
06 Ramp stop Start 0 3
07 No function Reset 0
08 No function Jog 0
09 Ramp 1 Ramp 2 0
10 Data invalid Data valid 1 4
11 No function Relay 01 active 0
12 No function Relay 04 active 0
13 Parameter set-up Selection Isb 0
14 Parameter set-up Selection msb 0 0
15 No function Reverse 0

5—34
VERSION 2019
ADVANCED PLC PROGRAMMING - SIEMENS S7-300 + Danfoss FC300 VFD
VLT® AutomationDrive FC 301 / FC 302 + PROFIBUS DP MCA 101
To implement Start – Stop Command in Ladder Logic,
Using “FC102”, follow the steps below;

1. Add “Network 5” and program the Ladder Logic as illustrated below (Start-Stop with
Interlocks);

1 2 3 4 5 6

Mapped as VFD Remote Signal in Chapter 1

FC102 – Network 5 Tags and Symbols


Symbol/Name Address Data Type Comment
1 DB1.DBX0.2 BOOL
2 "VFD PROFIBUS Read".VFD_Ctrl_Rdy DB103.DBX6.0 BOOL VFD Status Word, Control Ready = 1, Control no ready = 0
3 "VFD Read".VFD_Enable DB103.DBX6.1 BOOL VFD Status Word, VFD Enable = 1, Coasting = 0
4 "VFD Read".VFD_Trip DB103.DBX6.2 BOOL VFD Status Word, VFD Trip = 1, VFD No Error = 0
5 "VFD Write".VFD_Cmd_Stop DB103.DBX6.3 BOOL VFD Main Actual Value, 0 – 1675 RPM
6 "VFD Write".VFD_Cmd_Start DB102.DBX6.0 BOOL VFD Control Word, Stop Command
7 "VFD Write".VFD_St_Start DB102.DBX6.1 BOOL VFD Control Word, Start Command
8 "VFD PROFIBUS Write".VFD_St_Start DB102.DBX6.2 VFD Control Word, Start Status

5—35
VERSION 2019
ADVANCED PLC PROGRAMMING - SIEMENS S7-300 + Danfoss FC300 VFD
VLT® AutomationDrive FC 301 / FC 302 + PROFIBUS DP MCA 101
2. Add “Network 6” and program the Ladder Logic as illustrated below (Starting the Drive”);

W#16#47C
(Hex Value 047C
to Start the Drive)

W#16#43C
(Hex Value 047C
to Start the Drive)

FC1 – Network 7 Tags and Symbols


Symbol/Name Address Data Type Comment
1 "VFD PROFIBUS Write".VFD_St_Start DB102.DBX6.2 BOOL VFD Control Word, Start Status
2 "VFD PROFIBUS IO".PQW256_VFD_CTW DB101.DBW6 WORD VFD PROFIBUS, Control Word [PLC - VFD]

3. Close “FC102” and download the PLC program.

5—36
VERSION 2019
ADVANCED PLC PROGRAMMING - SIEMENS S7-300 + Danfoss FC300 VFD
VLT® AutomationDrive FC 301 / FC 302 + PROFIBUS DP MCA 101
6. HMI TESTING
Testing and commissioning
Steps:
1. Checking of the Profibus DP node addressing
2. Running the VFD by Local Control
3. I/O checking from field terminals to Software
4. Checking of the peripheral I/O addressing transfer function to Data Block
5. Checking of the VFD Start.Stop Function
6. Controlling and monitoring the VFD via pre-programmed HMI Simatic Multi Panel
12” Touch MP377.

6—37
VERSION 2019
ADVANCED PLC PROGRAMMING - SIEMENS S7-300 + Danfoss FC300 VFD
VLT® AutomationDrive FC 301 / FC 302 + PROFIBUS DP MCA 101

6—38
VERSION 2019

S-ar putea să vă placă și