Sinamics g120 at s7-300400-pn Doku v23 en PDF
Sinamics g120 at s7-300400-pn Doku v23 en PDF
Sinamics g120 at s7-300400-pn Doku v23 en PDF
http://support.automation.siemens.com/WW/view/en/58820849
Warranty and liability
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 provide support for typical applications. You are responsible for ensuring that
the described products are used correctly. These application examples do not
relieve you of the responsibility to use safe practices in application, installation,
operation and maintenance. When using these Application Examples, you
recognize that we 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 – the
contents of the other documents have priority.
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 Example shall be excluded. Such an exclusion shall
not apply in the case of mandatory liability, e.g. under the German Product Liability
Siemens AG 2014 All rights reserved
Security Siemens provides products and solutions with industrial security functions that
informa- support the secure operation of plants, solutions, machines, equipment and/or
tion networks. They are important components in a holistic industrial security
concept. With this in mind, Siemens’ products and solutions undergo continuous
development. Siemens recommends strongly that you regularly check for
product updates.
For the secure operation of Siemens products and solutions, it is necessary to
take suitable preventive action (e.g. cell protection concept) and integrate each
component into a holistic, state-of-the-art industrial security concept. Third-party
products that may be in use should also be considered. For more information
about industrial security, visit http://www.siemens.com/industrialsecurity.
To stay informed about product updates as they occur, sign up for a product-
specific newsletter. For more information, visit
http://support.automation.siemens.com.
Table of Contents
Warranty and liability................................................................................................... 2
Table of Contents ......................................................................................................... 3
1 Task ..................................................................................................................... 5
2 Solution............................................................................................................... 6
2.1 Overview of the general solution .......................................................... 6
2.2 Description of the core functionality ..................................................... 7
2.2.1 Configuring the communication ............................................................ 7
SIMATIC S7-300/400 ........................................................................... 7
SINAMICS G ........................................................................................ 7
2.2.2 Data exchange ..................................................................................... 7
Cyclic process data exchange ............................................................. 8
Acyclic data exchange (parameter access) ......................................... 8
2.3 Hardware and software components used........................................... 9
Sample files and projects ................................................................... 11
3 Setting up and Commissioning the Application .......................................... 12
3.1 Wiring ................................................................................................. 12
3.2 IP addresses and PN names ............................................................. 13
3.3 Settings on PG/PC ............................................................................. 13
3.4 Downloading the SIMATIC program .................................................. 14
Siemens AG 2014 All rights reserved
1 Task
The SIMATIC S7 300/400 can be operated as a PROFINET controller. A
SINAMICS G110M, G120, G120C, G120D or G120P can be used here as
PROFINET device and be controlled by the SIMATIC S7-300/400.
This application example illustrates how to configure SINAMICS
G110M/G120/G120C/G120D/G120P and SIMATIC S7-300/400, start it up, and
access process data and parameters.
Figure 1-1
Siemens AG 2014 All rights reserved
MPI, PROFIBUS
or Ethernet
PROFINET
Copyright
2 Solution
This application example gives an example of how to connect a SINAMICS
G110M, G120, G120C, G120D or G120P to an SIMATIC S7-300. It uses blocks
which can be directly applied to your own application.
Figure 2-1
PROFINET PC/PG
USB
(alternative for parameterization
Copyright
Motor
NOTICE This example is only valid for frequency converter SINAMICS G110M with
FW4.7 and SINAMICS G110M, G120, G120C, G120D and G120P as of FW4.6.
SIMATIC S7-300/400
SIMATIC S7-300/400 in this example is programmed with STEP 7 V5.
In HW Config, the SIMATIC S7 the stations connected via PROFINET, such as
SINAMICS G, are configured, and the communication is defined. One of several
message frame types can be selected here for the data exchange. It is important
that the same message frame type is selected here as for the SINAMICS G
configuration.
When inserting SINAMICS G into the SIMATIC project, the I/O addresses used by
the SIMATIC S7-300/400 for accessing the SINAMICS G are also specified.
SINAMICS G
Siemens AG 2014 All rights reserved
Note The two areas, process data and parameters, are independent from each other
and can also be used individually.
To be able to transfer parameters, message frame types were also defined where
additionally four words are provided for a parameter transfer. Since these four
words, like the process data, are always transmitted, a permanent communication
Siemens AG 2014 All rights reserved
load is produced even though the parameters themselves are generally only rarely
transferred.
PROFINET also provides the option of using an acyclic data exchange in addition
to the cyclic data exchange, which is only inserted on demand.
This makes it possible to transfer the parameter area acyclically on demand,
without creating a permanent communication load. The acyclic transfer takes
clearly longer than the cyclic transfer of the process data.
In this example an acyclic data exchange is used for parameter access.
Copyright
Note When using a CP342-1, the parameters of the SINAMICS G cannot be accessed
with the acyclic data exchange.
Software components
Table 2-7 Software components
Component Qty. Order number Note
SIMATIC STEP 7 Floating License
1
V5.5 SP4 6ES7810-4CC10-0YA5
STARTER
1 6SL3072-0AA00-0AG0 Free download: see /6/
V4.4
WinCC flexible 1 6AV6613-0AA51-3CA5
Version: 2008 SP3
CAUTION The example projects have been designed for usage with the example
components listed in Table 2-1. Converter and/or motor can be damaged or
destroyed if a SINAMICS G with a different output or a different motor is
connected, without adjusting the respective parameters.
3.1 Wiring
The figure below shows the hardware setup of the application.
Figure 3-1
L1
L2
L3
N
PE
24V
0V
+24 V OUT
Siemens AG 2014 All rights reserved
DI 4
F-DI1)
DI 5 L+ M E 0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 M
SM323
DI COM 1
PB PN PN CPU 315-2 PN/DP
DI COM 2 2)
GND USB
USB line
is optional.
SINAMICS
G120
Copyright
U2 V2 W2 PE PN PN
L+ M PN PN USB
M
Y
SIMATIC Panel PG/PC
KTP600
Notes The setup guidelines in the SINAMICS G manual (see /7/) and SIMATIC must
generally be followed.
Table 3-1
IP Component Device Name
192.168.0.1 S7-CPU S7-CPU
G110M G110M
CU230P-2 PN G120xCU230Px2
CU240E-2 PN G120xCU240Ex2
CU240E-2 PN F G120xCU240Ex2xF
192.168.0.2
CU240S-2 PN G120xCU250Sx2xV
CU240D-2 PN G120xCU240Dx2
CU240D-2 PN F G120xCU240Dx2xF
G120C PN G120C
192.168.0.3 KTP600 KTP600
192.168.0.200 PG/PC
By default STEP 7 enters the device’s Short Designation for the device name. But
the user can modify it as needed. The device name is not case sensitive.
Siemens AG 2014 All rights reserved
Table 3-3
No. Action Screenshots / Remarks
1. Connect the controller with the You can connect both devices directly or via a switch.
SIMATIC S7-300/400 using a
network cable.
2. Start STEP 7.
Siemens AG 2014 All rights reserved
5. Click on “Browse...”
– Select the CPU and click
OK.
Enter the IP address
192.168.0.1 and the subnet
mask 255.255.255.0, and
click on “Assign IP
Configuration”.
Enter the device name
“s7-cpu” and click on
“Assign Name”.
Exit the dialog by clicking
Siemens AG 2014 All rights reserved
“Close”.
Copyright
Notes Should you use a different SINAMICS G or motor you need to perform your own
configuration. Follow the instructions in chapter 6 “Configuration and Settings”,
especially steps 13 and 14.
In the screenshots below, a SINAMICS G is used. In the instruction texts deviating
names of the other SINAMICS G converter types might be mentioned.
The SIMATIC S7-300/400 CPU must support data record routing. (CPU 31x with
FW3.x or CPU 41x with FW5.1 or newer), see /9/
Table 3-4
No. Action Screenshots / Remarks
1. Connect the CU 240E-2 PN of You can connect both devices directly or via a switch.
the SINAMICS G120 to the
PG/PC.
2. Unless the SIMATIC program is
currently loaded, please perform
steps 1 to 3 from Table 3-3.
4. Click on “Browse...”
Select the SINAMICS G and
click on OK.
Enter the IP address
192.168.0.2 and the subnet
mask 255.255.255.0, and
click on “Assign IP
Configuration”.
Enter the device name of
your CU and click on
“Assign Name” (please
observe the note).
Siemens AG 2014 All rights reserved
– G110M
– G120xCU230Px2
– G120xCU240Ex2
– G120xCU240Ex2xF
– G120xCU250Sx2xV
– G120xCU240Dx2
– G120xCU240Dx2xF
– G120C
Exit the dialog by clicking
Copyright
“Close”.
Note:
The device name must match
the one given in the Properties of
SINAMICS G in HW Config.
5. Click on SINAMICS G.
Depending on the used
project, the SINAMICS G is
called…
– G110M_PN
– G120_CU230P_2_PN
– G120_CU240E_2_PN
– G120_CU240E_2_PN_F
– G120_CU250S_2_V_PN
– G120_CU240D_2_PN
– G120_CU240D_2_PN_F
– G120C_PN
Click 2x on
“Commissioning”.
This opens the STARTER
with the project.
The picture shows the example of a SINAMICS G120 with
CU 240E-2 PN.
7. Select
“S7ONLINE(TCP/IP->Network
card” and click on “OK”.
Copyright
Table 3-5
No. Action Screenshots / Remarks
1 Connect the SINAMICS G with the
PG/PC using a USB cable.
Wait until Windows has
recognized the SINAMICS G (USB
Mass Storage Device).
2 Click on SINAMICS G.
Siemens AG 2014 All rights reserved
– G120_CU240D_2_PN_F
– G120C_PN
Click 2x on “Commissioning”.
This opens the STARTER
with the project.
Table 3-6
No. Action Screenshots / Remarks
1. Go online.
Copyright
8. Go offline.
9. Perform a power reset. Switch off all supply voltages of SINAMICS G, wait until all
LEDs are off, and then switch back on.
Siemens AG 2014 All rights reserved
Copyright
Table 4-1
Terminal Name Function
E 0.0 ON Switching SINAMICS G on/off,
(Off2 and Off3 =1 must apply for the operation)
E 0.1 OFF2 0= Motor immediately switched off, drive spins out
E 0.2 OFF3 0= Fast stop, motor is decelerated with Off3 ramp down time (P1135) until it
stops
E 0.3 Ack Rising edge acknowledges a pending error in the SINAMICS G
E 0.4 Rev Reversed direction, the polarity of the setpoint value is negated
E 0.5 0 The setpoint value is set to 0.
E 0.6 n+ The setpoint value is increased
E 0.7 n- The setpoint value is decreased
Table 4-2
Step Action Note / Result
1. Apply 24V to OFF2(E0.1) and The further required control bits for the
OFF3(E0.2). operation are permanently set to 1 by
the program.
2. Enter a pulse (switching on and This acknowledges a possibly pending
back off) to Ack (E0.3). error message.
3. Enter a pulse (switching on and The setpoint is set to 0.
back off) to 0 (E0.5).
4. Apply 24V to ON(E0.0). The drive switches on.
5. Change the setpoint value with The speed of the motor changes.
inputs n+ (E 0.6), n- (E0.7) and 0
(E0.5).
6. Detach the 24V from ON(E0.0). The drive switches back off.
Siemens AG 2014 All rights reserved
Copyright
Figure 4-1
Start screen
From all subordinate
screens
Fault buffer
Terminate Runtime
Both screens for the process data exchange access the idb_Process_Data data
block (DB11).
Figure 4-2
Siemens AG 2014 All rights reserved
Copyright
The bit commands, which you can partially specify via the digital input module, are
displayed in the 16 bit wide control word.
The current state of the SINAMICS G is given via the also 16 bit wide status word.
Manual mode
Using the “Manual mode” button enables activating the manual mode of the block.
Instead of switching to the control signals pending at the block, in this example to
the digital inputs, this mode switches to an internal control word specified via HMI,
for example. Also, an internal value is used instead of the pending setpoint value.
This enables a simple manual/automatic switch-over.
When (de-)activating the manual mode, the control word and the setpoint
value are not adjusted. It is therefore possible when switching over that
SINAMICS G automatically starts up or changes the speed.
DANGER
In this example, this enables switching from the digital inputs to manual operation
via HMI. The set control word bits are then displayed yellow.
Figure 4-3
Siemens AG 2014 All rights reserved
In manual mode, the speed setpoint value is directly specified via HMI, the input
field is then shaded yellow.
When (de-)activating the manual mode, the control word and the setpoint
value are not adjusted. It is therefore possible when switching over that
SINAMICS G automatically starts up or changes the speed.
DANGER
Actual values:
The current actual values for speed, electrical current and torque are displayed
below the speed setpoint value input.
Current messages:
Current faults and warnings are displayed with a respective number. A “0” means
that no fault or alarm exists. If a message is pending it is displayed according to
Figure 4-4.
Figure 4-4
Tap or click on the message number to display the respective message text.
Figure 4-5
Siemens AG 2014 All rights reserved
Copyright
Both screens for the process data exchange access the idb_Parameter_Access
data block (DB11).
Reading/writing parameters
Figure 4-6
Siemens AG 2014 All rights reserved
Copyright
Table 4-3
Action Comment
1. Select the access type with the “Read The selected access type is displayed
parameters” and “Write parameters” via a bright green button.
buttons.
2. Read parameters:
Proceed with point 3 in the table.
Write parameters:
When tapping or clicking the yellow
input field for the rampup/rampdown
time, a keyboard mask for the value
input opens. Close your input with the
Return key.
8,0
Siemens AG 2014 All rights reserved
3. Start the write or read job with the The job status specifies how the job
“Start” button. was completed:
done = completed without error
errori = job cancelled with error
Note If you wish to check the parameters after a write job, you must trigger an
additional read job.
Fault buffer
The screen displays the fault codes of eight current and eight acknowledged faults,
which are saved in the SINAMICS G.
Note The values are read by SINAMICS G via the “Read parameters” function in
Figure 4-6 and saved in the SIMATIC S7-300/400.
When the “Fault buffer” screen comes up, the data stored in SIMATIC S7-
300/400 is displayed and may therefore be out of date.
Figure 4-7
Siemens AG 2014 All rights reserved
Copyright
Tap or click on the message number to display the respective message text.
Figure 4-8
OB 1 FC 5 “setpoint_
simulation“
“CYCL_EXC“
FB 10 “process data“
DB 10
“idb process data“
DB 100 “write drive
parameter“
DB 103 “answer
DB 20 “idb parameter access“ from drive_read“
Siemens AG 2014 All rights reserved
In this area, the process data for the SINAMICS G is transmitted (e.g. one
command and setpoint) or received (status and actual values)
Parameter access
In this area, the parameters SINAMICS G are accessed.
Note The two communication areas, process data and parameter access, are
independent from each other and can each also be used individually.
OB 1 FC 5 “setpoint_
simulation“
“CYCL_EXC“
FB 10 “process data“
DB 10
“idb process data“
DB 100 “write drive
parameter“
DB 103 “answer
DB 20 “idb parameter access“ from drive_read“
Siemens AG 2014 All rights reserved
The process data contains values which are regularly exchanged between
SIMATIC S7-300/400 and SINAMICS G. These values are at least the control and
status word as well as the setpoint and actual value. Selecting the message frame
type specifies the exact length and structure.
Copyright
The “Siemens Telegram 352, PZD 6/6” message frame type used in the example
exchanges 6 words in both directions, which are:
Table 5-1 Structure of Siemens “Telegram 352, PZD 6/6”
Send direction (viewed from SIMATIC) Receive direction (viewed from SIMATIC)
Control word Status word
Setpoint speed value Current speed (actual speed value)
(not used) Current electrical current
(not used) Current torque
(not used) Current warning
(not used) Current fault
5.1.1 Accessing process data in the user program of the SIMATIC S7-
300/400
At the start of the cycle, the operating system of SIMATIC S7-300/400 stores the
(user) data received by the SINAMICS G in the I/O input area of the SIMATIC CPU
and transmits the data stored in the I/O output area to the SINAMICS G at the end
of the cycle. In the user program, the data can be accessed by reading from or
writing to the I/O area. The address areas used are defined when specifying the
hardware configuration. See step 16 in Table 6-1.
If the I/O is accessed with the SFC 14/15 system functions, the consistency is
ensured across the entire data; hence, these functions are used in the example
program.
The setpoint and actual values are transferred as standards. The reference values
are stored in parameters P2000 to P2006 of the SINAMICS G.
FB20 “Parameter_Access” takes on entirely the conversion of setpoint and actual
values. The reference values for speed current, torque stored in parameters
P2000, P2003 and P2004 of SINAMICS must also be entered at the block input.
Siemens AG 2014 All rights reserved
16384dec = 4000hex = 100% applies here, with 100% referring to the reference
value for the transferred variable.
Example:
If P2000 (reference speed or reference frequency) is 1500 1/min and if a speed
of 500 1/min shall be run, then 33% or 5461dec must be transferred.
Copyright
The control and status word has already been defined. The subsequent figures
illustrate the control and status word when selecting the “Siemens Telegram 352,
PZD 6/6” message frame type.
Figure 5-3: Control word of the “Siemens Telegram 352, PZD 6/6” message frame type
Siemens AG 2014 All rights reserved
Copyright
Note A control word for which all bits are 0 is rejected as invalid by the SINAMICS G.
Therefore, at least bit 10 must always be set.
Figure 5-4 Status word of the “Siemens Telegram 352, PZD 6/6” message frame type
Siemens AG 2014 All rights reserved
Copyright
5.1.4 FB 10 “PZD_G120_Tel_352”
This FB takes on the transmission of the process data from and to the SINAMICS
G. It copies the main control and status bits and converts the setpoint and actual
values. It can therefore be used as interface with SINAMICS G in own applications.
Data Initial
Parameter Description
type value
Acknowledge BOOL FALSE Pending errors are acknowledged with
rising edge.
Direction_reversal BOOL FALSE With this input, the polarity of the
setpoint value can be changed.
Activate_manual_mode BOOL FALSE Switches the block between manual
and automatic mode.
For FALSE, the control word and the
setpoint value are formed of the signals
pending at the block, for TRUE, control
word and setpoint value from tags in
the instance DB are used and can be
specified via HMI, for example.
Speed_setpoint REAL 0.0 Setpoint speed value in U/min
Negative values change the direction
Reference_speed_P2000 REAL 1500.0 Reference speed
Here, the same value must be specified
as in parameter P2000 of SINAMICS
G.
Reference_current_P2002 REAL 0.0 Reference current
Here, the same value must be specified
Siemens AG 2014 All rights reserved
NOTICE To switch on SINAMICS G, OFF2 and OFF3 must initially be TRUE, then
SINAMICS G can be switched on with a positive edge (i.e. the signal
changes from FALSE to TRUE) at ON/OFF1.
SCL language
FB 10 “PZD_G120_Tel_352” was created in SCL. During compilation in the block
folder, the SCL editor generates a function block created in STL. It can be copied
into your own projects and used without installed SCL.
SCL source “Process_Data(Tel_352)” is located in the “Sources” subfolder of the
S7 program.
The SCL source can be exported via the context menu and then be viewed with
any text editor.
Copyright
Figure 5-6
Figure 5-7
Siemens AG 2014 All rights reserved
Copyright
OB 1 FC 5 “setpoint_
simulation“
“CYCL_EXC“
FB 10 “process data“
DB 10
“idb process data“
DB 100 “write drive
parameter“
DB 103 “answer
DB 20 “idb parameter access“ from drive_read“
Siemens AG 2014 All rights reserved
Acyclic parameter access occurs parallel to the cyclic process data exchange. This
saves resources, since this connection is only established on demand, i.e. when
accessing a parameter.
In SIMATIC S7-300/400, the “Write data record” and “Read data record” functions
must be used. Data record 47 must always be used.
Writing data record 47 sends a job to the SINAMICS G which performs the job and
provides a response. Reading data record 47 makes the response of SINAMICS G
available in SIMATIC S7-300/400 and can be evaluated.
Copyright
For reading and writing data records, the system function blocks SFB 53 “WRREC”
and SFB 52 “RDREC” are used in SIMATIC S7-300/400.
For the Data record 47 please refer to chap. 3.1.2 in the function manual Fieldbus
systems (Manuals).
Note Since SFB 53 “WRREC” and SFB 52 “RDREC” are not used with CP341-1, the
parameter access is not possible when using this CP.
5.3.1 FB 20 “Parameter_Access”
Figure 5-9
Input parameters
Address INT 0 IO address of SINAMICS G.
Here, the IO address must be specified
which was assigned for message frame
Telegram 352 of SINAMICS in HW
Config.
Input and output address must be
identical to be able to use this block.
Copyright
Error list
The FB 20 “Parameter_Access” can output the following error codes:
Table 5-4
Error number Description Note
0 No error
8000 DB_No_send and DB_No_rev
are identical. Check the parameters of FB 20
8001 DB_No_rev or DB_No_send is “Parameter_Access”.
zero.
8002 SFC53 “WEREC” outputs In the instance DB, the error code of
errors the SFC is stored in
#WD_REC_STATUS.
8003 SFC53 “WEREC” outputs In the instance DB, the error code of
errors the SFC is stored in
#RD_REC_STATUS.
8004 Send DB is empty (length 0), In the instance DB, the error code of
non existent or faulty. the SFC24 “TEST_DB” is stored in
#TEST_DB_1_STATUS. If the code
is 0, the DB is empty or write
protected.
8005 Receive DB is empty (length In the instance DB, the error code of
0), non existent or faulty. the SFC24 “TEST_DB” is stored in
#TEST_DB_2_STATUS. If the code
is 0, the DB is empty or write
Siemens AG 2014 All rights reserved
protected.
Drive error
If during processing a job in SINAMICS G an error occurred, and the error
detection was set in the response, the response DB must be analyzed to find out
the cause of the error.
Copyright
Function
FB 20 “Parameter_Accesss” only transfers the selected DBs to or from SINAMICS
G and checks, whether the transmission was successful. It is also checked,
whether the error detection was set in the response of the SINAMICS G.
The structure of the error detection is available in chapter chapter 6.1.5.1
“Configuring the fieldbus, PROFIdrive profile for PROFIBUS and PROFINET,
acyclic communication” in the operating instruction (/7/)
Structure
The “Parameter” FB consists of three parts:
Checking the DB_No_xx input parameters
Network 1
A step chain which controls the sequence of the parameter access.
Networks 2 to 10
Call of the system functions “Read data record” or “Write data record”.
Network 11
Note Network 1 with checking the DB_No_xx input parameters can be deleted to save
computing time and storage space without affecting the other functions of the
block.
Step chain
The step chain of FB 20 “Parameter_access” is represented in the following
graphic. The possible transitions between the individual steps are also displayed
there.
In the individual states of the step chain, the following functions are executed:
State Function
2 Wait for end of Waiting until the “busy” signal of SFB 53 “WRREC” becomes
WR_REC 0 again. Then step 3 is activated.
3 Check result of It is checked whether the data record was written
WR_REC successfully.
If so, the “REQ” signal of SFB 53 “WRREC” will be deleted
again and step 4 will be activated.
If SFB 53 “WRREC” reports the error 16#DF80_B500 (peer
not ready), step 3 will be activated again and SFB 53
“WRREC” will repeat the job.
If a different error has occurred, the “REQ” signal of SFB 53
“WRREC” will be deleted, an internal error bit will be set and
step 7 will be activated.
4 Start RD_REC The “REQ” signal of FB “RDREC” is set and step 5 is
activated.
5 Wait for end of It is waited until the “busy” signal of FB “RDREC” becomes 0
RD_REC again. Then step 6 is activated.
6 Check result of Check whether the data record has been read successfully.
RD_REC If so, the “REQ” signal of SFB 52 “RDREC” will be deleted
again and step 7 will be activated.
If SFB 52 “RDREC” reports the error 16#DE80_B500 (peer
not ready), step 5 will be activated again and FB “RDREC”
Siemens AG 2014 All rights reserved
– step 0 activated.
If no error bit has been set, the read times will be output, the
“BUSY” will be deleted, the “DONE” will be set and step 0
will be activated.
Call of the “Read data record” or “Write data record” system functions
After the currently required control bits were set in the sequence chart of FB 20
“Parameter_access”, the “Write data record” and “Read data record” system
functions (SFB 53 “WRREC” and SFB 52 “RDREC”) are called in network 10.
It is initially checked, whether the DB to be used exists in the SIMATIC S7-CPU
and how long it is. This creates an ANY pointer which references the data to be
send/received and calls the SFC.
To access the parameters, a given job structure must be kept. The response of
SINAMICS G also contains a given response structure.
Note Since the structure of the data record to be sent or received depends on the
number of jobs and their number format, a generally valid structure cannot be
used.
FB 20 “Parameter_Access” is therefore limited to sending and receiving the data
record. The DBs for the data record to be send and received must be set by the
user.
The job to access a parameter consists of at least 10 words. Therefore, the job
should be assembled in a DB. The response by the SINAMICS G also consists of
several words.
A job may contain the access to several parameters. Since the length of the data to
be transferred per job depends on the number and data types of the SINAMICS G
parameters, no generally valid structure can be devised.
In this example, only the ramp up and ramp down times (P1120 and P1121) and a
part of the fault memory (P945.x) is accessed. The job of writing the parameters is
Siemens AG 2014 All rights reserved
Figure 5-11 DB 100 for writing the ramp up and ramp down time (in the picture: 10s and 15 s)
Copyright
Figure 5-13 DB 101 for reading the ramp up and ramp down time and 16 values of the fault memory
Copyright
Note Since the structure of the data record to be sent or received depends on the
number of jobs and their number format, a generally valid structure cannot be
used.
Table 5-6
Block Function
OB86 If the connection to a PROFIBUS station is interrupted or
restored, the SIMATIC S7-CPU calls these error organization
blocks. If this OB does not exist in the SIMATIC S7-CPU, it
goes to STOP instead.
In this OB, the user can program a reaction to a failed or
restored station, in this example it is empty.
FC5 Function for generating a speed setpoint value using the digital
inputs.
The setpoint value is stored in MD0.
This block is not intended for use in your own projects.
VAT_Process_Data Value tables for monitoring and control of FB10 and FB20.
Siemens AG 2014 All rights reserved
VAT_Parameter_Access
Copyright
The step tables below describe what you have to do if you do not want to or cannot
use the sample code and you want to or have to configure SINAMICS G and
SIMATIC S7 CPU yourself.
Table 6-1
Siemens AG 2014 All rights reserved
The picture shows the example of a selected SINAMICS G120 with CU 240E-2 PN.
Ethernet
“Close”.
Note:
The device name must match
the one given in the Properties of
SINAMICS G in HW Config.
6. Click on SINAMICS G.
Depending on the used
project, the SINAMICS G is
called…
Copyright
– G110M_PN
– G120_CU230P_2_PN
– G120_CU240E_2_PN
– G120_CU240E_2_PN_F
– G120_CU250S_2_V_PN
– G120_CU240D_2_PN
– G120_CU240D_2_PN_F
– G120C_PN
Click 2x on “Commissioning”.
This opens the STARTER with
the project.
8. Select
“S7ONLINE(TCP/IP->Network
card” and click on “OK”.
Copyright
http://support.automation.siemens.com/WW/view/en/94003326
Function manual Fieldbus systems (V4.7):
http://support.automation.siemens.com/WW/view/en/99685159
8 History
Copyright
Table 8-1
Version Date Revisions
V1.0 07/2012 First issue
V2.0 08/2012 Complete revision with focus on easy usability of the blocks
in own projects
Expansion by SINAMICS G120C, G120D and G120P
V2.1 04/2013 Extended by CU250S-2 PN
V2.1a 04/2013 Corrected used STARTER version in chap. 2.3
V2.2 04/2014 Update FB10 (initialize the input buffer with 0, when SFC14
shows error)
Use of STARTER V4.3.3
V2.3 11/2014 Extended by SINAMICS G120 with FW 4.7 and
STARTER V4.4.