Home
Siemens S7 User's Manual
Contents
1. 0 0000e 2 2 6 Configuring Communication Services 2 00cc eee ee eee BIE E 2 3 Assigning Addresses for the First Time Applies to Latest CPs 2 3 1 Addressing by Selecting the Target System in the SIMATIC Manager 2 3 2 Addressing using the Properties Dialog in HW Config or NetPro 2 4 Downloading the Configuration Data to the Target System 3 SEND RECEIVE Interface in the User Program 2 22000eeeeeee eens 3 1 How the SEND RECEIVE Interface Works on the CPU 3 2 Programming the SEND RECEIVE Interface 0000000 3 3 Data Exchange S7 CPU lt gt Ethernet CP 00000 05 3 4 Additional Information 0 c cece teens 3 4 1 Programming Data Transfer on TCP Connections 3 4 2 Recommendations for Use with a High Communications Load 4 Configuring Communication Connections 00 eee eee e eee 68 74 78 80 80 4 1 PHOCCOU IS masrier debby aia e bie beneath aldcied ata a anche aude det eae pete SIMATIC NET NCM S7 for Industrial Ethernet 10 C79000 G8976 C129 06 Contents 4 2 Possible Connection Configurations 0 ccc ccc e eee ees 4 3 Connections n a an nunan nonan oaaae aaaeeeaa 4 3 1 Creating a New Connection 0 00 c cece eects 90 4 3 2 Connections to Partners in Other Projects 000eee sees 4 3 3 Further Functions 0 c cece
2. Depending on the required connection type the remote address parameters are either specified or left open during configuration e Specified UDP connection You specified a destination station when you created the connection Configuring broadcast or multicast provides you with a further option see Section 4 7 3 below e Unspecified UDP connection You entered unspecified for the connection partner when you created the connection SIMATIC NET NOM S7 for Industrial Ethernet C79000 G8976 C129 06 131 Configuring Communication Connections Addresses Tab Specified UDP Connections The addresses tab displays proposed values for the relevant local and remote address information You can make the settings for the ports individually Properties UDP Connection Figure 4 24 Layout of the Properties Dialog in the Addresses tab with DEFAULT Ports for UDP Connections Ports The ports or port addresses define the access point to the user program within the station CPU They must be unique within the station CPU The following table shows the range of values Table 4 5 Application Note Port Addresses Fixed must not be used 0 Assigned as default should not be used well known ports 1 to 1024 Range used by NCM in which a free port address is 2000 onwards searched for and assigned SIMATIC NET NCM S7 for Industrial Ethernet 132 C79000 G8976 C 129 06 Configuring Commu
3. Alternative Procedure You can also follow the steps outlined below in the SIMATIC Manager 1 Use the menu command PLC Display Accessible Nodes to display the nodes that you can access over Industrial Ethernet 2 Select the required node in the list displayed 3 Then select the menu command PLC Ethernet Address Result The previously selected node is entered directly into the Addressing dialog You cannot modify the MAC address of the node 4 Enter the required IP parameters and assign them to the CP see above under STEP 5 Result The CP is now accessible on Industrial Ethernet using the IP address SIMATIC NET NCM S7 for Industrial Ethernet C79000 G8976 C129 06 67 Installing and Starting the Ethernet CP with STEP 7 2 3 2 Addressing using the Properties Dialog in HW Config or NetPro Follow the steps below to assign the IP address the first time 68 1 2 Open the SIMATIC Manager Define the configuration of your S7 station with the appropriate components in HW Config in an existing or newly created project When you create the CP network it with an Industrial Ethernet subnet When you create the CP in HW Config the necessary dialog is displayed in which you can network the device and assign the IP address Select the Addressing tab in the properties dialog of the CP you want to address The tab displayed is identical to the dialogs illustrated in Section 2 3 1 Start a
4. Connection Name Reference Only in Multiproject If you create a connection to a partner in another project that has not yet been 9 merged with the current multiproject you must enter a connection name as reference Interproject connections can then be joined up based on this reference As soon as the connections have been brought together the connection name reference can no longer be entered SIMATIC NET NCM S7 for Industrial Ethernet 112 C79000 G8976 C129 06 Configuring Communication Connections 4 5 2 Specifying ISO on TCP Addresses Address parameter A connection is specified by the local and remote connection endpoint e Local addresses Local IP address and local TSAP Transport Service Access Point e Remote addresses Remote IP address and remote TSAP m Ethernet station A Ethernet station B 7 Remote Bs ISAP ISO on TCP ISAP Local connection TSAP TSAP MAC P address address A Figure 4 13 Sending and Receiving on One ISO on TCP Connection er The address parameters are configured with NCM S7 and saved in the CP database Modifications and extensions to the Industrial Ethernet network topology do not therefore have any effect on the CPU user program Notice When you configure the Ethernet CP and the Ethernet destination station the TSAPs of an ISO on TCP connection must cross match Remote TSAP in Ethernet CP local TSAP in destination station Local TSA
5. SIMATIC NET NCM S7 for Industrial Ethernet C79000 G8976 C129 06 79 SEND RECEIVE Interface in the User Program 3 4 Additional Information 3 4 1 Programming Data Transfer on TCP Connections Purpose of TCP Connections TCP connections should be used above all for connections to systems of a different type if they do not support RFC1006 For communication between devices of the SIMATIC family you should use the more convenient ISO on TCP connections The following sections explain certain special points to note Special Features f 80 Block types FC calls Use only the following functions FCs for data transmission With the S7 CPs for S7 400 you must use FCs AG_LSEND FC 50 and AG_LRECV FC 60 on TCP connections With the latest S7 CPs for S7 300 you also use FCs AG_SEND FC 5 and AG_RECV FC 6 for TCP connections Frame length On the TCP connections the protocol contains no information about the end of a message and start of a new message The receiving station must therefore know how many bytes belong to a message and transfer an ANY pointer corresponding exactly to this length when FC AG_LRECYV is called Example if 100 bytes of data are always transferred the ANY pointer could appear as P DB100 DBX 0 0 Byte 100 If you want to receive data with a variable length follow the steps below Include information on the length of the user data in the frame before the actual user data In the
6. SIMATIC NET NCM S7 for Industrial Ethernet C79000 G8976 C129 06 103 Configuring Communication Connections Default TSAPs When configuring the local and remote TSAPs there is a default value ISO 1 for the first connection between the two partners can be changed For a new connection between the two partners the default value ISO 2 is proposed With a new connection to a new partner the value ISO 1 is used again Addresses Tab Unspecified ISO transport connection Figure 4 9 104 If you select the partner type as unspecified depending on your task you can enter address information about the communication partner here The options available to you are explained in detail in Section 4 3 1 The Addresses tab shown here illustrates the situation in which the MAC address and the remote TSAP were not specified If you do not make any further settings this means that you are willing to accept a connection establishment request from any communication partner Properties 1SO Transport Connection ISO 2 49 53 4F 2D 32 Layout of the Addresses Tab of the Properties Dialog for an Unspecified Connection SIMATIC NET NCM S7 for Industrial Ethernet C79000 G8976 C 129 06 Configuring Communication Connections 4 4 3 Specifying ISO Transport Dynamic Properties Dynamics Tab The Dynamics tab displays the relevant timers and counters of this connection You can normally accep
7. 2 cr more subnets 1 project 35 several subnets several projects 39 several subnets several projects SIMATIC S5 and non SIMATIC devices 34 R Routing 140 S S7 communication on Ethernet S7 communication relay S7 functions 15 SEND RECEIVE interface 15 CPU cycle 78 data exchange overview user program SIMATIC NET System memory access using FETCH WRITE 108 117 126 T TCP Connection checking properties 127 TCP connection 119 addresses 122 specifying the connection partner 120 Type of communication 15 U UDP addresses 131 checking 138 configuring 128 UDP connection specifying the connection partner 129 Unspecified connection 94 SIMATIC NET NCM S7 for Industrial Ethernet C79000 G8976 C129 06 A amp D Technical Support Worldwide available 24 hours a day CE PON Worldwide Nuernberg Technical Support 24 hours a day 365 days a year Phone 49 0 180 5050 222 Fax 49 0 180 5050 223 E Mail adsupport siemens com GMT 1 00 Europe Africa Nuernberg Authorization Local time Mon Fri 8 00 to 17 00 Phone 49 0 180 5050 222 Fax 49 0 180 5050 223 E Mail adsupport siemens com GMT 1 00 United States Johnson City Technical Support and Authorization Local time Mon Fri 8 00 to 17 00 Phone 1 0 770 740 3505 Fax 1 0 770 740 3699 E Mail isd callcenter sea sieme
8. LEN parameter longer than SEND source area ID parameter invalid ID 1 2 to 64 No receive resources on the destination station the receiving station cannot process received data quickly enough or has not prepared any receive resources 0 1 83044 The connection is not established The send job should only be attempted again after waiting for at least 100 ms 0 1 83114 The destination station cannot be obtained under the specified Ethernet address 0 83124 Ethernet error on the CP 0 1 8F22h Source area invalid for example Area does not exist in the DB LEN parameter lt 0 0 Area error reading a parameter 0 1 8F28 Alignment error reading a parameter 0 Parameter contains a DB number that is too high 0 0 0 8F33u DB number error a Area not loaded DB 8F42u Timeout reading a parameter from the I O area 0 1 8F44n Address of the parameter to be read is disabled in the access track SIMATIC NET NOM S7 for Industrial Ethernet C79000 G8976 C129 06 157 Programming FCs Functions and FBs for S7 Ethernet CPs Table 5 2 AG_SEND AG_LSEND Codes DONE ERROR STATUS Meaning 0 8F7Fu Internal error e g illegal ANY reference E aie e g parameter LEN 0 0 80904 No module with this address exists or the CPU is in the STOP mode 0 Logical base address not at a double word boundary 0 1 80924 In the ANY reference a type other than BYTE is specified S7 400 only 0 1 80A4H The communication bus
9. Select the required connection in the connection table 2 Select the menu option Edit gt Object Properties Result The Properties ISO Transport Connection dialog appears Tabs The following tabs are available for ISO transport connections General Displays the global parameters of the connection and the local name of the ISO transport connection Addresses Displays the local and remote address information Dynamics Displays the relevant timers and counters Options Here you can decide whether or not you want to use the connection for one of the access types FETCH or WRITE Overview This is an overview of all the configured ISO transport connections of the selected S7 station with their parameters and the status of the connection Status Information This tab displays the current status information for the connection valid at the time the dialog is opened This information corresponds to that displayed by NCM diagnostics SIMATIC NET NOM S7 for Industrial Ethernet C79000 G8976 C129 06 99 Configuring Communication Connections 4 4 1 Specifying the Local Connection Endpoint General Tab This tab of the Properties dialog displays general connection parameters that identify the local connection endpoint Properties 1SO Transport Connection Figure 4 6 Layout of the Properties Dialog for the General Tab ISO Transport Connections SIMATIC NET NCM S7 for Industrial Ethernet 100 C790
10. 6 C79000 G8976 C129 06 This Manual on SIMATIC NET NCM S7 for Industrial Ethernet You will find additional information in the following sources oo This manual is also part of the NCM S7 for Industrial Ethernet documentation et package These documents are also on the Manual Collection CD supplied with every S7 CP and they are also available on the Internet The following table u provides you with an overview Title Content S7 CPs for Industrial The manual S7 CPs for Industrial Ethernet contains information on the Ethernet characteristics of the CPs and instructions on installation and connections Manual This is available on the Internet at e General Section http www4 ad siemens de view cs de 8777865 e CP 343 1 http www4 ad siemens de view cs de 8777308 e CP 343 1 PN http www4 ad siemens de view cs de 8776538 e CP 343 1 IT http www4 ad siemens de view cs de 8776544 e CP 443 1 http www4 ad siemens de view cs de 8776219 e CP 443 1 IT http www4 ad siemens de view cs de 8776322 NCM S7 for Industrial Based on simple examples the primer introduces you to the methods of Ethernet connecting and networking SIMATIC S7 stations with CPs on Industrial Primer Ethernet It shows you how the communications calls are entered in the user program to allow you to use the services via the SEND RECEIVE interface You will learn how simple it is to create a configuration for standard
11. 7002 WRITE active 8183 FETCH WRITE not configured for this connection 8186 ID number not in permitted range e g 1 64 with S7 400 Industrial Ethernet CPs SIMATIC NET NCM S7 for Industrial Ethernet 170 C79000 G8976 C 129 06 Programming FCs Functions and FBs for S7 Ethernet CPs 5 4 2 FC8 AG_UNLOCK Meaning of the Block Using the AG_UNLOCK function the external access to system areas on the S7 CPU with FETCH or WRITE on the connection specified by the ID parameter is released The next external FETCH WRITE job to arrive for the CP can then be processed The AG_UNLOCK follows an access lock with AG_LOCK Call Representation of the AG_UNLOCK Function AG_UNLOCK STATUS Example in STL representation STL Explanation call fc 8 Block call ID DB 100 DBW 2 Connection ID acc to configuration LADDR W 16 0100 LADDR 256 dec in hardware configuration STATUS DB 100 DBW 4 Status code How the Block Works To release the connection again the LOCK request bit must be reset by the FC again The FC also shows the current status using error messages Explanation of the Formal Parameters The following table explains all the formal parameters for the AG_UNLOCK function SIMATIC NET NOM S7 for Industrial Ethernet C79000 G8976 C129 06 171 Programming FCs Functions and FBs for S7 Ethernet CPs Parameter Declara Possible Remarks tion Values ID INPUT INT 1 2 16 for The conn
12. Configuration software for configuration and diagnostic functions on a PROFIBUS CP Network A network consists of one or more interconnected gt subnets with any number of gt nodes Several networks can exist side by side PG operation A mode of the PROFIBUS Ethernet CP in which the SIMATIC S7 CPU is pro grammed configured or diagnosed over PROFIBUS Ethernet This mode is handled by the S7 functions Process image The process image is a special memory area in the programmable logic control ler At the start of the cyclic program the signal states of the input modules are transferred to the process input image At the end of the cyclic program the pro cess output image is transferred as a signal state to the output modules SIMATIC NET NOM S7 for Industrial Ethernet C79000 G8976 C129 06 203 Glossary PROFIinet Standard of the PROFIBUS Users organization defining a heterogeneous com munications and engineering model Protocol A set of rules for transferring data Using these rules both the formats of the fra mes and the data flow are specified Segment Synonym for gt Bus segment Server A server is a device or in general terms an object that provides certain services A service is started at the instigation of a gt client Services Services provided by a communication protocol SIMATIC NET Siemens SIMATIC Network and Communication Product name for gt networks and network components from
13. Connection Overview with Multiple CPUs in an S7 Station If you operate more than one CPU in your S7 station you can click the button to extend the overview to the connections on all CPUs SIMATIC NET NOM S7 for Industrial Ethernet C79000 G8976 C129 06 127 Configuring Communication Connections 4 7 Configuring UDP Connection Properties Introduction After the entry in the connection table you can modify specific connection parameters for each configured connection that were given default values when you created the connection Opening the Dialog To call the dialog for special connection properties follow the steps outlined below 1 Select the required connection in the connection table 2 Select the menu option Edit gt Object Properties Result The Properties UDP Connections dialog appears Tabs The following tabs are available for UDP connections e General Displays the parameters of the connection and the local name of the UDP connection e Addresses Displays the local and remote address information e Overview Overview of all configured UDP connections of the selected S7 station with corresponding parameters and the status of the connection e Status Information This tab displays the current status information for the connection valid at the time the dialog is opened This information corresponds to that displayed by NCM diagnostics SIMATIC NET NCM S7 for Industrial Ethernet 128 C79000 G8976 C129
14. For an example of this display refer to Section 4 3 4 the ISO transport connection Parameter Description Local ID This is the connection ID of the ISO on TCP connection STEP 7 connection configuration DWORD Name loc Entered connection name This identifies the ISO on TCP connection endpoint CPU If you display all the ISO transport connections being operated in this station in the Applications multiprocessor mode with PC stations multiple applications the CPU application that is the endpoint of the particular connection is specified here R S or via CP With S7 CPs Rack slot of the local CP via which the connection is established With PC stations Display of the CP over which the connection is maintained Partner Specifies the remote IP address of the connection address Local TSAP Local Transport Service Access Point 8 characters default Remote TSAP Remote transport service access point 8 characters default Mode Displays the mode configured in the Options tab Status Indicates the current configuration of the connection Connections without assignment are indicated by No local CP No remote CP in the status column and a P character at the end of the Local ID for example 0002 A000 Connections you are currently editing are also indicated by at the end of the local ID Connection Overview with Multiple CPUs in an S7 Station If you operate more than one CPU in your
15. S7 Station as FTP Client You can transfer data blocks from or to a file server S7 Station as FTP Server Another station for example a PC transfers data blocks to or from the S7 station the file system on the IT CP Possibilities for Communication between Device Types The possible communication available with the types of communication listed above is shown in the following table 57 300 wet Se am S7 communication S7 communication SEND RECEIVE PG OP 57 300 communication ii SEND RECEIVE SEND RECEIVE FETCH WRITE ES PROF Inet S7 communication SEND RECEIVE FETCH WRITE HTML process control PROF Inet FTP services S7 communication S7 communication SEND RECEIVE PG OP communication Ti SEND RECEIVE SEND RECEIVE FETCH WRITE i tl i S7 communication FTP services SEND RECEIVE FETCH WRITE HTML process control FTP services 1 PC only as client SIMATIC NET NCM S7 for Industrial Ethernet C79000 G8976 C129 06 17 Communication via Ethernet CPs in S7 Stations Configuration and Diagnostics 18 To connect and configure the Ethernet CP you require the STEP 7 configuration software and the SIMATIC NET NCM S7 for Industrial Ethernet option NCM S7 for Industrial Ethernet is installed as a STEP 7 option and is therefore integrated in STEP 7 NCM S7 for Industrial Ethernet also provides a wide range of diagnostic functions for the various types of communication
16. 06 Configuring Communication Connections 4 7 1 Specifying the Local Connection Endpoint General Tab This tab of the Properties dialog displays the parameters of the connection and a local connection name for the UDP connection The local ID is identical to the ID in the NetPro connection table STEP 7 connection configuration and is shown here to illustrate the assignment Properties UDP Connection 0 02 UDP Verbindung 39 Figure 4 22 Layout of the General Tab in the Properties Dialog for UDP Connections SIMATIC NET NCM S7 for Industrial Ethernet C79000 G8976 C129 06 129 Configuring Communication Connections movies Besstipion Cd Local Endpoint The entry is identical to the Local ID parameter in the Selectable connection list When you create the connection a name is proposed here Modifiable along with a connection number as suffix With unspecified connections use this box to identify the partner If the station contains more than one CP of the same type Display only connected to the same subnet you can select the connection route gt Route see Section 4 8 If no CP is assigned for example because the CP has been deleted none is displayed here Block Parameters ID This value must be entered as a block call parameter ID for Display only calling the FC in the user program to identify the connection The ID changes if the local ID is changed
17. 3 UDP with Broadcast and Multicast 0 0 ccc eee eee 4 7 4 Checking the Properties of a UDP Connection 4 7 5 Free UDP Connection 000000 eee eee 4 8 Routing to Distribute Load 000 cee eects 5 Programming FCs Functions and FBs for S7 Ethernet CPs 5 1 General Notes on FCs FBS 0 c ccc cee eee eens 5 2 Setting Parameters for FC Calls 0 c ccc cee cece 5 2 1 Parameters for CP and Connection Assignment input parameters 5 2 2 Parameters for Specifying a CPU Data Area input parameters 5 2 3 Status Information output parameters 0 00 cee eee eee 5 3 FCs for Configured Connections 00 cece eee eens 5 3 1 FC5 AG_SEND FC50 AG_LSEND 0 0 cece eee 5 3 2 FC6 AG_RECV FC60 AG_LRECV 00 ccc eee 5 4 FCs for Access Coordination with FETCH WRITE 5 4 1 FC7 AG LOCK fncce icetee nid nnna baw ee nae ee deel a nao ids 5 4 2 FCS AG UNLOCK arnei natant anaes head n dearest Point lands avaned 5 5 Numeric Data Resource Requirements of the FCs 6 NCM S7 Diagnostics 2c cece eee eee 6 1 OVONVIEW eaen e PS PE a E EEA 6 2 Functions of NCM S7 Diagnostics 0 cece eee ee SIMATIC NET NOM S7 for Industrial Ethernet C79000 G8976 C129 06 11 Contents 12 6 2 1 Installing and Starting NCM S7 Diagnostics 020 0005
18. Data block area SIMATIC NET NCM S7 for Industrial Ethernet C79000 G8976 C129 06 155 Programming FCs Functions and FBs for S7 Ethernet CPs Parameter DONE Declara tion OUTPUT BOOL Possible Values On ISO Transport and ISO on TCP TCP 1 2 to 32767 or up to length specified for SEND parameter On UDP 1 2 2048 or up to length specified for SEND parameter 0 Job active 1 done Remarks Number of bytes to be sent from the data area with this job The possible values range from 1 to length specified for the SEND parameter e Note the block type 7 300 With older versions of FC AG_SEND up to V3 0 the data area is always restricted to a maximum of 240 bytes 7 The current versions allow up to 8192 Q bytes 2048 bytes for UDP 7 400 With FC AG_SEND the data area is restricted to a maximum of 240 bytes Note on the S7 400 Data transfer may be restricted to LEN lt 240 bytes with older versions of the CP firmware For further information see 1 Improved performance with shorter data records Transfer of data records up to 240 bytes results in better performance regardless of the block type used This parameter indicates whether or not the job was completed without errors As long as DONE 0 no further job can be triggered DONE is set to 0 by the CP when it accepts a new job For the meaning of this parameter
19. IP address Bytes 2 3 Bytes 4 5 Meandaia Data byte 0 Data byte 1 Bytes 6 7 o Bytes o Data byte 2040 Data byte 2041 2046 2047 Figure 5 1 Sending and Receiving on a Free UDP Connection with Programmed Addresses Job header e Inthe picture entries in hexadecimal the following IP address is assumed 142 11 40 35 example only e For the port address 1003 the following would be entered for low byte EBy for high byte 03 e The user data area can be up to 2048 bytes long Up to 2042 bytes of user data can be transferred 6 bytes are reserved for the job header Please note that the data length specified in the block call LEN parameter must include the header and the user data SIMATIC NET NCM S7 for Industrial Ethernet C79000 G8976 C129 06 151 Programming FCs Functions and FBs for S7 Ethernet CPs 5 3 1 FC5 AG_SEND FC50 AG_LSEND Meaning of the Block The FCs AG_SEND AG_LSEND pass data to the Ethernet CP for transfer over a configured connection The selected data area can be a process image area a memory bit area or a data block area Error free execution of the function is indicated when the entire user data area could be sent on Ethernet Note Unless otherwise stated all the following information applies to both the FCs AG_SEND and AG_LSEND Call Call interface in LAD representation AG_SEND AG_LSEND BOOL DONE BOOL INT ERROR BOOL WORD STATUS WORD ANY INT
20. Industrial Ethernet Quick Start CD Samples covering all aspects of communication The Quick Start CD that can be ordered separately is a ATIC Pope treasure trove of sample programs and configurations CET id dat fe fa betales tre ald Comm aterins You can order this directly over the Internet at http www ad siemens de net html_00 online_zugreifen htm Additional Information on SIMATIC S7 and STEP 7 The following documentation contains additional information about the STEP 7 standard software of the SIMATIC programmable controllers and can be obtained from your local Siemens office Topic Document Basic information for technical STEP 7 basics with personnel using the STEP 7 e Configuring hardware with STEP 7 standard software for control e P i ith STEP 7 tasks with S7 300 400 rogramming Wi programmable controllers e Manual for converting from S5 to S7 e Primer for a fast start The reference works describing STEP 7 reference manuals with the programming languages e Manuals for LAD FBD STL LAD FBD and STL as well as the tandard and temtune f standard and system functions in By A000 SYSTEMS EONS OF addition to the STEP 7 basic 7 knowledge You will also find information on SIMATIC programmable controllers on the Quick Start CD and from the Customer Support Online services at http www siemens de simatic net General information or http www ad siemens de csi net Product infor
21. LADDR This value must be entered as a block call parameter ID for Display only calling the FC in the user program to identify the connection Connection Name Reference Only in Multiproject If you create a connection to a partner in another project that has not yet been i 9 merged with the current multiproject you must enter a connection name as reference Interproject connections can then be joined up based on this reference As soon as the connections have been brought together the connection name reference can no longer be entered SIMATIC NET NCM S7 for Industrial Ethernet 130 C79000 G8976 C129 06 Configuring Communication Connections 4 7 2 Specifying UDP Addresses Address Parameters and Connection Types Figure 4 23 With UDP the communication partners are addressed using the local and remote endpoint as follows e Local addresses Local IP address and local port e Remote addresses Remote IP address and remote port Note The term connection is also used here for UDP Reason During configuration just as in TCP the communication partners are assigned to each other and therefore logically connected In actual fact with UDP there is no explicit connection establishment between communication partners m Ethernet station A Ethernet station B am remote ie Ca connection D MAC address A Sending and Receiving on One UDP Connection remote port A f bf
22. NOM S7 for Industrial Ethernet C79000 G8976 C129 06 31 Communication via Ethernet CPs in S7 Stations Variants Before configuring networks with STEP 7 you should be aware of the various configurations possible in the STEP 7 project The following configurations are typical for stations networked with CPs Variant examples Characteristics Configuration 1 1 subnet 1 project Additional SIMATIC S5 stations and stations with equipment of other vendors 2 or more subnets 1 project 1 subnet more than one project More than one subnet more than one project oO on A Ww PY Internetwork connections TCP These variants will be used as a basis to illustrate how real configurations can be created in STEP 7 projects SIMATIC NET NCM S7 for Industrial Ethernet 32 C79000 G8976 C129 06 Communication via Ethernet CPs in S7 Stations 1 7 1 Network Project Variant One Subnet One Project Configuration of the System In the simplest case your system consists of SIMATIC S7 stations connected by one subnet for example of the type Industrial Ethernet 7 400 1 7 300 1 System I Production l l l i Ethernet 1 7 300 2 View in a STEP 7 Project You create an Industrial Ethernet object in the STEP 7 project Stations created in the same project refer to this object as soon as they are configured as network nodes K SIMATIC Manager Pro
23. S7 station you can click the button to extend the overview to the connections on all CPUs SIMATIC NET NCM S7 for Industrial Ethernet 118 C79000 G8976 C129 06 Configuring Communication Connections 4 6 Configuring TCP Connection Properties Introduction After the entry in the connection table you can modify specific connection parameters for each configured connection that were given default values when you created the connection Opening the Dialog To call the dialog for special connection properties follow the steps outlined below 1 Select the required connection in the connection table 2 Select the menu option Edit gt Object Properties Result The Properties TCP Connection dialog appears Tabs The following tabs are available for TCP connections General Displays the parameters of the connection and the local name of the TCP connection Addresses Displays the local and remote address information Options Here you can decide whether or not you want to use the connection for one of the access types FETCH or WRITE Overview This is an overview of all the configured TCP connections of the selected S7 station with their parameters and the status of the connection Status Information This tab displays the current status information for the connection valid at the time the dialog is opened This information corresponds to that displayed by NCM diagnostics SIMATIC NET NOM S7 for Indust
24. TCP This is described in RFC1006 Request For Comment ISO on TCP connections allow program event controlled communication via Ethernet from a SIMATIC S7 PLC to e SIMATIC S7 PLC with Ethernet CP e SIMATIC S5 PLC with Ethernet CP e PC PG with Ethernet CP e any system SIMATIC NET NCM S7 for Industrial Ethernet 206 C79000 G8976 C129 06 Glossary ISO Transport Connection see ISO on TCP Communication connection of the transport layer with the CP COM 143 previously S5S5 connection ISO transport connections allow program event controlled communication on Industrial Ethernet between SIMATIC S7 PLCs and e SIMATIC S7 PLC with Ethernet CP e SIMATIC S5 with an Ethernet CP e g CP 143 or CP 1430 e PC PG with Ethernet CP for example CP 1413 e Any system using the ISO transport protocol ISO 8073 The transfer of blocks of data on an ISO transport connection is bi directional MAC address Address to distinguish between different stations connected to a common trans mission medium Industrial Ethernet Media Access Control MAC Mechanisms for controlling access by a station to a common transmission me dium shared with other stations RFC1006 see ISO on TCP S5S5 connection see ISO transport connection Subnet mask The subnet mask specifies which parts of an IP address are assigned to the net work number see ISO on TCP The bits in the IP address whose corresponding bits in the subnet mask have the value 1
25. TCP connections for PROFInet SIMATIC NET NCM S7 for Industrial Ethernet C79000 G8976 C129 06 177 NCM S7 Diagnostics 6 2 1 Installation Installing and Starting NCM S7 Diagnostics NCM S7 Diagnostics is an integrated component of the NCM S7 for Industrial Ethernet optional package NCM S7 Ethernet Diagnostics is installed along with NCM S7 for Ethernet on your PG There are several ways in which you can start the diagnostic tool Alternative 1 e From the standard Start menu of Win dows program group SIMATIC gt gt NCM Use this method if the STEP 7 project in which the CP was configured is not available on your PG for service pur poses l fS NCM 57 Industrial Ethernet si NCM 57 PROFIBUS fs Notes ES NCM S7 Diagnostics Online Patt Node address gateway Sy subnet Dict destnationine r Destination Station Destination station attachment J CS NCM 57 Manuals gt S Readme gt d E Diagno MPI PROFIBUS AUTO Alternative 2 e From the Properties dialog of the CP within your STEP 7 project COLOR_414 Properties CP 443 1 ISO R0754 General Addresses Options Diagnostics Module Diagnostics l Start special diagnostics es CP 443 1 Industrial Ethernet NCM S7 Diagnose ONLINE 178 SIMATIC NET NCM S7 for Industrial Ethernet C79000 G8976 C 129 06 NCM S7 Diagnostics Structure In the same
26. TSAPs must also be different SIMATIC NET NCM S7 for Industrial Ethernet 114 C79000 G8976 C129 06 Configuring Communication Connections Default TSAPs When configuring the local and remote TSAPs there is a default value TCP 1 for the first connection between the two partners can be changed For a new connection between the two partners the default value TCP 2 is proposed With a new connection to a new partner the value TCP 1 is used again Addresses Tab Unspecified ISO on TCP Connection If you select the partner type as unspecified depending on your task you can enter address information about the communication partner here The options available to you are explained in detail in Section 4 3 1 The Addresses tab shown here illustrates the situation in which the remote IP address and the remote TSAP were not specified If you make no further entries you are accepting connection establishment from any communication partner Properties 1SO on TCP Connection 54 43 50 2D 31 Figure 4 15 Layout of the Addresses Tab of the Properties Dialog for an Unspecified Connection SIMATIC NET NCM S7 for Industrial Ethernet C79000 G8976 C129 06 115 Configuring Communication Connections 4 5 3 ISO on TCP with the FETCH WRITE Mode Using FETCH PASSIVE WRITE PASSIVE If you select one of the FETCH PASSIVE or WRITE PASSIVE modes for the ISO on TCP connection you can acces
27. This allows you to register the CP as a node in a multicast group SEND RECEIVE interface Data transfer is triggered by the user program The interface to the user program in the SIMATIC S7 is formed by special SIMATIC S7 blocks of the type FC functions SIMATIC NET NCM S7 for Industrial Ethernet 28 C79000 G8976 C129 06 Communication via Ethernet CPs in S7 Stations Stations The SEND RECEIVE interface allows program controlled communication on Industrial Ethernet between the SIMATIC S7 PLC and the following e SIMATIC S7 PLC with Ethernet CP e SIMATIC S5 PLC with Ethernet CP e PC PG with Ethernet CP e Other station with Industrial Ethernet attachment S7 300 S7 400 l r x Ethernet Other station with SIMATIC S5 Ethernet attachment PG PC with Ethernet with Ethernet CP attachment Internet Router only TCP IP Figure 1 5 SIMATIC S7 PLC with Possible Communications Partners on the SEND RECEIVE Interface SIMATIC NET NCM S7 for Industrial Ethernet C79000 G8976 C129 06 29 Communication via Ethernet CPs in S7 Stations 1 6 FETCH WRITE Services Server Application In addition to the SEND RECEIVE interface the FETCH WRITE functionality provides further services for S5 compatible communication on configured transport connections The
28. a parameter Parameter is in the write protected 1st act data block ao 8F31H Parameter is in the write protected 2nd act data block a 8F32x Parameter contains a DB number that is too high 8F33H DB number error 8F3Ax Destination area not loaded DB 1 8F43u Timeout writing a parameter to the I O area o ojoj ojojoj CO ojo 0 Address of the parameter to be read is disabled in the access track 0 Internal error e g illegal ANY reference 0 a 80904 No module with this address exists or the CPU is in the STOP mode 0 a 80914 Logical base address not at a double word boundary 0 80924 In the ANY reference a type other than BYTE is specified S7 400 only 0 80A0x Negative acknowledgment reading from the module 0 1 80A4uH The communication bus connection between the CPU and CP is not established 0 80B0x The module does not recognize the data record 0 Pee Destination area invalid 0 80B2u The communication bus connection between the CPU and CP is not established 80C0x The data record cannot be read The specified data record is currently being processed There are too many jobs pending CPU resources memory occupied Communication error occurs temporarily and a repetition in the user program will often remedy the problem 0 1 80D2n Module base address incorrect SIMATIC NET NOM S7 for Industrial Ethernet 166 C79000 G8976 C129 06 Programming FCs Functions and FBs for S7 Eth
29. applications using STEP 7 and the NCM S7 optional package The examples described here can also be found in the project folder for sample programs after you have installed STEP 7 and the NCM S7 for Industrial Ethernet option This is available on the Internet at http www4 ad siemens de view cs de 1172503 NCM S7 for Industrial The manual is intended as a guide and reference work for configuring and Ethernet programming an Industrial Ethernet CP Manual This is available on the Internet at http www4 ad siemens de view cs de 1172423 IT CP The manual is intended as a guide and source of reference when working with Manual the IT CP In addition to the functions provided by an Ethernet CP the IT CP also provides functions for Internet technology This is available on the Internet at http www4 ad siemens de view cs de 1172744 Advanced PC Advanced PC Configuration is the new tool with which you can commission a Configuration PC station as part of an industrial communication network Manual The manual supports you and helps you to make efficient use of communications with your PC applications in conjunction with the SIMATIC NET modules This explains the steps involved in configuration with NCM S7 This is available on the Internet at http www4 ad siemens de view cs SIMATIC NET NCM S7 for Industrial Ethernet C79000 G8976 C129 06 7 This Manual on SIMATIC NET NCM S7 for
30. are assigned to the network number Subnet number A gt system consists of several gt subnets with unique subnet numbers SIMATIC NET NOM S7 for Industrial Ethernet C79000 G8976 C129 06 207 Glossary TCP IP TCP Transport Connection Protocol IP Internet Protocol UDP User Datagram Protocol User Datagram Protocol datagram service for simple internetwork transmission without acknowledgment B 3 PROFIinet Component based Automation Concept for implementing modular distributed automation applications on the basis of open standards and data communication Component based Automation is an expansion of Totally Integrated Automation TIA Device In Component based Automation part of the PROFInet component that contains the hardware specific data of the PROF Inet component In SIMATIC iMap a device is the software representation of the physical device for which the PROF Inet component was created It is displayed in the network view of SIMATIC iMap as an object with one or more bus attachments The following distinction is made according to the communication functionality gt PROFlnet devices and gt PROFIBUS devices Interconnection General Logical data connection between two objects In SIMATIC iMap Connection between two technological functions An output is interconnected with an input of the same type Interconnections are represented in SIMATIC iMap by lines Network view View of the devices and th
31. cece eee eee eee e eee eee eens 96 4 3 4 Connections Without Assignment 0 0 0c eee ee eee 4 4 Configuring ISO Transport Connections 00 cee eee eee 4 4 1 Specifying the Local Connection Endpoint 0000 eee eee 4 4 2 Specifying ISO Transport Addresses 0 0000 cece cece eens 4 4 3 Specifying ISO Transport Dynamic Properties 000005 4 4 4 ISO Transport with the FETCH WRITE Mode 005 4 4 5 Checking ISO Transport Connection Properties 055 4 5 Configuring ISO on TCP Connections Properties 4 5 1 Specifying the Local Connection Endpoint 0000 ee eee 4 5 2 Specifying ISO on TCP Addresses 0 0 cece eee eee eens 4 5 3 ISO on TCP with the FETCH WRITE Mode 0 0 eee ee 4 5 4 Checking ISO on TCP Connection Properties 0005 4 6 Configuring TCP Connection Properties 0 000 cee eee eee 4 6 1 Specifying the Local Connection Endpoint 0000 cece 4 6 2 Specifying TCP Addresses 0 0 ccc cece eee teen eens 4 6 3 TCP with the FETCH WRITE Mode 00 cece eee eens 4 6 4 Checking TCP Connection Properties 0 00 cee eee eee 4 7 Configuring UDP Connection Properties 0000e eee eee 4 7 1 Specifying the Local Connection Endpoint 00 00 eee eee 4 7 2 Specifying UDP Addresses 0 00 c cece eee teens 4 7
32. connection between the CPU and CP is not established Only with newer CPU versions 0 ao 80B0x The module does not recognize the data record 0 80B1n The specified length in the LEN parameter is incorrect 0 80B2u The communication bus connection between the CPU and CP is not established 0 The data record cannot be read 0 There are too many jobs pending 0 Communication error occurs temporarily and a repetition in the user program will often remedy the problem 0 Module base address incorrect SIMATIC NET NCM S7 for Industrial Ethernet 158 C79000 G8976 C129 06 Programming FCs Functions and FBs for S7 Ethernet CPs Example of AG_SEND II Below you will find an executable example of an FC5 AG_SEND call and parameter evaluation The OB100 listed below belongs to the FC100 selected here in which the send call takes place OB100 sets the ACT bit correctly when the CPU starts up To function correctly a DB100 with a size of at least 240 bytes must be loaded The program requires a CP at address 256 and a configured connection of the type ISO Transport ISO on TCP or TCP with ID 1 please adapt your configuration where necessary FUNCTION FC 100 TITLE AUTHOR FAMILY NAME SENDE DEMO Tester S7300 FC5_Demo VERSION 1 0 II BEGIN CALL FC 5 ACT ID LADDR SEND LEN DONE ERROR M100 2 STATUS R M100 0 SET A M100 1 JC done SET A M100 2 JC
33. connections Per job up to 64 Kbytes of user data can be transmitted The Ethernet CP acts as an S7 communication relay by passing on the S7 functions via Industrial Ethernet see 8 Depending on the configuration of the Ethernet CP data transfer is on the basis of the ISO transport or the ISO on TCP protocol TCP IP with RFC 1006 From the perspective of the user S7 communication is identical over PROFIBUS and Industrial Ethernet Nodes Two cases can be distinguished depending on device type and plant configuration e Client and server functionality at both ends S7 connections can be operated between the following nodes with the entire functionality of S7 communication between S7 stations S7 300 and S7 400 between S7 stations and PC PG stations with an Ethernet CP El w Ethernet PUT GET BSEND BRECV USEND URECV only TCP IP PC PG with Ethernet CP J eS Ho S7 300 400 Figure 1 3 Nodes Communicating on S7 Connections over Industrial Ethernet SIMATIC NET NCM S7 for Industrial Ethernet C79000 G8976 C129 06 23 Communication via Ethernet CPs in S7 Stations e Client and server functionality at one end only S7 connections configured at one end In the following situations write and read functions can be implemented with PUT GET S7 communication over router PG PC stations can access S7 stations if the PG PC stations are connected to a differ
34. detailed information about the maximum connection resources refer to 13 and 7 System Memory You can access the following address areas in the system memory on the SIMATIC S7 PLC using FETCH or WRITE e Data blocks DB When accessing DBs remember that the highest DB number is 255 e Bit memory M MB MW MD e Process image input table E e Process image output table A e 1 O area inputs PIW PID PIB e 1 O area outputs PQW PQD PQB e Counters C e Timers T Links to Other Systems The FETCH and WRITE modes supported on ISO transport connections and ISO on TCP or TCP connections can be used with any other device to access the S7 system memory areas To be able to use this type of access for example for PC applications you need to know the PDU structure of the jobs The required S7 or S5 headers for request and response frames are 16 bytes long and their structure is described in the Appendix Messages in the Diagnostic Buffer 126 As a result of FETCH WRITE access negative acknowledgments from the S7 CPU are possible This then leads to corresponding connection oriented entries in the diagnostic buffer that you can read out with NCM Diagnostics see Section 6 5 SIMATIC NET NOM S7 for Industrial Ethernet C79000 G8976 C129 06 Configuring Communication Connections 4 6 4 Checking TCP Connection Properties Overview Tab The overview shows all the previously configured TCP connections and the
35. maximum of 240 bytes Condition Codes The following table shows the codes formed by the DONE ERROR and STATUS parameters that must be evaluated by the user program Note For entries coded with 8Fxxy in STATUS refer to the information in the STEP 7 Standard and System Functions reference manual The chapter describing error evaluation with the RET_VAL output parameter contains detailed information To find out which SFCs are used and are relevant for error evaluation display the properties dialog of the FC described here in the Calls tab Table 5 3 AG_RECV AG_LRECV Codes NDR ERROR STATUS Meaning 1 0 00004 New data accepted 0 OO 81804 There are not yet any data available 0 0 81814 Job active 0 No configuration or the ISO transport service has not yet started on the Ethernet CP 0 System error the source data area is incorrect 0 Destination buffer RECV is too short 0 ID parameter invalid ID 1 2 16 S7 300 ID 1 2 64 S7 400 SIMATIC NET NCM S7 for Industrial Ethernet C79000 G8976 C129 06 165 Programming FCs Functions and FBs for S7 Ethernet CPs Table 5 3 AG_RECV AG_LRECV Codes ND ERROR STATUS Meaning 0 7 The connection is not established The send job should only be attempted again after waiting for at least 100 ms ae ae Source area invalid for example Area does note exist in the DB Area error writing a parameter Alignment error writing
36. network search for available modules by selecting the Browse button Select the CP with the matching MAC address from the components listed Assign the IP parameters taken from the networking to the CP by clicking the relevant button Result The CP is now accessible on Industrial Ethernet using the IP address Note You will find further detailed information on this procedure in the STEP 7 online help SIMATIC NET NCM S7 for Industrial Ethernet C79000 G8976 C129 06 Installing and Starting the Ethernet CP with STEP 7 2 4 Principle Downloading the Configuration Data to the Target System The configuration data of the Ethernet CP are downloaded from the hardware configuration All the configuration data of the S7 station are downloaded including the central configuration all relevant DP master systems and all parameter settings The data of the configured connections must also be downloaded see below Type of Interface You can download the configuration data to the S7 station on the following paths interfaces e MPI interface You can use this interface to download configuration data or when assigning a MAC IP address for the first time node initialization for details refer to the manual 1 Assigning Addresses for the First Time e Industrial Ethernet Here you use the PG mode of the Ethernet CP in the S7 station see also Section 1 3 Depending on the PG PC interface
37. of addressing in other words the partner addresses remain empty Unspecified Connections Connections to an as yet unknown device for example a diagnostic unit are configured as unspecified connections They can be specified later in the Properties dialog You can create an unspecified connection simply by selecting station unspecified for the connection partner when you create the connection The unspecified connection can be used in two ways explained below based on the example of an ISO on TCP connection ISO transport and TCP connections are analogous e Declare readiness for communication passive connection establishment The connection establishment is then set to passive see settings in the General tab The address setting for the ISO on TCP connection is then as follows The remote IP address is 0 0 0 0 and the remote TSAP is empty in other words they are not relevant for the CP When the connection is established any partner is accepted partner connection name that addresses the CP with the correct IP address and TSAP It is also possible to use a partial specification in other words communication is permitted with any partner that matches the specified TSAP e Connection to a specific station in any project The address setting for the ISO on TCP connection is then as follows You can specify the remote IP address and the port of any destination station The destination station can be in the c
38. on the server 2 for S7 300 Notice Please remember the following points regarding data consistency in your user pro gram In the CPU of the S7 station the read or written information is taken from the S7 user program into the operating system or copied from the operating system to the S7 user program in blocks of 8 or 32 bytes depending on the firmware version If information in the word or double word format is located across such bounda ries data inconsistency may arise during transmission using S7 communication For more detailed information refer to the STEP 7 documentation 9 SIMATIC NET NOM S7 for Industrial Ethernet C79000 G8976 C129 06 25 Communication via Ethernet CPs in S7 Stations Notes on S7 communication between PC PG station and S7 station Applications in a PC PG station communicate with the S7 station over an OPC interface or SAPI S7 interface for operator intervention monitoring and control The S7 stations use the integrated communication SFBs FBs client and server functionality at both ends The following general requirements must be met by a PC PG station for S7 communication e On the PC PG an Ethernet CP installed there is an interface for S7 communication installed SOFTNET S7 for Ind Ethernet or S7 1613 WIN 95 WIN NT MS DOS Windows e The CPs in the S7 stations are supplied with a MAC IP address use the default MAC address or set an IP address To use S7 com
39. option you must also specify the address of the partner in the Addresses tab ON the connection is established actively OFF the connection is established by the partner Use for FTP protocol Selecting the option has the following effects Modifiable e The TCP connection is now used as an FTP connection e Addresses tab The addresses are specified automatically Port 21 Options tab The mode is set permanently to FTP The Active connection establishment option is irrelevant and cannot be set No of connections See 1 Precondition The option can only be selected for an unspecified TCP connection This value must be entered as a block call parameter ID for Display only calling the FC in the user program to identify the connection The ID changes if the local ID is changed This value must be entered as a block call parameter ID for Display only calling the FC in the user program to identify the connection Connection Name Reference Only in Multiproject If you create a connection to a partner in another project that has not yet been x 9 merged with the current multiproject you must enter a connection name as reference Interproject connections can then be joined up based on this reference As soon as the connections have been brought together the connection name reference can no longer be entered SIMATIC NET NCM S7 for Industrial Ethernet C79000 G8976 C129 06 121 C
40. receiving station you evaluate only the length information and then fetch the appropriate amount of data in a further receive job Fetch the appropriate length of user data in another receive job by specifying an ANY pointer of the required length on the FC interface for fetching the actual user data SIMATIC NET NCM S7 for Industrial Ethernet C79000 G8976 C129 06 SEND RECEIVE Interface in the User Program 3 4 2 Recommendations for Use with a High Communications Load Overview The points below will help you to avoid overload situations on your CPU when using the Ethernet CPs In particular when you replace an older CP with a newer CP and are then confronted with overload problems you should check your application for the pitfalls outlined below Known Problems Remedy The functions for sending and receiving FC5 FC6 or FC50 60 are often called cyclically in OB1 This leads to constant communication between the CPU and CP As a result other types of communication such as PG functions cannot be executed or only very slowly HMI systems access data of the CPU too often using S7 functions This slows down communication generally and there may be a lack of resources when SEND RECEIVE FCs are called cyclically in OB1 The recommendations below will help to avoid these situations Do not call communication blocks cyclically in OB1 Communication should be called time controlled in a suitable cyclic interrupt OB The call int
41. same multiproject for example using drag amp drop the interproject connections are retained Possible problems in distributed projects and tips on how to avoid them Possibilities for stations outside the current project The addition of the multiproject functionality means that the following situations can arise Connection to a partner in an unknown project The new multiproject functionality allows you to create a connection to a partner in an unknown project In this case you can specify a connection name as a reference in the properties dialog of the connection When the projects are merged STEP 7 then supports you with automatic synchronization of the separately configured connections The connection remains unspecified until the projects have been merged and the connections synchronized Only following this synchronization can the configuration data be downloaded to the local station without inconsistencies You should therefore use this variant when you know that the projects will be merged in a multiproject Specified connections with representative objects To allow you to create specified connections to stations in a different project for example production 2 or that are not managed with STEP 7 you can configure these stations as other stations example in the project production 1 This makes it possible to create consistent fully specified configuration data and to download it to the local station It is als
42. tab of the properties dialog for the connection Display Example The status of connections is displayed in the Properties ISO Transport Connection dialog in the Overview tab Properties 1SO Transport Connection x General Addresses Dynamics Options Overview Status Information Connections 0001 A020 150 Verbi 0 4 08 00 06 01 00 01 150 1 00024020 1SO Verbi 0 4 08 00 06 01 00 01 150 2 00024021 ISO Verbi 0 7 ISO 2 00034020 ISO Verbi 0 4 08 00 06 01 00 02 150 1 00044020 1S0 Verbi 0 4 08 00 06 01 00 03 150 1 00054020 150 Verbi 08 00 06 01 00 03 150 2 Remot Print Configuration Print I Display connections of all CPUs Figure 4 5 Status of the Connections in the Overview Tab Example of ISO Transport Connections Notice If you replace one CP with another this must provide at least the same services and have at least the same version SIMATIC NET NCM S7 for Industrial Ethernet 98 C79000 G8976 C129 06 Configuring Communication Connections 4 4 Configuring ISO Transport Connections Introduction As well as the entry in the connection table you can also modify special properties for each configured connection Here you can change specific connection parameters that were entered as defaults during the new connection dialog Opening the Dialog To call the dialog for special connection properties follow the steps outlined below 1
43. the boundaries of the subnet SIMATIC NET NCM S7 for Industrial Ethernet C79000 G8976 C129 06 Installing and Starting the Ethernet CP with STEP 7 Diagnostics Tab In the Diagnostics tab you can start NCM S7 Ethernet Diagnostics See Chapter 6 Diagnostics for a description of the diagnostic functions themselves Addressing Tab In the Addressing tab you can assign the previously configured IP address and IP parameters to the CP This is necessary before the configuration data can be downloaded to the CP over Ethernet For a detailed description refer to Section 2 3 SIMATIC NET NCM S7 for Industrial Ethernet C79000 G8976 C129 06 59 Installing and Starting the Ethernet CP with STEP 7 2 2 5 Overview S Ethern 60 Substitute Objects in the STEP 7 Project Communication connections can be configured fully when the communications partners are available in the current project For the stations on the Ethernet subnet whose configuration data were not created in STEP 7 or whose configuration data are not managed in the currently active project the following substitute objects can be created in the project e SIMATIC S5 stations e PG PC e Other stations for devices of other manufacturers for SIMATIC S7 stations in another project not necessary in a multiproject Note Instead of creating substitute objects you can also configure unspecified connections for connections to th
44. type PROFIBUS or Industrial Ethernet is already decided by the load file you selected e Fora PROFIBUS module There are no further settings in this dialog go to the next step e For an Industrial Ethernet module Select or specify the MAC address of the Ethernet module and go to the next step Note The following applies to an Industrial Ethernet module If a download to the module was previously aborted you must click the Emergency Address button In this case it is assumed that module memory has been reset and it is now only accessible using the emergency address With newer modules a fixed MAC address assigned to the module is used instead of an emergency address Please refer to the information in the relevant manual 1 on the topic of Downloading New Firmware Check the configuration You can check and adjust settings for the PG PC interface using the Modify button Set the PG PC interface according to the CPs available on your PG Device Parameter Assignments list box and according to the bus attachment Properties list box For more detailed information refer to the integrated help system Continue to follow the instructions in the dialog to establish the connection to the Ethernet CP SIMATIC NET NCM S7 for Industrial Ethernet C79000 G8976 C129 06 Firmware Loader 0 Caution Remember that interrupting the download can lead to an inconsistent state on the module With In
45. 00 G8976 C129 06 Configuring Communication Connections Attributes Description Access The entry is identical to the Local ID parameter in the connection list Selectable When you create the connection a name is proposed here along Modifiable with a connection number as suffix With unspecified connections use this box to identify the partner Local Endpoint Via CP If the station contains more than one CP of the same type connected Display only to the same subnet you can select the connection route gt Route button see Section 4 8 If no CP is assigned for example because the CP was previously deleted none is displayed here Active Connection With this option you specify whether the connection is established by Modifiable Establishment this S7 station This is the default setting when the address of the partner is specified ON the connection is established actively OFF the connection is established by the partner If you selected partner unspecified when you created the connection the option is deselected as default If you activate the option you must also specify the address of the partner in the Addresses tab Note Please note the effects on the mode If you want to use the FETCH or WRITE mode refer to the Options tab the mode must be set to Passive Block Parameters ID This value must be entered as a block call parameter ID for
46. 178 6 2 2 General Menu Commands 0 0c eee e eee ett 180 6 3 Starting Diagnostics Establishing a Connection to the Ethernet CP 182 6 4 How to Use Diagnostics 0 cece eee 185 6 5 Call Specific Diagnostic Functions 000 e cece eee 186 6 6 Checklist for Typical Problems ina System 0000 0e eee 188 6 6 1 Checklist for General CP Functions 000 cece eee ee eee 189 6 6 2 Communication Connections Checklist 20 000 eee eee eee 190 7 Firmware Loader 0 0 ce cece cece eee eee eee eee ee eee eee eeneees 7 1 Application ersa itene bd ae sede deeb he NE EREEREER ENEAS 192 7 2 Loading Firmware 0 cee eee rere ris theri iskr Es EEE A 193 A RelerenCeS oerste e E e ee eee eee ee dae ee 197 B GIOSSANY Sisson Ses ee a te eee wn eee eee eee aeee en nee ee ane B 1 General Section 0 000 c ce eee eee 202 B 2 Industrial Ethernet 0 c cece eee eee tenets 206 B 3 PROFINET 24 50 ceiien taannoin nana DEO Yad de Sed be See EEE Gee de 208 Cc Linking to Other Systems with FETCH WRITE 0 0ceeeee ee eeeee 211 D Document History 00 cece eee eee eee eee e een een eeneees 217 E SIMATIC NET Support and Training 0 0e eee e eee eens 219 Automation and Drives Service amp Support 0000 e eee eee es 219 SIMATIC NET NOM S7 for Industrial Ethernet C79000 G8976 C129 06 Communication via Ethernet CPs in S7 1 Statio
47. 190 C79000 G8976 C129 06 Firmware Loader r This chapter will familiarize you with the uses and handling of the Firmware Loader The firmware loader allows you to download more recent firmware versions to the SIMATIC NET modules SIMATIC NET NOM S7 for Industrial Ethernet C79000 G8976 C129 06 191 Firmware Loader 7 1 Application Firmware Here firmware means the system programs in the SIMATIC NET modules Uses of the Firmware Loader The firmware loader allows you to download more recent firmware versions to the SIMATIC NET modules It is used on the following e PROFIBUS modules e Industrial Ethernet modules Installation The firmware loader is available when you have installed NCM on your PG PC Load Files The firmware loader supports the following file types e lt file gt LAD A file format containing only the system program that can be downloaded to the module e lt file gt FWL A file form that contains information that can be displayed in the dialogs of the firmware loader in addition to the LAD file form For detailed information read the documentation for example the README file shipped with the load file Working with the Firmware Loader Depending on the module type the downloading is prepared and executed in three or four steps For more detailed information refer to the next section and the dialog boxes themselves SIMATIC NET NOM S7 for Industrial Ethernet 192 C79000
48. Block The AG_RECV AG_LRECV function receives the data transferred on a configured connection from the Ethernet CP The data area specified for the receive data can be a process image area a bit address area or a data block area Error free execution is indicated when the data could be received from the Ethernet CP Note Unless otherwise stated all the following information applies to both the FCs AG_RECV and AG_LRECV Call Call interface in LAD representation AG_RECV AG_LRECV NDR BOOL INT ERROR BOOL WORD STATUS WORD ANY LEN INT Example in STL representation STL Explanation call fe 6 AG_RECV AG LRECV block call ID MW 40 Connection ID acc to configuration LADDR W 16 0100 LADDR 256 dec in hw configuration RECV P M 0 0 BYTE 100 Buffer for received data NDR DB 110 DBX 0 6 Receive code ERROR DB 110 DBX 0 7 Execution code STATUS DB 110 DBW 2 Error code LEN DB 110 DBW 4 Status code SIMATIC NET NOM S7 for Industrial Ethernet C79000 G8976 C129 06 161 Programming FCs Functions and FBs for S7 Ethernet CPs Notice Please not the following special feature on TCP connections With the S7 CPs for S7 400 you must use FC AG_LRECV on TCP connections f With the latest S7 CPs for S7 300 you must also use FC AG_RECV for TCP connections SIMATIC NET NCM S7 for Industrial Ethernet 162 C79000 G8976 C129 06 Programming FCs Functions and FBs for S7 Ethernet CPs Ho
49. C NET CPs the window time is set to 1 3 of the inactivity time 2 60 s default 10 s Sign of life frames are sent to check the connection when there is no data traffic Notice Window Time and Inactivity Time The partner responds to a sign of life frame with a frame They are therefore sent to the partner at the intervals of the window time To avoid unwanted connection termination the inactivity time should be at least three times as long as the window time SIMATIC NET NCM S7 for Industrial Ethernet 106 C79000 G8976 C129 06 Configuring Communication Connections 4 4 4 ISO Transport with the FETCH WRITE Mode Using FETCH PASSIVE WRITE PASSIVE Figure 4 11 If you select one of the FETCH PASSIVE or WRITE PASSIVE modes for the ISO transport connection you can access the system areas on a SIMATIC S7 PLC from a SIMATIC S5 station or other non S7 station Properties ISO Transport Connection ae E Send Recv The connection can then only be used for this mode sending or receiving with the FCs AG_SEND AG_LSEND or AG_RECV AG_LRECYV is then no longer possible The connection establishment is passive in other words only the partner station SIMATIC S5 station or other non S7 station can establish the connection The setting is made automatically in the General tab and cannot be changed e FETCH If you select the FETCH mode you allow direct read access to system memory on the S
50. C NET NCM S7 for Industrial Ethernet C79000 G8976 C129 06 This Manual on SIMATIC NET NCM S7 for Industrial Ethernet Audience This manual is intended for personnel responsible for installing and programming STEP 7 programs and for service personnel Scope of this Manual This manual applies to version 5 2 and higher of the NCM S7 configuration software for Industrial Ethernet and to version 5 2 and higher of the STEP 7 software oom N WP his versi l Ns This version of the manual includes information relating to new functions in STEP 7 ve and NCM S7 as of V5 2 In the main this involves the following topics e S7 communication over routers single ended client and server functionality via an IE PB Link or CP see Section 1 4 e Multiprojects With the new multiproject functionality projects can be split up and distributed for engineering and then merged again Symbols used in this Manual This symbol indicates functions requiring STEP 7 version V5 2 This symbol appears in the margin to draw your attention to useful tips This symbol indicates recommended documentation Where you see this symbol you should also refer to additional information in the basic help system of STEP 7 This symbol indicates where detailed context sensitive help is available You can display these help texts with the F1 key or by clicking on the Help button in the relevant dialog SIMATIC NET NCM S7 for Industrial Ethernet
51. C79000 G8976 C129 06 Installing and Starting the Ethernet CP with STEP 7 Relocating the CP in the Hardware Configuration If you are using communication services with configured connections the connection IDs also identify the slot of the CP If you drag a CP you have already configured to a different slot note the following Notice If you drag the CP to a different slot the data of the connection configuration are automatically updated The data of the connection configuration must however be downloaded again SIMATIC NET NCM S7 for Industrial Ethernet C79000 G8976 C129 06 71 SIMATIC NET NOM S7 for Industrial Ethernet C79000 G8976 C129 06 SEND RECEIVE Interface in the User 3 Program This chapter explains the following e How to send and receive data e Which data areas can be used on the S7 CPU e How to program the SEND RECEIVE interface in the user program v You will find further information in the following sources e For programming and configuring nodes for connections for example a SIMATIC S5 PLC with the CP 1430 TCP PC with CP 1413 please refer to the appropriate manuals e The FCs for programming connections are described in Section 5 3 e Configuring the Ethernet CP with NCM S7 is described in Chapter 4 Sample programs Sample configurations and programs are available for the SEND RECEIVE interface described here e Inthe sample project PROJECT_ETHERNET that you can start immedia
52. END AG_LSEND the parameters DONE ERROR STATUS for AG_RECV AG_LRECV the parameters NDR ERROR STATUS Notice Connection numbers IDs must be taken from the configuration when programming To ensure correct parameter settings for the block calls The LAD STL FBD editor in STEP 7 provides you with the option of accepting all the relevant parameters from the hardware configuration HW Config and from the connection configuration For more information refer to Section 5 2 SIMATIC NET NOM S7 for Industrial Ethernet C79000 G8976 C129 06 75 SEND RECEIVE Interface in the User Program Calling FCs in the CPU Program One possible sequence for FCs in conjunction with the organization and program blocks in the CPU cycle is illustrated in the following diagram gt Read PII Read in the received data of the User program y AG_RECV Communication AG RECV A Gommunication connection y connection L O AGSEND O SEND X ULM RECV a Communication connection A SEND Transfer send data for the connection NNN SEND Write PIQ Legend gt gt Sequence of the CPU cycle ZZN The different shading shows which connections and FC blocks belong together Figure 3 2 Typical Sequence of Function Calls in the CPU Cycle The following points are illustrated by the diagram e The user program consisting of any number of blocks OBs FBs or FCs gt see also 6 accesses several connections Figure 3 2 illust
53. END or AG_LRECV Please check the length of the data area in the product information The following table shows the limit values of the various connection types SIMATIC NET NOM S7 for Industrial Ethernet C79000 G8976 C129 06 149 Programming FCs Functions and FBs for S7 Ethernet CPs Table 5 1 FC ISO Transport ISO on TCP TCP UDP AG_LSEND 8192 bytes 8192 bytes 8192 bytes 2048 bytes S7 400 AG_SEND S7 300 AG_LRECV 8192 bytes 8192 bytes 8192 bytes 2048 bytes S7 400 AG_RECV S7 300 Note For information on the length of the data area you can transfer with older versions of the Ethernet CPs refer to the product information bulletin manual of the Ethernet CP you are using 1 Working without the Job Header On specified connections the address and job parameters are specified by the connection configuration The user program only provides the user data in the UDP data area when sending with AG_SEND AG_LSEND or receives the data with AG_RECV AG_LRECV SIMATIC NET NCM S7 for Industrial Ethernet 150 C79000 G8976 C129 06 Programming FCs Functions and FBs for S7 Ethernet CPs Working with the Job Header Free UDP connections require a job header in the user data area The following schematic illustrates the structure of the job buffer and the meaning and location of the parameters in the job header User data area Job buffer Port EBx low byte _ 03 high byte Bytes 0 1
54. Example in STL representation STL Explanation call fe 5 ACT M 10 0 AG_SEND AG LSEND block call ID MW 12 Job triggered by memory bit LADDR W 16 0100 Connection ID acc to configuration SEND P db99 dbx10 0 byte 240 LADDR 256 dec in hardware configuration LEN MW 14 Buffer with send data DONE M 10 1 Length for send data ERROR M 10 2 Execution code STATUS MW 16 Error code Status code SIMATIC NET NCM S7 for Industrial Ethernet 152 C79000 G8976 C129 06 Programming FCs Functions and FBs for S7 Ethernet CPs Notice Please not the following special feature on TCP connections With the S7 CPs for S7 400 you must use FC AG_LSEND on TCP connections f With the latest S7 CPs for S7 300 you must also use FC AG_SEND for TCP connections How the Block Works The following diagram illustrates the normal sequence of data transmission triggered in the user program using AG_SEND The send job in executed as soon as the parameter ACT 1 is passed Following this the parameter ACT 0 must be passed in at least one further call The status code in the output parameters DONE ERROR and STATUS is updated in each block call and can be evaluated To update the status code without starting a new send job start a new block call with the parameter ACT 0 Refer to the sample program at the end of Section 5 3 1 SIMATIC NET NCM S7 for Industrial Ethernet C79000 G8976 C129 06 153 Programming FCs F
55. FETCH WRITE interface is used primarily to attach SIMATIC S7 to SIMATIC S5 and to other non S7 stations for example PCs e FETCH The partner on the connection SIMATIC S5 or non S7 station can read system data on the SIMATIC S7 PLC e WRITE The partner on the connection SIMATIC S5 or non S7 station can write system data on the SIMATIC S7 PLC From the point of view of the SIMATIC S7 PLC this is a passive communication function the communications partner initiates the connection establishment For further information refer to the system documentation of the SIMATIC S5 PLC or the non S7 station you are using Connection Types To access a station with FETCH or WRITE functions a FETCH passive or WRITE passive connection must be configured The following types are possible e ISO Transport e ISO on TCP e TCP Coordinating Access Using the User Program To coordinate access you can use the FCs AG_LOCK and AG_UNLOCK With these FCs you can coordinate access to system memory areas so that no inconsistent data are created and transferred SIMATIC S5 On the SIMATIC S5 station the FETCH WRITE services are configured and started by READ ACTIVE PASSIVE and WRITE ACTIVE PASSIVE SIMATIC NET NOM S7 for Industrial Ethernet 30 C79000 G8976 C129 06 Communication via Ethernet CPs in S7 Stations 1 7 Networking Stations with STEP 7 Configuring To allow stations to communicate with each other the networks must be confi
56. G8976 C129 06 Firmware Loader 7 2 Loading Firmware Starting the Download Start the program from the Windows standard Start menu using the SIMATIC gt NCM S7 gt Firmware Loader menu command A SIMATIC NET Firmware Loader lel ES The SIMATIC NET Firmware Loader is used to load the firmware of SIMATIC NET CPs New firmware must be loaded when the functions of the firmware have been extended or when errors have been corrected To check whether you require an update of your firmware contact your local SIEMENS office To load the firmware follow the steps as explained and the instructions in the readme file Cancel Help Select the Next button and follow the instructions displayed in the dialog 1st Step Select the firmware to be downloaded using the Browse button The text box for selecting files also displays a list box in which the last ten selected load files are displayed and can be selected With FWL load files the comment box may also contain additional information about the file 0 Caution Make sure that the load file you are using is intended as an update for the version of the firmware contained on your module If you are in any doubt contact your local Siemens advisor SIMATIC NET NCM S7 for Industrial Ethernet C79000 G8976 C129 06 193 Firmware Loader 2nd Step 3rd Step 194 Select the interface via which you want to download the firmware The interface
57. IMATIC S7 PLC Such access can be for example from a SIMATIC S5 station or other station e WRITE If you select the WRITE mode you allow direct write access to system memory on the SIMATIC S7 PLC Such access can be for example from a SIMATIC S5 station or other station SIMATIC NET NCM S7 for Industrial Ethernet C79000 G8976 C129 06 107 Configuring Communication Connections Notice Remember that with this configuration on an S7 300 one connection resource free connection for S7 functions of the S7 300 CPU is used CPU connection resources are also used for example by S7 300 CPs in the FMS mode or by PGs and OPs For more detailed information about the maximum connection resources refer to 13 and 7 System Memory You can access the following address areas in the system memory on the SIMATIC S7 PLC using FETCH or WRITE e Data blocks DB When accessing DBs remember that the highest DB number is 255 e Bit memory M MB MW MD e Process image input table I IB IW ID e Process image output table Q QB QW QD e 1 O area inputs PIW PID PIB e 1 O area outputs PQW PQD PQB e Counters C e Timers T Links to Other Systems The FETCH and WRITE modes supported on ISO transport connections and ISO on TCP or TCP connections can be used with any other device to access the S7 system memory areas To be able to use this type of access for example for PC applications you need to know the PD
58. ME Version FC no Load Work MC7 Local data memory memory Bytes Bytes bytes bytes AG_SEND 50 AG_UNLOCK 4 0 8 712 604 568 32 SIMATIC NET NCM S7 for Industrial Ethernet C79000 G8976 C129 06 173 Programming FCs Functions and FBs for S7 Ethernet CPs SIMATIC NET NCM S7 for Industrial Ethernet 174 C79000 G8976 C129 06 NCM S7 Diagnostics 6 The NCM S7 Diagnostics described here provides dynamic information on the operating state of the communication functions of online CPs This chapter provides a general overview of the individual diagnostic functions The following checklist will help you to recognize several typical problems and their possible causes and shows how you can use the NCM S7 for PROFIBUS diagnostics tool to remedy the situation v Further information is available from the following sources e When you are working with the diagnostic tool the integrated help system provides you with context related support e You will find detailed information on working with STEP 7 programs in the Help on STEP 7 which includes the topic Diagnosing Hardware Note NCM S7 Diagnostics supports not only diagnostics for CPs communication modules but also other module types such as the IE PB Link In this chapter the term CP is therefore synonymous with all modules with which you can run NCM S7 diagnostic functions SIMATIC NET NOM S7 for Industrial Ethernet C79000 G8976 C129 06 175 NCM S7 Diagnostic
59. Merged Subnets Multiproject When you merge subnets transferable subnet properties such as the subnet ID of the master subnet will be transferred to the other subnets of the group Some parameters relate specifically to a subproject and remain unchanged these include for example descriptive parameters such as the name author and any comments SIMATIC NET NCM S7 for Industrial Ethernet C79000 G8976 C129 06 47 Installing and Starting the Ethernet CP with STEP 7 Notice Preserving Consistency in Merged Subnets After merging the subnets you should check the consistency throughout the multi project using the menu command Network gt Check Interproject Consistency in NetPro to make sure that there is consistency throughout the multiproject This check detects for example S7 subnet IDs that are not unique within the multipro ject SIMATIC NET NCM S7 for Industrial Ethernet 48 C79000 G8976 C129 06 Installing and Starting the Ethernet CP with STEP 7 2 2 2 Entering an Ethernet CP in the Hardware Configuration Procedure By installing and assigning the Ethernet CP in the rack of a SIMATIC station you establish the logical attachment between the Internet CP and the subnet 1 Select the station in your project that you want to attach to Industrial Ethernet using an Ethernet CP 2 Select the CP in the hardware configuration just like any other module by selecting it in the hardware catalog and then selecting the
60. P address you must first assign an IP address to the CP Assigning the Address Options and Recommendations There are three ways of assigning this address in STEP 7 64 Addressing by selecting the target system in the SIMATIC Manager This option allows you to assign the address without having to set up a STEP 7 project This is useful for example if you want to download defined configuration data you created offline to the S7 station This is described in Section 2 3 1 Addressing using the properties dialog in HW Config or NetPro This option assumes that the CP was networked in STEP 7 The advantage of this method is that the IP parameters set during configuration in STEP 7 NetPro can be used In the Addressing tab you assign the previously configured IP address and IP parameters to the CP This is necessary before the configuration data can be downloaded to the CP over Ethernet This is described in Section 2 3 2 Downloading configuration data using the ISO protocol Another option is to download configuration data with a defined IP address using the ISO protocol see above SIMATIC NET NOM S7 for Industrial Ethernet C79000 G8976 C129 06 Installing and Starting the Ethernet CP with STEP 7 Requirements 2 3 1 Before you can use the addressing described here the CP must be obtainable online which means e An attachment to the Ethernet LAN must already exist there must be no routers between su
61. P in Ethernet CP remote TSAP in destination station SIMATIC NET NOM S7 for Industrial Ethernet C79000 G8976 C129 06 113 Configuring Communication Connections Addresses Tab The addresses tab displays proposed values for the relevant local and remote address information If necessary you can set the TSAP addresses individually Properties 1SO on TCP Connection Options Overview Status information fama freee 54 43 50 2D 31 54 43 50 2D 32 Figure 4 14 Layout of the Addresses Tab of the Properties Dialog with Default TSAPs for ISO on TCP Connections TSAP Format ISO on TCP connections have a TSAP length of 1 to 16 bytes When you are entering values the current length is displayed automatically visible display 20 ASCII characters Local and remote TSAPs can be input as hexadecimal values or as ASCII strings If you make your entries in ASCII the characters you enter are also displayed in hexadecimal format If you make your entries in hexadecimal printable characters are displayed in ASCII 8 hexadecimal values are visible If you enter nonprintable characters the ASCII display is gray no further ASCII entries possible and the nonprintable characters are displayed as periods Local and Remote TSAPs Remote and local TSAPs can be identical since the connection is uniquely identified by the different MAC addresses If you require more than one connection between two stations the
62. P to be own MPI address checked Otherwise specify the MPI address of If you specify the MPI address of the the CPU CP you can simply use the default setting 0 0 With this setting the CP whose address was specified as the node address is accessed PROFIBUS PROFIBUS address of the Rack slot no of the CP to be PROFIBUS CP via which the S7 checked station is reached SIMATIC NET NCM S7 for Industrial Ethernet 182 C79000 G8976 C129 06 NCM S7 Diagnostics Table 6 2 Possible Settings for the Online Paths without Parameters for Internetworking Attachment on Destination Station Industrial Ethernet Node Address MAC address of the Ethernet CP via which the S7 station is reached Entered in hexadecimal Location of the Module Rack Slot Rack slot no of the CP to be checked If you specify 0 0 the CP specified with the node address is accessed directly Industrial Ethernet TCP IP IP address of the Industrial Ethernet CP via which the S7 station is reached Entered in decimal Example IP address decimal 142 120 9 134 Rack slot no of the CP to be checked If you specify 0 0 the CP specified with the node address is accessed directly Internetworking If the CP you want to check with diagnostic functions can only be reached via a gateway you must select the device and specify its node address in the local network You must also s
63. SIEMENS SIMATIC NET NCM for Industrial Ethernet Manual for NCM S7 V5 2 and higher 11 2002 C79000 G8976 C129 Release 06 Preface Communication via Ethernet CPs 1 in S7 Stations Installing and Starting the 9 Ethernet CP with STEP 7 SEND RECEIVE 3 interface Configuring Communication 4 Connections Programming Functions FCs NCM S7 Diagnostics Firmware Loader References Q gt oO o 5 S 2a lt S U D gt NO o Linking to Other Systems with FETCH WRITE O Document History Index Classification of Safety Related Notices gt 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 occur if the relevant not
64. SIMATIC 400 2 SIMATIC 3001 SIMATIC 300 2 Ethernet 1 Press F1 for help This representation illustrates the following e More than one subnet can be managed in one project e Each station is created once in the project e Each station can be assigned to more than one subnet by assigning its CPs to different subnets SIMATIC NET NCM S7 for Industrial Ethernet C79000 G8976 C129 06 35 Communication via Ethernet CPs in S7 Stations 1 7 4 Network Project Variant One Subnet More Than One Sub Project Configuration of the System In complex networked systems during configuration it is sometimes more efficient to manage plant sections in different sub projects The situation can arise that communication takes place over an interproject subnet and that interproject connections must then also be created Example WA S7 400 1 S7 400 2 E Ee E S7 300 1 S7 300 2 S7 300 3 System section Production 2 Ethernet 1 Organization in a Multiproject User friendly and consistent configuration of such communication is supported in 9 STEP 7 as of Version V5 2 with the multiproject The functions for multiprojects in STEP 7 allow the following e Several projects can be managed in one multiproject and edited separately e Projects can be branched and merged Two different strategies can be distinguished in a multiproject e Several employees wo
65. Section 1 2 S7 connections see the STEP 7 user manual 6 ISO transport connections see Section 4 4 ISO on TCP connections see Chapter 4 5 TCP connections see Section 4 6 Connections for UDP see Section 4 7 Interconnections for PROFInet communication see manual Component based Automation configuring plants with SIMATIC iMap 23 The information in the STEP 7 user manual 6 in the chapter Creating Communication Connections Between Two Programmable Modules also applies to the additional types of connection possible with the CPs selecting Help gt Contents Select the topic Configuring Connections and Data fa You will find this information in the online help with integrated in STEP 7 by HLP Exchange SIMATIC NET NCM S7 for Industrial Ethernet C79000 G8976 C129 06 63 Installing and Starting the Ethernet CP with STEP 7 2 3 Assigning Addresses for the First Time Applies to Latest CPs Meaning of the Address Assignment MAC Address and IP Address The CP ships with a factory set MAC address Without further configuration the device can only be accessed over the Ethernet port using this MAC address In its original state you can already use the following functions via the CP using the ISO protocol and the factory set MAC address Download the defined configuration to the CP or CPU Run diagnostics on the CP or CPU Before you can download defined configuration data to the device using an I
66. Siemens previously SINEC SIMATIC NET Ind Ethernet SIMATIC NET LAN system for industrial applications based on Ethernet previously SINEC H1 SINEC Previous product name for gt networks and network components from Siemens Now SIMATIC NET Station A station is identified by a e MAC address in the Ethernet network e PROFIBUS address in the PROFIBUS network SIMATIC NET NCM S7 for Industrial Ethernet 204 C79000 G8976 C129 06 Glossary Subnet A subnet is part of a gt network whose parameters for example gt PROFIBU must be matched The subnet includes bus components and all the attached stations Subnets can for example be connected together by gt gateways to form a network A gt system consists of several subnets with unique gt subnet numbers A subnet consists of several gt stations with unique gt PROFIBUS or MAC addresses Industrial Ethernet System This means all the electrical equipment within a system A system includes among other things programmable logic controllers devices for operation and monitoring bus systems field devices actuators supply lines Transmission rate According to DIN 44302 this is the number of binary decisions transmitted per time unit The unit is bps he set or selected transmission rate depends on va rious conditions for example the distance across the network Transport layer The transport layer is layer 4 of the ISO OSI reference model for
67. Specifies the address and length The address of the data area refers to one of the following Process image area Bit memory Data block area Note on length Performance is improved in transfer of data records up to 212 bytes if you also restrict the length to 212 with the RECV parameter This parameter indicates whether new data were received For the meaning of this parameter in conjunction with the ERROR and STATUS parameters refer to the following table OUTPUT 0 1 error Error code For the meaning of this parameter in conjunction with the DONE and STATUS parameters refer to the following table STATUS 164 OUTPUT see following table Status code For the meaning of this parameter in conjunction with the NDR and ERROR parameters refer to the following table SIMATIC NET NCM S7 for Industrial Ethernet C79000 G8976 C129 06 Programming FCs Functions and FBs for S7 Ethernet CPs Parameter Declara Possible Remarks tion Values On ISO Specifies the number of bytes accepted from Transport and the Ethernet CP and entered in the data area ISO on TCP e Note the block type 1 2 8192 7 300 With older versions of FC AG_RECV up On UDP to V3 0 the data area is always 1 2 2048 restricted to a maximum of 240 bytes The current versions allow up to 8192 Ge 2048 bytes for UDP 7 400 With FC AG_RECV the data area is restricted to a
68. Subnet Aims To be able to attach the SIMATIC stations to a subnet you create the subnet in your project This means that all the parameters for the entire subnet are managed centrally Procedure It is advisable to create the subnet before you configure the stations since the assignment of the SIMATIC stations is then performed largely automatically It is also possible to create the subnet at a later point in time when configuring a CP This is explained in more detail later in the chapter Follow the steps outlined below 1 Select the project in the SIMATIC Manager 2 Select Insert gt Subnet gt Industrial Ethernet Result An object of the type network is created in the project This allows all the SIMATIC stations created in the project to be attached to this subnet RJ SIMATIC Manager PROJECT ETHERNET lt Standard Hierarchy Of M E3 ay File Edit Insert PLC View Options Window Help Dleiz Ae sal Safor os HE E 2 E SIMATIC 400 Station 1 Eh SIMATIC 400 Station 2 SIMATIC SIMATIC SIMATIC E SIMATIC 400 Station 3 400 Station 1 400 Station 2 400 Station 3 T MPI Netz 1 Ethemet 1 SIMATIC S5 1 Press F1 for help Figure 2 1 Project with Assigned Ethernet Network SIMATIC NET NOM S7 for Industrial Ethernet 46 C79000 G8976 C129 06 Installing and Starting the Ethernet CP with STEP 7 3 If you prefer a NetPro graphic network display select the netwo
69. U structure of the jobs The required S7 or S5 headers for request and response frames are 16 bytes long and their structure is described in the Appendix Messages in the Diagnostic Buffer 108 As a result of FETCH WRITE access negative acknowledgments from the S7 CPU are possible This then leads to corresponding connection oriented entries in the diagnostic buffer that you can read out with NCM Diagnostics see Section 6 5 SIMATIC NET NOM S7 for Industrial Ethernet C79000 G8976 C129 06 Configuring Communication Connections 4 4 5 Checking ISO Transport Connection Properties Overview Tab The Overview tab displays all previously configured ISO transport connections and their parameters for this station information only For an example of this display refer to Section 4 3 4 Parameter Description Local ID This is the connection ID of the ISO transport connection Name Entered connection name This identifies the ISO transport connection CPU Applications If you display all the ISO transport connections being operated in this station in the multiprocessor mode with PC stations multiple applications the CPU application that is the endpoint of the particular connection is specified here R S or via CP With S7 CPs Rack slot of the local CP via which the connection is established With PC stations Display of the CP over which the connection is maintained Remote Specifies the remote MAC a
70. Using FETCH PASSIVE WRITE PASSIVE If you select one of the FETCH PASSIVE or WRITE PASSIVE modes for the TCP connection you can access the system areas on a SIMATIC S7 PLC from a SIMATIC S5 station or other non S7 station Properties TCP Connection Overview Status nication Send Recy Figure 4 21 The connection can then only be used for this mode sending or receiving with the FCs AG_SEND AG_LSEND or AG_RECV AG_LRECYV is then no longer possible The connection establishment is passive in other words only the partner station SIMATIC S5 station or other non S7 station can establish the connection The setting is made automatically in the General tab and cannot be changed e FETCH If you select the FETCH mode you allow direct read access to system memory on the SIMATIC S7 PLC Such access can be for example from a SIMATIC S5 station or other station e WRITE If you select the WRITE mode you allow direct write access to system memory on the SIMATIC S7 PLC Such access can be for example from a SIMATIC S5 station or other station SIMATIC NET NCM S7 for Industrial Ethernet C79000 G8976 C129 06 125 Configuring Communication Connections Notice Remember that with this configuration on an S7 300 one connection resource free connection for S7 functions of the S7 300 CPU is used CPU connection resources are also used for example by S7 300 CPs in the FMS mode or by PGs and OPs For more
71. When configuring PROF Inet communication you also use the engineering tool SIMATIC iMap for detailed information on SIMATIC iMap refer to the manual Component based Automation Configuring Plants with SIMATIC iMap 23 SIMATIC NET NCM S7 for Industrial Ethernet C79000 G8976 C129 06 Communication via Ethernet CPs in S7 Stations 1 3 PG OP Communication via Industrial Ethernet Application PG OP communication provides functions that are already integrated in every SIMATIC S7 M7 C7 device A distinction must be made between the following two types of function PG communication PG communication with STEP 7 PLCs on Industrial Ethernet means the following You can use the complete range of functions of STEP 7 on Industrial Ethernet You can use programming diagnostic operating and monitoring functions on all modules in the SIMATIC S7 PLC via Industrial Ethernet OP Operation PG OP communication on Industrial Ethernet allows the operation and monitoring of all modules in a SIMATIC S7 PLC using operator interface systems TD OP The Ethernet CP acts as a communications relay that relays the PG OP communication via Industrial Ethernet SIMATIC NET NCM S7 for Industrial Ethernet C79000 G8976 C129 06 19 Communication via Ethernet CPs in S7 Stations Ethernet attachment Ethernet CP Figure 1 2 Configuration for PG OP Operation 20 Ethernet Create configuration data f
72. _RECV AG_LRECY 1 er AG_SEND AG_LSEND 152 AG_UNLOCK 171 for configured connections 1148 Further functions H Hardware configuration Ethernet CP 49 Industrial Ethernet overview Industrial Ethernet user interface to 23 ISO transport connection m of data and number of connections ni no 109 connection without assignment 97 105 dynamic properties 1 printing configured connections 96 properties dialog addresses 103 dynamics general 100 overview 109 save connection unspecified connection 1104 ISO on TCP connection specifying the connection partner 111 Index 223 ISO on TCP connection addresses 113 checking properties 110 J Job header 150 M MAC address 70 Multicast with UDP 134 137 Multiproject 31 36 configuring connections 86 93 N NCM S7 general information installation NCM S7 Diagnostics 175 NCM S7 diagnostics overview 176 Network access New connection 90 O Operator interface devices 22 23 Other station configuring 60 connecting a subnet 61 P PG communication in configured mode 21 in PG operation 21 with STEP 7 on PROFIBUS 21 PG operation with STEP 7 via Ethernet 19 PG PC interface 23 PROFIBUS 14 PROFIBUS user interface to PROFInet communication 15 16 Index 224 Project variant 1 subnet 1 project 33 1 subnet more than 1 project 36
73. above 4 Select the menu command PLC gt Download to Module STEP 7 then guides you through dialog boxes Note the additional information in the STEP 7 User Manual Chapter Configuring and Assigning Parameters to Modules 6 Deactivating the MAC Address in the Configuration If you deactivate the use of the MAC address when you are configuring the CP the CP can be reached via the preset MAC address however you cannot define any ISO transport connections or S7 connections over ISO connections in your configuration Saving the Configuration Data in Non Volatile Memory You can download the configuration data step by step or all at once If you download step by step you will be prompted to start the download function separately for each module You must select this method if you want to save the configuration data in non volatile memory on the Ethernet CP In this case select the Copy to ROM button in the Download dialog for the CP Downloading the Configured Connections 70 To download configured connections you use a corresponding download function in the connection configuration NetPro Notice If you have assigned a new address to the Ethernet CP or have configured connections you must always download the connection configuration again Remember that you also make suitable address adaptations for the other stations or substitute objects SIMATIC NET NCM S7 for Industrial Ethernet
74. activating a switch on the module the output parameters of the FC are reset as follows DONE 0 NDR 0 ERROR 0 STATUS 8180 for AG_RECV AG_LRECV or 8181 for AG_SEND AG_LSEND SIMATIC NET NOM S7 for Industrial Ethernet C79000 G8976 C129 06 147 Programming FCs Functions and FBs for S7 Ethernet CPs 5 3 FCs for Configured Connections Overview The following functions FCs are available for transferring data over configured connections FC Can be used with Meaning S7 300 S7 400 AG SEND FC5 x X lforsendingdata AG_RECV FC6 xX x for receiving data AG_LSEND FC50 xX for sending data AG_LRECV FC60 x for receiving data 1 Notes on the FCs in FCs for an S7 300 and S7 400 e 57 300 With older versions of the Ethernet CPs the data length per job is restricted to lt 240 bytes applies up to block version V3 0 of AG_SEND AG_RECV with later versions longer data records up to 8092 bytes can be transferred with FCs AG_LSEND or AG_LRECV si With the latest versions of the Ethernet CPs only FCs AG_SEND and oY AG_RECV are used due to a new and more efficient internal protocol the data up to 8092 bytes can be transferred e 7 400 With FCs AG_SEND AG_RECV the data length per job is restricted to lt 240 bytes Longer data records up to 8092 bytes can be transferred with FCs AG_LSEND or AG_LRECV Please check the manual 3 of the S7 CP you are usin
75. ain dialog is updated If you click Cancel the dialog is terminated and the connection is not entered in the list SIMATIC NET NCM S7 for Industrial Ethernet C79000 G8976 C 129 06 Configuring Communication Connections Handling Connections in a Multiproject Interproject connections to a specified partner for example a CPU are created in 4 the same way as connections within a project identical procedure The dialog for selecting the connection partner has been extended and allows you not only to select the endpoint module but also the project within a multiproject to which the endpoint belongs The consistency of interproject connections is retained when you work with the projects of the multiproject e Interproject connections within a multiproject are implicitly broken when a project is taken out of the multiproject for distributed editing and the connection partner is located in the removed project e When the removed project is returned to the multiproject STEP 7 automatically merges the broken connections consistently Connections to Non S7 Stations using Substitute Objects If you want to configure connections to devices or stations that are not S7 stations select a station of the type SIMATIC S5 PC PG or Other Station as the destination station By creating these stations in NetPro and networking them you have already specified the node addresses MAC or IP addresses of the two stati
76. are for the SIMATIC iMap interface to STEP 7 SIMATIC NET NOM S7 for Industrial Ethernet C79000 G8976 C129 06 209 SIMATIC NET NOM S7 for Industrial Ethernet C79000 G8976 C129 06 Linking to Other Systems with C FETCH WRITE The FETCH and WRITE modes supported on ISO transport connections TCP and ISO on TCP connections can be used with any other device to access the S7 system memory areas To be able to use this type of access for example for PC applications you need to know the PDU structure of the jobs The required S7 or S5 header for request and response frames are 16 bytes long and their structure is described in this chapter SIMATIC NET NOM S7 for Industrial Ethernet C79000 G8976 C129 06 211 Linking to Other Systems with FETCH WRITE a Structure of WRITE Frames 212 WRITE request frame System ID Length of header ID OP code Length OP code OP code ORG field Length ORG field ORG ID DBNR Start address Length Empty field Length empty field Data up to 64 K The meaning and values of parameters shown without values in the following table can be found in the section Parameter Values WRITE acknowledgment frame arg 0 System ID S 5 1 5 16d 2 Length of header 16d 01 3 ID OP code 01 03 4 Length OP code 03 03 5 OP code 04 03 6 Ack field 0Fh 08 7 Length ack field 03 8 Error f
77. arge span of the plant stations can be created as follows e Using sub projects in the multiproject e by configuring Other stations SIMATIC S5 in the other project Ethernet 1 Cell level sub project 1 Cell level Sub project 2 PROFIBUS 1 Se Se S7 300 1 S7 300 2 Organization in a Multiproject If you use a multiproject organization follow the steps below to connect the 9 7 400 1 station to the PROFIBUS 1 subnet STEP Create a subnet of the type PROFIBUS in both subprojects and merge these two subnets in NetPro SIMATIC NET NCM S7 for Industrial Ethernet C79000 G8976 C129 06 39 Communication via Ethernet CPs in S7 Stations Representative Objects for Stations Outside the Current Project If you do not want to use the multiproject functions you can fall back on the use of representative objects as used previously To be able to network the representative objects you must once again create a subnet of the type PROFIBUS in both projects as shown in the example here SIMATIC NET NCM S7 for Industrial Ethernet 40 C79000 G8976 C 129 06 Communication via Ethernet CPs in S7 Stations 1 7 6 Network Project Variant Connections between Subnets TCP IP Configuration of the System If connections are required to stations on network structures connected by routers due to the differing tasks of the stations or the large span of the network the st
78. ate the connection a name is proposed here Modifiable along with a connection number as suffix With unspecified connections use this box to identify the partner If the station contains more than one CP of the same type Display only connected to the same subnet you can select the connection route gt Route button see Section 4 8 If no CP is assigned for example because the CP has been deleted none is displayed here Active Connection With this option you specify whether the connection is Modifiable Establishment established by this S7 station This is the default setting when the address of the partner is specified ON the connection is established actively OFF the connection is established by the partner If you selected partner unspecified when you created the connection the option is deselected as default If you activate the option you must also specify the address of the partner in the Addresses tab Note Please note the effects on the mode If you want to use the FETCH or WRITE mode refer to the Options tab the mode must be set to Passive Block Parameters This value must be entered as a block call parameter ID for Display only calling the FC in the user program to identify the connection The ID changes if the local ID is changed LADDR This value must be entered as a block call parameter ID for Display only calling the FC in the user program to identify the connection
79. ated by patent grant or registration of a utility model or design are reserved Siemens AG Automation and Drives Postfach 4848 D 90327 N rnberg Disclaimer of Liability We have checked the contents of this manual for agreement with the hard ware 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 Subject to technical change Siemens Aktiengesellschaft G79000 G8976 C1 29 06 This Manual on SIMATIC NET NCM S7 for Industrial Ethernet supports you when using the communication services provided by the SIMATIC NET communications processors Industrial Ethernet CPs for communication on SIMATIC NET with Industrial Ethernet in the management and cell areas The documentation on your S7 CPs and NCM S7 is in several parts that fit together as shown below e S7 CP selecting is installing Manual commissioning performance data S7 CP for 7 300 e S7 CP and STEP 7 NCM S7 7 400 familiarization Primer Siep testing interfaces NCM S7 commissioning or a n POF 1 T Ethemet it Panta E Communication services with STEP 7 NCM S7 programming configuring downloading commissioning diagnostics NCM S7 Manual SIMATI
80. ated otherwise The following list shows the numbers of the FCs as they are supplied with the configuration tool You can change these numbers You will also find the following information on the block library in the SIMATIC Manager e SIMATIC_NET_CP These blocks are available when you install the NCM S7 for Industrial Ethernet option default setting in STEP 7 Setup Please note that you must use different FCs for the S7 300 and S7 400 separate libraries Communicatio Block Type SIMATIC Manager Library Described in n serleg SIMATIC_NET_CP CP 300 CP 400 SEND RECEIVE FC5 AG_SEND x x Chapter 5 3 S5 compatible FC6 AG_RECV x X communication FC7 AG_LOCK x x FC8 AG_UNLOCK x x FC50 AG_LSEND x FC60 AG_LRECV x S7 a FB12 BSEND x STEP 7 communication F513 BRCV x ria ata FB15 PUT x FB14 GET x FB8 USEND x FB9 URCV x FC62 C_CNTRL Xx FTP IT CPs FC40 FTP_CONNECT x x SIMATIC NET FC41 FTP_STORE x x Ta Manual FC42 FTP_RETRIEVE x X FC43 FTP_DELETE x X FC44 FTP_QUIT x x PROFInet FB88 1 PN_InOut 1 x Manual CP 343 1 PN 1 1 FB88 supplied along with the engineering tool SIMATIC iMap 2 Not to be used for the latest CPs 142 SIMATIC NET NOM S7 for Industrial Ethernet C79000 G8976 C129 06 Programming FCs Functions and FBs for S7 Ethernet CPs Which Block Version Should Use The following descriptions also include information on differe
81. ations in the other project can be reached by configuring Other Stations S7 400 1 Ethernet 2 S7 400 2 S7 300 1 Internet i y E only TCP IP View in a STEP 7 Project aiji If the stations in the two networks are managed in the same project the networking appears as shown below in NetPro itz NETPRO Configuring Networks Network To Project G GDESKTOP NCMS7_stuf2 41 Beispiele Project_ 22 Network Edit Insert PLC View Options Window Help Sale e ol LA x Ethernet 1 a for SIMATIC 400 Stat 2 a for SIMATIC 400 Stet 1 SIMATIC 400 Station 2 7 EN CPUICP E 414 443 o m SIMATIC 30001 2 CPUICP m 313 343 o m Ethernet 2 Industrial Ethernet SIMATIC NET NCM S7 for Industrial Ethernet C79000 G8976 C129 06 41 Communication via Ethernet CPs in S7 Stations 42 SIMATIC NET NCM S7 for Industrial Ethernet C79000 G8976 C129 06 Installing and Starting the Ethernet CP 2 with STEP 7 HLP To attach a SIMATIC station to Industrial Ethernet via the Ethernet CP configure the CP with the NCM S7 configuration software The chapter explains the following How the CP is configured in the STEP 7 project How the various network configurations are managed setting up access to other systems How to control and supply the CP with data using NCM S7 You will find further information in the following sources When installing the Eth
82. below 1 Open the Set PG PC Interface dialog box in the Windows Control Panel 2 Set the PG PC interface according to the CPs available on your PG and according to the bus attachment interface parameter assignment used For more detailed information on the topic of PG operation and engineering station refer to 4 SIMATIC NET NCM S7 for Industrial Ethernet C79000 G8976 C129 06 21 Communication via Ethernet CPs in S7 Stations 1 3 2 OP Operation Connecting Operator Interface Devices via Industrial Ethernet Requirements Operation allowing operator interface functions is possible when the following conditions are met e The operator interface device has an Ethernet CP installed SOFTNET S7 for Ind Ethernet or S7 1613 WIN 95 WIN NT MS DOS Windows installed e The CPs in the S7 stations are supplied with a MAC IP address use the default MAC address or set an IP address Procedure To be able to use S7 communication address the required module in the SIMATIC S7 PLC on your operator interface system v For more detailed information refer to the description of your operator interface system SIMATIC NET NOM S7 for Industrial Ethernet 22 C79000 G8976 C129 06 Communication via Ethernet CPs in S7 Stations 1 4 S7 Communication on Industrial Ethernet Application S7 communication via Industrial Ethernet allows program controlled communication using communication SFBs FBs via configured S7
83. bnets in the path e The Ethernet port of your PG PC must be accessible to STEP 7 Notice The options for assigning an address as described here are available only if you have a module that can be reached using the default MAC address such modules must support the PST Primary Setup Tool function Please refer to the informa tion in the relevant manual 1 Addressing by Selecting the Target System in the SIMATIC Manager Follow the steps below to assign the IP address the first time 1 Open the SIMATIC Manager 2 Select the menu command PLC gt Assign Ethernet Address Assign Ethernet Address po a E Addiess ESsignHaGress SIMATIC NET NCM S7 for Industrial Ethernet C79000 G8976 C129 06 65 Installing and Starting the Ethernet CP with STEP 7 66 3 Start a network search for available modules by selecting the Browse button 4 Select the CP with the matching MAC address from the components listed 5 Enter the required IP parameters and assign them to the CP Assign Ethernet Address 08 00 06 00 00 20 140 90 221 1 oF 255 255 0 0 C Addiess imei Result The CP is now accessible on Industrial Ethernet using the IP address Note You will find further detailed information on this procedure in the STEP 7 online help SIMATIC NET NCM S7 for Industrial Ethernet C79000 G8976 C129 06 Installing and Starting the Ethernet CP with STEP 7
84. calling Display only the FC in the user program to identify the connection The ID changes if the local ID is changed LADDR This value must be entered as a block call parameter ID for calling Display only the FC in the user program to identify the connection Connection Name Reference Only in Multiproject If you create a connection to a partner in another project that has not yet been 7 9 merged with the current multiproject you must enter a connection name as reference Interproject connections can then be joined up based on this reference As soon as the connections have been brought together the connection name reference can no longer be entered SIMATIC NET NCM S7 for Industrial Ethernet C79000 G8976 C129 06 101 Configuring Communication Connections 4 4 2 Specifying ISO Transport Addresses Address Parameters An ISO transport connection is specified by the local and remote connection endpoint e Local addresses Local MAC address and local TSAP Transport Service Access Point e Remote addresses Remote MAC address and remote TSAP m Ethernet station A Ethernet station B 7 Remote m TSAP ISO transport ISAP Local connection Remote TSAP si a TSAP MAG MAC address A address B Figure 4 7 Sending and Receiving on One ISO Transport Connection j Notice The TSAPs of an ISO transport connection must match as follows Remote TSAP on Ethernet CP local TSAP in destinati
85. connection Table 4 1 ISO Transport ISO on TCP TCP UDP Sending 8192 bytes 8192 bytes 8192 bytes 2048 bytes Receiving 8192 bytes 8192 bytes 8192 bytes 2048 bytes Notice The transfer of more than 240 bytes of data is supported by newer version CPs Please note the information in Section 5 and in the manual of the Ethernet CP Tasks of the Ethernet CP When handling the data transfer on a connection the Ethernet CP has the following tasks e When receiving Receiving data from Ethernet and transferring it to the user data area on the CPU e When sending Taking data from the user data area on the CPU and sending the data via Ethernet For a free UDP connection the following functions are also necessary in addition to those above e When receiving Entry of the sender of the message in the job header e When sending Evaluation of the job header and addressing the partner The connection is established automatically as soon as the partner is obtainable SIMATIC NET NCM S7 for Industrial Ethernet 88 C79000 G8976 C129 06 Configuring Communication Connections Requirements for Configuring Connections The Ethernet CP was entered in the hardware configuration and connected to the subnet As a bus node the Ethernet CP has an address Notice All stations not in the STEP 7 project must be configured with substitute objects for example as SIMATIC S5 or Other stations o
86. cs 6 6 Checklist for Typical Problems in a System Meaning The following lists contain several typical problems and their possible causes and how you can use the NCM S7 Ethernet Diagnostics tool to remedy the situation The checklists deal with the following topics 1 Checklist for General CP Functions 2 Communication Connections Checklist Note In the column Identifying the Cause and Remedy you will see the diagnostic function recommended for dealing with the problem shown in bold face SIMATIC NET NCM S7 for Industrial Ethernet 188 C79000 G8976 C129 06 NCM S7 Diagnostics 6 6 1 Checklist for General CP Functions Table 6 5 Checklist for Typical Problems When Operating a CP in a System Problem Possible Cause Identifying the Cause and Remedy The Ethernet CP will not Invalid configuration Yellow STOP LED and red SF LED lit change to the RUN mode loaded on the Ethernet continuously CP Call up the diagnostic buffer in NCM S7 Ethernet Diagnostics Example of an entry CP STOP due to invalid CP parameter assignment What to do Correct the configuration of the Ethernet CP Switch set to STOP on the Query the operating mode in NCM S7 Ethernet CP Diagnostics Operating mode STOP Cause switch set to STOP What to do Change the switch to RUN on the Ethernet CP SIMATIC NET NCM S7 for Industrial Ethernet C79000 G8976 C129 06 189 NCM S7 Diagnostics 6 6 2 Communication Conn
87. ct G GDESKTOP NCMS7_stuf2 V41 PIE 2 Eile Edit Inset PLC View Options Window Help l x oela Hee mal Safe fe TEE H E Production2 all ail SIMATIC 400 1 SIMATIC 300 1 SIMATIC 300 2 Other Station 1 ca z MPI 1 Ethemet 1 SIMATIC S5 1 iz NETPRO Configuring Networks Network To Project G GDESKTOP NCMS7_stuf2 41 Beispiele Produc Ea Ges SP Network Edit Inset PLC View Options window Help Stas He H ole BLA wl Ethernet 1 Industrial Ethernet Press F1 for help SIMATIC NET NCM S7 for Industrial Ethernet 34 C79000 G8976 C129 06 Communication via Ethernet CPs in S7 Stations 1 7 3 Network Project Variant Two or More Subnets One Project Configuration of the System Due to the different tasks of the stations or due to the extent of the system it may be necessary to operate more than one network System Ethernet 1 Production and R Management Level S7 400 2 j Mi it PROFIBUS 1 ADIRI S7 300 1 S7 300 2 View in a STEP 7 Project You can create the subnets in one STEP 7 project and configure the stations for communication KJ SIMATIC Manager Production and Management lt Offline gt Project G GDESKTOP NCMS Mi E3 EP File Edit Insert PLC View Options Window Help Nee sele s ie E Production and Managemen SIMATIC 400 1 SIMATIC 400 2 SIMATIC 300 1 SIMATIC 300 2 SIMATIC 400 1
88. d S7 connections over the CP use the same multiplex channel as you use for multiplexing the HMI connections If you configure S7 connections this means that one CPU connection resource is already used Please note PG connections do not use the multiplexer if you use a PG one connection resource is always occupied Note on Programming When you use the multiplex mode you must specify the rack slot assignment of the CP for addressing on TD OP HMI connections instead of the rack slot assignment of the CPU Applications for example ProAgent that require block related messages Alarm_S SFC17 19 are not supported in the multiplex mode Time of Day Synchronization Tab 58 In this tab you can make the settings for one of the two synchronization modes explained below SIMATIC mode If the CP receives MMS time of day frames its local time is synchronized providing the NTP mode was not configured MMS Manufacturing Message Specification The advantage of this mode is the accuracy that is generally higher than achieved with the NTP mode NTP mode NTP Network Time Protocol In the NTP mode the CP sends time queries in the client mode at regular intervals to the NTP server in the subnet LAN Based on the replies from the server the most reliable and most accurate time is calculated and the time of day on the station is synchronized The advantage of this mode is that the time of day can be synchronized beyond
89. ddress of the connection on the Ethernet address subnet Local TSAP Local connection endpoint Transport Service Access Point Partner TSAP Remote connection endpoint Transport Service Access Point Mode Displays the mode configured in the Options tab Status Indicates the current configuration of the connection Connections without assignment are indicated by No local CP No remote CP in the status column and a character at the end of the Local ID for example 0002 A000 Connections you are currently editing are also indicated by at the end of the local ID You can set the column widths in the Overview tab individually Connection Overview with Multiple CPUs in an S7 Station If you operate more than one CPU in your S7 station you can click the button to extend the overview to the connections on all CPUs SIMATIC NET NOM S7 for Industrial Ethernet C79000 G8976 C129 06 109 Configuring Communication Connections 4 5 Configuring ISO on TCP Connections Properties Introduction As well as the entry the connection table you can also modify specific connection parameters that were entered as defaults during the New connection dialog Opening the Dialog To call the dialog for special connection properties follow the steps outlined below 1 Select the required connection in the connection table 2 Select the menu option Edit gt Object Properties Result The Propertie
90. defined by the international standard IEEE 802 3 see 11 All Round Communication in the Industrial Sector Industrial Ethernet is integrated in the SIMATIC NET concept that allows comprehensive networking of the management cell and field levels in conjunction with PROFIBUS and the AS interface AS i Industrial Ethernet IEEE 802 3 PROFIBUS EN 50170 Vol 2 PROFIBUS AS Interface AS i Actuator Sensor Interface Figure 1 1 Industrial Ethernet in the SIMATIC NET Concept Network Access Industrial Ethernet is accessed using the CSMA CD Carrier Sense Multiple Access with Collision Detection network access technique specified in IEEE 802 3 SIMATIC NET NCM S7 for Industrial Ethernet 14 C79000 G8976 C129 06 Communication via Ethernet CPs in S7 Stations 1 2 SIMATIC S7 Communication with S7 Ethernet CPs Types of Communication The Ethernet CP for SIMATIC S7 supports the following types of communication depending on the CP type C Ethernet CPD Ei T erne S7 M7 400 j i enh Interfaces Services Possible types of communication Protocols e PG OP communication with the protocols e 7 communication Iso TCP IP RFC 1006 e 5 compatible communication with the SEND RECEIVE interface and the protocols ISO Transport SO on TCP TCP IP with RFC 1006 TCP IP UDP E mail with FETCH WRITE services and the protocols ISO Transport ISO o
91. duction lt Offline gt Project D siemens STEP7 402 S7proj Prod P Ea E Eile Edit Insert PLC View Options window Help la x oelaye eee a ae e E A SIMATIC 30001 SIMATIC 4001 SIMATIC 3001 SIMATIC 300 2 MPI 1 SIMATIC 300 2 E gi 40001 El i NETPRO Configuring Networks Network To Project D siemens STEP7 402 S 7proj Pr ES BP Network Edit Insert PLC View Options Window Help Ethemet 1 slala Efa els x SIMATIC 400 1 CPUICP 413 443 o Ethernet 1 Industrial Ethernet MPIC1 MPI 2 Press F1 for help SIMATIC NET NCM S7 for Industrial Ethernet C79000 G8976 C129 06 33 Communication via Ethernet CPs in S7 Stations 1 7 2 Network Project Variant SIMATIC S5 and Non SIMATIC Devices on the Subnet Configuration of the System In addition to SIMATIC S7 stations SIMATIC S5 stations and non SIMATIC devices can be included in your system 7 400 1 7 300 1 1 sm System Production Non SIMATI Ethernet 1 SEN 7 300 2 SIMATIC 5 View in a STEP 7 Project SIMATIC S5 stations you intend to include in the communication can be selected directly Non SIMATIC devices must be entered in the configuration as Other stations K SIMATIC Manager Production2 lt Offline gt Proje
92. dustrial Ethernet please note the instruction in the second step for displaying the emergency address Using the Modify button you can set the PG PC interface back to its original values For more detailed information refer to the integrated help system SIMATIC NET NCM S7 for Industrial Ethernet C79000 G8976 C129 06 195 Firmware Loader SIMATIC NET NCM S7 for Industrial Ethernet 196 C79000 G8976 C129 06 References A 1 2 3 4 Product information bulletin manual SIMATIC NET CP Supplied with the specific CP Siemens AG NCM S7 for PROFIBUS Primer Part of the documentation package NCM S7 for PROFIBUS of the online documentation in the STEP 7 optional package NCM S7 for PROFIBUS SIEMENS AG NCM S7 for Industrial Ethernet Manual Part of the documentation package NCM 7 for Industrial Ethernet of the online documentation in the STEP 7 optional package NCM S7 for Industrial Ethernet SIEMENS AG SIMATIC NET manual Commissioning PC Stations Part of the documentation package NCM S7 for Industrial Ethernet of the online documentation in the STEP 7 optional package NCM S7 for Industrial Ethernet Siemens AG SIMATIC NET NOM S7 for Industrial Ethernet C79000 G8976 C129 06 197 References 5 6 ITI 18 9 10 11 198 SIMATIC NET IT CP manual Part of the documentation package NCM S7 for Industrial Ethernet of the onl
93. e networks Ethernet PROFIBUS in SIMATIC iMap Plant view View of the technological functions of the automation system and its interconnections in SIMATIC iMap One chart is displayed in the plant view SIMATIC NET NCM S7 for Industrial Ethernet 208 C79000 G8976 C129 06 Glossary PROFIBUS device In Component based Automation A PROFIBUS device has only one PROFIBUS attachment as a slave It does not take part directly in PROFInet communication but is linked using a proxy PROF Inet device PROFInet Standard of the PROFIBUS Users organization defining a heterogeneous communications and engineering model PROFInet device A device on Ethernet is a PROFInet device A PROF Inet device can also have a PROFIBUS attachment as master and proxy PROF Inet device for PROFIBUS devices PROFinet device proxy A PROF Inet device that has the role of the master for PROFIBUS devices This allows PROFIBUS slaves to be included in PROFInet communication PROFInet component Software representation of a technological module with defined functionality An automation system is made up of several PROFInet components A PROF Inet component always includes a technological function and the corresponding device SIMATIC IMap Engineering tool from Siemens for Component based Automation Allows the configuration commissioning and monitoring of modular distributed automation systems based on the PROF Inet standard SIMATIC iMap STEP 7 AddOn Softw
94. e stations listed above In the Properties dialog of these connections you must then specify the full partner address These partners do not appear in the NetPro plant view Plant Plant Production 1 Production 2 7 400 1 S7 400 2 PC PG S7 400 4 WO A 3 ee E i pidddde i 5 A mz s Non siemen i et subnet 1 H DO O W 4 0 Oo Oo i A Wl 3 7 4 S7 400 3 smancss 574005 J SIMATIC NET NOM S7 for Industrial Ethernet C79000 G8976 C129 06 Installing and Starting the Ethernet CP with STEP 7 Procedure To enter a substitute object in the project following the steps below 1 Select the project in the SIMATIC Manager 2 Select the menu command Insert gt Station gt and then as necessary Other Station PG PC or SIMATIC S5 Possible result the selected object is created in the project RJ SIMATIC Manager PROJECT ETHERNET lt Standard Hierarchy Of MEI ES amp Eile Edit Insert PLC View Options Window Help l x olele e wal eaa e a PROJECT ETHERNET Eli nm LL f SIMATIC 400 Station 1 j a g SIMATIC 400 Station 2 SIMATIC SIMATIC SIMATIC a SIMATIC 400 Station 3 400 Station 1 400 Station 2 400 Station 3 amp ca E MPl Netz 1 Ethernet 1 SIMATIC S5 1 Press F1 for help Figure 2 6 Project With Substitute Object
95. e supplied sample programs or programs you have written your self 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 recommen ded by Siemens Before you use the supplied sample programs or programs you have written your self make certain that no injury to persons nor damage to equipment can result in your plant or process SIMATIC NET NOM S7 for Industrial Ethernet C79000 G8976 C129 06 3 Prior to Startup Before putting the product into operation note the following warning Caution Prior to startup you must observe the instructions in the relevant documentation For ordering data of the documentation please refer to the catalogs or contact your local SIEMENS representative Copyright 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 cre
96. e than once You can also start NCM S7 Diagnostics twice with an online connection to the same CP this can for example be useful if you want to monitor the diagnostic buffer at the same time as running diagnostic functions on a connection Requirement You have an online connection available via the LAN ISO or TCP IP on the one hand and an online connection via the communication K bus on the other alternatively via the CPU or via PG channel routing via a further CP SIMATIC NET NCM S7 for Industrial Ethernet 184 C79000 G8976 C129 06 NCM S7 Diagnostics 6 4 How to Use Diagnostics Procedure To use diagnostics efficiently particularly when working with the diagnostic tool for the first time the following procedure can be recommended 1 Use the sequence shown below as a basis for using diagnostics Begin NCM S7 Diagnostics Establish connection to the CP Section 6 3 Make the required settings See Section 6 2 2 Identify the Ethernet CP Query the current status of the CP Operating Mode tab i If the CP is not If the CP is in the RUN mode in the RUN mode TCP connection ISO transport connection ISO on TCP connections UDP connections If anything unusual is displayed for connection status receive status send status y View evaluate the diagnostic buffer to obtain an overview and detailed explanation of diagnostic ev
97. ection number of the connection is 7 300 specified in the parameter ID see 1 2 64 for Configuration Section 4 3 1 7 400 LADDR INPUT WORD Module base address When you configure the CP with STEP 7 hardware configuration the module base address is displayed in the configuration table Specify this address here STATUS OUTPUT WORD see following Status code table For meaning refer to the table below Condition Codes The following table shows the STATUS code that must be evaluated by the user program Table 5 5 AG UNLOCK Condition Codes STATUS Meaning 7000 CP is not processing a job 7001 FETCH active 7002 WRITE active 8183 FETCH WRITE not configured for this connection 8186 ID number not in permitted range e g 1 64 with S7 400 Industrial Ethernet CPs SIMATIC NET NCM S7 for Industrial Ethernet 172 C79000 G8976 C129 06 Programming FCs Functions and FBs for S7 Ethernet CPs 5 5 Numeric Data Resource Requirements of the FCs Notice Please note the version information of the blocks Blocks with other versions have different resource requirements Table 5 6 Information for FCs with an S7 400 NAME Version FC no Load Work MC7 Local data memory memory Bytes Bytes bytes bytes AG_SEND 20 AG_RECV 20 AG_LOCK 6 AG_UNLOCK 1 0 8 256 186 150 6 AG_LSEND 1044 846 52 AG_LRECV 3 0 60 1190 992 956 58 Table 5 7 Information for FCs with an S7 300 NA
98. ections Checklist Table 6 6 Checklist for Typical Problems with ISO Transport SO on TCP UDP Connections Problem No data transfer on an ISO transport connection ISO on TCP connection or only in one direction Possible Cause AG SEND and AG RECV are not called in the user program or Receive or send buffer too small or incorrect Identifying the Cause and Remedy Check the user program Evaluate status bytes in AG SEND and AG RECV What to do If necessary configure FC blocks If necessary correct ANY pointer The connection is not established Evaluate status bytes of the FC blocks or evaluate diagnostic buffer What to do Change the address parameters MAC IP address TSAP Data transfer too slow Receiving device too slow Evaluate diagnostic buffer Entry No receive resources on destination station XX What to do Delay the send trigger or check the destination station and optimize reception The complete data field is not sent on an ISO LEN parameter for AG SEND is set to the What to do Set the LEN parameter to the required size is not sent on an ISO the ANY pointer is too transport wrong value ISO on TCP UDP connection The complete data field The buffer specified with What to do Correct the LEN parameter and the ANY pointer transport small ISO on TCP UDP connection Lj SIMATIC NET NCM S7 for Industrial Ethernet
99. ectivity devi ces such as repeaters and bridges Segments are transparent for addressing Client A client is a device or in general terms an object that requests a service from a gt server Configuration data Parameters that determine the modes and functions of a gt CP They are set and downloaded using the NCM S7 configuration tool CP Communications Processor Module for communications tasks CSMA CD CSMA CD Carrier Sense Multiple Access with Collision Detection Frame A message from one PROFIBUS Ethernet station node to another Frame header A frame header consists of an identifier for the gt frame and the source and de stination address Frame Trailer A frame trailer consists of a checksum and the end identifier of the gt frame SIMATIC NET NOM S7 for Industrial Ethernet 202 C79000 G8976 C129 06 Glossary Functions FCs STEP 7 code blocks of the type function Gateway Intelligent connectivity device that connects local area gt networks of different types at the ISO Layer 7 level Industrial Ethernet ALAN system complying with IEEE 802 3 ISO 8802 2 Multicast A multicast is like calling all group stations Using one multicast frame you can reach all the nodes that belong to the multicast group and that are prepared to receive frames NCM S7 for Industrial Ethernet Configuration software for configuration and diagnostic functions on an Ethernet CP NCM S7 for PROFIBUS
100. ent subnet PROFIBUS Ethernet via routers for example an IE PB Link in this case S7 stations are servers S7 communication is possible over a gateway S7 300 Ethernet CP gt et PUT GET S7 400 i Ethernet PC PG Station Ethernet IE PB Link PUT GET Figure 1 4 PC PG station communicates over a gateway with S7 stations on an underlying PROFIBUS or Ethernet For more detailed information on the features supported by your Ethernet CP refer to the manual 1 SIMATIC NET NOM S7 for Industrial Ethernet 24 C79000 G8976 C129 06 Communication via Ethernet CPs in S7 Stations Configuring S7 Connections Create S7 connections to use S7 communication for data exchange between two SIMATIC S7 stations For more detailed information refer to the STEP 7 Description 6 8 Notice S7 connections via routers are supported only within a STEP 7 project but not bet ween partners in different STEP 7 projects of a multiproject Interface in the User Program of the S7 Station You use SFBs for S7 400 and FBs for S7 300 in the user program Block type Client Server Described in SFB FB12 BSEND x STEP 7 SFB FB13 BRCV 7 Documentation 9 SFB FB15 PUT x 1 SFB FB14 GET x 1 SFB FB8 USEND x SFB FB9 URCV a x SFC FC62 CONTROL S7 400 x x 2 C_CNTRL S7 300 1 you do not need to configure a connection
101. ents If necessary correct configuration or programming BES ia on 2 Pinpoint your problem or task for example based on the checklist in Section 6 6 and select the diagnostic function you require based on the recommendation in the list SIMATIC NET NCM S7 for Industrial Ethernet C79000 G8976 C129 06 185 NCM S7 Diagnostics 6 5 Call Specific Diagnostic Functions The following table shows the diagnostic options that exist in the available functions Table 6 3 General Diagnostic and Statistical Functions Diagnostic Functions Diagnostic Object CP information Diagnostic Aims The aim is to identify the CP to which NCM S7 Diagnostics is connected and to find out the current mode Special Features Mode Here the aim is to find out the current operating mode of the Ethernet CP as a module in the S7 300 400 and as a node on Industrial Ethernet and if necessary to modify the mode menu command Operating Mode gt Stop Module Start Module Reset Memory Reset to Factory Settings Diagnostic buffer General Error Diagnostics Using Diagnostic Buffers To display and decode event messages recorded on the CP in detail The diagnostic buffer provides you with detailed information about all the communication services of the CP Event messages are recorded on the CP in a ring buffer The ring buffer can contain up to 50 entries In NCM S7 on the other
102. ernet CP please refer to the instructions in the manual 1 supplied with the Ethernet CP This also contains further information about the performance of the Ethernet CP For more information about the functions and applications of STEP 7 in which the NCM S7 option is integrated please read the following topics For using the help functions read the section Working with STEP 7 in 6 Configuring and assigning parameters to modules in 6 Configuring networks in 6 You will find this information in the online help with integrated in STEP 7 by selecting Help gt Contents You will find examples of configurations in the Primer 3 SIMATIC NET NOM S7 for Industrial Ethernet C79000 G8976 C129 06 43 Installing and Starting the Ethernet CP with STEP 7 2 1 General Information About the NCM S7 for Industrial Ethernet Option Installation Please follow the instructions in the README file when installing the NCM S7 for Industrial Ethernet option on your PG PC under STEP 7 Functions NCM S7 consists of the following e CP specific index dialogs that you call using the properties dialog box of the modules e Dialogs for the connection configuration e Diagnostic functions that you obtain as follows Using the Diagnostics tab in the properties dialog Using the standard Start menu of Windows with which you can call the SIMATIC program group e Functions displayed with SIMATIC gt NCM in the Star
103. ernet CPs 5 4 FCs for Access Coordination with FETCH WRITE Overview The following FCs are available for FETCH WRITE function to coordinate access FC can be used with Meaning S7 300 S7 400 AG_LOCK FC7 xX X Locks external data access with FETCH WRITE AG_UNLOCK FC8 xX xX Releases external data access with FETCH WRITE Caution when Configuring If you use FCs AG_LOCK and AG_UNLOCK you must specify the following information for S7 400 stations in the configuration e in HW Config In the Addresses tab the option Address setting for LOCK UNLOCK must be selected How the Block Works With these FCs you can coordinate access to system memory areas so that no inconsistent data are created and transferred The control is from the user program in the S7 CPU that can if necessary disable an external FETCH WRITE access using an AG_LOCK call After a certain time or after the local write read access is completed an AG_UNLOCK job can be used to enable external access again Another advantages is that this access lock only applies to the FETCH WRITE connection specified in the call If more than one FETCH WRITE connections are configured these can for example be used for certain specific system areas and a selective access coordination can be implemented The following diagram illustrates the usual chronological sequence of memory access coordination controlled in the user progra
104. err S M100 0 BEU M100 0 1 W 16 100 P DB100 dbx0 0 BYTE 240 240 M100 1 MW102 Reset parameter ACT for all further FC5 calls Test whether DONE TRUE Test whether ERROR TRUE Neither DONE nor ERROR is set the job is still running Job completed without error Set ACT TRUE so that the following call can trigger the new job SIMATIC NET NCM S7 for Industrial Ethernet C79000 G8976 C129 06 159 Programming FCs Functions and FBs for S7 Ethernet CPs err NOP 1 An error occurred The status word can be eva NOP 1 luated here Set ACT to TRUE in any case so S M100 0 that a new send job can be triggered if the BEU error disappears mannan nnn nnn nnn nnn nnn nnn nnn nnn nnn nnn nnn nnn END FUNCTION ORGANIZATION BLOCK OB100 TITLE Init_for_FC100 FAMILY S7300 NAME SENDE_DEMO_INIT VERSION 1 0 VAR_TEMP OB1 System array 1 20 of byte END_VAR BEGIN SET S M100 0 Initialize ACT parameter END ORGANIZATION BLOCK SIMATIC NET NOM S7 for Industrial Ethernet 160 C79000 G8976 C129 06 Programming FCs Functions and FBs for S7 Ethernet CPs 5 3 2 FC6 AG_RECV FC60 AG_LRECV Meaning of the
105. erval of this OB should be significantly higher than the average cycle time of your program You should set a minimum cycle time that is higher than the average runtime of OB1 This frees resources for communication on the CPU This is for example a remedy for existing applications when communication already takes place cyclically in OB1 If necessary reduce the time taken for communication processing on the CPU by changing the parameters set for cyclic load due to communication in the properties dialog of the CPU SIMATIC NET NOM S7 for Industrial Ethernet C79000 G8976 C129 06 81 SEND RECEIVE Interface in the User Program 82 SIMATIC NET NCM S7 for Industrial Ethernet C79000 G8976 C129 06 Configuring Communication Connections 4 This chapter explains the following e The general aspects of configuring communication connections e How to configure ISO transport connections ISO on TCP and TCP connections e How to use the connection configuration functions to specify communication partners that exchange data via UDP You will find a description of the connection specific properties dialogs in the following sections e ISO transport connections see Section 4 4 e SO on TCP connections see Section 4 5 e TCP connections see Section 4 6 e UDP see Section 4 7 You will find further information in the following sources e For the properties of the configurable connection types refer to Section 1 5 e For the propertie
106. ficance Depending on the context other functions may be available for more detailed information refer to the online help for NCM Diagnostics Table 6 1 Meaning of the Menu Commands Menu Diagnostics gt Open Online Connection Diagnostics gt Close Online Connection Meaning With this menu command you can establish a connection to a different CP you want to check without having to quit and restart the diagnostic tool The current diagnostic connection is closed If you want to use more than one diagnostic connection at the same time you can start NCM S7 diagnostics more than once Operating Mode gt Stop a module Start a module Reset module memory Resetting to factory settings You can control the CP as follows Stops the CP Starts the CP if the RUN STOP switch is set to RUN With certain CP types for example the CP 443 5 Basic you can reset the CP memory This function must be confirmed before it is executed Following this memory reset the CP retains the preset MAC address and the retentive parameters The CP is therefore immediately ready for downloads using the IP address The retentive parameters include e IP address and IP parameters e Anewly set MAC address e LAN settings With some modules it is possible to reset to the factory settings The function corresponds to a memory reset When you reset to the factory settings the retentive parameters are also deleted Afte
107. for S7 Ethernet CPs Notice Please remember that if you replace a module you must only use the blocks per mitted for the configured CP type in the user program This means e f you replace the module without adapting the configuration data to the possibly newer module type you do not need to make any changes to the blocks used e If you replace the module and you do adapt the configuration data to the newer module type you must use the block versions approved for this module type We recommend that you always use the latest block versions for all module types With the older module types this recommendation assumes that you are using the latest firmware for the particular block type You will find more information on replacing blocks in our Customer Support on the Internet The manuals 1 contain information on the compatibility of the S7 CPs and the corresponding blocks FCs FBs SIMATIC NET NCM S7 for Industrial Ethernet 144 C79000 G8976 C129 06 Programming FCs Functions and FBs for S7 Ethernet CPs 5 2 Setting Parameters for FC Calls Before describing the FCs in detail a few general comments on calling and setting parameters for FCs will be useful in this point It is possible to make the following general statements about the following parameter groups that occur in all FCs e Parameters for CP and connection assignment input parameters e Parameters for specifying a CPU data area input para
108. for details 5 5 compatible communication with FETCH WRITE services server The FETCH WRITE services server allow direct access to the system memory areas on the SIMATIC S7 CPU from SIMATIC S5 or from devices of other ranges Depending on the CP type the following communications services are available for FETCH WRITE access ISO Transport optimized for top performance at the self contained manufacturing level TCP IP for internetwork communication with ISO on TCP connections RFC 1006 TCP connections PROFIinet communication PROFInet is a standard of the PROFIBUS Users organization defining a heterogeneous communications and engineering model An 7 300 station equipped with a CP capable of PROF Inet can be interconnected as a PROF Inet component in SIMATIC iMap TCP connections are used for the PROFInet communication For more detailed information on PROF Inet refer to 23 HTML process control With an IT CP use the supplied functions and HTML pages to query important system data using a Web browser you should also refer to the instructions on the IT CP 5 SIMATIC NET NCM S7 for Industrial Ethernet C79000 G8976 C129 06 Communication via Ethernet CPs in S7 Stations e File management and file access with FTP The IT CP S7 400 S7 300 provides additional functions for FTP services You can use your S7 station both as an FTP client and as an FTP server refer to the manual of the IT CP 5
109. g for the data areas supported You will find an overview of the versions of the FCs FBs in the documentation and block history Application The following diagram illustrates the use of the FCs described here for bi directional data transfer on one configured connection SIMATIC NET NCM S7 for Industrial Ethernet 148 C79000 G8976 C129 06 Programming FCs Functions and FBs for S7 Ethernet CPs CPU Ethernet CP Ethernet CP CPU STEP 7 user program User data areas User data areas send i C gt receive gt AG _RECV l Connection AG_RECV receive lt lt i send ae Note Unless specifically stated otherwise the information on this and the following pages refers to AG_SEND AG_LSEND or AG_RECV AG_LRECV Specifying the Data Area on the CPU When you call an FC you transfer the address and length of the data area in the CPU Remember that the maximum length of the data area depends on the block type and block version being used e AG_SEND and AG_RECV Up to version V3 0 of these blocks a maximum of 240 bytes could be sent or received The current block versions allow a data area of up to 8192 bytes for an S7 300 With an S7 400 the FCs AG_LSEND AG_LRECV must still be used for larger data areas e AG_LSEND AG_LRECV Using the CPs of the S7 400 and with earlier versions of the S7 300 larger data areas can only be transferred with the FCs AG_LS
110. g the STEP 7 object Partner other project or using substitute objects such as Other stations or SIMATIC S5 CI Ethernet IT CP S7 400 C Ethernet cP gt S7 300 CEthernetCP gt S7 400 7 Subnet 1 WAN LAN only TCP IP 7 z T ea a IOLI SIMATIC S5 CIC I PG PC with Ethernet CP Subnet 2 Other station with Ethernet attachment Figure 4 2 Possible Connections SIMATIC NET NOM S7 for Industrial Ethernet C79000 G8976 C129 06 85 Configuring Communication Connections Organization in a Multiproject If interproject subnets are configured you can also configure connections over 9 such subnets using STEP 7 V5 2 The endpoints of these connections can be located in different projects STEP 7 supports you both when creating interproject connections within a multiproject as well as when synchronizing connections that were configured without a multiproject context SIMATIC NET NCM S7 for Industrial Ethernet 86 C79000 G8976 C129 06 Configuring Communication Connections 4 3 Connections Characteristics of a Connection Figure 4 3 A communication connection allows program controlled communication between two nodes on Industrial Ethernet with the following characteristics The data transfer is bi directional in o
111. ger Hans Automation with STEP 7 SIMATIC S7 300 400 Programmable Logic Controllers For configuring PROFInet components and systems Basic help in the SIMATIC iMap engineering tool For configuring PROFInet components and systems Component based Automation Configuring Systems with SIMATIC iMap Manual Order Numbers 200 The order numbers for the SIEMENS documentation listed above can be found in the catalogs SIMATIC NET Industrial Communication Catalog IK PI 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 Some of the documents listed here are also on the Manual Collection CD supplied with every S7 CP SIMATIC NET NCM S7 for Industrial Ethernet C79000 G8976 C129 06 Glossary B B 1 General Section iden he ere dh batten peed N Ae ever S EA 202 B 2 Industrial Ethernet sw s2 oceee ase 5 a tee ae eben he Ate tee a dad 206 B 3 PROPINGL hartana Gnn ecard ct tat n AA atham el a AA chant 208 SIMATIC NET NCM S7 for Industrial Ethernet C79000 G8976 C129 06 201 Glossary B 1 General Section Baud rate gt transmission rate Broadcast A broadcast is like calling all stations Using one broadcast frame you can re ach all nodes that are prepared to accept broadcast frames Bus segment Part of a gt subnet Subnets can consist of bus segments and conn
112. gured in the STEP 7 projects Configuring a network or subnet involves the following 1 You create one or more subnets of the required subnet type in the project 2 You select the properties of the subnet Normally the default settings are adequate 3 You connect the station logically to the subnet 4 You set up connections for communication Networking in a Multiproject STEP 7 as of Version V5 2 supports configuration in a multiproject 2 Using a multiproject for example you can create a project for distributed editing by various editors and distribute the stations to the projects according to their editors To allow this functions are available for branching and merging sub projects Interproject subnets and connections can be created Tools The SIMATIC Manager provides convenient tools for configuring and documenting networks also graphically with NetPro ze NETPRO Configuring Networks Network To Project D siemens S TEP7 402 E xamples EXIE RP Network Edit Insert PLC View Options window Help slala Ae dl lel Dal w Y H SIMATIC 400 Station 1 simatic 400 Station 2 SIMATIC 400 Station 3 ey SIMATIC S5 1 Eg cPUlCP Eu CPU CP En cP l4i4 443 414 443 443 E o lm o m a 2 2 2 i The chapters describing network configuration in 6 and the online help system d also contain information about configuring SIMATIC S7 networks HLP SIMATIC NET
113. gured transport connection is suitable for e the reliable transmission of related blocks of data between two Ethernet nodes using TCP see 17 19 20 with ISO on TCP connection see 18 or TCP connection ISO transport connection e simple unacknowldegedg transfer of related blocks of data datagram service between two Ethernet nodes with UDP User Datagram Protocol on IP The SEND RECEIVE interface is also suitable for sending E mail refer to the manual for the IT CP 5 For TCP applications there is an active network with IP protocol see 20 ISO Transport Connection ISO transport provides services for the reliable transfer of data on configured connections Due to the segmentation of the data large amounts of data can be transmitted Transmission reliability is extremely high due to automatic repetition and additional field check mechanisms The communications partner confirms reception of data and the sender receives a return value on the SEND RECEIVE interface ISO transport is operated only on Industrial Ethernet and is optimized for high performance operation at the self contained manufacturing level 1 The previous name of the SEND RECEIVE interface was S5S5 connections SIMATIC NET NCM S7 for Industrial Ethernet C79000 G8976 C129 06 27 Communication via Ethernet CPs in S7 Stations IP Internet Protocol For internetwork data transmission the following services are available with suitab
114. h an overview and checklists the online help provides you with detailed information on the diagnostic events SIMATIC NET NOM S7 for Industrial Ethernet C79000 G8976 C129 06 221 SIMATIC NET NOM S7 for Industrial Ethernet C79000 G8976 C129 06 A Access coordination 1167 Address parameters broadcast 136 137 unspecified ISO on TCP connection 1115 unspecified TCP connection unspecified UDP connection 133 AS interface 14 B Broadcast with UDP C Communication options Communication services configuring 63 ss Mae data download to target system Connection properties a Connection configuration CP address 142 1142 CP configuration oaa saving Creating a subnet 4 CSMA CD 14 D Diagnostics 59 Displaying network attachments 52 Downloading 69 Dynamic properties 105 E Ethernet overview Ethernet CP further GE properties a 5 time installing and starting 43 procedure 45 F FCs block number 142 general notes 142 SIMATIC NET NCM S7 for Industrial Ethernet C79000 G8976 C129 06 FCs for access coordination with FETCH WRITE 167 FETCH WRITE services configuration for ISO on TCP 116 ka configuration for ISO tr ransport configuration for TCP 125 overview 30 Firmware Loader application loading firmware 193 1193 Functions AG RECV AG SEND Functions FC typical sequence 76 Functions FCs AG_LOCK 169 AG_LOCK AG_UNLOCK AG
115. hand up to 500 messages can be saved All the CP functions can generate event messages When you call the diagnostic object the messages are read out and displayed The latest message is displayed in the top line with the highest consecutive number If you double click a previously selected event message you display a help text explaining the message in greater detail Table 6 4 Mode Dependent Functions Diagnostic Functions Diagnostic Object Connections Diagnostic Aims To display and monitor communication connections You obtain an overview or detailed information in the contents area depending on the diagnostic object you select Special Features e Overview of All Connection Types Used By double clicking the objects in the contents area you can display detailed information 186 SIMATIC NET NOM S7 for Industrial Ethernet C79000 G8976 C129 06 NCM S7 Diagnostics Table 6 4 Mode Dependent Functions continued Diagnostic Diagnostic Aims Special Features Functions Diagnostic Object Connections gt e Overview of all the communication Type connections of a particular type for example all TCP connections e Information on the connection status Connections gt e Detailed information about the status Type gt of a communication connection Type connection n SIMATIC NET NCM S7 for Industrial Ethernet C79000 G8976 C129 06 187 NCM S7 Diagnosti
116. he Ethernet profile for fault tolerant connections only when you actually use fault tolerant S7 connections Otherwise you must expect your system to be more susceptible to problems since for example the number of transfer or connection establishment attempts is reduced compared with non redundant systems 56 SIMATIC NET NOM S7 for Industrial Ethernet C79000 G8976 C129 06 Installing and Starting the Ethernet CP with STEP 7 Table 2 1 Settings in the Options Tab continued Option Individual Network Settings Meaning Effect Here you can make fixed network settings when necessary As default Automatic Setting is selected and this setting generally guarantees problem free communication in most situations If problems occur in communication for example when connections are not established or when there are often disturbances on the network the reason may be that the selected or automatic network settings are not suitable You can then select a network setting to suit your network configuration Send Keepalives for Connections Here you can set the interval at which keepalives are sent to the partner of a communications connection This setting decides the latest time after which the failure of a communications partner is detected For all connection oriented services the Ethernet CP is configured so that keepalives are sent This guarantees that connections are closed if a communica
117. ice 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 SIMATIC NET NCM S7 for Industrial Ethernet C79000 G8976 C129 06 Trademarks SIMATIC SIMATIC HMI and SIMATIC NET 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 recommen ded 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 th
118. ield No 9 Empty field FFh High Byte A Length empty field 07 Low Byte B High Byte Cc Low Byte D free FFh E 02 F SIMATIC NET NCM S7 for Industrial Ethernet C79000 G8976 C 129 06 Linking to Other Systems with FETCH WRITE a Structure of FETCH Frames The meaning and values of parameters shown without values in the following table can be found in the section Parameter Values FETCH request frame FETCH response frame System ID S 0 System ID S 75 1 5 Length of header 16d 2 Length of header 16d ID OP code 01 3 ID OP code 01 Length OP code 03 4 Length OP code 03 OP code 05 5 OP code 06 ORG field 03 6 Ack field 0Fh Length ORG field 08 7 Length ack field 03 ORG ID 8 Error field No DBNR 9 Empty field FFh Start address High Byte A Length empty field 07 Low Byte B Length High Byte Cc Low Byte D free Empty field FFh E Length empty field 02 F Data up to 64 K but only if Error no 0 SIMATIC NET NCM S7 for Industrial Ethernet C79000 G8976 C129 06 213 Linking to Other Systems with FETCH WRITE Parameter Values S7 Address Area ORG ID 01H 024 03H 044 Source dest Source dest Source dest Source dest data from to data from to data from to data from to data block in flag area process process main
119. in conjunction with the ERROR and STATUS parameters refer to the following table ERROR OUTPUT BOOL 0 1 error For the meaning of this parameter in conjunction with the DONE and STATUS parameters refer to the follow table STATUS OUTPUT WORD see following table Status code The following table shows the condition codes formed by the DONE and ERROR parameters Condition Codes 156 The following table shows the condition codes formed by the DONE ERROR and STATUS parameters that must be evaluated by the user program SIMATIC NET NCM S7 for Industrial Ethernet C79000 G8976 C129 06 Programming FCs Functions and FBs for S7 Ethernet CPs Note For entries coded with 8Fxxy in STATUS refer to the information in the STEP 7 Standard and System Functions reference manual The chapter describing error evaluation with the RET_VAL output parameter contains detailed information To find out which SFCs are used and are relevant for error evaluation display the properties dialog of the FC described here in the Calls tab Table 5 2 AG_SEND AG_LSEND Codes Meaning Job completed without error No job being executed Job active This code is possible only with the S7 300 the FC was called with ACT 0 the job has not yet been processed No configuration or the ISO TCP service has not yet started on the Ethernet CP System error
120. ine documentation in the STEP 7 optional package NCM S7 for Industrial Ethernet Siemens AG SIMATIC STEP 7 Configuring Hardware with STEP 7 Part of the standard STEP 7 Documentation Package Part of the online documentation in STEP 7 SIEMENS AG SIMATIC Communication with SIMATIC Manual SIEMENS AG SIMATIC STEP 7 Programming with STEP 7 Part of the standard STEP 7 Documentation Package Part of the online documentation in STEP 7 SIEMENS AG SIMATIC STEP 7 Reference Manual Documentation Package SIEMENS AG SIMATIC NET Industrial Twisted Pair Networks SIEMENS AG Ethernet IEEE 802 3 ISO 8802 3 SIMATIC NET NCM S7 for Industrial Ethernet C79000 G8976 C129 06 References 12 13 14 15 16 17 18 SINEC CP 1413 Manuals for MS DOS Windows SIEMENS AG SIMATIC S7 7 300 Programmable Controller Hardware and Installation Manual SIEMENS AG SIMATIC NET Manual for Triaxial Networks SIEMENS AG SIMATIC NET Ethernet Manual SIEMENS AG Lokale Netze Kommunikationsplattform der 90er Jahre Andreas Zenk Addison Wesley ISBN 3 89319 567 X TCP IP Internet Protokolle im professionellen Einsatz Mathias Hein International Thomson Publishing ISBN 3 8266 400 4 ITP Online Center http Awww ora de RFC1006 Request For Comment SIMATIC NET NOM S7 for Industrial Ethernet C79000 G8976 C129 06 199 References 19 20 21 22 23 RFC793 TCP RFC791 IP Ber
121. ion status is available in the Overview tab 96 SIMATIC NET NCM S7 for Industrial Ethernet C79000 G8976 C129 06 Configuring Communication Connections 4 3 4 Overview Connections Without Assignment This section explains the actions that can lead to a configured connection losing its assignment to the CP or being deleted Caution Remember that in contrast to the S7 connections the connections of the SEND RECEIVE interface are assigned a CP dependent ID The actions below may require the ID to be modified so that the interface information in the user program must also be adapted Table 4 3 Actions That Can Cause Changes to Configured Connections Action The CP module is moved to a different location in the hardware configuration drag and drop Consequences for the Connections The connections are retained The connection IDs are automatically updated How to Establish the Connection Again Adapt the module start address LADDR in the user program Download the connection configuration to the CP again The CP module is deleted in the hardware configuration You receive the message CP has n connections the assignment will be lost in the connection table The connections remain without assignment to a CP in the connection table In the Overview tab of the Properties dialog the connections are identified with Once you have placed a CP in the ha
122. ion was terminated You can reestablish the connection to the CP with the corresponding acknowledgment in the dialog The connection is then automatically reestablished whenever possible SIMATIC NET NCM S7 for Industrial Ethernet C79000 G8976 C129 06 181 NCM S7 Diagnostics 6 3 Starting Diagnostics Establishing a Connection to the Ethernet CP Initial Situation Establish the physical connection between the PG and the SIMATIC S7 Station There are two ways of doing this e MPI e Industrial Ethernet e Industrial Ethernet TCP IP e PROFIBUS Starting Diagnostics from the NCM Program Group If there are no configuration data on your PG PC follow the steps outlined below to start diagnostics with a connected CP 1 Select the function NCM Diagnostics in the NCM S7 program group NCM S7 Diagnostics is started with the message No online connection to the CP in the contents area 2 Select the Diagnostics gt Open Online Connection menu command 3 In the displayed dialog NCM S7 Diagnostics select the interface to match your hardware configuration Depending on the type of network attachment you have you will be prompted to specify an address Table 6 2 Possible Settings for the Online Paths without Parameters for Internetworking Attachment on Node Address Location of the Module Destination Station Rack Slot MPI MPI address of the CP if this has its Rack slot no of the C
123. ir parameters cannot be modified here For an example of this display refer to Section 4 3 4 the ISO transport connection Parameter Description ID This is the connection ID of the TCP connection STEP 7 connection configuration DWORD Name loc endpoint Entered connection name It identifies the TCP connection 8 character double width CPU Applications If you display all the ISO transport connections being operated in this station in the multiprocessor mode with PC stations multiple applications the CPU application that is the endpoint of the particular connection is specified here R S or via CP With S7 CPs Rack slot of the local CP via which the connection is established With PC stations Display of the CP over which the connection is maintained Partner address Specifies the remote IP address of the connection Local port Local port 8 characters default length Remote port Remote port 8 characters default width Mode Displays the mode configured in the Options tab Status Indicates the current configuration of the connection Connections without assignment are indicated by No local CP No remote CP in the status column and a character at the end of the Local ID for example 0002 A000 Connections you are currently editing are also indicated by at the end of the local ID You can set the column widths in the Overview tab individually
124. itor in STEP 7 provides you with the option of accepting all the relevant parameters from the hardware configuration HW Config and from the connection configuration When assigning the parameters for the block in the user program follow the steps outlined below 1 Select the block call and its block parameters 2 Right click and select the menu command Connections 3 Depending on the block type you can now select the connection and or module intended for the block from a list 4 Confirm your selection as far as possible the available parameter values are entered in the block call Response to Incorrect Addresses If the S7 CPU cannot communicate with the Ethernet CP using the specified module base address the errors described below occur Cause Reaction Code No module can be addressed or The CPU remains in the stop with system error identified at the specified CP address state in this case evaluate the diagnostic buffer of the CPU The CP address points to a different Possible error code in the STATUS parameter module type of the communication block 8184H System error 80B0OH Module does not recognize data record 80C0H Data record cannot be read 80C3H Resources occupied memory 80D2H Logical base address wrong Notice If you inadvertently address not a CP but another module type errors occur that cannot be indicated by the error messages of the FCs themselves 1 This f
125. le CPs such as the CP 443 1 TCP e SO on TCP connection ISO on TCP is intended for reliable internetwork data transmission The ISO on TCP service corresponds to the TCP IP standard Transmission Control Protocol Internet Protocol with the RFC 1006 extension according to layer 4 of the ISO reference model see 18 RFC 1006 extends the TCP protocol by allowing the transmission of blocks of data messages assuming that both partners support RFC 1006 Transmission reliability is extremely high due to automatic repetition and additional field check mechanisms The communications partner confirms reception of data and the sender receives a return value on the SEND RECEIVE interface e TCP connection When using the SEND RECEIVE interface on TCP connections the Ethernet CP supports the socket interface for example Winsock dll to TCP IP found on almost every system PC or other system TCP is intended for reliable internetwork data transmission The TCP service complies with the TCP IP standard Transmission Control Protocol Internet Protocol see 18 e UDP connection UDP is intended for simple internetwork data transmission without confirmation If the connection is suitably configured broadcast and multicast frames can also be sent on UDP connections To avoid overload due to high broadcast load the CP does not allow reception of UDP broadcasts As an alternative use the multicast function over a UDP connection
126. ll from which the data are taken timer cell from which the data are taken or or written to written to 0 127 0 255 0 255 digital I Os 128 255 analog I Os Length of the Length of the Length of the source dest source dest source dest data field in data field in data field in bytes words counter words counter cell 1 word cell 1 word 1 256 1 1 215 Linking to Other Systems with FETCH WRITE SIMATIC NET NCM S7 for Industrial Ethernet 216 C79000 G8976 C129 06 Document History D This section provides an overview of the previous releases of this manual and the functional expansions in STEP 7 and NCM S7 New in Release 05 STEP 7 V5 1 SP3 e Configuring multicast and broadcast on UDP connections See Chapter 4 e The blocks AG_SEND and AG_RECV can now be used for long data packets with an S7 300 See Chapter 5 e The S7 CPs for Ind Ethernet are now supplied with a default MAC address allowing configuration data to be downloaded over Ethernet without a node initialization New in Release 04 up to STEP 7 V5 1 SP2 e The FETCH WRITE mode is now supported on TCP connections See Chapter 4 e The FETCH WRITE mode can be coordinated in the user program by the new FCs AG_LOCK and AG_UNLOCK See Chapter 5 e NCM Diagnostics has a completely revised user interface See Chapter 6 The description of NCM S7 Diagnostics has been restructured While this manual provides you wit
127. m with AG_LOCK and AG_UNLOCK SIMATIC NET NOM S7 for Industrial Ethernet C79000 G8976 C129 06 167 Programming FCs Functions and FBs for S7 Ethernet CPs User program Ethernet CP Communications Partner CPU cycle aoe AG_LOCK FETCH WRITE LOCKED 0 access to DB x active AG_LOCK Cycle n 1 LOCKED 0 AG_LOCK FETCH WRITE Cycle n 2 LOCKED 1 FETCH WRITE rejected p Data Sa processing in DB x AG_UNLOCK Cycle n m STATUS 700x FETCH WRITE access to DB x active Time The lock job must first be monitored in the user program using the code in the return parameter LOCKED As long as LOCKED 0 is indicated it must be assumed that there is still a FETCH WRITE access active If LOCKED 1 is indicated this shows that the lock is active data can now be modified by the user program The status code is updated at each block call SIMATIC NET NCM S7 for Industrial Ethernet 168 C79000 G8976 C129 06 Programming FCs Functions and FBs for S7 Ethernet CPs 5 4 1 FC7 AG_LOCK Meaning of the Block Using the AG_LOCK block the data exchange using FETCH or WRITE on the connection selected with the parameter ID is disabled The LOCKED output indicates whether or not the lock was successful If the lock was not successful the job must be triggered again in a later CPU cycle The STATUS output indicates the status of the CP for this connection Call Representation of
128. mation and downloads SIMATIC NET NOM S7 for Industrial Ethernet 8 C79000 G8976 C129 06 This Manual on SIMATIC NET NCM S7 for Industrial Ethernet Access to Online Help of STEP 7 and NCM S7 With the online help you can obtain the following information e You can display the contents of the STEP 7 basic help system with the menu command Help gt Contents HLP e Context sensitive help on the selected object using the Help gt F1 Context Sensitive Help menu command the F1 function key or the question mark in the toolbar You can then access further information relating to the current topic e Glossary for all STEP 7 applications by clicking the Glossary button Please note that each STEP 7 application has its own contents and context sensitive help Conventions References to other manuals and documentation are indicated by numbers in slashes These numbers refer to the titles of manuals listed in the References section of the Appendix m SIMATIC NET NOM S7 for Industrial Ethernet C79000 G8976 C129 06 9 Contents 1 Communication via Ethernet CPs in S7 Stations 00005 1 1 Industrial Ethernet 0 00 00 cece eee eee teens 1 2 SIMATIC S7 Communication with S7 Ethernet CPs 1 3 PG OP Communication via Industrial Ethernet 4 1 3 1 PG Communication with STEP 7 over Industrial Ethernet 1 3 2 OP Operation Connecting Operator I
129. memory image of the image of the inputs PII outputs PIQ DB from irrelevant irrelevant irrelevant which the source data are taken or to which the dest data are transferred permitted range 1 255 Start address DW number Flag byte no Input byte no Output byte from which from which from which no from the data are the data are the data are which the taken or taken or taken or data are written to written to written to taken or written to permitted range 0 2047 0 255 0 127 0 127 Length of the source dest data field in words Length of the Length of the Length of the source dest source dest source dest data field in data field in data field in bytes bytes bytes 1 2048 1 256 1 128 1 128 permitted range SIMATIC NET NCM S7 for Industrial Ethernet 214 C79000 G8976 C129 06 Linking to Other Systems with FETCH WRITE S7 Address Area ORG ID DBNR Start address permitted range Length permitted range SIMATIC NET NOM S7 for Industrial Ethernet C79000 G8976 C129 06 05H 06H 07H Source dest Source dest Source dest data from to in data from to data from to 1 O modules counter cells timer cells With source data input modules with dest data output modules irrelevant irrelevant irrelevant I O byte no Number of the Number of the from which the data are taken or written to counter ce
130. meters e Status information output parameters Calling Communication Blocks for an S7 300 5 2 1 Caution The communication blocks for S7 300 SIMATIC NET block libraries for S7 300 in STEP 7 must not be called in more than one priority class If for example you call a communication block in OB1 and in OB35 block execution could be inter rupted by the higher priority OB If you call blocks in more than one OB you must write your program so that a communication block that is currently executing cannot be interrupted by another communication block for example by disabling enabling SFC interrupts Parameters for CP and Connection Assignment input parameters When you call an FC you transfer the module start address of the Ethernet CP in the CPLADDR or LADDR parameter The module start address of the Ethernet CP can be found in the properties dialog of the CP in the Address Input tab can be selected in the SIMATIC Manager or in HW Config With connection oriented jobs you must also reference the connection to be used by its connection ID You will find this in the properties dialog of the connection under Block parameters refer to the information in NetPro SIMATIC NET NOM S7 for Industrial Ethernet C79000 G8976 C129 06 145 Programming FCs Functions and FBs for S7 Ethernet CPs Setting Block Parameters Automatically To ensure correct parameter settings for the block calls The LAD STL FBD ed
131. munication with the SIMATIC S7 PLC from a PC address the required CPU module in the SIMATIC S7 PLC that you want to communicate with in your PC application S7 communication via routers one ended client and server functionality It is possible to reach the S7 station from an application OPC server of the PC PG station that is attached to another subnet The subnets must be connected over a router such as the IE PB Link An S7 station or a PC connected to both subnets can also serve as a router In this configuration the S7 station can only be addressed by the PC PG station as a communications server on S7 connections configured at one end The requirements for the configuration of the PC PG station are identical to those for operation in the same subnet see above the CP in the PC PG station must also have routing capability In this situation configure a one ended S7 connection to the PC PG station in the other subnet for the PC PG station in STEP 7 NetPro You can then access data in the S7 station in your user program using the functions PUT writing and GET reading SIMATIC NET NCM S7 for Industrial Ethernet 26 C79000 G8976 C129 06 Communication via Ethernet CPs in S7 Stations 1 5 5 compatible Communication SEND RECEIVE Interface Application Using the SEND RECEIVE interface your S7 user program has access to 5 compatible communication with configured transport connections Data transmission on a confi
132. n TCP TCP IP e PROFInet communication with the protocols TCP IP e HTML process control with with the protocols web browser HTTP IP protocol e File management and file with the protocols access with FTP FTP IP protocol e PG OP communication PG OP communication is used to download programs and configuration data to run tests and diagnostic functions and to control and monitor a plant from OPs SIMATIC NET NOM S7 for Industrial Ethernet C79000 G8976 C129 06 15 Communication via Ethernet CPs in S7 Stations 16 S7 communication S7 communication forms a simple and efficient interface between SIMATIC S7 stations and PGs PCs using communication function blocks S5 compatible communication with SEND RECEIVE interface Depending on the CP type the SEND RECEIVE interface allows program controlled communication on a configured connection from a SIMATIC S7 PLC to another SIMATIC S7 PLC to a SIMATIC S5 PLC to PCs PGs and to any other station Depending on the CP type the following communications services are available on the SEND RECEIVE interface ISO Transport optimized for top performance at the self contained manufacturing level TCP IP for internetwork communication with ISO on TCP connections RFC 1006 TCP connections and UDP datagram service including broadcast multicast Sending E mail The controller is capable of sending messages triggered by process events refer to the IT CP manual
133. nces between the various block versions Please take note of the version identifiers of the blocks you are using The SIMATIC Manager block libraries installed with STEP 7 NCM S7 contain the block versions that were current at the time of the STEP 7 release Note We recommend that you always use the latest block versions for all module types You will find information on the current block versions and the current blocks to download from the Internet in our customer support http www4 ad siemens de view cs de 8797900 Entry ID 8797900 With the older module types this recommendation assumes that you are using the latest firmware for the particular block type Notice At various points in this chapter you will find information on the different CP versions These passages are highlighted with the following symbol f Newer CP types are CPs module types with the following versions or higher CP 343 1 6GK 7343 1EX11 OXE0 version 1 or higher firmware version V2 0 or higher CP 343 1PN 6GK 7343 1HX00 0XE0 version 1 or higher firmware version V1 0 or higher CP 343 1 IT 6GK 7343 1GX11 0XE0 version 1 or higher firmware version V2 0 or higher FCs and Module Replacement Spares Module replacement in this sense means the replacement of a module with another module that may be a more recent version SIMATIC NET NCM S7 for Industrial Ethernet C79000 G8976 C129 06 143 Programming FCs Functions and FBs
134. nication Connections Addresses Tab Unspecified UDP Connection An unspecified UDP connection can be used in two ways e Free UDP Connection To configure a free UDP connection select the Address assignment in block check box The input boxes for the remote IP address and the remote port are then deactivated since the destination addresses are now specified by the user program e Connection to a remote station in a different project You can specify the remote IP address and the port for any destination station The destination station can be in the current STEP 7 project or in another project Please note Since no connection is actually established with UDP datagram service communication on the configured UDP connection is only possible when the partner addresses IP address and port are specified Properties UDP Connection Figure 4 25 Layout of the Properties Dialog in the Addresses Tab for the Free UDP Connection Mode SIMATIC NET NCM S7 for Industrial Ethernet C79000 G8976 C129 06 133 Configuring Communication Connections 4 7 3 UDP with Broadcast and Multicast Application When you select the connection partner you have the following two extra options on UDP connections e Connection to all Broadcast Nodes If you select the all broadcast nodes you specify that UDP frames are sent to all obtainable broadcast nodes Notice When using broadcast you can only send
135. ns The Ethernet CP for SIMATIC S7 provides a series of communications services for different tasks This chapter explains the following e The types of communication possible with the Ethernet CP on Industrial Ethernet e The tasks handled by the Ethernet CP for the various services e How to create the conditions for your communications requirements You will find further information in the following sources e When installing the Ethernet CP please refer to the instructions in the manual 1 supplied with the Ethernet CP This also contains further information about the performance of the Ethernet CP e For the functions and use of the STEP 7 configuration software some of which is used to configure the CP such as hardware configuration please refer to 6 and 8 e For using structuring and handling Industrial Ethernet you will find detailed information in 11 e For a general introduction to local area networks with TCP IP refer to 16 and 17 SIMATIC NET NOM S7 for Industrial Ethernet C79000 G8976 C129 06 13 Communication via Ethernet CPs in S7 Stations 1 1 Industrial Ethernet Definition Within the open heterogeneous SIMATIC NET communication system Industrial Ethernet is the network for the management and cell level Physically Industrial Ethernet is an electrical network that uses a shielded coaxial cable or twisted pair or an optical network with fiber optic cables Industrial Ethernet is
136. ns com GMT 5 00 Asia Australia Beijing Technical Support and Authorization Local time Mon Fri 8 30 to 17 30 Phone 86 10 64 75 75 75 Fax 86 10 64 74 74 74 E Mail adsupport asia siemens com GMT 8 00 The languages of the SIMATIC Hotlines and the authorization hotline are generally German and English A amp D Technical Support A amp D Technical Support Service amp Support on the Internet In addition to our documentation we offer our Know how online on the internet at http www siemens com automation service amp support where you will find the following e The newsletter which constantly provides you with up to date information on your products e The right documents via our Search function in Service amp Support e A forum where users and experts from all over the world exchange their experiences e Your local representative for Automation amp Drives via our representatives database e Information on field service repairs spare parts and more under Services A amp D Technical Support
137. nsfer the amounts of data shown in the table below per job on one connection Table 3 1 ISO Transport ISO on TCP TCP UDP Sending 8192 bytes 8192 bytes 8192 bytes 2048 bytes Receiving 8192 bytes 8192 bytes 8192 bytes 2048 bytes SIMATIC NET NCM S7 for Industrial Ethernet C79000 G8976 C129 06 SEND RECEIVE Interface in the User Program 3 2 Programming the SEND RECEIVE Interface Principle of Job and Data Transfer The user program triggers the transfer of the user data areas with FC calls and monitors the transfer by evaluating the return codes of the FCs The following parameters are transferred when the FCs are called e The number of the connection ID e The location of the user data area in the CPU For detailed information about the call interface see Chapter 5 Purpose of the FCs Calling the function blocks has the following effects e The user data area is transferred to the Ethernet CP or received from the Ethernet CP e The execution of the job is confirmed positively or negatively in a status message Programming Connections Program the SEND RECEIVE interface in the user program as follows 1 Use the following functions FCs for data transmission on connections AG_SEND AG_LSEND for transferring the user data area to the Ethernet CP AG_RECV AG_LRECV for entering data received from the Ethernet CP in the user data area 2 Evaluate the following bits in the FCs for AG_S
138. nterface Devices via Industrial EINGinel oase deas Ank Genero REDEE ied tie wie NAREN es 1 4 S7 Communication on Industrial Ethernet 00002 000ee 1 5 5 compatible Communication SEND RECEIVE Interface 1 6 FETCH WRITE Services Server 00 0 cece eee eens 1 7 Networking Stations with STEP 7 ccc eee eee eee eee 13 14 15 33 1 7 1 Network Project Variant One Subnet One Project 1 7 2 Network Project Variant SIMATIC S5 and Non SIMATIC Devices on the Subnet esos eera dia hunier Er uea EEE ER E E RES 1 7 3 Network Project Variant Two or More Subnets One Project 1 7 4 Network Project Variant One Subnet More Than One Sub Project 1 7 5 Network Project Variant Several Subnets in Several Sub Projects 1 7 6 Network Project Variant Connections between Subnets TCP IP 2 Installing and Starting the Ethernet CP with STEP 7 0 00 2 1 General Information About the NCM S7 for Industrial Ethernet Option 2 2 PROCCOUIG ease aided denis an seme e nate paoee am E eee ate 2 2 1 Creating an Industrial Ethernet Subnet 000 eee eeee 2 2 2 Entering an Ethernet CP in the Hardware Configuration 2 2 3 Displaying the Network Attachments of a Station 2 2 4 Setting Further CP Properties 0 0 00 cece eee eee eee 2 2 5 Substitute Objects in the STEP 7 Project
139. o possible to create specified connections between these stations in different independent projects The stations can then communicate immediately over the created connections after the configuration data have been downloaded Use this variant when you want to operate projects separately due to the complexity SIMATIC NET NCM S7 for Industrial Ethernet C79000 G8976 C129 06 37 Communication via Ethernet CPs in S7 Stations Stations of the type SIMATIC S5 function in just the same way as representative objects Merging projects in the multiproject If you have used the multiproject functions allowing you to use connections to a partner in an unknown project STEP 7 will automatically attempt to synchronize two separately configured connections If you have configured projects with representative objects and want to merge these projects into a multiproject you have the following options e You can leave the representative objects with the configured connections unchanged e You can reassign the connection partner and then delete the representative objects SIMATIC NET NCM S7 for Industrial Ethernet 38 C79000 G8976 C129 06 Communication via Ethernet CPs in S7 Stations 1 7 5 Network Project Variant Several Subnets in Several Sub Projects Configuration of the System If several network types need to be used and if these need to be managed in different projects due to the different tasks of the stations or due to the l
140. oject specific address information How to do this is described in Section 2 3 SIMATIC NET NCM S7 for Industrial Ethernet C79000 G8976 C129 06 51 Installing and Starting the Ethernet CP with STEP 7 2 2 3 Displaying the Network Attachments of a Station Procedure You can easily get an overview of the network attachment configurations of a SIMATIC station in one of the following ways e A graphic overview in NetPro e An overview in table form in the Properties dialog of the station Graphic Overview in NetPro The NetPro view provides you with a good overview of the networked stations Follow the steps below 1 Double click one of the network objects for example Ethernet in your project in the SIMATIC Manager Ra NETPRO Configuring Networks Network To Project D siemens S TEP7 402 E xamples EXIE Be Network Edit Insert PLC View Options Window Help Slalo e Ae DLA x Ethernet 1 Industrial Ethernet MPI Netz 1 MPI SIMATIC 400 Station 1 SIMATIC 400 Station 2 SIMATIC 400 Station 3 emate ssi Eg CPUlCP Ey CPU CP E TP 414 443 414 44 443 T o lo ole m r 2 2 2 Figure 2 3 NetPro View of a Subnet of the Type Industrial Ethernet SIMATIC NET NCM S7 for Industrial Ethernet 52 C79000 G8976 C129 06 Installing and Starting the Ethernet CP with STEP 7 Overview in Table Form The table view in the Properties dialog of the station provides a detailed overview of the com
141. on Ethernet with Ethernet CP node User data area unspecified Job buffer send T gt receive UDP connection Job header receive lt L lt send User data Figure 4 28 Sending and Receiving on an Unspecified UDP Connection with Programmed Addressing Amounts of Data Refer to the manual 1 supplied with the Ethernet CP for the number of UDP connections supported by the Ethernet CP The number of connections per station can be increased by adding more CPs Up to 2042 bytes of user data can be transferred per job buffer The job header uses an additional 6 bytes SIMATIC NET NOM S7 for Industrial Ethernet C79000 G8976 C129 06 139 Configuring Communication Connections 4 8 Routing to Distribute Load Routing to Distribute Load If more than one CP of the same type exists in a station and is connected to the same subnet the route can be selected Click the Route button in the General tab to display the route dialog Local Partner SIMATIC 400 Station 1 CPU414 1 1 SIMATIC 400 Station 2 CPU414 1 1 Via CP CP 443 1 RO S4 CP 443 1 RO S4 bd CP 443 1 R0754 CP 443 1 RO S7 Interface Type Industrial Ethernet Node Address 08 00 06 01 00 00 08 00 06 01 00 01 Subnet Ethernet 1 Cancel Help If you have configured a load distribution on two or more Ethernet CPs at the local or remote end you can assign the connection to the required route via
142. on station Local TSAP on Ethernet CP remote TSAP in destination station SIMATIC NET NCM S7 for Industrial Ethernet 102 C79000 G8976 C129 06 Configuring Communication Connections Addresses Tab The addresses tab displays proposed values for the relevant local and remote address information When connecting to non S7 stations you can set the TSAP addresses individually Properties 1SO Transport Connection 49 53 4F 2D 31 49 53 4F 2D 31 Figure 4 8 Layout of the Addresses Tab of the Properties Dialog with Default TSAPs TSAP Format ISO transport connections have a TSAP length of 1 to 16 bytes When you are entering values the current length is displayed automatically visible display 20 ASCII characters Local and remote TSAPs can be input as hexadecimal values or as ASCII strings If you make your entries in ASCII the characters you enter are also displayed in hexadecimal format If you make your entries in hexadecimal printable characters are displayed in ASCII 8 hexadecimal values are visible If you enter nonprintable characters the ASCII display is gray no further ASCII entries possible and the nonprintable characters are displayed as periods Local and Remote TSAPs Remote and local TSAPs can be identical since the connection is uniquely identified by the different MAC addresses If you require more than one connection between two stations the TSAPs must also be different
143. on the same network is permitted to pass on the time synchronization messages Note The time of day synchronization function does not exist for all module types Data transfer gt 240 bytes With this option you specify whether or not the CP will support jobs with a data length of more than 240 bytes for S7 300 stations Notes e The transfer of more than 240 bytes of data is supported by newer version CPs Please note the information in the product information bulletin manual of the Ethernet CP f Please note the information in Section 5 1 on the newer CP types e Remember that with this configuration on an S7 300 one connection resource free connection for S7 functions of the S7 300 CPU is used CPU connection resources are also used for example by S7 300 CPs in the FMS mode or by PGs and OPs For more detailed information about the maximum connection resources refer to 13 and 7 SIMATIC NET NCM S7 for Industrial Ethernet C79000 G8976 C129 06 55 Installing and Starting the Ethernet CP with STEP 7 Table 2 1 Settings in the Options Tab continued Option Replace Module without PG Meaning Effect With this option you can have the configuration data of the CP stored on the CPU If you then replace CP the configuration data for the new CP are downloaded automatically from the CPU when the CP is started up If you select this option the configuration data are sto
144. onfiguring Communication Connections 4 6 2 Specifying TCP Addresses Address Parameters and Connection Types With TCP the communication partners are addressed by the local and remote endpoints as follows e Local addresses Local IP address and local port e Remote addresses Remote IP address and remote port m Ethernet station A Ethernet station B 7 remote a C gt Cae connection remote se ae MAC IP eae Figure 4 18 Sending and Receiving on One TCP Connection Depending on the required connection type the remote address parameters are either specified or left open during configuration e Specified TCP connection You specified a destination station when you created the connection e Unspecified TCP connection You entered unspecified for the connection partner when you created the connection SIMATIC NET NCM S7 for Industrial Ethernet 122 C79000 G8976 C129 06 Configuring Communication Connections Addresses Tab Specified TCP Connection The addresses tab displays proposed values for the relevant local and remote address information You can change the port settings individually Properties TCP Connection Options Overview Status infomation Figure 4 19 Layout of the Properties Dialog in the Addresses tab with DEFAULT Ports for TCP Connections Ports The ports or port addresses define the access point to the user program within the station CPU They m
145. onnections also available with the right mouse button Result The following dialog appears on the screen SIMATIC NET NCM S7 for Industrial Ethernet C79000 G8976 C129 06 Configuring Communication Connections Insert New Connection 1 5 In the current project E E PROJECT ETHERNET SIMATIC 400 Station 2 SIMATIC 400 Station 3 SIMATIC S5 1 Unspecified All broadcast stations All multicast stations In unknown project SIMATIC NET NCM S7 for Industrial Ethernet C79000 G8976 C129 06 91 Configuring Communication Connections Figure 4 4 92 Insert New Connection E w In the current project amp PROJECT ETHERNET All broadcast stations i All multicast stations D In unknown project Layout of the New Connection Dialog Example of an ISO Transport Connection 3 Select the partner station to which you want to establish a connection if several CPUs exist please select the required CPU 4 Select the connection type you want to use for example ISO transport connection in the Type box When you confirm your input with Apply the new connection is created and the New Connection dialog box remains open This allows you to create further connections without needing to reopen the dialog box At the same time the connection list is updated When you click OK the connection is entered in the list the dialog is terminated and the display in the m
146. ons You must specify the TSAP Transport Service Access Point for the destination station Notice Connections to non S7 stations for example SIMATIC S5 are generated as incompletely specified connections in other words the remote TSAP or port is empty These connections must be specified in the Properties dialog 4 3 2 Connections to Partners in Other Projects There are various ways of creating connections to partners configured in other STEP 7 projects or with other tools outside the current STEP 7 project e Connections using substitute objects such as SIMATIC S5 PC PG SIMATIC PC Station or Other Station This method is described in the section above e Unspecified connections e STEP 7 object Partner in other project multiproject With this method a connection is reserved in both subprojects that can be synchronized later by the system when the partner project is included in the multiproject SIMATIC NET NCM S7 for Industrial Ethernet C79000 G8976 C129 06 93 Configuring Communication Connections In both projects the same connection name must be configured in the properties of the connection The connection name is used as a textual reference when the projects are merged Based on the connection name it is possible to assign the connection partner and synchronize the connection properties Before the projects are merged such connections are unspecified connections in terms
147. open system interconnection The purpose of the transport layer is to transfer data reliably S from device to device Transport connections can be used for the transmission Transport interface The transport interface of a SIMATIC S5 PLC is the access to the connection oriented services of the transport layer on the CP The transport interface pre sents itself to the control program in the form of handling blocks HDBs TSAP Transport Service Access Point Watchdog Mechanism for monitoring operability SIMATIC NET NOM S7 for Industrial Ethernet C79000 G8976 C129 06 205 Glossary B 2 Industrial Ethernet Base address Logical address of a module in S7 systems e For PROFIBUS The PROFIBUS base address is the address starting at which all addresses that are calculated automatically in the project are assigned e For Industrial Ethernet The base MAC address is the address starting at which all addresses that are calculated automatically in the project are assigned Ind Ethernet station A station is identified by a gt MAC address in gt Industrial Ethernet ISO on TCP Transport layer connection layer 4 communication complying with ISO simulated on TCP On an ISO on TCP connection messages can be exchanged in both directions TCP provides the data flow communication without segmenting the data into messages ISO on the other hand is message oriented With ISO on TCP this mechanism is simulated on
148. or every CP and download to the Ethernet CPs Ethernet CP SIMATIC NET NCM S7 for Industrial Ethernet C79000 G8976 C129 06 Communication via Ethernet CPs in S7 Stations 1 3 1 PG Communication with STEP 7 over Industrial Ethernet Requirements for PG Communication PG communication is possible when the following requirements are met e An Ethernet CP is installed in the PG or engineering station or there is a modem ISDN interface for remote access e The Ethernet CP must have an address default MAC address or set the IP address Networking the PG Engineering Station Depending on the configuration of the PG or Engineering Station the following two situations are possible when using PG communication e PG Engineering Station in the Configured Mode If you select this configuration when you commission the PG engineering station the interfaces of the communication modules you are using are already known The option in Set PG PC Interface is automatically set to PC internal Once you have downloaded this configuration to your PG engineering station you can exchange PG functions with the accessible nodes in the network with STEP 7 without requiring any further settings e PG Engineering Station in PG Operation If your PG or engineering station is configured for this mode you must specify the interface on the PG or engineering station explicitly with Set PG PC Interface Follow the steps outlined
149. pecify the S7 subnet ID of the destination network The subnet ID consists of two numbers separated by a dash One number for the project One number for the subnet You will find the subnet ID in the object properties of the subnet in the STEP 7 project The subnet ID is also printed out with the network configuration Starting Diagnostics from the Properties Dialog of the CP If the project data are available on your PG PC follow the steps outlined below 1 Select the S7 station in the project and open the hardware configuration HW Config 2 Select the CP and open the Properties dialog 3 Select the Diagnostics dialog 4 Select the Run button Result NCM S7 Diagnostics is opened The path is set automatically to match the current connection in STEP 7 SIMATIC NET NOM S7 for Industrial Ethernet C79000 G8976 C 129 06 183 NCM S7 Diagnostics Other Startup Options In the Properties dialog of the connections 1 Select the PLC gt Activate Connection Status menu command to activate online access 2 Select the Special Diagnostics button in the Status Information tab In the hardware configuration tool HW Config 1 With the S7 station online select the PLC gt Module Status menu command 2 Select the Special Diagnostics button in the dialog that is opened Note To operate several diagnostic connections at the same time you can start NCM S7 Diagnostics mor
150. ponents used for network attachment Follow the steps below 1 Using the SIMATIC Manager select the station in your project that you want to check 2 Select the Object Properties using the menu option Edit gt Object Properties or by double clicking the station symbol 3 Select the Interfaces tab Result Properties SIMATIC 400 Station MPI 2 Ind Ethernet 140 80 0 4 Ethernet 1 Ind Ethernet 140 80 0 2 Ethernet 1 MPI 2 Ind Ethernet 08 00 06 0 Ethernet 1 Figure 2 4 Interface Tab in the SIMATIC 300 400 Properties Dialog Box CPU 416 1 CP 443 1 1 CP 443 1 CPU 416 1 1 CP 443 1 BGR 1 BES 416 1 J01 O480 BGK 443 1EX10 0XE0 BGK 443 1EX02 0KE0 BES 416 1 J01 04B0 BGK 443 1BXO00 0XE0 In the displayed dialog you can see the subnet attachments that were configured for the SIMATIC station SIMATIC NET NCM S7 for Industrial Ethernet C79000 G8976 C129 06 53 Installing and Starting the Ethernet CP with STEP 7 2 2 4 Setting Further CP Properties Overview In addition to the network attachment you can also make further settings for the specific module or you can call functions 1 Select the Ethernet CP in the hardware configuration 2 Select Edit gt Object Properties In the dialog you will see further tabs in addition to the General tab described in Section 2 2 2 depending on the type and CP some of which are shown in the example of a CP 443 1 P
151. port Remote port 8 characters default width Status Indicates the current configuration of the connection Connections without assignment are indicated by No local CP No remote CP in the status column and a character at the end of the Local ID for example 0002 A000 Connections you are currently editing are also indicated by at the end of the local ID You can set the column widths in the Overview tab individually Connection Overview with Multiple CPUs in an S7 Station If you operate more than one CPU in your S7 station you can click the button to extend the overview to the connections on all CPUs SIMATIC NET NCM S7 for Industrial Ethernet 138 C79000 G8976 C129 06 Configuring Communication Connections 4 7 5 Free UDP Connection Program Controlled Addressing A free UDP connection allows program controlled addressing of the communication partner Communication between two nodes on Industrial Ethernet has the following properties e Data transfer is bi directional in other words it is possible to send and receive on the UDP connection at the same time e The local node is specified in the configuration The remote node is entered in the job header of the job buffer by the user program when it calls AG_SEND This allows any node on Ethernet LAN WAN to be reached e The IP address and the port of the sender can be read from the job header of AG_RECV SIMATIC S7 stati
152. ption of each FC includes the following sections that may be extended by specific information e Meaning e Call Interface e How the Block Works e Explanation of the Formal Parameters e Condition Codes This chapter provides you with information over and above the general information available in the online help for the FCs when programming in STEP 7 v You will find further information in the following sources e The communication FBs BSEND BRCV PUT GET USEND URCV C_CNTRL for programming S7 communication are described in the STEP 7 Documentation 9 Sample configurations and programs are available for the SEND RECEIVE interface described here e Inthe sample project PROJECT_ETHERNET that you can start immediately after installing NCM S7 for a description refer to the Primer 3 e On the Internet as downloadable sample projects refer to the information in Appendix C Support and Training The Quick Start CD that can be ordered separately is a treasure trove of sample programs and configurations ner ald i Goomerczis You can order this directly on the Internet at bp E http www ad siemens de csi net SIMATIC NET NCM S7 for Industrial Ethernet C79000 G8976 C129 06 141 Programming FCs Functions and FBs for S7 Ethernet CPs 5 1 General Notes on FCs FBs Block Library The functions FCs and function blocks FBs described here are supplied with the STEP 7 basic package unless indic
153. r Use the unspecified partner type when you create the connection SIMATIC NET NCM S7 for Industrial Ethernet C79000 G8976 C129 06 89 Configuring Communication Connections 4 3 1 Principle Creating a New Connection When you create new connections you start from entered and networked stations A connection is then configured starting from a station or CPU in the current S7 project and then selecting a destination station Due to the networking the node addresses MAC or IP addresses of the two stations are already decided The local remote TSAPs Transport Service Access Point or ports at both ends of the connection are automatically assigned default values If the partner station is a station outside the current project or a non S7 station the remote TSAPs Transport Service Access Point or ports must be specified in the Properties dialog of the connection The endpoint of the connection to a SIMATIC S7 station is always a CPU A separate connection table is created for each CPU and displays the connection partner and types of connections New Connection 90 To configure a new connection the stations and their CPs must be configured and networked in the S7 project To create a new connection follow the steps below In NetPro follow the steps below 1 In NetPro select the station or the CPU in the station from which you want to establish the connection 2 Select the menu command Insert gt New C
154. r this the module retains only the factory set MAC address as shipped View gt Update Each time you activate this menu command the displayed diagnostic and status information is updated once View gt Update Cyclically Using this menu command you activate and deactivate the automatic cyclic off updating of the displayed diagnostic and status information You can set the interval between update points with the menu command Options gt Customize 180 SIMATIC NET NCM S7 for Industrial Ethernet C79000 G8976 C129 06 NCM S7 Diagnostics Table 6 1 Meaning of the Menu Commands Menu Meaning Options gt Customize With this menu command you set the general parameters for the diagnostic session On Ethernet e Dialog update time This sets the interval at which the diagnostic data are updated in a contents area when cyclic updating is selected e Show TSAP in ASCII You can decide whether the TSAP is shown in ASCII or hexadecimal in the following tab page dialogs Help gt You can obtain help about the current diagnostic function As an alternative you can also press the F1 key Remember that you can also call up context related help for some of the diagnostic functions To obtain help position the cursor on the output field and press the F1 key Note If the connection to the CP is terminated during the diagnostic session the following message is displayed The online connect
155. rates three connections SIMATIC NET NOM S7 for Industrial Ethernet 76 C79000 G8976 C129 06 SEND RECEIVE Interface in the User Program e At various points event and program controlled the user program sends data on aconnection using the AG_SEND call e At various points in the CPU cycle the user program accepts the data received on the connection using an AG_RECV call Note The blocks can also be called more than once in a cycle for the same communication connection SIMATIC NET NCM S7 for Industrial Ethernet C79000 G8976 C129 06 77 SEND RECEIVE Interface in the User Program 3 3 Data Exchange S7 CPU lt gt Ethernet CP The Ethernet CP processes the send and receive jobs independent of the CPU cycle and requires one transmission time The interface to the user program with the FCs is synchronized by an acknowledgment Two situations must be distinguished e The CPU cycle is faster than the transmission time e The CPU cycle is slower than the transmission time Note Please refer to the sequence charts for the FCs in Chapter 5 These charts show how to handle the SEND RECEIVE interface in the user program for problem free data exchange Remember the points below about the CPU cycle and transmission time FC Calls Faster than the Transmission Time If a block is called again in the user program before data were transferred or received the procedure is as follows on the interface of the FC
156. rdware configuration and networked it 1 Assign the CP in the connection properties dialog in the Addresses tab or Reassign the connection using the menu option Edit gt Connection Partner Adapt the connection ID in the user program Download the connection configuration to the CP again Deleting the SIMATIC S7 station All the connections to this station are deleted within the project Reconfigure the station and connections SIMATIC NET NOM S7 for Industrial Ethernet C79000 G8976 C129 06 97 Configuring Communication Connections Table 4 3 Actions That Can Cause Changes to Configured Connections continued Action Consequences for the How to Establish the Connection Connections Again Deleting a remote station The connections of the stations Reassign a remote station or evena in the project to remote stations local station using the menu option Edit remain without assignment in gt Connection Pariner the connection table In the Overview tab of the Properties dialog the connections are identified with P Changing the subnet The connections that were Reassign the connections using the assignment of the CP assigned via the CP remain menu option Edit gt Connection without an assignment in the connection table In the Overview tab of the Properties dialog the connections are identified with Partner or in the Addresses
157. red long term on the CPU instead of in the EEPROM of the CP Remember however that long term storage on the CPU is only safe from power outages if the CPU is protected by battery backup or by using an S7 Memory Card Note If you store the configuration data on the CPU please read the note below The following functions do not modify the configuration data on the CPU e Resetting module memory e Resetting to factory settings e Assigning an IP address using the target system selection in the SIMATIC Manager or the properties dialog in HW Config or NetPro If you subsequently upload the configuration data from the CPU to a PG you will always object the configuration data that were previously on the CP with parameters connections IP address 1 Note You should only use the assign IP address function during commissioning in other words before downloading the configuration data Ethernet Profile for Fault Tolerant Connections Select this profile if you use fault tolerant communication in your system Fault tolerant communication means that Industrial Ethernet is designed with redundancy and that you have configured fault tolerant S7 connections If you select the Ethernet profile for fault tolerant connections here the time response of the S7 connections is adapted As a result breakdowns of a connection are detected more quickly and the failover to redundant connections is faster Note Select t
158. rial Ethernet C79000 G8976 C129 06 119 Configuring Communication Connections 4 6 1 Specifying the Local Connection Endpoint General Tab This tab of the Properties dialog displays general connection parameters that identify the local connection endpoint Properties TCP Connection 0004 4021 TCP Verbindung 5 Figure 4 17 Layout of the General Tab in the Properties Dialog for TCP Connections SIMATIC NET NCM S7 for Industrial Ethernet 120 C79000 G8976 C 129 06 Configuring Communication Connections A Local Endpoint The entry is identical to the Local ID parameter in the Selectable connection list Name loc endpoint When you create the connection a name is proposed here Modifiable along with a connection number as suffix With unspecified connections use this box to identify the partner If the station contains more than one CP of the same type Display only connected to the same subnet you can select the connection route gt Route see Section 4 8 If no CP is assigned for example because the CP has been deleted none is displayed here Active Connection With this option you specify whether the connection is Modifiable Establishment established by this S7 station This is the default setting when the address of the partner is specified If you selected partner unspecified when you created the connection the option is deselected as default If you activate the
159. rk at the same time on a multiproject in a networked environment The projects of the multiproject are in different network folders In this case all connection partners are available for configuring connections e One employee manages the multiproject centrally This person creates the structures for projects when necessary locally and contracts individual projects out for external editing The central configuration engineer then returns these projects to the multiproject and synchronizes the interproject data with system support and where necessary executes the required interproject functions In this case agreement is necessary for example regarding the assignment of connection names because it will be far easier when synchronizing the projects SIMATIC NET NCM S7 for Industrial Ethernet 36 C79000 G8976 C129 06 Communication via Ethernet CPs in S7 Stations HLP to bring connections with identical connection names together The topic of multiprojects is dealt with in detail in the STEP 7 basic help Here you will find information on the following topics Requirements for interproject functions How to create multiprojects How to create a new project in a multiproject How to separate a project from a multiproject How to include projects in the multiproject How to synchronize projects in a multiproject Moving stations within a multiproject when a station is moved from one project of a multiproject to another project of the
160. rk object Ethernet and confirm with Edit gt Open Object zNETPRO Configuring Networks Network To Project D siemens STEP7V402 E xamples EXIE SP Network Edit Insert PLC View Options window Help Sale He aol ol BLA e SIMATIC 400 Station 1 SIMATIC 400 Station 2 SIMATIC 400 Station 3 simatic ssa Eq He Eg TPU Eal Eq cP 13 i414 443 i414 443 443 E o lm o m m 2 2 2 Figure 2 2 Graphic Network Representation here showing stations not yet networked From this graphic representation you can also activate all the functions for networking and configuring connections with the Ethernet CPs You can also create the subnets in NetPro Open the catalog using the menu command Insert gt Network Objects Organization in a Multiproject If you use the multiproject form of organization this has the following effects when creating subnets You create subnets initially in the subprojects as described above To be able to network S7 stations you will for example need to create a suitable subnet of the type Industrial Ethernet in each subproject If this is physically a subnet that extends beyond the boundaries of the subproject you should first merge the subnets before configuring the communication connections between the S7 stations If you do not merge the subnets NetPro assumes that you are connecting the subnets via routers and displays warning messages to this effect Properties of
161. roperties CP 443 1 R0 S4 Addresses Options Timeot Day Synchronization Diagnostics Addressa Figure 2 5 Example of the General Tab of the Properties CP Dialog Box for the CP 443 1 TCP Addresses Tab The Addresses tab displays the address at which the module can be addressed by the user program You require this address when calling the FCs for transport connections gt see Chapter 5 Please read the description of the Properties dialog of the CP in the integrated help The functions are explained in detail there SIMATIC NET NCM S7 for Industrial Ethernet 54 C79000 G8976 C129 06 Installing and Starting the Ethernet CP with STEP 7 Notice Please note the following information on S7 300 stations If you selected the option Update OB1 process image cyclically in the CPU confi guration default make sure that the start address of the CP is outside the pro cess image area start addresses in the Addresses tab Example if the process image selected for the CPU 1024 0 1023 an address gt 1024 must be selected for the CP Options Tab Table 2 1 Depending on the CP type you can make the following settings Settings in the Options Tab Option Time of Day Synchronization Meaning Effect Here you decide whether the CP passes on time of day frames or not You require this function if you have several CPs in a station since only one CP
162. s 6 1 Overview Diagnostic Options in STEP 7 STEP 7 provides you with a graded concept allowing you to query information about the status of your SIMATIC S7 components and functions and to sort out problems in a variety of different situations These options cover the following e Hardware Diagnostics and Troubleshooting with STEP 7 Hardware diagnostics provides dynamic information on the operating mode of modules including CPs when the S7 station is online You can recognize the existence of diagnostic information for a module by the diagnostics icon in the project window of the SIMATIC Manager Diagnostic icons show the status of the corresponding module and also the operating mode of CPUs Detailed diagnostic information is displayed in the module information that you can open by double clicking a diagnostic icon in the quick view or the diagnostic view Communication Diagnostics with NCM S7 Diagnostics The NCM S7 Diagnostics described here provides dynamic information on the operating state of the communication functions of online CPs or modules HW Config Provides Static Information Static information means the configured communication properties of an online or offline CP and you can display this at any time using the hardware configuration shown by HW Config What You Should Already Know You should be familiar with the basic information from Chapter 2 about handling NCM S7 This means that you know how
163. s e AG_SEND AG_LSEND No further job is accepted until the transmission of the data on the connection has been acknowledged by the Ethernet station During this time the user program receives the message job active until the Ethernet CP can accept the next job on the same connection e AG_RECV AG_LRECV The job is acknowledged with the message no data available yet if there are no received data on the Ethernet CP The user program receives this message in the CPU cycle until the Ethernet CP has received data again on the connection FC Calls Slower than the Transmission Time 78 If a block is called again before the data were completely transferred or received the procedure is as follows on the interface of the FC blocks e AG_SEND AG_LSEND The job is positively acknowledged The Ethernet CP is ready to receive a new send job at the earliest however with the next call e AG_RECV AG_LRECV The job is acknowledged with New Data Received when the data have been transferred to the user program Following this the FC call can be repeated SIMATIC NET NCM S7 for Industrial Ethernet C79000 G8976 C129 06 SEND RECEIVE Interface in the User Program Notice Remember that resource shortages can occur if the processing speeds on the sender and receiver are not the same sender faster than receiver The sender receives a message from the FCs if problems occur No resources on the destination station
164. s Configured Attaching Non S7 Stations to the Subnet The next step is to assign the substitute objects to the subnet as follows 1 Select the required object in the project and select Edit gt Object Properties 2 In the Properties dialog box that is displayed select the Interfaces tab and click the New button for example Other Station Result The New Interface Type Selection dialog box is displayed SIMATIC NET NCM S7 for Industrial Ethernet C79000 G8976 C129 06 61 Installing and Starting the Ethernet CP with STEP 7 Figure 2 7 62 New Interface Type Selection Selecting the Subnet Type for Other Station Example 3 Select a subnet Result The Properties Ethernet Interface dialog is displayed Here you can select the subnet connect the station to the network and set the address MAC IP All the SIMATIC stations in the project can establish communication relationships to this substitute object The addresses MAP IP configured for the substitute object here must also be set on the station using the appropriate tool for example COM 1430 SIMATIC NET NCM S7 for Industrial Ethernet C79000 G8976 C129 06 Installing and Starting the Ethernet CP with STEP 7 2 2 6 Configuring Communication Services Setting Up Connections You must set up connections for the connection oriented services supported by the Industrial Ethernet CP see also the Table in
165. s ISO on TCP Connection dialog appears Tabs The following tabs are available for ISO on TCP connections e General Displays the parameters of the connection and the local name of the ISO on TCP connection e Addresses Displays the local and remote address information e Options Here you can decide whether or not you want to use the connection for one of the access types FETCH or WRITE e Overview This is an overview of all the configured ISO on TCP connections of the selected S7 station with their parameters and the status of the connection e Status Information This tab displays the current status information for the connection valid at the time the dialog is opened This information corresponds to that displayed by NCM diagnostics SIMATIC NET NCM S7 for Industrial Ethernet 110 C79000 G8976 C129 06 Configuring Communication Connections 4 5 1 Specifying the Local Connection Endpoint General Tab This tab of the Properties dialog displays general connection parameters that identify the local connection endpoint Properties 1SO on TCP Connection 021 4 1SO on TCP Verb 3 Figure 4 12 Layout of the General Tab in the Properties Dialog for ISO on TCP Connections SIMATIC NET NCM S7 for Industrial Ethernet C79000 G8976 C129 06 111 Configuring Communication Connections Local Endpoint The entry is identical to the Local ID parameter in the Selectable connection list When you cre
166. s of the configurable connection type E mail refer to 5 e You will find information on the numbers of connections and amounts of data in Section 3 1 e For information on configuring connections refer to the online help of STEP 7 by selecting Help gt Contents HLP SIMATIC NET NCM S7 for Industrial Ethernet C79000 G8976 C129 06 83 Configuring Communication Connections 4 1 Procedure Steps The following steps are necessary to operate connections on the SIMATIC S7 PLC with the Ethernet CP Configuring Programming Create new If necessary Program the connections configure Other SEND RECEIVE interface in Station for the user program connections using the f appropriate tool Refer to Section 3 2 and the detailed FC description in Chapter 5 a Configure connection properties So es Ss Download connection configurations to the CP necessary steps ane ae optional steps Figure 4 1 Operating Connections with the Ethernet CP SIMATIC NET NCM S7 for Industrial Ethernet 84 C79000 G8976 C129 06 Configuring Communication Connections 4 2 Possible Connection Configurations Communication connections are possible between the communication partners shown in the diagram below The communication partners can be in the same project or distributed in the subprojects of a multiproject Connections to communication partners outside a project are configured usin
167. s the following address areas in the system memory on the SIMATIC S7 PLC using FETCH or WRITE e Data blocks DB When accessing DBs remember that the highest DB number is 255 e Bit memory M MB MW MD e Process image input table I IB IW ID e Process image output table Q QB QW QD e 1 O area inputs PIW PID PIB e 1 O area outputs PQW PQD PQB e Counters C e Timers T Links to Other Systems The FETCH and WRITE modes supported on ISO transport connections and ISO on TCP or TCP connections can be used with any other device to access the S7 system memory areas To be able to use this type of access for example for PC applications you need to know the PDU structure of the jobs The required S7 or S5 headers for request and response frames are 16 bytes long and their structure is described in the Appendix Messages in the Diagnostic Buffer As a result of FETCH WRITE access negative acknowledgments from the S7 CPU are possible This then leads to corresponding connection oriented entries in the diagnostic buffer that you can read out with NCM Diagnostics see Section 6 5 SIMATIC NET NOM S7 for Industrial Ethernet C79000 G8976 C129 06 117 Configuring Communication Connections 4 5 4 Checking ISO on TCP Connection Properties Overview Tab The overview shows all the configured ISO on TCP connections and their parameters cannot be modified here You can adjust the width of the columns in the table
168. s the system areas on a SIMATIC S7 PLC from a SIMATIC S5 station or other non S7 station Properties 1SO on TCP Connection Overview Status Information J Send Recy Figure 4 16 The connection can then only be used for this mode sending or receiving with the FCs AG_SEND AG_LSEND or AG_RECV AG_LRECYV is then no longer possible The connection establishment is passive in other words only the partner station SIMATIC S5 station or other non S7 station can establish the connection The setting is made automatically in the General tab and cannot be changed e FETCH If you select the FETCH mode you allow direct read access to system memory on the SIMATIC S7 PLC Such access can be for example from a SIMATIC S5 station or other station e WRITE If you select the WRITE mode you allow direct write access to system memory on the SIMATIC S7 PLC Such access can be for example from a SIMATIC S5 station or other station SIMATIC NET NCM S7 for Industrial Ethernet 116 C79000 G8976 C 129 06 Configuring Communication Connections Notice Remember that with this configuration on an S7 300 one connection resource free connection for S7 functions of the S7 300 CPU is used CPU connection resources are also used for example by S7 300 CPs in the FMS mode or by PGs and OPs For more detailed information about the maximum connection resources refer to 13 and 7 System Memory You can acces
169. s within the network SIMATIC NET NCM S7 for Industrial Ethernet C79000 G8976 C129 06 135 Configuring Communication Connections Addresses Tab Connection to all Broadcast Nodes If you select all broadcast nodes as the connection partner you specify that UDP frames are sent to all obtainable broadcast nodes In the Addresses tab a valid broadcast address in the network is proposed for the partner under the IP address IP You must enter a PORT address suitable for all partners you want to reach under PORT Properties UDP connection Options Overview Status information Figure 4 26 Layout of the Properties Dialog Addresses Tab for the Broadcast Mode SIMATIC NET NCM S7 for Industrial Ethernet 136 C79000 G8976 C129 06 Configuring Communication Connections Addresses Tab Connection to all Multicast Nodes By selecting all multicast nodes as the connection partner you specify that e sent UDP frames are delivered to all multicast nodes of the multicast group e the local device receives multicast frames in the specified multicast group In the Addresses tab a valid multicast address in the network is proposed for the partner under the IP address IP When using multicast the partner is always a group of receivers multicast group You must enter a PORT address suitable for all partners you want to reach under PORT Properties UDP connection E In the c
170. slot in the rack You select CPs in the hardware catalog using a short text and the order number Once you have installed NCM S7 the CPs are available in the catalog Result The CP is assigned to the SIMATIC station For information about the permitted slots refer to 1 How to configure a module is described in detail in 6 Subnet Attachment To allow you to activate the network attachment of the Ethernet CP the SIMATIC Manager displays the following dialog Properties Ethernet interface CP 443 1 R0754 08 00 06 01 00 00 140 80 0 1 not networked Ethernet 1 SIMATIC NET NCM S7 for Industrial Ethernet C79000 G8976 C129 06 49 Installing and Starting the Ethernet CP with STEP 7 Note You can open the dialog for setting the interface at any time from the Properties dialog of the CP in the General tab 1 If you have not yet created a subnet in the project or have not yet created the selected subnet you can now create a subnet To do this select the New button Result An object of the type network is created in the project 2 Check the addresses and if necessary change them The system enters the next free address automatically You will find detailed information on the address ranges in the online help Please note the following additional information MAC address The latest Ethernet CPs are supplied with a default MAC address address prin
171. t menu of Windows Diagnostics Help for functions FCs Readme file with current information about NCM Firmware loader Operation Operating and handling the software package is as explained in the STEP 7 user manual 6 SIMATIC NET NCM S7 for Industrial Ethernet 44 C79000 G8976 C129 06 Installing and Starting the Ethernet CP with STEP 7 2 2 Procedure A CP is managed in an S7 project just as the other modules You use STEP 7 to configure the hardware and create and manage the user software see 6 Configuring a CP involves the following basic steps the broken lines indicate options Create the Industrial Ethernet subnet see 2 2 1 Enter the Ethernet CP in the hardware configuration see 2 2 2 Y Attach the Ethernet CP to the Ethernet subnet see 2 2 2 y Program the SEND RECEIVE interface Chap 3 Configuring communication services Chap 4 S7 connections 6 ISO transport connections ISO on TCP connections TCP connections UDP Configuration data in the STEP 7 project Download the configuration to the PLC see 2 4 The steps are explained in detail in the sections shown Fields with broken lines are optional SIMATIC NET NOM S7 for Industrial Ethernet C79000 G8976 C129 06 45 Installing and Starting the Ethernet CP with STEP 7 2 2 1 Creating an Industrial Ethernet
172. t these default values If necessary for example with connections to non Simatic systems you can set the timers and counters individually and influence the dynamic response of the connection Properties ISO Transport Connection Figure 4 10 Layout of the Dynamics Tab of the Properties Dialog Attributes Description Access Connection Establishment Retransmission Time The retransmission time specifies the interval after which an unsuccessful connection establishment attempt can be triggered again 1 60 s default 5 s if connection establishment is active Modifiable if connection establishment is passive gt irrelevant Data Transfer Retransmission time This parameter specifies the interval after which an Modifiable unsuccessful transmission attempt can be triggered again 100 30000 ms default 1000 ms Max Count Max Count is the number of attempted transmissions Modifiable including the first 1 100 default 5 SIMATIC NET NCM S7 for Industrial Ethernet C79000 G8976 C129 06 105 Configuring Communication Connections Attributes Description Access Inactivity Time The inactivity time specifies the interval after which Modifiable the connection is terminated if no sign of life is received from the partner 6 180 s default 30 s Window Time The window time specifies the interval at which sign Display only of life frames are sent For SIMATI
173. ted on the module To be sure that you have a unique address assignment do not enter a MAC address in the configuration the option is deactivated This means that the module automatically uses the factory set address If you want to use ISO services we recommend that you enter the address printed on the module in the configuration Note The IP address and Subnet mask input fields have no significance for ISO transport option IP protocol being used 3 Select the required subnet type in the Subnet list box 4 You can display the properties dialog box for the selected subnet by clicking the Properties button 5 Enter information specific to the subnet node in the General tab 6 You must finally confirm your input with OK otherwise the networking is not entered refer to Point 3 Result The CP is now configured as a network node for the corresponding S7 station SIMATIC NET NCM S7 for Industrial Ethernet 50 C79000 G8976 C129 06 Installing and Starting the Ethernet CP with STEP 7 Setting Addresses in the Configuration and Addressing for the First Time The address settings described here are made on the CP only after you download the configuration data With the latest Ethernet CPs the situation is as follows To be able to reach the CP using these addresses before you download the configuration data you can address the CP using its default MAC address and then supply it with pr
174. tely after installing NCM S7 for a description refer to the Primer 2 e On the Internet as downloadable sample projects refer to the information in Appendix C Support and Training The Quick Start CD that can be ordered separately is a treasure trove of sample programs and configurations You can order this directly on the Internet at http www ad siemens de net html_00 online zugreifen htm SIMATIC NET NCM S7 for Industrial Ethernet C79000 G8976 C129 06 73 SEND RECEIVE Interface in the User Program 3 1 How the SEND RECEIVE Interface Works on the CPU Functions FCs Figure 3 1 The following functions FCs are available for handling communication on connections e AG_SEND AG_LSEND This block takes the user data from the specified user data area and transfers it to the Ethernet CP e AG_RECV AG_LRECV This block transfers received user data to the user data area specified in the call The diagram below illustrates the situation Using the FCs AG_SEND AG_LSEND and AG_RECV AG_LRECYV the user program instructs the Ethernet CP to send or receive data on the configured connection Ethernet station SIMATIC S7 SS CPU Ethernet CP CP STEP 7 database user program User data buffer User data areas send Communication connection al Interaction of the CPU and Ethernet CP on Connections Amounts of Data 74 The Ethernet CP can tra
175. the AG_LOCK Function AG_LOCK ID STATUS LADDR LOCKED Example in STL representation STL Explanation call fc 7 Block call ID DB 100 DBW 2 Connection ID acc to configuration LADDR Ww 16 0100 LADDR 256 dec in hardware configuration STATUS DB 100 DBW 4 Status code LOCKED DB 100 DBX 0 6 Status code of access disable Explanation of the Formal Parameters The following table explains all the formal parameters for the AG_LOCK function SIMATIC NET NOM S7 for Industrial Ethernet C79000 G8976 C129 06 169 Programming FCs Functions and FBs for S7 Ethernet CPs Parameter Declara Possible Remarks tion Values ID INPUT INT 1 2 16 for The connection number of the connection is 7 300 specified in the parameter ID see 1 2 64 for Configuration Section 4 3 1 S7 400 LADDR INPUT WORD Module base address When you configure the CP with STEP 7 hardware configuration the module base address is displayed in the configuration table Specify this address here LOCKED OUTPUT BOOL 0 not yet Shows the status of the access lock requested locked on the specified FETCH WRITE connection 1 locked STATUS OUTPUT WORD see following Status code table For meaning refer to the table below Condition Codes The following table shows the STATUS code that must be evaluated by the user program Table 5 4 AG LOCK Condition Codes STATUS Meaning 7000 CP is not processing a job 7001 FETCH active
176. the CP Parameter Description Via CP Local If more than one Ethernet CP exists in the station via which connections operated you can select route here The CPs are only displayed for selection if they are networked If no CP is assigned for example because the CP was deleted previously None is displayed here If there is only one CP plugged into the station no selection is possible Via CP Depending on the local selection the possible remote CPs are displayed All the CPs Partner connected to the same subnet networked and the local CP can be selected remote Alternatives are only available when a connection is established to a remote station configured in the same project and the remote station has two or more CPs If there is no CP assigned on the partner for example because the CP was deleted previously None is displayed here If there is only one CP in the remote station no selection is possible If the partner is an other station or SIMATIC S5 PLC one or more attachments are displayed for selection depending on the configuration and networking of the station SIMATIC NET NCM S7 for Industrial Ethernet 140 C79000 G8976 C129 06 Programming FCs Functions and FBs for 5 S7 Ethernet CPs Ready made blocks form the interface to some of the communications services available with the Ethernet CPs This chapter includes a detailed description of these blocks The descri
177. ther words it is possible to transmit and receive on the connection simultaneously Both stations have the same rights in other words each station can trigger the send and receive procedures in response to events The address of the communication partner is specified in the configuration The free UDP connection is the exception to this Here the address is specified at the FC interface in the user program SIMATIC S7 station Ethernet with Ethernet CP node send p see gt receive Communication connection receive lt i igi send Ethernet node send Cl C7 receive Communication onnection receive st lt send Sending and Receiving via one Communication Connection Note The term connection is also used here for UDP Reason during configuration just as in TCP the communication partners are assigned to each other and therefore logically connected In actual fact with UDP there is no explicit connection establishment between communication partners SIMATIC NET NOM S7 for Industrial Ethernet C79000 G8976 C129 06 87 Configuring Communication Connections Amounts of Data Refer to the manual 1 supplied with the Ethernet CP for the number of communication connections supported by the Ethernet CP The number of connections per station can be increased by adding more CPs The Ethernet CP can transfer the amounts of data shown in the table below per job on one
178. tion configuration dialog the following functions are available g Save To save the configured connection select the Save function or click the save button Print You can print the entire connection table or individual sections of it by selecting the Print function or clicking the print button The following print options are available e Overview of all connections complete connection table e Overview of the selected connections selected area e Detailed printout of all connections details of all connections e Detailed printout of the selected connections details of the selected area Change Connection Partners You assign a new partner station to the selected connection Important Remember that this also changes the partner ID on connections of the SEND RECEIVE interface You may need to adapt your user program Insert Connection S You create a new entry in the connection table R Download You download the connection table to the PLC For more detailed information call up the integrated help function Help If you require help or more information select the Help function or click the help button The help button provides you with context related help Using the help function you call a help dialog familiar from other Windows applications Print Function in the Overview Tab An additional function for printing the configured connections and configurat
179. tions Why Does an S7 CP Prevent Reception on Broadcast Connections It is often necessary for one station to send frames to a number of partner stations It is important that the frames are sent at the same time and arrive and practically the same time Sending and receiving broadcast frames is always required A broadcast message is received by all nodes in the network A typical application is the sending of broadcast frames to find a MAC address for an IP address ARP request For this reason a communications module must accept broadcast frames and evaluate them in its software The major disadvantage of this is that network performance sinks significantly if there are too many broadcast frames because each individual module needs to process all the broadcast frames to find out whether the frames were intended for it To avoid these disadvantages S7 CPs handle broadcast as follows e Following reception the broadcast frames are filtered out with high priority by all Ethernet CPs This means that frames that cannot be interpreted are discarded immediately Only frames that can be interpreted for example an ARP request are passed on over the LAN controller and evaluated This prevents a negative influence on the other connections by broadcast frames e For the application this means that the S7 CP cannot receive broadcast frames intended for the transfer of user data It is however possible for the module to send broadcast frame
180. tions partner fails and that the connection resources are released The setting made here applies to all TCP and ISO on TCP connections operated via the CP a connection oriented setting is not possible Possible values Default Setting 30 seconds Turn keepalives off 0 seconds Maximum value 65535 seconds Notes Recommendations Remember that the keepalive mechanism can keep underlying connections established for example an ISDN telephone connection although no user data are actually being transmitted If this is not required set the interval so high that the underlying connection is closed down when no further user data are sent before a keepalive is sent SIMATIC NET NCM S7 for Industrial Ethernet C79000 G8976 C129 06 57 Installing and Starting the Ethernet CP with STEP 7 Table 2 1 Settings in the Options Tab continued Option Meaning Effect Multiplex OP Connections To attach TD OPs or HMI devices you can optimize the connection Reserve Internal CPU resources on the S7 300 CPU by having up to 16 of these devices Connection Resources communication on a single CPU connection resource multiplex mode If you do not use this option the number of operable TD OPs or HMI devices depends on the number of available connection resources of the CPU you are using As default this option is deactivated This means that a CPU connection resource is used for multiplex only when necessary Configure
181. to connect the Ethernet CP to the PG and how to control the module using the PG Where to Find Further Information v 176 Further information is available from the following sources e Information about the communication services is available in the appropriate chapters in this manual e When you are working with the diagnostic tool the integrated help system provides you with context related support e You will find detailed information on working with STEP 7 programs in the Help on STEP 7 which includes the topic Diagnosing Hardware SIMATIC NET NCM S7 for Industrial Ethernet C79000 G8976 C129 06 NCM S7 Diagnostics 6 2 Functions of NCM S7 Diagnostics Functions The diagnostic functions can be grouped as follows e General diagnostic and statistical functions e Type and mode dependent diagnostic functions General diagnostic and statistical functions Regardless of the configured mode of the Ethernet CP the following diagnostic functions are possible e Querying the operating mode on Ethernet e Querying the event messages recorded on the Ethernet CP diagnostic buffer Mode Dependent Functions Depending on the configured mode of the Ethernet CP the following diagnostic functions are possible e Diagnostics of ISO transport connections e Diagnostics of ISO on TCP connections e Diagnostics of TCP connections e Diagnostics of UDP connections e Diagnostics of E mail connections e Diagnostics of
182. unction is possible only with the block library V5 0 SP3 or later SIMATIC NET NCM S7 for Industrial Ethernet 146 C79000 G8976 C129 06 Programming FCs Functions and FBs for S7 Ethernet CPs 5 2 2 Parameters for Specifying a CPU Data Area input parameters Specifying the Data Area on the CPU When you call an FC you transfer the address and length of the data area on the CPU in which the user data are available or will be stored or which can contain further parameter information The ANY pointer data type is used to address this area For more detailed information on this data type refer to the STEP 7 online help under the topic Format of the Parameter Type ANY You will also find a detailed description of the ANY point in 21 5 2 3 Status Information output parameters For status evaluation the following parameters must be evaluated in the user program DONE or NDR These parameters DONE with send jobs and NDR with receive jobs signal successful completion of the job ERROR This indicates that the job could not be executed error free STATUS This parameter supplies detailed information about the execution of the job Status codes can be returned during execution of the job DONE 0 and ERROR 0 Evaluating Status Codes Remember that the status codes DONE NDR ERROR STATUS are updated at each block call Status Codes during CP Startup With a complete restart or restart of the Ethernet CP after
183. unctions and FBs for S7 Ethernet CPs User program Ethernet CP Communications Partner CPU cycle Supply AG_SEND with data X ACT 1 AG SEND lt q _0 0 81811 Transfer Supply AG_SEND OE ACT 0 active on ne Ethernet a 0 0 81811 AG_SEND lt q 1 0 00001 Time Legend 1 parameter transfer DONE ERROR STATUS SIMATIC NET NOM S7 for Industrial Ethernet 154 C79000 G8976 C129 06 Programming FCs Functions and FBs for S7 Ethernet CPs Explanation of the Formal Parameters The following table explains all the formal parameters for the AG_SEND AG_LSEND functions Parameter Declara Possible Remarks tion Values ACT INPUT BOOL 0 1 If an FC is called with ACT 1 LEN bytes are sent from the ISO transport data area specified with the SEND parameter If an FC is called with ACT 0 the status codes DONE ERROR and STATUS are updated ID INPUT INT 1 2 64 The connection number of the connection is S7 400 specified in the parameter ID see 1 2 16 Configuration Section 4 3 1 S7 300 LADDR INPUT WORD Module base address When you configure the CP with STEP 7 hardware configuration the module base address is displayed in the configuration table Specify this address here SEND INPUT ANY Specifies the address and length The address of the data area refers to one of the following Process image area Bit memory
184. urrent STEP 7 project or in another project Use this method if you have not created a substitute object for the partner station for example SIMATIC S5 in the current project The following table lists the possible options Table 4 2 Meaning for Connection IP Address TSAP Port Possible Connection Establishment MAC Address Establishment by any partner empty empty passive by any partner via specific TSAP empty specified passive to or by a specific partner specified specified active passive 94 SIMATIC NET NCM S7 for Industrial Ethernet C79000 G8976 C129 06 Configuring Communication Connections The free UDP connection is another variant With this type of connection the address of the connection partner is left open during configuration The communication nodes are identified by address information in the communication job in the user program For further information refer to the sections dealing with specific connections Notice The number of connections possible per Ethernet CP can be found in the manual 1 supplied with the CP If several CPs are installed in one station the next CP is automatically selected if the limit is exceeded The connections can be routed in the Properties dialog of the connection SIMATIC NET NCM S7 for Industrial Ethernet C79000 G8976 C129 06 95 Configuring Communication Connections 4 3 3 Further Functions Toolbar In the toolbar of the connec
185. urrent project ep PROJECT ETHERNET H SIMATIC 400 Station 2 SIMATIC 400 Station 3 Figure 4 27 IP addresses from 224 0 0 0 to 239 255 255 255 can be used for IP multicast Since the IP addresses up to 224 0 0 255 are reserved for special purposes we recommend that you use IP addresses starting at 224 0 1 0 default for IP multicast SIMATIC NET NOM S7 for Industrial Ethernet C79000 G8976 C129 06 137 Configuring Communication Connections 4 7 4 Checking the Properties of a UDP Connection Overview Tab At the overview level all the configured UDP connections and their parameters in this station are displayed cannot be modified For an example of this display refer to Section 4 3 4 the ISO transport connection Parameter Description Local ID This is the connection ID of the UDP connection STEP 7 connection configuration DWORD Name loc endpoint Entered connection name This identifies the UDP connection 8 characters default length CPU Applications If you display all the ISO transport connections being operated in this station in the multiprocessor mode with PC stations multiple applications the CPU application that is the endpoint of the particular connection is specified here R S Rack slot of the local CP via which the connection is established Partner address Specifies the remote IP address of the connection Local port Local port 8 characters default length Remote
186. used by the station on which you create your configuration you can download the defined configuration data to the S7 station over the TCP IP interface or over the ISO interface of STEP 7 When you download over the IP interface the CP must already have been assigned an IP address refer to Chapter 2 3 When you download over the ISO interface you can use the preset MAC address However please note the following Note If you want to download the configuration data over the ISO interface to a CP with an unchanged factory set MAC address and you have configured a different MAC address in your STEP 7 project you must start the download in NetPro or HW Config this is the only way you will be prompted to enter the current MAC address The SIMATIC Manager on the other hand aborts the download if the target station cannot be reached SIMATIC NET NOM S7 for Industrial Ethernet C79000 G8976 C129 06 69 Installing and Starting the Ethernet CP with STEP 7 Procedure To download the configuration data to the S7 station follow the steps outlined below 1 Open the Set PG PC Interface dialog box in the Windows Control Panel 2 Set the PG PC interface according to the CPs available on your PG and according to the bus attachment interface parameter assignment used For more detailed information refer to the integrated help system 3 Change the CPU to the STOP mode regardless of the type of interface see
187. ust be unique within the station CPU The following table shows the range of values Table 4 4 Application Note Port Addresses Fixed must not be used 0 Assigned as default should not be used well known ports 1 to 1024 Range used by NCM in which a free port address is searched for and assigned You can set any port address within this range from 2000 to 5000 Port addresses higher than 5000 are used by the system Note If you want to use these port addresses please contact your system administrator from 5000 65535 SIMATIC NET NCM S7 for Industrial Ethernet C79000 G8976 C129 06 123 Configuring Communication Connections Addresses Tab Unspecified TCP Connection If you select the partner type as unspecified depending on your task you can enter address information about the communication partner here The options available to you are explained in detail in Section 4 3 1 The Addresses tab shown here illustrates the situation in which the remote port but not the IP address was specified If you make no further entries you are accepting connection establishment with any communication partner that uses the specified port Properties TCP Connection Options Overview Status Infomation Figure 4 20 SIMATIC NET NOM S7 for Industrial Ethernet 124 C79000 G8976 C 129 06 Configuring Communication Connections 4 6 3 TCP with the FETCH WRITE Mode
188. w the Block Works The following diagram illustrates the normal sequence of data acceptance triggered by an AG_RECV in the user program Each AG_RECV job in the user program is acknowledged by the Ethernet CP with an entry in the output parameters NDR ERROR and STATUS User program Ethernet CP Communications Partner CPU cycle Transfer A active on AG_RECV Ethernet 0 1 8180 1 AG_RECV lt q 10 00001 Accept evaluate Transfer received data A B active on AG_RECV Ethernet lt lt 0 0 8180 AG_RECV lt q 10 00001 Accept evaluate received data B AG_RECV eet active on Ethernet Time Legend 1 Parameter transfer NDR ERROR STATUS The status code is updated at each block call SIMATIC NET NOM S7 for Industrial Ethernet C79000 G8976 C129 06 163 Programming FCs Functions and FBs for S7 Ethernet CPs Explanation of the Formal Parameters The following table explains all the formal parameters for the AG_RECV AG_LRECV function Parameter Declara tion Possible Values Remarks The connection number of the ISO transport connection is specified in the ID parameter see Configuration Section 4 3 1 Module base address When you configure the CP with STEP 7 hardware configuration the module base address is displayed in the configuration table Specify this address here OUTPUT 0 1 new data
189. way for example as the SIMATIC Manager NCM S7 Diagnostics appears as a separate two part application window with a menu and toolbar Sajo sijar E CP Information ELR HE Enlace 150 40 00 00 00 00 00 00 k Enlace 150 41 00 00 00 00 00 00 By Connections Enlace ISO 00 00 00 00 00 00 Enlace ISO 08 00 06 20 61 CC Enlace 150 40 Enlace 150 41 Enlace ISO i ig Enlace ISO a g ISO on TCP gy TCP cf UDP Navigation area with diagnostic objects Content area with the diagnostic result e Inthe navigation area on the left hand side you will find the hierarchically arranged diagnostic objects You have an overview of the available diagnostic functions at all times The object structure displayed in the navigation area is adapted to the type of CP you are currently checking and the functions and connections configured for the CP e Inthe content area on the right hand side you will see the result of the diagnostic function you selected in the navigation area Operation e By selecting a diagnostic object in the navigation area with the mouse you execute the diagnostic function e Using the menu bar and toolbar you control the sequence of the diagnostics with context sensitive menu commands SIMATIC NET NCM S7 for Industrial Ethernet C79000 G8976 C129 06 179 NCM S7 Diagnostics 6 2 2 Overview General Menu Commands When running diagnostic functions the following menu commands have general signi
190. with S7 CPs reception is not possible see below e Connection to all Multicast Nodes If you select all multicast nodes as the partner you specify that UDP frames are sent to all nodes of a multicast group and that multicast frames can be received Multicast is a special configurable connection option that is supported by Industrial Ethernet CPs only on UDP connections The frames are sent without acknowledgment because the UDP protocol has no provision for acknowledgments This is designed to avoid floods of data resulting from the acknowledgments If for example frames are sent to 100 partners 100 acknowledgments 1 per partner will arrive at the same time The sending module would not be able to evaluate such a flurry of data When to Use Multicast instead of Broadcast To allow the simultaneous transmission of a frame to a number of partners the connection option Multicast for UDP connections was introduced In contrast to the broadcast connection option it is also possible to receive frames sent to several nodes in the multicast circle on this connection type By specifying a particular group of recipients multicast circle load on recipients for which the message is not intended is prevented Multicast therefore represents a better solution than broadcast when frames are sent to groups of partner stations SIMATIC NET NCM S7 for Industrial Ethernet 134 C79000 G8976 C129 06 Configuring Communication Connec
Download Pdf Manuals
Related Search
Related Contents
User Guide BaByliss G490E Isyliss Use & Care Guide Guia de Uso y Cuidado Guide d`utilisation et d EMatic Dealer Troubleshooting Guide Rev B 十二指腸内視鏡による多剤耐性菌の伝播について User manual vraie Copyright © All rights reserved.
Failed to retrieve file