mang
Trang 1SMVector: PROFIBUS-DP Communications to Siemens S7-300 PLC
Overview
PROFIBUS-DP is an internationally accepted serial protocol designed for
commercial and industrial automation control systems and distributed I/O devices
Scope
This document is intended to provide a helpful getting started guide for configuring a
PROFIBUS-DP master to correctly communicate with a SMVector drive and is aimed
to accompany the “SMVector PROFIBUS-DP Interface Reference Guide”
It is assumed that the user has familiarised themselves with how to navigate through
the drive parameters using the drive keypad display
Methods for configuring master devices can differ greatly between manufacturers The
details supplied in this document are intended for the configuring a Siemens / VIPA S7
-300 type PLC
Previous experience of using Siemens Step 7 PLC configuration software would be a
distinct advantage
The PLC handles the data transfer automatically, therefore no PLC coding or ladder
logic is required to initiate data transfer between the PLC CPU & the PROFIBUS-DP
interface However an example ladder program is provided for reference
Requirements
Hardware:
• SMV with firmware V2.6.0 or later
• SMV PROFIBUS-DP interface with firmware V1.01 or later
• A PC to PLC interface, either via PROFIBUS-DP or using the PLC MPI port
• PLC PROFIBUS-DP interface, if not fitted as standard depending upon the CPU
type (a VIPA Speed7 318 PLC with an integrated PROFIBUS-DP port was used
for this document)
Software & Firmware:
• Siemens Simatic Step 7 Manager (V5.4 used for this document)
• GSD & icon files for SMVector
NOTE:
It is also assumed that the user has correctly configured and tuned the SMVector with the
motor it is connected to
Trang 2Drive Configuration
All SMVector parameters and settings are accessed using the drive keypad
Set the following drive parameters:-
1 Set the relevant motor and application parameters as required such as Accel
times and current limit etc
2 P100 - Start Control Source:
Set to mode 3
Other modes exist (see the drive Operating Instructions for full details), however,
only mode 3 allows full drive control from a PROFIBUS network
3 P121, P122 or P123 - TB13A, B & C Digital inputs:
Set one of the inputs to mode 9
It is possible to communicate to the drive via the network, but the drive control
word will on function when the chosen input is active
4 P400 - Network Protocol:
Set to 6 for PROFIBUS
5 P410 - Node Address:
Set this to the require address
The default is 126, but the valid address range is 1 to 125
6 The SMVector PROFIBUS-DP module has support for up to 6 cyclic data
channels in both directions However the The default mapping for SMVector
PROFIBUS-DP is 2 Data IN words and 2 Data OUT words, the configuration of
which is shown in following table:-
7 P418 - Re-initialise
Set P418 to 1 to activate any changes made to the module settings
8 The SMVector is now ready for use on the PROFIBUS-DP network
Page 2
Lenze DS47
Link # Mapped Function
IN 1 Drive Status Word
IN 2 Actual Output Frequency
OUT 1 Drive Control Word
OUT 2 Frequency Setpoint
NOTE:
• The terms “IN data” and “OUT data” refer to the data as seen by the PLC
Therefore, ”OUT data” goes OUT of the PLC to the network, while “IN data” comes
IN from the network to the PLC
• OUT data words should only be mapped to drive Read/Write parameters
Trang 3Creating the Simatic project
1 Ensure that the Siemens Simatic Step 7 Manager software is correctly
installed before proceeding Follow the instructions that are supplied with this
software for more information
2 Using the Siemens Step 7 Manager configuration software, you can use a
wizard or manually setup the project by selecting File from the toolbar followed
by either New… or “New Project” Wizard… from the drop down menu, to
create a new project
3 If using the wizard then please follow the instructions given Alternatively if you
choose to manually set up the project, a window titled New Project will open
Under the User projects tab enter a project name, and then click on OK
4 The project window will now open Select Insert from the SITMATIC Manger
toolbar followed by Station from the drop down menu, and select the appropriate
PLC type, e.g 2 SIMATIC 300 Station
Enter the project name here
Trang 45 The SIMATIC Manager will now display the project with 2 icons in the right
win-dow Either expand the project tree on the left hand side or double click on the
PLC name icon until the Hardware icon is visible
6 Double click on the Hardware icon to launch the Hardware Configuration Utility
Hardware Configuration
1 If the Hardware list / catalogue is not visible in the right side of the screen, then
select View from the SITMATIC Manger toolbar followed by Catalogue from the
drop down menu to open the Catalogue window section
2 Before proceeding check if the SMVector GSD file is installed, by expanding the
PROFIBUS DP icon in the hardware list, followed by Additional Fieldbus
De-vices, then Drives If the drive you require is not listed, then the GSD file(s) will
have to be imported (See Appendix A later in this document)
3 Expand the SIMATIC 300 icon, and then expand the RACK-300 folder Drag and
drop the Rail icon in to the large left hand window This will then produce a Rail
list as shown below
Page 4
Lenze DS47
PLC icon Hardware
Configuration icon
Trang 54 Expand the PS-300 folder then drag and drop the appropriate PLC power supply
icon in to the Rail List slot 1
5 Expand the CPU-300 folder, expand the appropriate CPU type folder then drag
and drop the appropriate CPU to the Rail List slot 2 As shown (The CPU 318-2
model was used as the basis of this application which has a built in
PROFIBUS-DP port)
6 The PROFIBUS Network Properties window will automatically open (see below)
Set the Master Address to the required value and then select New
Trang 67 In the Properties-New subnet PROFIBUS window enter the network and author
names, any other useful information can be entered into the comments box
Switch to the Network Settings tab Select the required Transmission Rate
and set the Profile to DP Select OK to finish
8 The Interface Properties window will return but this time displaying the subnet
data Select OK to finish and return back to the Hardware Configuration
window
Page 6
Lenze DS47
Trang 79 If all the data has been entered correctly, the Rail List should now display a list of
components for the PLC and a chequered bus line labelled with the network
name that was chosen, trailing from the right hand side
10 Expand the Profibus DP icon at the top of the Catalogue list Expand the
Additional Fieldbus Devices folder, then the Drives folder
11 Drag and drop the relevant drive folder on to the chequered Rail List tail
12 The Properties-PROFIBUS interface window will appear again Set the
Address value to the require node address Followed by OK to finish
Trang 813 In the Catalogue section, expand the relevant drive folder then drag and drop the
required data format to the small lower left window section (See Appendix B for
data format details)
14 Repeat steps 11 and 13 to add as many nodes on to the network as required
and save the configuration
15 Check to ensure that the PLC CPU key / switch is the STOP position
16 Download the Hardware profile to the PLC, by selecting PLC from the Hardware
Configuration toolbar followed by Download to Module… from the drop down
menu
17 When the Select Target Module window opens ensure that the CPU that is to
be programmed is highlighted then select OK to finish
Page 8
Lenze DS47
Trang 918 Once the PC establishes communications, the Select node address window will
open If there is only one target station for the project then it will automatically be
highlight, otherwise select the appropriate station and select OK
19 The download progress bar will be displayed for the duration of the download,
after which the display will revert back to the HW Config window as per Step 13
20 Check the status LEDs on the PLC before switching the PLC into RUN mode
When in RUN mode the RUN LED should be illuminated If the BUSF (bus fault)
LED is illuminated double check the PositionServo and other slave device
set-tings ensuring that they were re-initialised correctly and that their setset-tings match
that of the Hardware Configuration
21 Check Node Status
Once initialised and the network detected the module will enter the “Data
Ex-change” state, i.e P419 = 4
If a different status is reported refer to the PROFIBUS-DP Communications
Module manual for further details
Trang 10Appendix A – Importing GSD Files PROFIBUS Configurator
What are GSD files?
PROFIBUS-DP master configuration software uses the GSD files to configure the
network profile and communications with the relevant devices
For reference many manufacturers offer language specific GSD files for their
PROFIBUS devices, in which case the term and file suffix “GSD” is used for their
primary language choice and additional files for alternative languages will be named
differently, so for example with many European manufacturers where English is not
the primary language it may be possible to obtain GSD and GSE files where the GSE
file will have been coded so that the user configuration software displays the data
within the GSE file in English etc
GSD files are available form Lenze-ACTech website
GSD Files Installation
1 This procedure only needs to be performed once or after GSD file changes
2 Launch the “Simatic Step 7” software
3 Launch the Hardware Configuration sub package from within the main Simatic
Manager
4 If an existing project opens, close it
5 Select Options from the menu followed by Install New GSD
Page 10
Lenze DS47
Trang 116 From within Installing new GSD window, click on the Browse button to navigate
to the folder that GSD file(s) are located in Select either an individual or all
available GSD files then click on the Install button
7 Acknowledge the caution that pops up, OK the message when installation
complete then click on Close
8 The HW Config screen will re-appear The GSD file(s) will now be available and
will be listed as shown:
Trang 12Appendix B - PROFIBUS-DP Data Types
Operation of the PROFIBUS-DP network is controlled automatically by the system in
the PLC The transfer of data values over the network must be initiated form the PLC
program itself
There are two ways of transferring data between the PLC and the remote nodes, the
choice of which depends up on the nature of the application
Non-consistent Data transfer can be used if there is no need to ensure new
references are transferred to the bus together This format allows data values to be
transferred directly to and from the peripheral I/O registers and therefore is simpler to
implement when writing the PLC code
Consistent Data transfer ensures that all data bytes are written to the data bus at the
same time This can be useful as it prevents data skew This occurs when the data
high and data low words of a reference are not transferred to the bus at the same
instant
Consequently, special function calls within the PLC must be used to ensure
consistency of data is maintained In the case of the Siemens Simatic software these
are:
• SFC14 to perform a write
• SFC15 to perform a read
Page 12
Lenze DS47
Trang 13Appendix C - Example Ladder Logic Program
Example Program
1 Configure a network with just the PLC and a single Drive connected to the
PROFIBUS-DP network
2 Configure the PLC as described and ensure that the PROFIBUS-DP node
address on the drive is set correctly and ensure that the default mappings are
selected within the drive
3 The example program given below will generate a triangle wave reference, and
transfer the data value over PROFBUS-DP to the Drive The transmitted value
will be seen in parameter VAR_IREF
Using Simatic Step 7 - LAD/STL/FBD Editor
1 Enter the following ladder logic program into OB35, other OBs are available &
have different timed cyclic interrupts, ref to the Step 7 manager software help for
details (OB35 has a default scan time 100ms)
Trang 142 Connect to the PLC CPU using the appropriate PC to PLC adapter
3 Compile and download the program shown, then go on-line and set the PLC key
into RUN mode
4 Once the program has been downloaded successfully into the PLC, select PLC
from the toolbar followed by Monitor/Modify variables from the drop menu This
will open a watch window called Var-Variable Table 1 Setup the variable table
to monitor, this will allow the PC to either monitor or modify the PLC registers
(the PLC mode selection key will have to be in the RUN-P position) See on the
following page
Page 14
Lenze DS47
Trang 155 To enable the variable table to monitor constantly, select the glasses
icon
6 Enter the required values in to the watch window
Set MW2 to “1”
Set MW4 to “250”
Set MW6 to ”-250”
The value of MW0 should now ramp to 250 (25.0Hz) and down to 0 then through
to –250 before repeating the cycle
7 Ensure the drive hardware RUN and Network Enable are active
MW20 is used to access the SMV Control Word, which is constructed as follows
(see the PROFIBUS Reference Guide for more details):-
Writing a value of 0x0061 to MW20 will set BITs 0, 5 and 6 of the control word
The drive should now enable and follow the reference value of MW0