Table of contents
S7-1200 Programmable controller
System Manual, 03/2014, A5E02486680-AG
17
12.4.2 USS_PORT (Edit communication via USS network) instruction ................................................ 715
12.4.3 USS_DRV (Swap data with drive) instruction ............................................................................ 716
12.4.4 USS_RPM (Readout parameters from the drive) instruction ..................................................... 719
12.4.5 USS_WPM (Change parameters in the drive) instruction.......................................................... 720
12.4.6 USS status codes....................................................................................................................... 722
12.4.7 General drive setup information ................................................................................................. 724
12.5 Modbus communication ............................................................................................................. 727
12.5.1 Overview of Modbus RTU and TCP communication Modbus TCP instructions V13 ................ 727
12.5.2 Modbus TCP .............................................................................................................................. 730
12.5.2.1 MB_CLIENT (Communicate via PROFINET as Modubus TCP client) instruction .................... 730
12.5.2.2 MB_SERVER (Communicate via PROFINET as Modbus TCP server) instruction ................... 736
12.5.2.3 MB_SERVER example: Multiple TCP connections ................................................................... 742
12.5.2.4 MB_CLIENT example 1: Multiple requests with common TCP connection ............................... 743
12.5.2.5 MB_CLIENT example 2: Multiple requests with different TCP connections .............................. 744
12.5.2.6 MB_CLIENT example 3: Output image write request ................................................................ 745
12.5.2.7 MB_CLIENT example 4: Coordinating multiple requests .......................................................... 745
12.5.3 Modbus RTU .............................................................................................................................. 746
12.5.3.1 MB_COMM_LOAD (Configure port on the PtP module for Modbus RTU) instruction ............... 747
12.5.3.2 MB_MASTER (Communicate via the PtP port as Modbus master) instruction ......................... 749
12.5.3.3 MB_SLAVE (Communicate via the PtP port as Modubus slave) instruction ............................. 755
12.5.3.4 Modbus RTU master example program ..................................................................................... 762
12.5.3.5 Modbus RTU slave example program ....................................................................................... 764
12.6 Telecontrol and TeleService with the CP 1242-7 ...................................................................... 765
12.6.1 Connection to a GSM network ................................................................................................... 765
12.6.2 Applications of the CP 1242-7 ................................................................................................... 767
12.6.3 Other properties of the CP ......................................................................................................... 768
12.6.4 Accessories ................................................................................................................................ 769
12.6.5 Configuration examples for telecontrol ...................................................................................... 770
13 Teleservice communication (SMTP email) ........................................................................................... 775
13.1 TM_Mail (Send email) instruction ............................................................................................... 775
14 Online and diagnostic tools ................................................................................................................. 783
14.1 Status LEDs ............................................................................................................................... 783
14.2 Going online and connecting to a CPU ...................................................................................... 786
14.3 Assigning a name to a PROFINET IO device online ................................................................. 787
14.4 Setting the IP address and time of day ...................................................................................... 789
14.5 Resetting to factory settings ....................................................................................................... 789
14.6 Updating firmware ...................................................................................................................... 791
14.7 CPU operator panel for the online CPU ..................................................................................... 792
14.8 Monitoring the cycle time and memory usage ........................................................................... 792
14.9 Displaying diagnostic events in the CPU ................................................................................... 793
14.10 Comparing offline and online CPUs ........................................................................................... 794
14.11 Monitoring and modifying values in the CPU ............................................................................. 795
14.11.1 Going online to monitor the values in the CPU .......................................................................... 796
14.11.2 Displaying status in the program editor ..................................................................................... 797