1. Trang chủ
  2. » Kỹ Thuật - Công Nghệ

S7-1200 and Step7 Basic v10.5 communication

25 829 5

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 25
Dung lượng 1,04 MB

Nội dung

S7-1200 and Step7 Basic v10.5 communication

S7-1200 and STEP7 Basic V10.5 Chapter 7: Communication For internal use only / © Siemens AG 2009 All Rights Reserved SIMATIC Systems Support I IA AS CS FA Page S7-1200 and STEP7 Basic V10.5 Communication Overview: Communication interfaces Overview Open user communication Exercise CPU onboard: Ethernet (PROFINET) PG/OP Communication Open User Communication (T-Blocks) connections PtP Communication TCP native (up to 8kB) ISO-on-TCP (up to 8kB) UDP (in preparation) S7-Communication S7-1200 as Server Client: PUT/GET (in preparation) PROFINET I/O (in preparation) Communication SIMATIC Systems Support I IA AS CS FA For internal use only / © Siemens AG 2009 All Rights Reserved Industry Sector Page S7-1200 and STEP7 Basic V10.5 Communication Overview: Communication interfaces Overview Open user communication Exercise PtP Communication Communication Module (CM) Point-to-Point communication over RS232 and RS485 ASCII – Protocol (Freeport serial communication) USS – Drive protocol Modbus – Protocol RTU Master-Protocol RTU Slave-Protocol 3rd Party Communication SIMATIC Systems Support I IA AS CS FA For internal use only / © Siemens AG 2009 All Rights Reserved Industry Sector Page S7-1200 and STEP7 Basic V10.5 Communication Open user communication – Overview Overview Open user communication Overview Ethernet Basics Configuration Blocks Blocks without connection management „TCON „ make an Ethernet connection „TDISCON“ break an Ethernet connection „TSEND“ send data „TRCV“ receive data Exercise PtP Communication Blocks with connection management „TSEND_C“ make an Ethernet connection and send data „TRCV_C“ make an Ethernet connection and receive data Communication SIMATIC Systems Support I IA AS CS FA For internal use only / © Siemens AG 2009 All Rights Reserved Industry Sector Page S7-1200 and STEP7 Basic V10.5 Communication Without connection management CPU (active) Open user communication Overview Ethernet Basics Configuration Blocks CPU (passive) TCON TCON Connect SFB TSEND Connection data IP Address ConnectionID TSAP/PORT TRCV Data SFB TDISCON Disconnect SFB Communication SIMATIC Systems Support I IA AS CS FA TRCV Data SFB PtP Communication SFB SFB IE Port Exercise IE Port Overview Connection data TSEND SFB IP Address ConnectionID TSAP/PORT TDISCON SFB For internal use only / © Siemens AG 2009 All Rights Reserved Industry Sector Page S7-1200 and STEP7 Basic V10.5 Communication With connection management Overview CPU (active) Open user communication Overview Ethernet Basics Configuration Blocks CPU (passive) Connect TSEND_C TRCV_C Data SFB SFB Disconnect Exercise PtP Communication IP Address ConnectionID TSAP/PORT Connection data IE Port IE Port Connection data IP Address ConnectionID TSAP/PORT Connect TRCV_C Data SFB TSEND_C SFB Disconnect Communication SIMATIC Systems Support I IA AS CS FA For internal use only / © Siemens AG 2009 All Rights Reserved Industry Sector Page S7-1200 and STEP7 Basic V10.5 Communication Protocol: TCP and UDP dr es s ot oc ol Ad Pr IP m e sig n B oo as et wo r N N TP P Port 161 Ti k e Si m pl TC P on Port 102 SN M Port 80 IS O Port 21 k N et w or ns rT ex tT yp e ht H Fi le FT P PtP Communication M an Pr fe r ol Pr ot oc sf er an Tr Exercise ag ot oc ol Open user communication Overview Ethernet Basics Configuration Blocks Pr ot oc ol Overview Port 123 Port 67 UDP TCP IP: 192.168.2.1 Ethernet Communication SIMATIC Systems Support I IA AS CS FA For internal use only / © Siemens AG 2009 All Rights Reserved Industry Sector Page S7-1200 and STEP7 Basic V10.5 Communication Protocol: ISO-on-TCP dr es s ot oc ol Ad Pr IP m e sig n B oo as et wo r N N TP P Port 161 Ti k e Si m pl TC P on Port 102 SN M Port 80 IS O Port 21 k N et w or ns rT ex tT yp e ht H Fi le FT P PtP Communication M an Pr fe r ol Pr ot oc sf er an Tr Exercise ag ot oc ol Open user communication Overview Ethernet Basics Configuration Blocks Pr ot oc ol Overview Port 123 Port 67 UDP TCP IP: 192.168.2.1 Ethernet Communication SIMATIC Systems Support I IA AS CS FA For internal use only / © Siemens AG 2009 All Rights Reserved Industry Sector Page S7-1200 and STEP7 Basic V10.5 Communication Protocol: TSAP at ISO-on-TCP Overview Open user communication Overview Ethernet Basics Configuration Blocks TSAP (Transport Service Access Point) Access point for ISO-on-TCP connections ISO-on-TCP connections always via Port 102 In ASCII or HEX Application Exercise PtP Communication TSAP Port 21 Port 80 Port 102 Port 161 Port 123 Port 67 UDP TCP IP: 192.168.2.1 Ethernet Communication SIMATIC Systems Support I IA AS CS FA For internal use only / © Siemens AG 2009 All Rights Reserved Industry Sector Page S7-1200 and STEP7 Basic V10.5 Communication Device- and Network configuration Overview Activate networking Open user communication Overview Ethernet Basics Configuration Blocks Exercise PtP Communication connect PLCs with subnet via Drag&Drop Properties of the Ethernet interface Communication SIMATIC Systems Support I IA AS CS FA For internal use only / © Siemens AG 2009 All Rights Reserved Industry Sector Page 10 S7-1200 and STEP7 Basic V10.5 Communication Blocks in the Task-Card „Instructions“ Overview Open user communication Overview Ethernet Basics Configuration Blocks Task-Card „Instructions“ Blocks for Open user communication Exercise PtP Communication Below „Other“ are the blocks without connection management Communication SIMATIC Systems Support I IA AS CS FA For internal use only / © Siemens AG 2009 All Rights Reserved Industry Sector Page 11 S7-1200 and STEP7 Basic V10.5 Communication Send data with „TSEND_C“ Connecting and send data with rising edge Overview Open user communication Overview Ethernet Basics Configuration Blocks Hold connection or disconnecting Exercise PtP Communication Connection data IP Address ConnectionID TSAP/PORT Connecting, send data and disconnecting in one block Communication SIMATIC Systems Support I IA AS CS FA For internal use only / © Siemens AG 2009 All Rights Reserved Industry Sector Page 12 S7-1200 and STEP7 Basic V10.5 Communication Receive data with „TRCV_C“ Overview Open user communication Overview Ethernet Basics Configuration Blocks Choice connection type Exercise PtP Communication Connection data IP Address ConnectionID TSAP/PORT Communication SIMATIC Systems Support I IA AS CS FA For internal use only / © Siemens AG 2009 All Rights Reserved Industry Sector Page 13 S7-1200 and STEP7 Basic V10.5 Communication Exercise for Communication Hands-on Overview Open user communication Exercise PtP Communication Let’s just it the lab for you Communication SIMATIC Systems Support I IA AS CS FA For internal use only / © Siemens AG 2009 All Rights Reserved Industry Sector Page 14 S7-1200 and STEP7 Basic V10.5 Communication Exercise7-1: Connect S7-1200 Demo Boxes Hands-on Overview Open user communication Team1 IP: 192.168.0.x Team2 IP: 192.168.0.x+1 Exercise PtP Communication S7-1200 PLCs have to different IP Addresses Communication For internal use only / © Siemens AG 2009 All Rights Reserved Industry Sector Task Connect S7-1200 Demo Boxes Process SIMATIC Systems Support I IA AS CS FA connect two S7-1200 Demo Boxes Page 15 S7-1200 and STEP7 Basic V10.5 Communication Exercise7-1: Create new project Hands-on Overview Open user communication Exercise PtP Communication Communication For internal use only / © Siemens AG 2009 All Rights Reserved Industry Sector Task Create new project Process activate „Create new project“ set project name to „My_Communication“ click button „Create“ SIMATIC Systems Support I IA AS CS FA Page 16 S7-1200 and STEP7 Basic V10.5 Communication Exercise7-1: Add unspecified PLCs Hands-on Overview Open user communication 10 Exercise PtP Communication Communication For internal use only / © Siemens AG 2009 All Rights Reserved Industry Sector Task Add unspecified PLCs Process start editor for „Devices & Networks“ In Hardware catalog select 6ES7 2XX-XXXX-XXXX at PLC > SIMATIC S7-1200 > CPU > Unspecified CPU 1200 insert PLC via Drag&Drop in „Network view“ repeat Step also for the second PLC select PLC_1 10 switch to the device view of PLC_1 SIMATIC Systems Support I IA AS CS FA Page 17 S7-1200 and STEP7 Basic V10.5 Communication Exercise7-1: Upload Hardware configuration Hands-on Overview Open user communication Exercise PtP Communication 12 11 Communication 13 For internal use only / © Siemens AG 2009 All Rights Reserved Industry Sector Task Upload Hardware configuration Process 11 detect the configuration of the connected device 12 select accessible device (check MAC-address) 13 load configuration 14 uploaded configuration of S7-1200 Demo rack 15 select PLC_2 in the DropDown list 16 repeat Step 11 up to 14 also for the second PLC 17 switch to the Network view SIMATIC Systems Support I IA AS CS FA Page 18 S7-1200 and STEP7 Basic V10.5 Communication Exercise7-1: Adjust PLC properties Hands-on Overview Open user communication 18 Exercise PtP Communication 20 19 21 Communication For internal use only / © Siemens AG 2009 All Rights Reserved Industry Sector Task Adjust PLC properties Process 18 activate „Networks“ in the taskbar 19 connect both PLC with a subnet via Drag&Drop 20 select PLC_1 21 activate clock memory bits for PLC_1 Hint: You need following memory bit for your user program: - „1Hz clock“ (M0.5) SIMATIC Systems Support I IA AS CS FA Page 19 S7-1200 and STEP7 Basic V10.5 Communication Exercise7-1: Add „TSEND_C“ in PLC_1 Hands-on Overview Open user communication Exercise PtP Communication 2 23 24 Communication For internal use only / © Siemens AG 2009 All Rights Reserved Industry Sector Task Add “TSEND_C“ in PLC_1 Process 22 open OB1 of PLC_1 23 In Extended instructions select „TSEND_C“ at Communication > Open user communication and insert in OB1 via Drag&Drop 24 add Instance-DB for „TSEND_C“ SIMATIC Systems Support I IA AS CS FA Page 20 S7-1200 and STEP7 Basic V10.5 Communication Exercise7-1: Adjust connection parameters PLC_1 Hands-on Overview Open user communication 27 Exercise 28 PtP Communication 29 30 Communication 26 For internal use only / © Siemens AG 2009 All Rights Reserved Industry Sector Task Adjust connection parameters of PLC_1 Process 25 set PLC_2 as Partner PLC 26 assign „PLC1“ to Local TSAP and „PLC2“ to Partner TSAP 27 assign M0.5 (1Hz Clock) to In-Parameter „REQ“ 28 assign TRUE to In-Parameter „CONT“ 29 assign ‘1’ to In-Parameter „LEN“ 30 assign IB0 to In-Parameter „DATA“ SIMATIC Systems Support I IA AS CS FA Page 21 S7-1200 and STEP7 Basic V10.5 Communication Exercise7-1: Add „TRCV_C“ in PLC_2 Hands-on Overview Open user communication Exercise PtP Communication 32 31 33 Communication For internal use only / © Siemens AG 2009 All Rights Reserved Industry Sector Task Add „TRCV_C“ in PLC_2 Process 31 open OB1 of PLC_2 32 In Extended instructions select „TRCV_C“ at Communication > Open user communication and insert in OB1 via Drag&Drop 33 add Instance-DB for „TRCV_C“ SIMATIC Systems Support I IA AS CS FA Page 22 S7-1200 and STEP7 Basic V10.5 Communication Exercise7-1: Adjust connection parameters PLC_2 Hands-on Overview Open user communication 36 Exercise 37 PtP Communication 38 39 Communication 35 For internal use only / © Siemens AG 2009 All Rights Reserved Industry Sector Task Adjust connection parameters of PLC_2 Process 34 set PLC_1 as Partner PLC 35 choose „PLC_2_Connection_DB“ as connection data for Local PLC and „PLC_1_Connection_DB“ for Partner PLC 36 assign TRUE to In-Parameter „EN_R“ 37 assign TRUE to In-Parameter „CONT“ 38 assign ‘1’ to In-Parameter „LEN“ 39 assign QB0 to In-Parameter „DATA“ SIMATIC Systems Support I IA AS CS FA Page 23 S7-1200 and STEP7 Basic V10.5 Communication Exercise7-1: Load project Hands-on Overview Open user communication 41 Exercise PtP Communication 40 Communication 40 For internal use only / © Siemens AG 2009 All Rights Reserved Industry Sector Task Load project Process 40 select both PLCs (CTRL + mouse click) 41 load projects SIMATIC Systems Support I IA AS CS FA Page 24 S7-1200 and STEP7 Basic V10.5 Communication Thank you for your attention! I IA AS CS FA Phone: +49 (911) 895-4646 E-Mail: sss.simatic@siemens.com For internal use only / © Siemens AG 2009 All Rights Reserved SIMATIC Systems Support I IA AS CS FA Page 25 S7-1200 and STEP7 Basic V10.5 Communication ... Page S7-1200 and STEP7 Basic V10.5 Communication Overview: Communication interfaces Overview Open user communication Exercise PtP Communication Communication Module (CM) Point-to-Point communication. .. connect two S7-1200 Demo Boxes Page 15 S7-1200 and STEP7 Basic V10.5 Communication Exercise7-1: Create new project Hands-on Overview Open user communication Exercise PtP Communication Communication... 14 S7-1200 and STEP7 Basic V10.5 Communication Exercise7-1: Connect S7-1200 Demo Boxes Hands-on Overview Open user communication Team1 IP: 192.168.0.x Team2 IP: 192.168.0.x+1 Exercise PtP Communication

Ngày đăng: 24/05/2014, 21:48

TỪ KHÓA LIÊN QUAN

w