NCM S7 For Industrial Ethernet J
NCM S7 For Industrial Ethernet J
NCM S7 For Industrial Ethernet J
1 2
3 4
References
Classification of Safety-Related Notices This manual contains notices which you should observe to ensure your own personal safety, as well as to protect the product and connected equipment. These notices are highlighted in the manual by a warning triangle and are marked as follows according to the level of danger: Danger indicates that death or severe personal injury will result if proper precautions are not taken.
Warning indicates that death or severe personal injury can result if proper precautions are not taken.
Caution with warning triangle indicates that minor personal injury can result if proper precautions are not taken.
Caution without warning triangle indicates that damage to property can result if proper precautions are not taken.
Notice indicates that an undesirable result or status can result if the relevant notice is ignored.
Note highlights important information on the product, using the product, or part of the documentation that is of particular importance and that will be of benefit to the user.
Trademarks SIMATICR, SIMATIC HMIR and SIMATIC NETR are registered trademarks of SIEMENS AG. Third parties using for their own purposes any other names in this document which refer to trademarks might infringe upon the rights of the trademark owners. Safety Instructions Regarding your Product: Before you use the product described here, read the safety instructions below thoroughly. Qualified Personnel Only qualified personnel should be allowed to install and work on this equipment. Qualified persons are defined as persons who are authorized to commission, to ground, and to tag circuits, equipment, and systems in accordance with established safety practices and standards. Correct Usage of Hardware Products Note the following: Warning This device and its components may only be used for the applications described in the catalog or the technical description, and only in connection with devices or components from other manufacturers which have been approved or recommended by Siemens. This product can only function correctly and safely if it is transported, stored, set up, and installed correctly, and operated and maintained as recommended. Before you use the supplied sample programs or programs you have written yourself, make certain that no injury to persons nor damage to equipment can result in your plant or process. EU Directive: Do not start up until you have established that the machine on which you intend to run this component complies with the directive 89/392/EEC. Correct Usage of Software Products Note the following: Warning This software may only be used for the applications described in the catalog or the technical description, and only in connection with software products, devices, or components from other manufacturers which have been approved or recommended by Siemens. Before you use the supplied sample programs or programs you have written yourself, make certain that no injury to persons nor damage to equipment can result in your plant or process.
Prior to Startup Prior to startup, note the following: Caution Prior to startup, note the information and follow the instructions in the latest documentation. You will find the ordering data for this documentation in the relevant catalogs or contact your local Siemens office.
Copyright E Siemens AG 2001 2002 All rights reserved The reproduction, transmission or use of this document or its contents is not permitted without express written authority. Offenders will be liable for damages. All rights, including rights created by patent grant or registration of a utility model or design, are reserved.
Disclaimer of Liability We have checked the contents of this manual for agreement with the hardware and software described. Since deviations cannot be precluded entirely, we cannot guarantee full agreement. However, the data in this manual are reviewed regularly and any necessary corrections included in subsequent editions. Suggestions for improvement are welcomed.
Siemens AG Automation and Drives Postfach 4848, D-90327 Nuernberg Siemens Aktiengesellschaft Technical data subject to change. SIMATIC NET NCM S7 for Industrial Ethernet G79000G8976C11603
C79000G8976C1 1603
Preface
Aims How to Achieve Your Aims You want to install our SIMATIC S7 CPs in your system and make optimum use of them. This primer will help you to become familiar with handling NCM S7 for Industrial Ethernet, the configuration tool for S7 CPs. Based on the configuration and program examples supplied with NCM, we introduce you to the typical steps required to make optimum use of NCM S7 for Industrial Ethernet with your SIMATIC S7 CPs. Aims of the Primer... You can learn how to use the product effectively in a short time... You can learn how to use the product extremely effectively taking somewhat more time... ...how to achieve the aims ...by working through the steps described and using the supplied example on a suitable system configuration. ...by using the description to support you when you first configure and program an application of your own.
You should be familiar with the basics of STEP 7, in other words you should know the following: How to work with STEP 7 Which functions STEP 7 provides for managing hardware and software How to handle projects This primer is intended for installation personnel and STEP 7 programmers as well as for service personnel. This primer applies to Version V5.2 and higher of the NCM S7 configuration software and to Version 5.0 and higher of the STEP 7 software. For further information about STEP 7 documentation and the product, please refer to the accompanying manual NCM S7 for Industrial Ethernet. For further information about installing the NCM S7 for Industrial Ethernet software, please refer to the readme file.
Preface
Note Please note that the NCM S7 for Industrial Ethernet product information bulletin may contain further information about the sample programs described in this primer.
Conventions S
The following conventions are used in the primer: References to other manuals and documentation are indicated by numbers is slashes /.../. These numbers refer to the titles of manuals listed in the Appendix. Actions you are required to perform are indicated by the symbol n -
Based on the sample configuration and the sample program PROJECT ETHERNET, the Primer will guide you through the following steps in the next chapters: Chapter 2 PROJECT ETHERNET 1. Create/open your project
It is advisable to create all the system data offline. The data can then be changed, saved and downloaded at any time. The basis for this is the STEP 7 project PROJECT ETHERNET.
You convert your control task to an S7 user program. You can use, for example, the STL notation.
5. Startup/diagnostics
If you encounter problems, you can investigate the S7 stations with the online tools of STEP 7/STL and NCM diagnostics.
To achieve success quickly... If your system configuration corresponds to the configuration selected for the sample, you can download the sample data directly to the S7 stations in steps 2, 3 and 4! You will, however, learn more by working through the steps as outlined in this primer. TIP
Skip the functions you alredy know.
How the chapter will help you: S S You will get to know how to create a project with CPs You will get to know all the steps involved in configuration Requirements: A working knowledge of STEP 7, experience with STL, a basic knowledge of PLCs.
If you require detailed information about the other functions of the configuration software, please refer to the corresponding manuals. This chapter also contains references to specific manuals.
PROJECT ETHERNET
After installation of the NCM S7 optional software, the sample project is located in the project folder of STEP 7, for example in the folder C:\SIEMENS\STEP7\EXAMPLES\EXIE. If you want to use the project in the S7 folder, follow the steps outlined below:
n Start the SIMATIC Manager. n Open the supplied sample project PROJECT ETHERNET with File " Open " Project....
From the sample program displayed here, you move on to the steps described in the following sections.
The sample project contains an Ethernet subnet. If you want to create a new or further Ethernet subnet or a different object,
PROJECT ETHERNET
n ...Use the menu command File " Save As to create a copy of the sample project in any
folder you wish. Device configuration The following table shows the configurations in the individual stations. This will also indicate how much of the sample you can use directly and the extent to which you will have to adapt the sample.
Station SIMATIC 400 station(1) CP Type CP 4431 MAC Address 08.00.06.01.00.00 Communicate s with Station SIMATIC 400 station(2) Description Communication via the SEND/RECEIVE interface with the CP 4431. Data are transmitted in both directions. The FCs AG_SEND and AG_RECV are used. SIMATIC 400 station(2) SIMATIC 400 station(3) CP 4431 CP 4431 08.00.06.01.00.01 08.00.06.01.00.03 SIMATIC 400 station(1) SIMATIC S5 station(1) Communication via the SEND/RECEIVE interface with the CP 4431. The user program is adapted to the program sample of the CP 1430 TF (see /14/). Data are sent from the SIMATIC 400 station(3) to the SIMATIC S5 station. SIMATIC S5(1) CP 1430 TF 08.00.06.01.00.02 SIMATIC 400 station(3)
10
PROJECT ETHERNET
You have already created a configuration If you have already created a configuration and simply want to use the sample programs for your CPU, follow the steps outlined below:
n Copy the sample programs (container with S7 programs) of the station from the sample
project to the CPU of your existing project. Make sure that blocks do not overlap.
n Make sure that the hardware configuration and networking and the configured connections
are adapted according to the descriptions below.
Summary of step 1 Creating the Project: You have created a STEP 7 project in which you can configure your system and in which you can create and save your user programs.
11
PROJECT ETHERNET
If you start with the existing sample configuration, you should get an overview of it before you download the configuration to the PLC. STEP 7 provides you with convenient methods of obtaining an overview. You can do the following:
n Double-click the object Ethernet(1) in your project in the SIMATIC Manager. This opens the NetPro view for your project.
From this display, you can start all the steps required for hardware and connection configuration. As shown in the illustration,
S the connection table for the selected CPU is displayed in the lower part of the screen; S information about the network attachment is displayed if you point to the symbol for the
interface of the node with the mouse pointer.
12
PROJECT ETHERNET
From the information relating to the network attachments, you can recognize the following situation: The CP 443-1 has the configured MAC address (node). The CPU is shown with an MPI address. You require this MPI addresse, for example, when you want to run diagnostic functions on the CP via the MPI attachment of the CPU with NCM Ethernet Diagnostics. If you want to modify the network address... ... you can do this in the Properties dialog of the Ethernet node. You can display this dialog by double-clicking the network node in the NetPro view. An address modification may, for example, be necessary when the configured Ethernet address is already being used in your network by another station.
For more information...
Checking the configuration in HW Config here based on the example of the SIMATIC 400 station(1)
n Select the station or the CPU in the SIMATIC 400 station(1) in the NetPro view; then select
Edit " Open Object. You will see the hardware configuration with an overview and a detailed view.
If you want to see the configuration of one of the displayed modules in detail,
n position the cursor on the module, for example the CP 443-1 and select Edit " Object
Properties.
13
PROJECT ETHERNET
Adapting the configuration in HW Config If your hardware configuration does not match the configuration required for the sample, you can now change the entries. You could, for example, make the following changes:
14
PROJECT ETHERNET
Further information about networking the station It is easy to obtain an overview of the existing network attachment configurations using the print functions in NetPro. The printout for a configured network appears as shown in the example below:
15
PROJECT ETHERNET
To download the hardware configuration to the PLC... ...follow the steps outlined below:
n Connect the PG to the MPI interface of the CPU using the MPI cable. n Set the interface on your PG/PC for the required type of attachment. Select the PG/PC
interface in the Windows control panel to match the CPs available on your PG and to match the bus attachment.
TIP To check which nodes are accessible over Ethernet, use the Accessible Nodes function.
Summary of Step 2 Configuring and Networking Your Hardware: You have now done the following: 1. Configured the S7 stations in the STEP 7 project 2. Assigned the S7 stations to the Ethernet subnet and assigned addresses 3. Downloaded the configuration to both S7 stations. The stations are now ready for you to configure the communication connections and download the user programs.
16
Contents 3.1 The task 3.2 System configuration 3.3 The example step by step Configuring ISO transport connections Creating a user program Startup/diagnostics 18 19 21 23 29 36
17
3.1
The Task
Sending and Receiving Data The communication task illustrated by the sample program has deliberately been kept simple.
S A controller (SIMATIC 400 station 1) processes process data. S It communicates with a further device (SIMATIC 400 station 2), for example to delegate a
control job. The SIMATIC 400 station 2 returns data to station 1. The following schematic illustrates how the program functions:
Process data
Send job data (4 bytes) Accept job and execute it Send response data (4 bytes) Evaluate received data
Time
Time
The jobs and responses in the example contain 4 bytes of user data.
18
3.2
Structure
System Configuration
The following system configuration is required for the supplied sample project (modifications / alternatives are possible > see following page):
MPI interface
MPI interface
Ethernet
as400
19
Required Devices/Resources You require the following components if you want to use the supplied example unmodified.
No. Required 2 2 2 Type S7-400 programmable controllers with CPU 4141 CP 4431 Simulation modules DI/DO Can be replaced by Digital output module DO16xDC24V/2A or by Digital output module DO32xDC24V/0.5A 1 1 Transmision path Programming device (PG/PC) with 6ES7422-1BH10-0AA0 6ES7422-1BL10-0AA0 see /11/ /12/ see Catalog ST 70 Order Number see Catalog ST 70 6 GK 7443-1EX11-0XE0 1)
S STEP 7 software version V5.2 or higher installed S Optional software NCM S7 for Ethernet version V5.2
or higher installed.
Newer versions of the module are normally compatible in terms of functionality; You can load the configuration data of the sample project on your module without needing to make changes. Please read the information in the manual of the CPs on the topic of compatibility and replacing devices!
Alternatives: You can adapt the sample configuration to suit your own situation. Possible modifications are outlined below:
20
Notice If you change the module address in the configuration, you must also adapt the user program and the configured connection.
3.3
This description is based on the created project and on the configured stations. The steps Create Project and Configuring and Networking Hardware were explained in Chapter 2. 1. Create/open your project 2. Configure and network your hardware 3. Configure ISO transport connections 4. Write your user program 5. Startup Chapter 3.3 / and pages following
n n
Chapter 2
To achieve success quickly... If your system configuration corresponds to the configuration selected for the example, you can download the sample data directly to the S7 stations in steps 3 and 4. You will, however, learn more by working through the steps as outlined in this primer.
TIP Skip the functions that you already know. Chapter 2 deals with the topic of Downloading.
21
1. Create/open your project 2. Configure and network your hardware 3. Configure ISO transport connections 4. Write your user program 5. Startup
n n
Set up communication connections for the CPUs. When completed, you will have downloaded the connection configuration to the stations.
Communication on the SEND/RECEIVE interface uses configured ISO connections . The next step is therefore to download the connection list to the station.
First, however, you should get an overview of the sample configuration by:
For more information...
Manual /3/
Chapter 3
n Change back to the SIMATIC Manager and select the CPU in the required station.
22
Connection
Note... ...By selecting the stations, you can obtain an overview of all the stations in the project and the configured connections.
Further connections... ...You can configure further configurations to this or other partner stations in this overview.
n To insert a new connection in the connection list, select the function Insert " Connection.
23
n Select the connection properties by double-clicking the connection in the connection table.
0001 is the ID that you use in the user program on the SEND/RECEIVE interface A020 is the ID for ISO transport connections.
You can assign a name to the connection reflecting its purpose in your system.
Note on the block parameters: The module start address and the connection ID are required later when you program the SEND/RECEIVE interface. Page 31 has a similar sample call.
Addresses Tab The information in the Addresses tab page for a connection between S7 stations within a project does not normally need to be modified.
24
For further information about the status of the connection or the connection configuration, open the Overview tab.
If the character ! appears in the Local ID field, this indicates further relevant information in the Status field. Depending on the setting of the table header, this field may be hidden. You can readjust the display with the horizontal arrow key. In the situation shown here, the status is when the connection configuration is completed.
25
n ...select the Change Partners dialog with the Edit" Change Partners menu command or
by double-clickng the connection in the Partner column of the connection table.
26
To download the connection configuration to the PLC... ...follow the steps outlined below:
n If you have made changes in the connection configuration, save your changes with
Connection Table
"
Save.
n Select the station in the connection table for which the Ethernet attachment exists. n Select the menu command PLC " Download.
Note: During the download, you are asked whether you want to copy from RAM to ROM on the CP. If you want to save the data in nonvolatile memory, answer with Yes.
For more information...
Manual /4/
n Attach the MPI to the SIMATIC 400 station (2). n Repeat step 2 Configuring/networking your hardware and step 3 Configuring ISO transport
connections for the SIMATIC 400 station(2) if you want to make changes to the existing configuration of the second station. Summary of step 3 Configuring ISO transport connections: You have now done the following: Configured an ISO transport connection between the two SIMATIC 400 stations Downloaded the connection configuration to the two SIMATIC 400 stations The stations are now ready for data exchange on the SEND/RECEIVE interface.
27
1. Create/open your project 2. Configure and network your hardware 3. Configure ISO transport connections 4. Write your user program 5. Startup
n n n
How is the SEND/RECEIVE interface supplied with data? How are the status bits evaluated? When completed, you will have downloaded the user programs to the stations.
The tasks in the user program The task described in Section 3.1 must now be converted to suitable programmable controller programs. To execute the programs or to download them to the S7 stations...
TIP Page 34 contains more detailed information about the topic Downloading.
n ...you should print out the program blocks and check them. The following page contains an
overview of the FCs required for communication.
28
The table shows which blocks of the types OB and FC handle which tasks.
Task in SIMATIC 400 Station 1 Processing process data Task in SIMATIC 400 Station 2 Description of the Task in the Program Blocks Simulation of a changing process value:
OB100
Creation of data blocks DB30 and DB31. The process values are saved in these data blocks.
OB1
Coordination of the program sequence.
FC29
A data word is incremented and decremented cyclically. The time interval for botj incrementing and decrementing is 3 seconds.
FC30/FC5 (AG_SEND)
This data word is transferred to Station 2 as the current process value (job). Accept and process job Accepting and further processing the job data:
OB100
Creation of data blocks DB30 and DB31. The process values are saved in these data blocks.
OB1
Coordination of the program sequence.
FC31/FC6 (AG_RECV)
Save the received data in the data block and output the data to the process simulation.
FC30/FC5 (AG_SEND)
Return the data to Station 1 as job confirmation. Evaluate the received data
FC31/FC6 (AG_RECV)
Accept and evaluate job confirmation. Output process data to the simulation module.
Notice You can take and use the latest versions of the communications blocks (FC5/ FC6) for your module from the SIMATIC NET block library of STEP 7. If you are using an older module type, this is only possible if you use the latest firmware version for this module type.
29
The Program Sequence The organization blocks in the example produce the following program sequence in the two S7 stations:
SIMATIC 400 station 1 SIMATIC 400 station 2
OB100
Create data blocks DB30 and 31
OB100 Startup
Create data blocks DB30 and 31
OB1 FC29
Increment / decrement / data word
Cyclic processing
OB1
FC30 AG_SEND
ISO transport connection
FC31 AG_RECV
FC31 AG_RECV
FC30 AG_SEND
Legend:
30
Programming Functions (FCs) for Communication Two functions (FCs) are available for handling communication on the ISO transport connections, as follows:
S AG_SEND (FC5)
This block transfers the user data from the specified user data area to the Ethernet CP for transmission.
S AG_RECV (FC6)
This block enters the received user data in the user data area specified in the call.
The user program in our example was written in STL notation. As an example, the parameter assignment for calling AG_SEND and AG_RECV in S7 station 1 is shown below.
STL call fc 5 ACT := ID := LADDR := SEND := LEN := DONE := ERROR := STATUS := M 50.0 1 W#16#0110 P#db30.dbx1.0 byte 240, 4 M 1.2 M 1.3 MW 200
Explanation //AG_SEND block call //Bit for triggering job //Connection ID //Module address 272Dec. in hardware conf. //Data area to be transferred // Length of the data area to be sent (4 bytes // Memory bit for return parameter DONE // Memory bit for return parameter ERROR // Memory word for return parameter STATUS
STL call fc 6 ID LADDR RECV NDR ERROR STATUS LEN := := := := := := := 1 W#16#0110 P#DB31.DBX 1.0 BYTE 240 M1.0 M1.1 MW202 MW10
Explanation //AG_RECV block call // //Connection ID //Module address 512Dec. in hardware conf. //Data area for receive data // Memory bit for return parameter NDR // Memory bit for return parameter ERROR // Memory word for return parameter STATUS // Area for length of received data
To see the complete code contained in these FCs, and the other OBs and FCs, please refer to the printouts of the sample project.
31
n Select the block call and its block parameters; n Select the menu command Connections... with the right mouse button. n Depending on the block type, you can now select the connection intended for the block or
module from a list.
n Confirm your selection; as far as possible, the available parameter values are entered in the
block call. FCs AG_LSEND/ AG_LRECV for longer data areas (CP 4431) The newer versions of the Ethernet CPs with the FCs AG_LSEND (FC50) and AG_LRECV can transfer larger data areas (up to 8192 bytes). Please check the manual of your CP for the supported data area and, if applicable, use the appropriate FCs. Working with the FCs is explained in the manual.
For more information...
32
Extending the Sample Program You can also extend the sample program or later your own applications. Some possibilities are shown below:
S Evaluation of the result codes of the FCs AG_SEND and AG_RECV to allow you to react to
specific statuses in your system.
S Conditional initiation of communication calls depending on result codes, so that, for example,
the send call on the client is only triggered again after the job confirmation has been received with the receive call.
Active
Example without simulation module If you do not want to use simulation modules, simply deactivate the output T QW ... in the FC31 blocks on Simatic 400 station 1 and 2. You can then follow the execution of the program by displaying the data blocks online in STEP 7/STL.
33
To download the user program to the PLC... ...follow the steps outlined below:
n Change the CPU to STOP or RUN-P. n Select the Blocks container in the appropriate station in the SIMATIC Manager. n Download the entire program (except for the system data) to the S7 station using the PLC"
Download menu command.
Note: In the RUN-P mode, the block order is important since the CPU cycle is active. Make sure that OB100 is only executed during startup.
Manual /4/
n Check the program sequence online in STEP 7/STL (monitor blocks). Check whether a
changing data word is being output to the simulation module.
n Go on to the next step and check communication with NCM Ethernet diagnostics.
34
1. Create your project 2. Configure / network your hardware 3. Configure ISO transport connections 4. Create the user program 5. Startup / diagnostics
n n n n
S Operating Mode
What is the status of the stations?
S ISO Transport
What is the status of the ISO transport connections? Were frames sent? How many successful? How many with errors?
S Diagnostic Buffer
What do the diagnostic buffer entries say?
35
Contents: 4.1 Changed system configuration 4.2 The example step-by-step Creating your project Configuring / networking your hardware Configuring ISO transport connections Creating the user program 37 39 41 42 46 49
36
4.1
In the system configuration shown in Section 3.2, the S7 station 2 must be replaced by a SIMATIC S5 station (modifications / alternatives are possible > see Section 3.2).
SIMATIC 400 station (3)
SIMATIC S5 with CP 1430 TF
as400
37
Required Devices/Resources You require the following components if you want to use the supplied example unmodified.
No. Required 1 1 1 1 Type SIMATIC S7-400 programmable logic controllers CP 443-1 SIMATIC S5 programmable logic controllers CP 1430 TF Order Number see Catalog ST 70 6 GK 7443-1EX11-0XE0 1) see catalogs ST52.3, ST54.1 6 GK1 4300TA0x 6 GK1 4300TB0x
1)
Newer versions of the module are normally compatible in terms of functionality; You can load the configuration data of the sample project on your module without needing to make changes. Please read the information in the manual of the CPs on the topic of compatibility and replacing devices!
1 1 Transmission path Programming device (PG/PC) with see /7/, /11/, /12/
S S S S
NCM S7 for Ethernet optional software installed NCM COM 1430 TF software installed MPI connection As an option for the PG/PC mode on Ethernet: CP for Ethernet connection > diagnostics/installation/service
On the S5 station, you can use the example programs supplied with the NCM COM 1430 configuration tool. Depending on the hardware configuration (CPU type etc.), you must select the suitable sample programs. For more detailed information refer to
Manual /14/ Volume 1 Chapter 7 Appendix A.4
38
4.2
The following example is based on the project that was created and the stations that have been configured. The steps Creating your project and Configuring/networking your hardware were explained in Chapter 2. 1. Create your project 2. Configure and network your hardware 3. Configure FDL connections 4. Create your user program 5. Startup Section 4.2 / and pages following
n n
Chapter 2
To achieve success quickly... If you system configuration corresponds to the configuration selected for the example, you can download the sample data directly to the SIMATIC stations in steps 3 and 4. You will, however, learn more by working through the steps as outlined in this primer.
TIP Skip the functions that you already know. Chapter 2 deals with the topic of Downloading.
39
1. Create your project 2. Configure and network your hardware 3. Configure FDL connections 4. Create the user program 5. Startup Diagnostics
Extra: The S5 station is managed with NCM COM 1430 TF.
Managing station 2 (S5): Use the familiar STEP 5 tools STEP 5 V6.x and NCM COM 1430 TF to edit the programs and the database file for the sample program for the CP 1430 TF.
Summary of Step 1 Creating your Project: You have created a project in STEP 7 in which you can configure your SIMATIC 400 station and save the corresponding user programs. You have created a database file for the S5 station in which the CP configuration data can be saved.
40
1. Create your project 2. Configure / network your hardware 3. Configure ISO transport connections 4. Create the user program 5. Startup
Extra: The SIMATIC S5 station must be made known in the STEP 7 project and networked.
To configure the SIMATIC 400 station in the STEP 7 project... ...follow the procedure described in Chapter 2. Managing the S5 Station For information about managing the configuration data and the (sample) programs, please refer to ...... This provides you with information about handling the S5 tools.
To network the SIMATIC 400 station with the SIMATIC S5 station and to be able to obtain the station on ISO transport connections... ...this S5 station must be included in the STEP 7 project. In the sample project, a station of the type SIMATIC S5 has been created.
If you want to continue working in a different project, you must now create a SIMATIC S5 station.
n Select your project. n Select the Insert " Hardware "SIMATIC S5 menu command.
SIMATIC NET NCM S7 for Industrial Ethernet C79000G8976C1 1603
41
...Now network the station Networking the SIMATIC 400 station is also the same as in the first example. The main point of interest here is how to network the SIMATIC S5 station: 4. Select the SIMATIC S5 station that you want to check in your project using the SIMATIC Manager or the NetPro view. 5. Select the Object Properties dialog with the menu Edit "Object Properties or by double-clicking the icon.
42
Downloading the hardware configuration to the PLC To download the configuration data to the SIMATIC 400 station, follow the steps outlined below
S For the SIMATIC 400 station, as described in Chapter 2. S For the SIMATIC S5 station, as described in...
Manual /14/ Chapter 6
Summary of Step 2 Configuring and Networking Your Hardware: You have now done the following: 1. Configured the SIMATIC 400 station in the STEP 7 project 2. Assigned the SIMATIC 400 station to the Ethernet and assigned addresses 3. Downloaded the configuration to the SIMATIC 400 station 4. Adapted the network configuration of the SIMATIC S5 station with NCM COM 1430 TF. The SIMATIC 400 station is now ready for you to configure communication connections and download user programs.
43
1. Create your project 2. Configure / network your hardware 3. Configure ISO transport connections 4. Create the user program 5. Startup
n n
Extra: The connection parameters for the S5 and S7 PLCs must be matched.
To create the ISO transport connections for S7Station(3) in the STEP 7 project... ...follow the steps as described in Chapter 1:
S Display and check the configured connections in the connection table. S Download the configured connections to the PLC.
Checking/configuring connection parameters In the Addresses tab page, adapt the TSAP setting so that it matches the configuration in S5Station. Only then can the local endpoints of the connection be correctly identified so that a connection can be established successfully. Follow the steps below:
n Open the connection table for the CPU in the SIMATIC 400 station. n Select the connection properties by double-clicking the connection in the connection table.
44
n Change to the Addresses tab page. n Check the TSAP entries and if necessary adapt them to the configuration for the S5 station.
To check and adapt the ISO transport connections for the SIMATIC S5 station,
n Use the function Edit "Connections "Transport Connections in COM 1420 TF: n Check the following assignment:
TSAP local (S5) = TSAP remote (S7) TSAP remote (S5) = TSAP local (S7)
Manual /14/ Volume 1 Chapter 7
Local Parameters:
TSAP (ASC): 0 1
45
Downloading the connection configuration to the PLC To download the configuration data to the stations, follow the steps outlined below:
S For the SIMATIC 400 station, as described in Section 1.3. S For the SIMATIC S5 station, as described in...
Manual /14/ Volume 1 Section 6.4
Summary of Step 3 Configuring ISO transport connections: You have now done the following: 1. Configured an ISO transport connection between the SIMATIC 400 station and the SIMATIC S5 station 2. Downloaded the connection configuration to both stations The stations are now ready for data exchange on the SEND/RECEIVE interface.
46
1. Create your project 2. Configure / network your hardware 3. Configure ISO transport connections 4. Create the user program 5. Startup
n n n
Extra: OBs, FBs and HDBs are used on the SIMATIC S5 side.
The tasks in the user program Compared with the description of the task in Chapter 1, the sample must be adapted for the CP 1430 TF according the description in /14/, as follows: Data are only sent by the SIMATIC 400 station to the SIMATIC S5 station, they are not returned so that the send call in the SIMATIC S5 station and the receive call in the SIMATIC 400 station are omitted. The table shows you which blocks of the type OB and FB in the SIMATIC S5 station are responsible for receiving the job data from the SIMATIC 400 station and processing it.
Task in the SIMATIC 400 Station Processing process data Task in the SIMATIC S5 Station Description of the task in program blocks Simulation of a changing process value:
OB100
Creation of data blocks DB30 and DB31. The process values are saved in these data blocks.
OB1
Co-ordination of the program sequence.
FC29
A data word is incremented and decremented cyclically. The time interval for both incrementing and decrementing is 3 seconds.
OB1
Coordination of the program sequence. FB101 (HDB RECEIVE) Saves received data in the data block and outputs them to the process simulation.
Notice You can take and use the latest versions of the communications blocks (FC5/ FC6) for your module from the SIMATIC NET block library of STEP 7. If you are using an older module type, this is only possible if you use the latest firmware version for this module type.
47
The Program Sequence In the example, the OB blocks organize the following program sequence in the two stations:
SIMATIC 400 station SIMATIC S5 station
OB 1 FC 29
Increment / decrement data word
Cyclic processing
OB 1
FB 101 HDBCTRL
HDBRECEIVE
Legend:
To process or download the programs of the SIMATIC 400 station... ...follow the steps described in Chapter 1. The information in Chapter 1 about the program extensions, for example to evaluate the call status codes, also applies here. For the SIMATIC S5 station ... ...you should adapt the program to obtain the required sequence, as follows:
n If the CP 1430 TF is not synchronized during startup, this may be caused by an incorrect
OB20. Copy the content of OB21 to OB20 so that the HDB SYNC is correctly called.
48
Notice Make sure that you use the correct HDBs for the specific CPU in the S5 station. In the example, you require the following: HDB-SYNC HDB-CTRL HDB-RECEIVE
Summary of step 4 Creating the user program: You have now done the following: 1. Created user programs according to the task for both stations 2. Extended the sample programs, for example to include evaluation of status codes 3. Downloaded the user programs to the CPUs of both stations. Result: To monitor the data transfer, follow the instructions in the manual of the CP 1430 TF. You monitor the updating of the data in the receive data block on the SIMATIC S5 station.
n Check the program sequence online in STEP 7/STL (monitor blocks). Follow the same
procedure with the programs on the SIMATIC S5 PLC in STEP 5.
49
A
/1/
References
Manual/ Product Information SIMATIC NET CP Supplied with each CP SIEMENS AG
/2/
NCM S7 for PROFIBUS Manual Supplied with the documentation package NCM S7 for PROFIBUS SIEMENS AG
/3/
NCM S7 for Industrial Ethernet Manual Supplied with the documentation package NCM S7 for Industrial Ethernet SIEMENS AG
/4/
SIMATIC STEP 7 User Manual Part of the standard STEP 7 Documentation Package SIEMENS AG
/5/
SIMATIC STEP 7 Programming Manual Part of the standard STEP 7 Documentation Package SIEMENS AG
/6/
/7/
/8/
/9/
/10/
50
References
/11/
/12/
/13/
/14/
SINEC CP 1430 TF with NCM COM 1430 TF Manual SIEMENS AG 6 GK 19701TA430AA0 The order numbers for the SIEMENS documentation listed above can be found in the catalogs SIMATIC NET Industrial Communication, Catalog IK10 and SIMATIC Programmable Controllers SIMATIC S7 / M7 / C7. You can obtain these catalogs and any further information you require from your local SIEMENS office or national head office.
Order Numbers
51