Sunteți pe pagina 1din 8

Siemens Industry IA/DT/BT Service&Support - Automation Service, Automation Support, Simatic Service, Simatic Support, Technical Support, Technical

Consulting

Contact | Sitemap Home | Product Support | Applications & Tools | Services | Forum | mySupport Login | Register Navigation Index (A-Z) [Advanced] related links Sample Program: S7 Communication ... How do you program the function b ... Sample program: S7 communication ... How do you program communication ... How do you program communication ... mySupport All personal data, information and functions at a glance - e.g. My Documentation Manager Newsletter CAx shopping cart Support Request

Product Information Drive Technology Automation Technology Automation Systems Operator control and monitoring sys Identification Systems Industrial Communication Industrial Ethernet Passive Network components Industrial Ethernet Switches SIPLUS Industrial Ethernet s Industrial Ethernet Security System interfacing SIMATIC S5 SIMATIC S7 Communication for SIM Communication for SIM Communication for SIM Communication for SIM Communication for SIM PG/PC/IPC SIPLUS system interface Accessories Engineering/ Network Manag Network transitions PROFINET PROFIBUS AS-Interface IO-Link Industrial Wireless Communicati Industrial Remote Access Industrial Security Energy Communication Field Ins Archive Industrial Controls Manufacturing Execution Systems PC-based Automation Process control systems Sensor systems Power supplies Products for specific requirements Low-Voltage Controls and Distribution Building Technology Safety systems - Safety Integrated Industries Service

Exit print preview Print preview Automation Technology > Industrial Communication > Industrial Ethernet > System interfacing > SIMATIC S7 Industrial Ethernet S7-300/400 CPs -- Configuring and programming communication -- Using communication blocks How is data with variable message length transferred via the TCP protocol and received by an S7-300 station via the Industrial Ethernet CP? How do you program the function blocks FB14 "GET" and FB15 "PUT" in the S7 program of the S7-300 in order to transfer more than 160 bytes of data? Where can you find sample programs and documentation for communication from SIMATIC S5 modules to SIMATIC S7 modules via Industrial Ethernet using the UDP protocol? Where can you find sample programs and documentation for communication from SIMATIC S5 modules to SIMATIC S7 modules via Industrial Ethernet using the TCP protocol? Where can you find sample programs and documentation for communication from SIMATIC S5 modules to SIMATIC S7 modules via Industrial Ethernet using the ISO transport protocol? How do you program the FC10 "AG_CNTRL"? Which commands (CMD) of the FC10 "AG_CNTRL" are supported by the IE CPs? How many communication jobs may be used simultaneously in an S7-300 CPU for S7 communication via a CP343-1? Which ports are released for Modbus/TCP communication and how many Modbus clients can communicate with a SIMATIC S7 CPU as Modbus server? Notes on using an

Print

To this entry Print Create PDF Send to a friend Help Online Help Guided Tour

file:///C|/Documents%20and%20Settings/Administrator/Desktop/llisapi.dll.htm[1/7/2012 8:58:54 PM]

Siemens Industry IA/DT/BT Service&Support - Automation Service, Automation Support, Simatic Service, Simatic Support, Technical Support, Technical Consulting

instance for multiple connection IDs Internal call of FC5 (AG_SEND) with FTP client blocks (FC 40-44) for the CP343-1 IT (6GK7 343-1GX110XE0) How do you program the communication blocks FB63 "TSEND", FB64 "TRECV", FB65 "TCON" and FB66 "TDISCON" in order to use the ISO-on-TCP protocol for data exchange by way of the integrated PROFINET interface of a CPU or by way of the CP443-1 Advanced? How do you program communication blocks FC11 and FC12 for the PROFINET IO device? Block calls for communications processors in multiple runtime layers Changing the input parameter of the user blocks "AG_SEND" and "AG_RECV" during the runtime of a job What should you watch out for if you transfer variables with the data type "REAL" when calling the communication blocks FC5/50 "AG_SEND/AG_LSEND" and FC6/60 "AG_RCV/AG_LRCV"? What should you pay attention to when using the communication blocks FC53 "AG_SSEND" and FC63 "AG_SRECV"? What points do you need to remember when calling communication blocks FC5/50 and FC6/60 in the STEP 7 user program of the CPU? How do you program communication blocks FC11 and FC12 for the PROFINET IO controller? How can you establish OPEN MODBUS / TCP communication from a SIMATIC S7 and where can you find further information? How do you program the communication blocks FC50 and FC60? Error STATUS "0x7000" on function block FC6 / FC60 (AG_SEND) with Send/Receive communication on the S7-400 controller How do you program the communication blocks FC5 and FC6? Sample program: S7 communication with the blocks SFB14 ("GET") and SFB15 ("PUT") with

file:///C|/Documents%20and%20Settings/Administrator/Desktop/llisapi.dll.htm[1/7/2012 8:58:54 PM]

Siemens Industry IA/DT/BT Service&Support - Automation Service, Automation Support, Simatic Service, Simatic Support, Technical Support, Technical Consulting

S7-400 Sample Program: S7 Communication with blocks FB14 ("GET") und FB15 ("PUT") of the CPU 317-2PN/DP How do you program communication blocks FB8 "USEND" and FB9 "URCV" for data exchange on the S7300? "STATUS = 27" (0x001B) with the loadable S7 communication on the S7-300 How do you program communication blocks FB14 "GET" and FB15 "PUT" for data exchange in the S7 program of an S7-300 CPU? How do you program communication blocks FB12 "BSEND" and FB13 "BRCV" for data exchange in the S7 program of an S7-300 CPU? Repeating the "BSEND" job (SFB12) when the "BRCV" block (SFB13) is in the "disabled" state ("EN_R = 0") S7-300 CPU 31x -- Configuring and programming communication -Using communication blocks How do you implement chronological messaging with S7-300 CPUs and WinCC? How do you program communication blocks FB14 "GET" and FB15 "PUT" for data exchange in the S7 program of an S7-300 CPU? How can you read out diagnostics data from a SIRIUS 3RK3 modular safety system using a S7-300/400 CPU? Which ports are released for Modbus/TCP communication and how many Modbus clients can communicate with a SIMATIC S7 CPU as Modbus server? How do you configure a specified and an unspecified S7 connection for data exchange between S7300 and/or S7-400 by way of Industrial Ethernet CPs? What restrictions are there for active jobs when communicating with SFC 58 / SFC 59 and SFB 52 / SFB 53 via PROFIBUS DP and PROFINET IO? How do you program communication blocks FB12 "BSEND" and FB13 "BRCV" for data exchange in the S7 program of an S7-300

file:///C|/Documents%20and%20Settings/Administrator/Desktop/llisapi.dll.htm[1/7/2012 8:58:54 PM]

Siemens Industry IA/DT/BT Service&Support - Automation Service, Automation Support, Simatic Service, Simatic Support, Technical Support, Technical Consulting

CPU? How do you program the communication blocks FB63 "TSEND", FB64 "TRECV", FB65 "TCON" and FB66 "TDISCON" in order to use the ISO-on-TCP protocol for data exchange by way of the integrated PROFINET interface of a CPU or by way of the CP443-1 Advanced? How do you program the communication blocks FB63 "TSEND", FB64 "TRCV", FB65 "TCON" and FB66 "TDISCON" in order to use the TCP protocol for data exchange by means of the integrated PROFINET interface of an S7-300 or S7-400 CPU? How can you establish OPEN MODBUS / TCP communication from a SIMATIC S7 and where can you find further information? How do you program the communication blocks FB67 "TUSEND", FB68 "TURCV", FB65 "TCON" and FB66 "TDISCON" in order to use the UDP protocol for data exchange via the integrated PROFINET interface of a CPU? How does data communication work between S7-300/S7400 and S7-200 via MPI using S7 basic communication? How great is data consistency in the PUT and GET S7 communication functions for the individual S7-300 CPUs and C7 complete devices? How can you access via PROFIBUS DP another CPU, which is connected to the PROFIBUS DP as a slave, from a DP master using basic communication with SFC72 "I_GET" and SFC73 "I_PUT"? How can you access consistent data without SFC14/15 as part of the process image? How do you program communication blocks FB14 "GET" and FB15 "PUT" for data exchange in the S7 program of an S7-300 CPU? Instructions Communication functions have to be called in the program in order to transfer data between two S7300 stations via an S7 connection configured in NetPro. Function block FB14 ("GET") is for reading data out of a remote CPU and function block FB15 ("PUT") is for writing data to a remote CPU. The S7 connection does not have to be configured on both sides, because the S7 communication via FB14 "GET" and FB15 "PUT" is based on the server-client principle. Note

file:///C|/Documents%20and%20Settings/Administrator/Desktop/llisapi.dll.htm[1/7/2012 8:58:54 PM]

Siemens Industry IA/DT/BT Service&Support - Automation Service, Automation Support, Simatic Service, Simatic Support, Technical Support, Technical Consulting

If you are using an Industrial Ethernet CP for data communication via S7 connections in the S7-300 station, then utilize the function blocks FB14 "GET" and FB15 "PUT" from the "SIMATIC_NET_CP" library under "CP 300 > Blocks". If you are using the integrated PN interface of a CPU31x-2PN/DP or CPU319-3PN/DP for data communication via S7 connections, then utilize function blocks FB14 "GET" and FB13 "PUT" from "Standard Library -> Communication Blocks -> Blocks" with the family "CPU_300". Features of the communication blocks FB14 "GET" and FB15 "PUT" FB14 and FB15 are asynchronous communication functions. The blocks must be called in the OB1 cycle (see also Entry ID: 2795485). They can run over several OB1 cycles. FB14 and FB15 are activated by the input parameter ("REQ"). The end of the job is indicated by "DONE" or "ERROR". PUT and GET can communicate simultaneously via one connection. Description of the sample program The STEP 7 project includes two S7-300 stations each with a CPU 315-2DP and CP 343-1 for data communication via Industrial Ethernet. An S7 connection is configured in NetPro to enable data communication between the two S7-300s via Industrial Ethernet. If you mark the CPU of the S7-300 station in NetPro, the configured S7 connection is displayed in the connection table.

Fig. 01 You determine the "Local ID" block parameters in the Properties dialog of the S7 connection. The value of the block parameter is specified at the "ID" input parameter when you call FB14 "GET" and FB15 "PUT". In the connection table, right-click on the configured S7 connection and open the Properties dialog of the S7 connection via the "Object Properties" menu.

Fig. 02 The STEP 7 program consists of blocks OB100, OB1, FB100, DB100, DB200, DB201, FB14 and FB15. OB100 The OB100 is a restart OB and is run when the CPU is restarted (warm start). In this OB the first communication trigger is enabled with markers M1.0 and M0.1.

file:///C|/Documents%20and%20Settings/Administrator/Desktop/llisapi.dll.htm[1/7/2012 8:58:54 PM]

Siemens Industry IA/DT/BT Service&Support - Automation Service, Automation Support, Simatic Service, Simatic Support, Technical Support, Technical Consulting

Fig. 03 OB1 OB1 is called cyclically. In this OB is the call of FB100 (instance DB: DB100) with M1.0 and M0.1. M1.0 is reset as soon as FB100 has been executed.

Fig. 04 FB100 FB100 is called in the OB1 cycle. In this FB is the call of FB14 "GET" and FB15 "PUT". FB14 is activated via the input parameter "REQ" when the M10.6 clock marker has a positive edge and no job is running. This locking of the function call is important, because the function is asynchronous and can last several cycles. Continuous activation of the function block without waiting for the end of the active job can cause a communication overload. The "ID" input parameter must be adopted from the Properties dialog of the S7 connection in NetPro (see Fig. 02). The "ADDR_1" parameter refers to a data area in the remote CPU that is written to or read from. For the "RD_1" parameter you must specify the data area for the data read. The output parameters "DONE", "ERROR" and "STATUS" are required for the job evaluation and are only valid in the same cycle.

file:///C|/Documents%20and%20Settings/Administrator/Desktop/llisapi.dll.htm[1/7/2012 8:58:54 PM]

Siemens Industry IA/DT/BT Service&Support - Automation Service, Automation Support, Simatic Service, Simatic Support, Technical Support, Technical Consulting

Fig. 05 If the block with error is executed, the block's status word is saved for the error analysis. Information on the meaning of the saved status word is available in the STEP 7 Online Help for error analysis.

Fig. 06 FB15 is activated via the input parameter "REQ" when the M10.6 clock marker has a positive edge and no job is running. This locking of the function call is important, because the function is asynchronous and can last several cycles. Continuous activation of the function block without waiting for the end of the active job can cause a communication overload. The "ID" input parameter must be adopted from the Properties dialog of the S7 connection in NetPro (see Fig. 02). The "ADDR_1" parameter refers to a data area in the remote CPU that is written to or read from. Parameter "SD_1" specifies the address of the data to be sent. The output parameters "DONE", "ERROR" and "STATUS" are required for the job evaluation and are only valid in the same cycle.

file:///C|/Documents%20and%20Settings/Administrator/Desktop/llisapi.dll.htm[1/7/2012 8:58:54 PM]

Siemens Industry IA/DT/BT Service&Support - Automation Service, Automation Support, Simatic Service, Simatic Support, Technical Support, Technical Consulting

Fig. 07 If the block with error is executed, the block's status word is saved for the error analysis. Information on the meaning of the saved status word is available in the STEP 7 Online Help for error analysis.

Fig. 08 Note The manual "System Software for S7-300/400 System and Standard Functions", Chapter 21 "S7 Communication" provides information on the volume of data you can transfer via communication blocks FB14 "GET" and FB15 "PUT". The manual is available for downloading in Entry ID: 1214574 The STEP 7 project as download: The STEP 7 project contains a sample program for calling the FB14 and the FB15 with status evaluation. It has been created with STEP 7 V5.2.

Sample_S7-300_PUT_GET.zip ( 197 KB ) Entry ID:18610307 Date:2010-08-24


Siemens AG 2011 - Corporate Information - Privacy Policy - Terms of Use

file:///C|/Documents%20and%20Settings/Administrator/Desktop/llisapi.dll.htm[1/7/2012 8:58:54 PM]

S-ar putea să vă placă și