Application example 12/20162016 Acyclic communication ... · Application example 12/20162016...
Transcript of Application example 12/20162016 Acyclic communication ... · Application example 12/20162016...
https://support.industry.siemens.com/cs/ww/en/view/109743977
Application example 12/20162016
Acyclic communication between S7-1500 and V90PN via PROFINET SINAMICS V90 / SIMATIC S7-1500
Warranty and liability
Acyclic communication between S7-1500 and V90 via PROFINET Entry-ID: 109743977, V1.0, 12/20162016 2
S
iem
en
s A
G 2
01
6 A
ll ri
gh
ts r
ese
rve
d
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 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”). The damages for a breach of a substantial contractual obligation are, however, limited to the foreseeable damage, typical for the type of contract, except in the event of intent or gross negligence or injury to life, body or health. The above provisions do not imply a change of the burden of proof to your detriment. Any form of duplication or distribution of these Application Examples or excerpts hereof is prohibited without the expressed consent of the Siemens AG.
Security informa-tion
Siemens provides products and solutions with industrial security functions that support the secure operation of plants, systems, machines and networks. In order to protect plants, systems, machines and networks against cyber threats, it is necessary to implement – and continuously maintain – a holistic, state-of-the-art industrial security concept. Siemens’ products and solutions only form one element of such a concept. Customer is responsible to prevent unauthorized access to its plants, systems, machines and networks. Systems, machines and components should only be connected to the enterprise network or the internet if and to the extent necessary and with appropriate security measures (e.g. use of firewalls and network segmentation) in place. Additionally, Siemens’ guidance on appropriate security measures should be taken into account. For more information about industrial security, please visit http://www.siemens.com/industrialsecurity.
Siemens’ products and solutions undergo continuous development to make them more secure. Siemens strongly recommends to apply product updates as soon as available and to always use the latest product versions. Use of product versions that are no longer supported, and failure to apply latest updates may increase customer’s exposure to cyber threats. To stay informed about product updates, subscribe to the Siemens Industrial Security RSS Feed under http://www.siemens.com/industrialsecurity.
Table of contents
Acyclic communication between S7-1500 and V90 via PROFINET Entry-ID: 109743977, V1.0, 12/20162016 3
S
iem
en
s A
G 2
01
6 A
ll ri
gh
ts r
ese
rve
d
Table of contents Warranty and liability ................................................................................................... 2
1 Task ..................................................................................................................... 4
2 Solution............................................................................................................... 5
2.1 Solution overview ................................................................................. 5 2.2 Hardware and Software Components .................................................. 6 2.2.1 Validity .................................................................................................. 6 2.2.2 Used Components ................................................................................ 6
3 Acyclic data exchange ...................................................................................... 7
3.1 Description ........................................................................................... 7 3.2 Diagram of acyclic data exchange ....................................................... 7 3.3 Read Parameter Data Structure ........................................................... 8 3.4 Write Parameter Data Structure ......................................................... 10 3.5 Error code ........................................................................................... 12
4 Libraries with function blocks for acyclic data transfer .............................. 14
5 Operation of the different block scenarios ................................................... 15
5.1 Scenario A (WRREC and RDREC mode) .......................................... 15 5.1.1 Configuration and programming ......................................................... 16 5.1.2 Read multiple parameters .................................................................. 17 5.1.3 Write multiple parameters .................................................................. 18 5.2 Scenario B (SINA_PARA and SINA_PARA_S mode) ....................... 19 5.2.1 Configuration and programming ......................................................... 19 5.2.2 Read parameters ................................................................................ 20 5.2.3 Write parameters ................................................................................ 21 5.3 Scenario C (LAcycCom Library mode) ............................................... 22 5.3.1 Configuration and programming ......................................................... 22 5.3.2 Read parameters ................................................................................ 25 5.3.3 Write parameters ................................................................................ 26
6 Comparison between the different scenarios .............................................. 27
7 Related literature ............................................................................................. 28
8 Contact.............................................................................................................. 28
9 History............................................................................................................... 28
1 Task
Acyclic communication between S7-1500 and V90 via PROFINET Entry-ID: 109743977, V1.0, 12/20162016 4
S
iem
en
s A
G 2
01
6 A
ll ri
gh
ts r
ese
rve
d
1 Task
Introduction
ROFINET IO controller can read and write the parameters of SINAMICS V90 PN drive by acyclic data exchange via PROFINET communication protocol. The controller can read or write multiple parameters.
Overview of the automation task
The figure 1-1 below provides an overview of the automation task.
Servo Drive Servo Motor
PG/PC
Profinet cable
Encoder cable
Power cable
SIMATIC PLC
Figure 1-1
2 Solution
Acyclic communication between S7-1500 and V90 via PROFINET Entry-ID: 109743977, V1.0, 12/20162016 5
S
iem
en
s A
G 2
01
6 A
ll ri
gh
ts r
ese
rve
d
2 Solution
2.1 Solution overview
Schema Display
The following figure 2-1 displays the most important components of the solution:
IO device
IO Supervisor
IO controller
Figure 2-1
Required knowledge
Basic knowledge about TIA Portal is assumed.
The configuration of S7-1500 PLC with the SINAMICS V90 PN drive in TIA Portal is assumed.
2 Solution
Acyclic communication between S7-1500 and V90 via PROFINET Entry-ID: 109743977, V1.0, 12/20162016 6
S
iem
en
s A
G 2
01
6 A
ll ri
gh
ts r
ese
rve
d
2.2 Hardware and Software Components
2.2.1 Validity
This application example is valid for
TIA Portal V13 SP1
S7-1500 CPU with PN interface
SINAMICS V90 PN FW V01.04.00
SIMOTICS S-1FL6 LI motor
2.2.2 Used Components
The application was generated with the following components:
Hardware components
Table 2-1 hardware components
Component No. Article number Note
SIMATIC S7-1500
CPU1511-1 PN
1 6ES7511-1AK00-0AB0 V1.7
SINAMICS V90 PN 200V
1 6SL3210-5FB10-1UF0 V1.0.0.12
SIMOTICS S-1FL6 Li motor
1 1FL6022-2AF21-1AA1 50W
Standard software components
Table 2-2 software components
Component No. Article number Note
TIA Portal 1 V13 SP1 UPD8
SINAMICS V-ASSISTANT
1 V1.04.00.07
Sample files and projects
The table 2-3 includes all files and projects that are used in this example.
Table 2-3
Component Note
Acyclic communication between S7-1500 and V90 PN.zip Scenario A
Acyclic communication between S7-1500 with V90 PN via SINA_PARA Scenario B
Acyclic communication between S7-1500 with V90 PN via LAcycCom Library Scenario C
3 Acyclic data exchange
Acyclic communication between S7-1500 and V90 via PROFINET Entry-ID: 109743977, V1.0, 12/20162016 7
S
iem
en
s A
G 2
01
6 A
ll ri
gh
ts r
ese
rve
d
3 Acyclic data exchange
3.1 Description
The acyclic data exchange mode allows the following task:
Exchange large “user data”.
By using the PLC function blocks READ and WRITE the user can exchange the data. The transferred data block structure should follow the DS47 data structure.
The acyclic data exchange between S7-1500 CPU and V90 PN drive should use the system block “WRREC” and “RDREC”.
The quantity of the read or write parameter is not restricted. But the maximum data length is 240 byte for each read or write job.
The “WRREC” block sends the request command to the V90 PN drive. The “RDREC” sends the response back to PLC.
3.2 Diagram of acyclic data exchange
The figure 3-1 describes the principle of acyclic data exchange.
Figure 3-1
3 Acyclic data exchange
Acyclic communication between S7-1500 and V90 via PROFINET Entry-ID: 109743977, V1.0, 12/20162016 8
S
iem
en
s A
G 2
01
6 A
ll ri
gh
ts r
ese
rve
d
3.3 Read Parameter Data Structure
The table 3-1 shows the data format of the parameter RECORD in function block “WRREC”. The table 3-2 shows the response data format of the V90 PN drive to this request in function block “RDREC”.
Table 3-1 data structure of the task “read parameter”
Data block Byte n Byte n+1 n
Message header
Refer 01 hex … FF hex 01 hex: read task 0
02 hex quantity of the parameters (m) 01 hex … 27 hex
2
The address of parameter 1
Properties
10 hex: parameter value
20 hex: parameter description
Quantity of the parameter index:
00 hex … EA hex
(parameter has no index: 00 hex)
4
Parameter number: 0001 hex … FFFF hex 6
The first index number: 0000 hex … FFFF hex
(parameter has no index: 0000 hex)
8
The address of parameter 2
… …
… … …
The address of parameter m
… …
Table 3-2 response data structure of the task “read parameter”
Data block Byte n Byte n+1 n
Message header
The same as table 3-1 01 hex: read task is finished
81 hex: read task is not finished
0
02 hex The same as table 3-1 2
The value of parameter 1
Value format:
02 hex: Integer 8
03 hex: Integer 16
04 hex: Integer 32
05 hex: Unsigned 8
06 hex: Unsigned 16
07 hex: Unsigned 32
08 hex: Floating Point
10 hex: Octet String
Quantity of the parameter index. It will be the quantity
of the error value 1)
if the
response is negative.
4
3 Acyclic data exchange
Acyclic communication between S7-1500 and V90 via PROFINET Entry-ID: 109743977, V1.0, 12/20162016 9
S
iem
en
s A
G 2
01
6 A
ll ri
gh
ts r
ese
rve
d
13 hex: Time Difference
41 hex: Byte
42 hex: Word
43 hex: Double Word
44 hex: Error
The value of the first index.
It will be the error value if the response is negative.
6
… …
The value of parameter 2
… …
… … …
The value of parameter m
… …
1) The error value will be described later.
3 Acyclic data exchange
Acyclic communication between S7-1500 and V90 via PROFINET Entry-ID: 109743977, V1.0, 12/20162016 10
S
iem
en
s A
G 2
01
6 A
ll ri
gh
ts r
ese
rve
d
3.4 Write Parameter Data Structure
The table 3-3 shows the data format of the parameter RECORD in function block “WRREC”. The table 3-4 and table 3-5 show the response data format of the V90 PN drive to this request in function block “RDREC”.
Table 3-3 data structure of the task “write parameter”
Data block Byte n Byte n+1 n
Message header
Refer 01 hex … FF hex 02 hex: write task 0
02 hex quantity of the parameters (m) 01 hex … 27 hex
2
The address of parameter 1
10 hex: parameter value
Quantity of the parameter index:
00 hex … EA hex
(the meaning of 00 hex and 01 hex is the same)
4
Parameter number: 0001 hex … FFFF hex 6
The first index number: 0000 hex … FFFF hex
(parameter has no index: 0000 hex)
8
The address of parameter 2
… …
… … …
The address of parameter m
… …
The value of parameter 1
Value format:
02 hex: Integer 8
03 hex: Integer 16
04 hex: Integer 32
05 hex: Unsigned 8
06 hex: Unsigned 16
07 hex: Unsigned 32
08 hex: Floating Point
10 hex: Octet String
13 hex: Time Difference
41 hex: Byte
42 hex: Word
43 hex: Double Word
Quantity of the parameter index:
00 hex … EA hex
The value of the first index
…
3 Acyclic data exchange
Acyclic communication between S7-1500 and V90 via PROFINET Entry-ID: 109743977, V1.0, 12/20162016 11
S
iem
en
s A
G 2
01
6 A
ll ri
gh
ts r
ese
rve
d
The value of parameter 2
… …
… … …
The value of parameter m
… …
If the V90 PN drive finishes the write task, then the response data format is shown in table 3-4.
Table 3-4 response data structure of the task “write parameter”
Data block Byte n Byte n+1 n
Message header
The same as table 3-3 02 hex 0
02 hex The same as table 3-3 2
If the V90 PN drive doesn’t finish the write task, then the response data format is shown in table 3-5.
Table 3-5 response data structure of the task “write parameter”
Data block Byte n Byte n+1 n
Message header
The same as table 3-3 82 hex 0
02 hex The same as table 3-3 2
The value of parameter 1
Value format:
40 hex: Zero, the write task is executed
44 hex: Error, the write task is not executed
Quantity of error
00 hex or 02 hex
4
Error value 1 only in error status1)
. 6
Error value 2 only in error status.
The value is 0 or the first index number
8
The value of parameter 2
… …
… … …
The value of parameter m
… …
1) The error value will be described later.
3 Acyclic data exchange
Acyclic communication between S7-1500 and V90 via PROFINET Entry-ID: 109743977, V1.0, 12/20162016 12
S
iem
en
s A
G 2
01
6 A
ll ri
gh
ts r
ese
rve
d
3.5 Error code
The table 3-6 will describe the error code in read and write job.
Table 3-6 error code
Error code Contents
00 hex The target parameter number does not exist.
01 hex Parameter value can’t be modified.
02 hex The modified value exceeds the parameter value range.
03 hex The target parameter index does not exist.
04 hex Using the index to visit the parameter without any index.
05 hex The data structure is not correct.
06 hex Using a value not equal to 0 to modify parameter value is forbidden.
07 hex Can’t modify the parameter description.
09 hex The target parameter description does not exist.
0B hex No access to modify parameter value.
0F hex The target text array does not exist.
11 hex Can’t modify parameter during drive is running.
14 hex Parameter value error.
15 hex The response data length exceeds the maximum length.
16 hex Parameter address is not correct.
17 hex The format is not correct.
18 hex The quantity of the parameter value is not correct.
19 hex The target drive does not exist.
6B hex No access to modify parameter value while drive enabled.
6C hex Unknown unit.
6E hex Only can be modified while P0010=3.
6F hex Only can be modified while P0010=2.
70 hex Only can be modified while P0010=1.
71 hex Only can be modified while P0010=0.
72 hex Only can be modified while P0010=30.
73 hex Only can be modified while P0010=95.
74 hex Only can be modified while P0010=5.
75 hex Only can be modified while P0010<>0.
76 hex Only can be modified while P0010=29.
3 Acyclic data exchange
Acyclic communication between S7-1500 and V90 via PROFINET Entry-ID: 109743977, V1.0, 12/20162016 13
S
iem
en
s A
G 2
01
6 A
ll ri
gh
ts r
ese
rve
d
77 hex Can’t modify parameter value while downloading.
81 hex Can’t modify parameter value while downloading.
82 hex P0806 is forbidden.
83 hex BICO is not correct.
84 hex Drive does not receive the modify task.
85 hex Undefined communication method.
86 hex Only can be modified while P0010=15.
87 hex It’s forbidden due to the protection level.
C8 hex The parameter value is lower than the minimum value.
C9 hex The parameter value is higher than the maximum value.
CC hex It’s forbidden to modify parameter value.
4 Libraries with function blocks for acyclic data transfer
Acyclic communication between S7-1500 and V90 via PROFINET Entry-ID: 109743977, V1.0, 12/20162016 14
S
iem
en
s A
G 2
01
6 A
ll ri
gh
ts r
ese
rve
d
4 Libraries with function blocks for acyclic data transfer SINA_PARA(FB286) and SINA_PARA_S(FB287) can be used for the acyclic communication between S7-1500 and V90 PN drive.
The details about FB286 and FB287 are provided in the application:
Cyclic and acyclic communication blocks, SIOS entry ID: 109475044
NOTE User can find detailed information about SINA_PARA and SINA_PARA_S in the chapter 4.4 and 4.5 of the application manual and can download the library when no Startdrive is in use. The previous named chapters explain the internal structure of the FBs, the use case “writing and reading of parameter” and some help for trouble shooting.
LAcycCom library also can be used for the acyclic communication between S7-1500 and V90 PN drive.
The details about LAcycCom library is provided in the application:
Acyclic Data Exchange, SIOS entry ID: 109479553
NOTE User can find detailed information about the library in two documents, can use one example and can download the library itself. The documents contain also the explanation to the resource management and the different drive functionalities. Several function and data blocks are collected inside the library.
5 Operation of the different block scenarios
Acyclic communication between S7-1500 and V90 via PROFINET Entry-ID: 109743977, V1.0, 12/20162016 15
S
iem
en
s A
G 2
01
6 A
ll ri
gh
ts r
ese
rve
d
5 Operation of the different block scenarios
5.1 Scenario A (WRREC and RDREC mode)
The details about how to do the configuration for the S7-1500 with V90 PN is provided in the applications:
Position Control of SINAMICS V90 with SIMATIC S7-1500 via IRT PROFINE; SIOS entry ID: 109739053
Speed Control of SINAMICS V90 with SIMATIC S7-1500 via PROFINET; SIOS entry ID: 109739216
NOTE In these previous mentioned application references the user can find the necessary steps to install a GSD file, to configure PROFINET RT or IRT and to configure the V90PN.
5 Operation of the different block scenarios
Acyclic communication between S7-1500 and V90 via PROFINET Entry-ID: 109743977, V1.0, 12/20162016 16
S
iem
en
s A
G 2
01
6 A
ll ri
gh
ts r
ese
rve
d
5.1.1 Configuration and programming
The configuration and programming is showed in table 5-1.
Table 5-1
Nr. Action Remarks
1 Using the telegram 3 in this application:
2 Insert “WRREC” into the PLC main block and make program as follows:
For the ID parameter the user should use the Modul Acces Point HW- ID. It is also possible to use the HW-ID of the cyclic telegram of the drive object.
The INDEX parameter should be 47.
The positive edge of M10.0 will active the writing request.
WRREC will write the 40 byte buffer from MB100.
3 Insert “RDREC” into the PLC main block and make program as follows:
For the ID parameter the user should use the Modul Acces Point HW-ID. It is also possible to use the HW-ID of the cyclic telegram of the drive object.
The INDEX parameter should be 47.
The positive edge of M20.0 will active the reading request.
WRREC will read the 40 byte buffer from MB200.
5 Operation of the different block scenarios
Acyclic communication between S7-1500 and V90 via PROFINET Entry-ID: 109743977, V1.0, 12/20162016 17
S
iem
en
s A
G 2
01
6 A
ll ri
gh
ts r
ese
rve
d
5.1.2 Read multiple parameters
In this example the task is to read several parameters from the drive. The parameters are P1121, P29020[0] and P29020[1]. Table 5-2 shows the operation sequence.
Table 5-2
Nr. Action Remarks
1 According to the data structure of table 3-1, fulfill the buffer of “WRREC” from MB100 to MB115. The format of the buffer shows in table 5-3.
2 Set M10.0 = 1 to start the task of “WRREC”.
3 After the task of “WRREC” finished, then set M20.0 = 1 to start the task of “RDREC”.
4 When the task of “RDREC” finished, the response data of the read task shows in table 5-4.
Table 5-3
Byte n Byte n+1 Address
Message header
Request Ref 01 hex Request ID 01 hex MW100
Drive ID 02 hex Para. Quantity 02 hex MW102
Parameter 1
Properties 10 hex Index Quantity 00 hex MW104
Parameter number = 0461 hex MW106
The first index number = 0000 hex MW108
Parameter 2
Properties 10 hex Index Quantity 02 hex MW110
Parameter number = 715C hex MW112
The first index number = 0000 hex MW114
Table 5-4
Byte n Byte n+1 Address
Message header
Request Ref 01 hex Request ID 01 hex MW200
Drive ID 02 hex Para. Quantity 02 hex MW202
Parameter 1
Value format 08 hex Index Quantity 01 hex MW204
Parameter value = 1.0 MD206
Parameter 2
Value format 06 hex Index Quantity 02 hex MW210
Parameter value = 18 MW212
Parameter value = 18 MW214
The result of the read task is: P1121=1.0, P29020[0]=18, and P29020[1]=28. It’s the same in the drive.
5 Operation of the different block scenarios
Acyclic communication between S7-1500 and V90 via PROFINET Entry-ID: 109743977, V1.0, 12/20162016 18
S
iem
en
s A
G 2
01
6 A
ll ri
gh
ts r
ese
rve
d
5.1.3 Write multiple parameters
In this example the task is to write several parameters from the drive. The parameters are P1121, P29020[0] and P29020[1]. Table 5-5 shows the operation sequence.
Table 5-5
Nr. Action Remarks
1 According to the data structure of table 3-3, fulfill the buffer of “WRREC” from MB100 to MB127. The format of the buffer shows in table 5-6.
2 Set M10.0 = 1 to start the task of “WRREC”.
3 After the task of “WRREC” finished, then set M20.0 = 1 to start the task of “RDREC”.
4 When the task of “RDREC” finished, the response data of the read task shows in table 5-7.
Table 5-6
Byte n Byte n+1 Address
Message header
Request Ref 01 hex Request ID 02 hex MW100
Drive ID 02 hex Para. Quantity 02 hex MW102
Parameter 1
Properties 10 hex Index Quantity 01 hex MW104
Parameter number = 0461 hex MW106
The first index number = 0000 hex MW108
Parameter 2
Properties 10 hex Index Quantity 02 hex MW110
Parameter number = 715C hex MW112
The first index number = 0000 hex MW114
Value of parameter 1
Value format 08 hex Index Quantity 01 hex MW116
Parameter Value = 2.0 MD118
Value of parameter 2
Value format 06 hex Index Quantity 02 hex MW122
Parameter Value = 20 MW124
Parameter Value = 21 MW126
Table 5-7
Byte n Byte n+1 Address
Message header
Request Ref 01 hex Request ID 02 hex MW200
Drive ID 02 hex Para. Quantity 02 hex MW202
The result of the write task is: P1121=2.0, P29020[0]=20, and P29020[1]=21. Check in the drive, the parameter value is modified.
5 Operation of the different block scenarios
Acyclic communication between S7-1500 and V90 via PROFINET Entry-ID: 109743977, V1.0, 12/20162016 19
S
iem
en
s A
G 2
01
6 A
ll ri
gh
ts r
ese
rve
d
5.2 Scenario B (SINA_PARA and SINA_PARA_S mode)
5.2.1 Configuration and programming
NOTE In the following PLC program, the data block of FB286_DB and FB287_DB is global data block.
The configuration and programming is showed in table 5-8.
Table 5-8
Nr. Action Remarks
1 Using the telegram 3 in this application:
2 Insert FB286 into the PLC main block and make program as follows:
For the LAddr parameter, user should use the Modul Acces Point HW- ID. It is also possible to use the hardware ID of the cyclic telegram of the drive object.
The complete description of the block can be found in the manual.
3 Insert FB287 into the PLC main block and make program as follows:
For the LAddr parameter, user should use the Modul Acces Point HW- ID. It is also possible to use the hardware ID of the cyclic telegram of the drive object.
The complete description of the block can be found in the manual.
5 Operation of the different block scenarios
Acyclic communication between S7-1500 and V90 via PROFINET Entry-ID: 109743977, V1.0, 12/20162016 20
S
iem
en
s A
G 2
01
6 A
ll ri
gh
ts r
ese
rve
d
5.2.2 Read parameters
In this example the task is to use FB286 to read several parameters from the drive. The parameters are P1121, P29020[0] and P29020[1]. The use case for FB287 is to read P29050[0]. Table 5-9 shows the operation sequence.
Table 5-9
Nr. Action Remarks
1 "FB286_DB".ReadWrite = 0
"FB286_DB".ParaNo = 1
"FB286_DB".AxisNo = 02 hex
"SINA_PARA_DB".sxParameter[1].siParaNo = 0461 hex
"SINA_PARA_DB".sxParameter[1].siIndex = 0000 hex
"SINA_PARA_DB".sxParameter[2].siParaNo = 715C hex
"SINA_PARA_DB".sxParameter[2].siIndex = 0000 hex
"SINA_PARA_DB".sxParameter[3].siParaNo =715C hex
"SINA_PARA_DB".sxParameter[3].siIndex = 0001 hex
FB286
2 "FB286_DB".Start = 1
3 After the execution finished, the result of the task is:
"SINA_PARA_DB".sxParameter[1].srValue = 2.0
"SINA_PARA_DB".sxParameter[2].srValue = 20
"SINA_PARA_DB".sxParameter[3].srValue = 21
This value is the same with P1121 and P29020 in the drive.
4 "FB287_DB".ReadWrite = 0
"FB287_DB".Parameter = 717A hex
"FB287_DB".Index = 0000 hex
"FB287_DB".AxisNo = 02 hex
FB287
5 "FB287_DB".Start = 1
6 After the execution finished, the result of the task is:
"FB287_DB".ValueRead = 300
This value is the same with P29050[0] in the drive.
5 Operation of the different block scenarios
Acyclic communication between S7-1500 and V90 via PROFINET Entry-ID: 109743977, V1.0, 12/20162016 21
S
iem
en
s A
G 2
01
6 A
ll ri
gh
ts r
ese
rve
d
5.2.3 Write parameters
In this example the task is to use FB286 to write several parameters from the drive. The parameters are P1121, P29020[0] and P29020[1]. The use case for FB287 is to write P29050[0]. Table 5-10 shows the operation sequence.
Table 5-10
Nr. Action Remarks
1 "FB286_DB".ReadWrite = 1
"FB286_DB".ParaNo = 1
"FB286_DB".AxisNo = 02 hex
"SINA_PARA_DB".sxParameter[1].siParaNo = 0461 hex
"SINA_PARA_DB".sxParameter[1].siIndex = 0000 hex
"SINA_PARA_DB".sxParameter[1].srValue = 3.0
"SINA_PARA_DB".sxParameter[2].siParaNo = 715C hex
"SINA_PARA_DB".sxParameter[2].siIndex = 0000 hex
"SINA_PARA_DB".sxParameter[2].srValue = 10
"SINA_PARA_DB".sxParameter[3].siParaNo = 715C hex
"SINA_PARA_DB".sxParameter[3].siIndex = 0001 hex
"SINA_PARA_DB".sxParameter[3].srValue =11
FB286
2 "FB286_DB".Start = 1
3 After the execution finished, the value of P1121 in the drive is modified to 3.0; the value of P29020[0] in the drive is modified to 10 and the value of P29020[1] is modified to 11.
4 "FB287_DB".ReadWrite = 1
"FB287_DB".Parameter = 717A hex
"Fb287_DB".Index = 0000 hex
"FB287_DB".AxisNo = 02 hex
"FB287_DB".ValueWrite = 290
FB287
5 "FB287_DB".Start = 1
6 After the execution finished, the value of P29050[0] in the drive is modified to 290.
5 Operation of the different block scenarios
Acyclic communication between S7-1500 and V90 via PROFINET Entry-ID: 109743977, V1.0, 12/20162016 22
S
iem
en
s A
G 2
01
6 A
ll ri
gh
ts r
ese
rve
d
5.3 Scenario C (LAcycCom Library mode)
5.3.1 Configuration and programming
NOTE Important: The global data block “LACycCom_RequestBuffer” has to be inserted in the program folder and is connected to all blocks with the input “requestBuffer”.
In the following PLC program, the data block of FB30501_DB, FB30510_DB, FB30511_DB, FB30512_DB, and FB30513_DB is the global data block.
The detailed explanation about the usage of all library blocks is explained in the manual. The configuration and programming is showed in table 5-11.
Table 5-11
Nr. Action Remarks
1 Using the telegram 3 in this application:
2 Insert FB30501 into the PLC main block and make program as follows:
The Resource Manager FB is necessary to operate with different acyclic blocks and task on one SIMATIC CPU. Additional information are described in the manual.
5 Operation of the different block scenarios
Acyclic communication between S7-1500 and V90 via PROFINET Entry-ID: 109743977, V1.0, 12/20162016 23
S
iem
en
s A
G 2
01
6 A
ll ri
gh
ts r
ese
rve
d
3 Insert FB30510 into the PLC main block and make program as follows to read single parameter:
For the hardwareID parameter the user should use the Modul Acces Point HW-ID. It is also possible to use the HW-ID of the cyclic telegram of the drive object.
4 Insert FB30511 into the PLC main block and make program as follows to write single parameter:
For the hardwareID parameter the user should use the Modul Acces Point HW-ID. It is also possible to use the HW-ID of the cyclic telegram of the drive object.
5 Operation of the different block scenarios
Acyclic communication between S7-1500 and V90 via PROFINET Entry-ID: 109743977, V1.0, 12/20162016 24
S
iem
en
s A
G 2
01
6 A
ll ri
gh
ts r
ese
rve
d
5 Insert FB30512 into the PLC main block and make program as follows to read multiple parameter:
For the hardwareID parameter the user should use the Modul Acces Point HW-ID. It is also possible to use the HW-ID of the cyclic telegram of the drive object. The connection to the dataset input is described in the manual.
6 Insert FB30513 into the PLC main block and make program as follows to write multiple parameter:
For the hardwareID parameter the user should use the Modul Acces Point HW-ID. It is also possible to use the HW-ID of the cyclic telegram of the drive object. The connection to the dataset input is described in the manual.
5 Operation of the different block scenarios
Acyclic communication between S7-1500 and V90 via PROFINET Entry-ID: 109743977, V1.0, 12/20162016 25
S
iem
en
s A
G 2
01
6 A
ll ri
gh
ts r
ese
rve
d
5.3.2 Read parameters
In this example the task is to use FB30512 to read several parameters from the drive. The parameters are P1121, P29020[0] and P29020[1]. And use FB30510 to read P29050[0]. Table 5-12 shows the operation sequence.
Table 5-12
Nr. Action Remarks
1 "FB30501_DB".enable=1 FB30501
2 "FB30510_DB".driveObjectId = 2
"FB30510_DB".parameterNumber = 29050
"FB30510_DB".index = 0
FB30510
3 "FB30510_DB".execute = 1
4 After the execution finished, the result of the task is:
"FB30510_DB".realValue = 290
This value is the same with P29050[0] in the drive.
"FB30510_DB".execute = 0
5 "FB30512_DB".parameterCount = 3
"FB30512_DB".driveObjectId = 2
"FB30512_DB".dataset[0].parameterNumber = 1121
"FB30512_DB".dataset[0].index = 0
"FB30512_DB".dataset[0].parameterNumber = 29020
"FB30512_DB".dataset[0].index = 0
"FB30512_DB".dataset[0].parameterNumber = 29020
"FB30512_DB".dataset[0].index = 1
FB30512
6 "FB30512_DB".execute = 1
7 After the execution finished, the result of the task is:
"FB30512_DB".dataset[0].value = 3.0
"FB30512_DB".dataset[1].value = 10
"FB30512_DB".dataset[2].value = 11
This value is the same with P1121 and P29020 in the drive.
"FB30512_DB".execute = 0
5 Operation of the different block scenarios
Acyclic communication between S7-1500 and V90 via PROFINET Entry-ID: 109743977, V1.0, 12/20162016 26
S
iem
en
s A
G 2
01
6 A
ll ri
gh
ts r
ese
rve
d
5.3.3 Write parameters
In this example the task is to use FB30513 to write several parameters from the drive. The parameters are P1121, P29020[0] and P29020[1]. And use FB30511 to write P29050[0]. Table 5-13 shows the operation sequence.
Table 5-13
Nr. Action Remarks
1 "FB30501_DB".enable=1 FB30501
2 "FB30511_DB".driveObjectId = 2
"FB30511_DB".parameterNumber = 29050
"FB30511_DB".index = 0
"FB30511_DB".value = 280
FB30511
3 "FB30511_DB".execute = 1
4 After the execution finished, the value of P29050[0] in the drive is modified to 280.
"FB30511_DB".execute = 0
5 "FB30513_DB".parameterCount = 3
"FB30513_DB".driveObjectId = 2
"FB30513_DB".dataset[0].parameterNumber = 1121
"FB30513_DB".dataset[0].index = 0
"FB30513_DB".dataset[0].value = 2.5
"FB30513_DB".dataset[0].parameterNumber = 29020
"FB30513_DB".dataset[0].index = 0
"FB30513_DB".dataset[0].value = 15
"FB30513_DB".dataset[0].parameterNumber = 29020
"FB30513_DB".dataset[0].index = 1
"FB30513_DB".dataset[0].value = 16
FB30513
6 "FB30513_DB".execute = 1
7 After the execution finished, the value of P1121 in the drive is modified to 2.5; the value of P29020[0] in the drive is modified to 15 and the value of P29020[1] is modified to 16.
"FB30513_DB".execute = 0
6 Comparison between the different scenarios
Acyclic communication between S7-1500 and V90 via PROFINET Entry-ID: 109743977, V1.0, 12/20162016 27
S
iem
en
s A
G 2
01
6 A
ll ri
gh
ts r
ese
rve
d
6 Comparison between the different scenarios The table 6-1 will describe some characteristics about these function block in the different scenarios.
Table 6-1
WRREC RDREC FB286 FB287
Read single parameter N Y Y Y
Read multiple parameters N Y Y N
Max number can be read Not defined
Not defined
16 1
Write single parameter Y N Y Y
Write multiple parameters Y N Y N
Max number can be write 240 byte 0 16 1
Need resource manager N N N N
Bus conflict while communicate with two or more controller
Y Y Y Y
FB35110 FB35111 FB35112 FB35113
Read single parameter Y N Y N
Read multiple parameters N N Y N
Max number can be read 1 0 39 0
Write single parameter N N Y Y
Write multiple parameters N N N Y
Max number can be write 0 0 1 19
Need resource manager Y Y Y Y
Bus conflict while communicate with two or more controller
N N N N
NOTE N means no, and Y means yes.
The max number of write and read parameters via “WRREC” and “RDREC” is belonged to the data structure. But the max telegram length is 240 byte.
“WRREC” and “RDREC” should be used together to read parameters. The other function block can read or write parameter.
7 Related literature
Acyclic communication between S7-1500 and V90 via PROFINET Entry-ID: 109743977, V1.0, 12/20162016 28
S
iem
en
s A
G 2
01
6 A
ll ri
gh
ts r
ese
rve
d
7 Related literature
Table 7-1
Topic
\1\ Siemens Industry Online Support
https://support.industry.siemens.com
\2\ Download page of this entry https://support.industry.siemens.com/cs/ww/en/view/109743977
\3\
8 Contact
Siemens Ltd., China
DF M3-BF GMC
No. 18 Siemens Road Jiangning Development Zone
Nanjing, 211100 China mailto: [email protected]
9 History
Table 9-1
Version Date Modifications
V1.0 08/2016 First version