Siemens S7-1200 TELECONTROL System Manual

  • Hello! I am an AI chatbot trained to assist you with the Siemens S7-1200 TELECONTROL System Manual. I’ve already reviewed the document and can help you find the information you need or explain it in simple terms. Just ask your questions, and providing more details will help me assist you more effectively!
S7-1200 Programmable controller
___________________
___________________
___________________
___________________
___________________
___________________
___________________
___________________
___________________
___________________
___________________
___________________
___________________
___________________
___________________
___________________
___________________
___________________
___________________
___________________
SIMATIC
S7
S7-1200 Programmable controller
System Manual
03/2014
A5E02486680
-AG
Preface
Product overview
1
STEP 7 programming
software
2
Installation
3
PLC concepts
4
Device configuration
5
Programming concepts
6
Basic instructions
7
Extended instructions
8
Technology instructions
9
Communication
10
Web server
11
Communication processor
and Modbus TCP
12
Teleservice communication
(SMTP email)
13
Online and diagnostic tools
14
SM 1278 4xIO-Link Master
15
Technical specifications
A
Calculating a power budget
B
Order numbers
C
Exchanging a V3.0 CPU for
a V4.0 CPU
D
Siemens AG
Industry Sector
Postfach 48 48
90026 NÜRNBERG
GERMANY
Order number: 6ES7298-8FA30-8BH0
12/2013 Technical data subject to change
Copyright © Siemens AG 2014.
All rights reserved
Legal information
Warning notice system
This manual contains notices you have to observe in order to ensure your personal safety, as well as to prevent
damage to property. The notices referring to your personal safety are highlighted in the manual by a safety alert
symbol, notices referring only to property damage have no safety alert symbol. These notices shown below are
graded according to the degree 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 may result if proper precautions are not taken.
CAUTION
indicates that minor personal injury can result if proper precautions are not taken.
NOTICE
indicates that property damage can result if proper precautions are not taken.
If more than one degree of danger is present, the warning notice representing the highest degree of danger will
be used. A notice warning of injury to persons with a safety alert symbol may also include a warning relating to
property damage.
Qualified Personnel
The product/system described in this documentation may be operated only by
personnel qualified
for the specific
task in accordance with the relevant documentation, in particular its warning notices and safety instructions.
Qualified personnel are those who, based on their training and experience, are capable of identifying risks and
avoiding potential hazards when working with these products/systems.
Proper use of Siemens products
Note the following:
WARNING
Siemens products may only be used for the applications described in the catalog and in the relevant technical
documentation. If products and components from other manufacturers are used, these must be recommended
or approved by Siemens. Proper transport, storage, installation, assembly, commissioning, operation and
maintenance are required to ensure that the products operate safely and without any problems. The permissible
ambient conditions must be complied with. The information in the relevant documentation must be observed.
Trademarks
All names identified by ® are registered trademarks of Siemens AG. The remaining trademarks in this publication
may be trademarks whose use by third parties for their own purposes could violate the rights of the owner.
Disclaimer of Liability
We have reviewed the contents of this publication to ensure consistency with the hardware and software
described. Since variance cannot be precluded entirely, we cannot guarantee full consistency. However, the
information in this publication is reviewed regularly and any necessary corrections are included in subsequent
editions.
S7-1200 Programmable controller
System Manual, 03/2014, A5E02486680-AG
3
Preface
Purpose of the manual
The S7-1200 series is a line of programmable logic controllers (PLCs) that can control a
variety of automation applications. Compact design, low cost, and a powerful instruction set
make the S7-1200 a perfect solution for controlling a wide variety of applications. The S7-
1200 models and the Windows-based STEP 7 programming tool (Page 35) give you the
flexibility you need to solve your automation problems.
This manual provides information about installing and programming the S7-1200 PLCs and
is designed for engineers, programmers, installers, and electricians who have a general
knowledge of programmable logic controllers.
Required basic knowledge
To understand this manual, it is necessary to have a general knowledge of automation and
programmable logic controllers.
Scope of the manual
This manual describes the following products:
STEP 7 V13 Basic and Professional (Page 35)
S7-1200 CPU firmware release V4.0
For a complete list of the S7-1200 products described in this manual, refer to the technical
specifications (Page 829).
Certification, CE label, C-Tick, and other standards
Refer to the technical specifications (Page 829) for more information.
Service and support
In addition to our documentation, Siemens offers technical expertise on the Internet and on
the customer support web site (http://www.siemens.com/automation/).
Contact your Siemens distributor or sales office for assistance in answering any technical
questions, for training, or for ordering S7 products. Because your sales representatives are
technically trained and have the most specific knowledge about your operations, process
and industry, as well as about the individual Siemens products that you are using, they can
provide the fastest and most efficient answers to any problems you might encounter.
Preface
S7-1200 Programmable controller
4 System Manual, 03/2014, A5E02486680-AG
Documentation and information
S7-1200 and STEP 7 provide a variety of documentation and other resources for finding the
technical information that you require.
The S7-1200 system manual provides specific information about the operation,
programming, and the specifications for the complete S7-1200 product family. In addition
to the system manual, the S7-1200 Easy Book provides a more general overview to the
capabilities of the S7-1200 family.
Both the system manual and the Easy Book are available as electronic (PDF) manuals.
The electronic manuals can be downloaded from the customer support web site and can
also be found on the documentation disk that ships with every S7-1200 CPU.
The online STEP 7 information system provides immediate access to the conceptual
information and specific instructions that describe the operation and functionality of the
programming package and basic operation of SIMATIC CPUs.
My Documentation Manager accesses the electronic (PDF) versions of the SIMATIC
documentation set, including the system manual, the Easy Book, and the STEP 7
information system. With My Documentation Manager, you can drag and drop topics from
various documents to create your own custom manual.
The customer support entry portal (http://support.automation.siemens.com) provides a
link to My Documentation Manager under mySupport.
The customer support web site also provides podcasts, FAQs, and other helpful
documents for S7-1200 and STEP 7. The podcasts utilize short educational video
presentations that focus on specific features or scenarios in order to demonstrate the
interactions, convenience, and efficiency provided by STEP 7. Visit the following web
sites to access the collection of podcasts:
STEP 7 Basic web page (http://www.automation.siemens.com/mcms/simatic-
controller-software/en/step7/step7-basic/Pages/Default.aspx)
STEP 7 Professional web page (http://www.automation.siemens.com/mcms/simatic-
controller-software/en/step7/step7-professional/Pages/Default.aspx)
You can also follow or join product discussions on the Service & Support technical forum
(https://www.automation.siemens.com/WW/forum/guests/Conferences.aspx?Language=e
n&siteid=csius&treeLang=en&groupid=4000002&extranet=standard&viewreg=WW&nodei
d0=34612486). These forums allow you to interact with various product experts.
Forum for S7-1200
(https://www.automation.siemens.com/WW/forum/guests/Conference.aspx?SortField=
LastPostDate&SortOrder=Descending&ForumID=258&Language=en&onlyInternet=Fa
lse)
Forum for STEP 7 Basic
(https://www.automation.siemens.com/WW/forum/guests/Conference.aspx?SortField=
LastPostDate&SortOrder=Descending&ForumID=265&Language=en&onlyInternet=Fa
lse)
Preface
S7-1200 Programmable controller
System Manual, 03/2014, A5E02486680-AG
5
Security information
Siemens provides products and solutions with industrial security functions that support the
secure operation of plants, solutions, machines, equipment and/or networks. They are
important components in a holistic industrial security concept. With this in mind, Siemens
products and solutions undergo continuous development. Siemens recommends strongly
that you regularly check for product updates.
For the secure operation of Siemens products and solutions, it is necessary to take suitable
preventive action (e.g. cell protection concept) and integrate each component into a holistic,
state-of-the-art industrial security concept. Third-party products that may be in use should
also be considered. You can find more information about industrial security on the Internet
(http://www.siemens.com/industrialsecurity).
To stay informed about product updates as they occur, sign up for a product-specific
newsletter. You can find more information on the Internet
(http://support.automation.siemens.com).
Preface
S7-1200 Programmable controller
6 System Manual, 03/2014, A5E02486680-AG
S7-1200 Programmable controller
System Manual, 03/2014, A5E02486680-AG
7
Table of contents
Preface ................................................................................................................................................... 3
1 Product overview .................................................................................................................................. 23
1.1 Introducing the S7-1200 PLC ....................................................................................................... 23
1.2 Expansion capability of the CPU.................................................................................................. 26
1.3 S7-1200 modules ......................................................................................................................... 29
1.4 New features ................................................................................................................................ 30
1.5 Basic HMI panels ......................................................................................................................... 32
2 STEP 7 programming software ............................................................................................................. 35
2.1 System requirements ................................................................................................................... 36
2.2 Different views to make the work easier ...................................................................................... 37
2.3 Easy-to-use tools ......................................................................................................................... 38
2.3.1 Inserting instructions into your user program ............................................................................... 38
2.3.2 Accessing instructions from the "Favorites" toolbar ..................................................................... 38
2.3.3 Creating a complex equation with a simple instruction ................................................................ 39
2.3.4 Adding inputs or outputs to a LAD or FBD instruction ................................................................. 41
2.3.5 Expandable instructions ............................................................................................................... 42
2.3.6 Selecting a version for an instruction ........................................................................................... 42
2.3.7 Modifying the appearance and configuration of STEP 7 ............................................................. 43
2.3.8 Dragging and dropping between editors ...................................................................................... 43
2.3.9 Changing the operating mode of the CPU ................................................................................... 44
2.3.10 Changing the call type for a DB ................................................................................................... 45
2.3.11 Temporarily disconnecting devices from a network ..................................................................... 46
2.3.12 Virtual unplugging of devices from the configuration ................................................................... 47
3 Installation ............................................................................................................................................ 49
3.1 Guidelines for installing S7-1200 devices .................................................................................... 49
3.2 Power budget ............................................................................................................................... 51
3.3 Installation and removal procedures ............................................................................................ 53
3.3.1 Mounting dimensions for the S7-1200 devices ............................................................................ 53
3.3.2 Installing and removing the CPU ................................................................................................. 56
3.3.3 Installing and removing an SB, CB, or BB ................................................................................... 58
3.3.4 Installing and removing an SM ..................................................................................................... 60
3.3.5 Installing and removing a CM or CP ............................................................................................ 62
3.3.6 Removing and reinstalling the S7-1200 terminal block connector ............................................... 63
3.3.7 Installing and removing the expansion cable ............................................................................... 64
3.3.8 TS (TeleService) adapter ............................................................................................................. 66
3.3.8.1 Connecting the TeleService adapter............................................................................................ 66
3.3.8.2 Installing the SIM card ................................................................................................................. 67
3.3.8.3 Installing the TS adapter unit on a DIN rail .................................................................................. 69
3.3.8.4 Installing the TS adapter on a panel ............................................................................................ 69
Table of contents
S7-1200 Programmable controller
8 System Manual, 03/2014, A5E02486680-AG
3.4 Wiring guidelines ......................................................................................................................... 70
4 PLC concepts ....................................................................................................................................... 77
4.1 Execution of the user program .................................................................................................... 77
4.1.1 Operating modes of the CPU ...................................................................................................... 81
4.1.2 Processing the scan cycle in RUN mode .................................................................................... 85
4.1.3 Organization blocks (OBs) .......................................................................................................... 85
4.1.3.1 Program cycle OB ....................................................................................................................... 86
4.1.3.2 Startup OB................................................................................................................................... 86
4.1.3.3 Time delay interrupt OB .............................................................................................................. 87
4.1.3.4 Cyclic interrupt OB ...................................................................................................................... 87
4.1.3.5 Hardware interrupt OB ................................................................................................................ 87
4.1.3.6 Time error interrupt OB ............................................................................................................... 88
4.1.3.7 Diagnostic error interrupt OB ...................................................................................................... 89
4.1.3.8 Pull or plug of modules OB ......................................................................................................... 91
4.1.3.9 Rack or station failure OB ........................................................................................................... 92
4.1.3.10 Time of day OB ........................................................................................................................... 92
4.1.3.11 Status OB .................................................................................................................................... 93
4.1.3.12 Update OB................................................................................................................................... 93
4.1.3.13 Profile OB .................................................................................................................................... 94
4.1.3.14 Event execution priorities and queuing ....................................................................................... 94
4.1.4 Monitoring and configuring the cycle time ................................................................................... 97
4.1.5 CPU memory ............................................................................................................................... 99
4.1.5.1 System and clock memory ........................................................................................................ 101
4.1.6 Diagnostics buffer ..................................................................................................................... 103
4.1.7 Time of day clock ...................................................................................................................... 104
4.1.8 Configuring the outputs on a RUN-to-STOP transition ............................................................. 104
4.2 Data storage, memory areas, I/O and addressing .................................................................... 105
4.2.1 Accessing the data of the S7-1200 ........................................................................................... 105
4.3 Processing of analog values ..................................................................................................... 110
4.4 Data types ................................................................................................................................. 110
4.4.1 Bool, Byte, Word, and DWord data types ................................................................................. 111
4.4.2 Integer data types ..................................................................................................................... 112
4.4.3 Floating-point real data types .................................................................................................... 112
4.4.4 Time and Date data types ......................................................................................................... 113
4.4.5 Character and String data types ............................................................................................... 114
4.4.6 Array data type .......................................................................................................................... 116
4.4.7 Data structure data type ............................................................................................................ 117
4.4.8 PLC data type ...........................................................................................................................
117
4.4.9 Pointer data types ..................................................................................................................... 118
4.4.9.1 "Pointer" pointer data type ........................................................................................................ 118
4.4.9.2 "Any" pointer data type .............................................................................................................. 119
4.4.9.3 "Variant" pointer data type ........................................................................................................ 120
4.4.10 Accessing a "slice" of a tagged data type ................................................................................. 121
4.4.11 Accessing a tag with an AT overlay .......................................................................................... 122
4.5 Using a memory card ................................................................................................................ 124
4.5.1 Inserting a memory card in the CPU ......................................................................................... 125
4.5.2 Configuring the startup parameter of the CPU before copying the project to the memory
card ........................................................................................................................................... 127
4.5.3 Transfer card ............................................................................................................................. 127
Table of contents
S7-1200 Programmable controller
System Manual, 03/2014, A5E02486680-AG
9
4.5.4 Program card ............................................................................................................................. 130
4.5.5 Firmware update ........................................................................................................................ 133
4.6 Recovery from a lost password .................................................................................................. 136
5 Device configuration............................................................................................................................ 137
5.1 Inserting a CPU .......................................................................................................................... 138
5.2 Detecting the configuration for an unspecified CPU .................................................................. 140
5.3 Adding modules to the configuration ......................................................................................... 141
5.4 Changing a device ..................................................................................................................... 142
5.5 Configuring the operation of the CPU ........................................................................................ 142
5.5.1 Overview .................................................................................................................................... 142
5.5.2 Configuring digital input filter times ............................................................................................ 144
5.5.3 Pulse catch ................................................................................................................................. 146
5.6 Configuring the parameters of the modules ............................................................................... 147
5.7 Configuring the CPU for communication ................................................................................... 149
5.7.1 Creating a network connection .................................................................................................. 149
5.7.2 Configuring the Local/Partner connection path .......................................................................... 150
5.7.3 Parameters for the PROFINET connection ............................................................................... 153
5.7.4 Assigning Internet Protocol (IP) addresses ............................................................................... 155
5.7.4.1 Assigning IP addresses to programming and network devices ................................................. 155
5.7.4.2 Checking the IP address of your programming device .............................................................. 157
5.7.4.3 Assigning an IP address to a CPU online .................................................................................. 158
5.7.4.4 Configuring an IP address for a CPU in your project ................................................................. 159
5.7.5 Testing the PROFINET network ................................................................................................ 162
5.7.6 Locating the Ethernet (MAC) address on the CPU .................................................................... 163
5.7.7 Configuring Network Time Protocol synchronization ................................................................. 165
5.7.8 PROFINET device start-up time, naming, and address assignment ......................................... 166
6 Programming concepts ....................................................................................................................... 169
6.1 Guidelines for designing a PLC system ..................................................................................... 169
6.2 Structuring your user program ................................................................................................... 170
6.3 Using blocks to structure your program ..................................................................................... 172
6.3.1 Organization block (OB) ............................................................................................................. 172
6.3.2 Function (FC) ............................................................................................................................. 174
6.3.3 Function block (FB) .................................................................................................................... 175
6.3.4 Data block (DB) .......................................................................................................................... 176
6.3.5 Creating reusable code blocks ................................................................................................... 177
6.4 Understanding data consistency ................................................................................................ 178
6.5 Programming language .............................................................................................................. 179
6.5.1 Ladder logic (LAD) ..................................................................................................................... 180
6.5.2 Function Block Diagram (FBD) .................................................................................................. 181
6.5.3 SCL ............................................................................................................................................ 181
6.5.4 EN and ENO for LAD, FBD and SCL ......................................................................................... 188
6.6 Protection ................................................................................................................................... 190
6.6.1 Access protection for the CPU ................................................................................................... 190
6.6.2 Know-how protection ................................................................................................................. 193
Table of contents
S7-1200 Programmable controller
10 System Manual, 03/2014, A5E02486680-AG
6.6.3 Copy protection ......................................................................................................................... 195
6.7 Downloading the elements of your program ............................................................................. 196
6.8 Uploading from the CPU ........................................................................................................... 197
6.8.1 Copying elements of the project ............................................................................................... 197
6.8.2 Using the compare function ...................................................................................................... 198
6.9 Debugging and testing the program .......................................................................................... 198
6.9.1 Monitor and modify data in the CPU ......................................................................................... 198
6.9.2 Watch tables and force tables ................................................................................................... 199
6.9.3 Cross reference to show usage ................................................................................................ 199
6.9.4 Call structure to examine the calling hierarchy ......................................................................... 201
7 Basic instructions ................................................................................................................................. 203
7.1 Bit logic operations .................................................................................................................... 203
7.1.1 Bit logic instructions .................................................................................................................. 203
7.1.2 Set and reset instructions .......................................................................................................... 206
7.1.3 Positive and negative edge instructions .................................................................................... 209
7.2 Timer operations ....................................................................................................................... 212
7.3 Counter operations .................................................................................................................... 220
7.4 Comparator operations ............................................................................................................. 226
7.4.1 Compare values instructions ..................................................................................................... 226
7.4.2 IN_Range (Value within range) and OUT_Range (Value outside range) instructions .............. 227
7.4.3 OK (Check validity) and NOT_OK (Check invalidity) instructions ............................................. 228
7.5 Math functions ........................................................................................................................... 229
7.5.1 CALCULATE (Calculate) instruction ......................................................................................... 229
7.5.2 Add, subtract, multiply and divide instructions .......................................................................... 230
7.5.3 MOD (return remainder of division) instruction ......................................................................... 231
7.5.4 NEG (Create twos complement) instruction .............................................................................. 232
7.5.5 INC (Increment) and DEC (Decrement) instructions ................................................................ 232
7.5.6 ABS (Form absolute value) instruction ..................................................................................... 233
7.5.7 MIN (Get minimum) and MAX (Get maximum) instructions ...................................................... 234
7.5.8 LIMIT (Set limit value) instruction .............................................................................................. 235
7.5.9 Exponent, logarithm, and trigonometry instructions .................................................................. 236
7.6 Move operations ........................................................................................................................ 238
7.6.1 MOVE (Move value), MOVE_BLK (Move block), and UMOVE_BLK (Move block
uninterrruptible) instructions ...................................................................................................... 238
7.6.2 FieldRead (Read field) and FieldWrite (Write field) instructions ............................................... 240
7.6.3 FILL_BLK (Fill block) and UFILL_BLK (Fill block uninterruptible) instructions .......................... 242
7.6.4 SWAP (Swap bytes) instruction ................................................................................................ 243
7.7 Conversion operations .............................................................................................................. 244
7.7.1 CONV (Convert value) instruction ............................................................................................. 244
7.7.2 Conversion instructions for SCL ............................................................................................... 245
7.7.3 ROUND (Round numerical value) and TRUNC (Truncate numerical value) instructions......... 249
7.7.4 CEIL and FLOOR (Generate next higher and lower integer from floating-point number)
instructions ................................................................................................................................ 250
7.7.5 SCALE_X (Scale) and NORM_X (Normalize) instructions ....................................................... 251
7.8 Program control operations ....................................................................................................... 254
7.8.1 JMP (Jump if RLO = 1), JMPN (Jump if RLO = 0), and Label (Jump label) instructions .......... 254
Table of contents
S7-1200 Programmable controller
System Manual, 03/2014, A5E02486680-AG
11
7.8.2 JMP_LIST (Define jump list) instruction ..................................................................................... 255
7.8.3 SWITCH (Jump distributor) instruction ...................................................................................... 256
7.8.4 RET (Return) instruction ............................................................................................................ 258
7.8.5 ENDIS_PW (Enable/disable CPU passwords) instruction ......................................................... 259
7.8.6 RE_TRIGR (Restart cycle monitoring time) instruction .............................................................. 262
7.8.7 STP (Exit program) instruction ................................................................................................... 263
7.8.8 GET_ERROR and GET_ERROR_ID (Get error and error ID locally) instructions .................... 263
7.8.9 SCL program control statements ............................................................................................... 267
7.8.9.1 Overview of SCL program control statements ........................................................................... 267
7.8.9.2 IF-THEN statement .................................................................................................................... 268
7.8.9.3 CASE statement......................................................................................................................... 269
7.8.9.4 FOR statement ........................................................................................................................... 270
7.8.9.5 WHILE-DO statement ................................................................................................................ 271
7.8.9.6 REPEAT-UNTIL statement ........................................................................................................ 272
7.8.9.7 CONTINUE statement ............................................................................................................... 273
7.8.9.8 EXIT statement .......................................................................................................................... 273
7.8.9.9 GOTO statement ........................................................................................................................ 274
7.8.9.10 RETURN statement ................................................................................................................... 274
7.9 Word logic operations ................................................................................................................ 275
7.9.1 AND, OR, and XOR logic operation instructions ....................................................................... 275
7.9.2 INV (Create ones complement) instruction ................................................................................ 276
7.9.3 DECO (Decode) and ENCO (Encode) instructions ................................................................... 276
7.9.4 SEL (Select), MUX (Multiplex), and DEMUX (Demultiplex) instructions ................................... 278
7.10 Shift and rotate ........................................................................................................................... 281
7.10.1 SHR (Shift right) and SHL (Shift left) instructions ...................................................................... 281
7.10.2 ROR (Rotate right) and ROL (Rotate left) instructions .............................................................. 282
8 Extended instructions .......................................................................................................................... 283
8.1 Date, time-of-day, and clock functions ....................................................................................... 283
8.1.1 Date and time-of-day instructions .............................................................................................. 283
8.1.2 Clock functions ........................................................................................................................... 286
8.1.3 TimeTransformationRule data structure .................................................................................... 289
8.1.4 SET_TIMEZONE (Set timezone) instruction .............................................................................. 290
8.1.5 RTM (Runtime meters) instruction ............................................................................................. 291
8.2 String and character ................................................................................................................... 292
8.2.1 String data overview .................................................................................................................. 292
8.2.2 S_MOVE (Move character string) instruction ............................................................................. 293
8.2.3 String conversion instructions .................................................................................................... 293
8.2.3.1 S_CONV, STRG_VAL, and VAL_STRG (Convert to/from character string and number)
instructions ................................................................................................................................. 293
8.2.3.2 Strg_TO_Chars and Chars_TO_Strg (Convert to/from character string and array of
CHAR) instructions .................................................................................................................... 302
8.2.3.3 ATH and HTA (Convert to/from ASCII string and hexadecimal number) instructions ............... 304
8.2.4 String operation instructions ...................................................................................................... 306
8.2.4.1 MAX_LEN (Maximum length of a character string) instruction .................................................. 306
8.2.4.2 LEN (Determine the length of a character string) instruction ..................................................... 307
8.2.4.3 CONCAT (Combine character strings) instruction ..................................................................... 307
8.2.4.4 LEFT, RIGHT, and MID (Read substrings in a character string) instructions ............................ 308
8.2.4.5 DELETE (Delete characters in a character string) instruction ................................................... 310
8.2.4.6 INSERT (Insert characters in a character string) instruction ..................................................... 311
8.2.4.7 REPLACE (Replace characters in a character string) instruction ............................................. 312
Table of contents
S7-1200 Programmable controller
12 System Manual, 03/2014, A5E02486680-AG
8.2.4.8 FIND (Find characters in a character string) instruction ........................................................... 313
8.3 Distributed I/O (PROFINET, PROFIBUS, or AS-i) .................................................................... 314
8.3.1 Distributed I/O Instructions ........................................................................................................ 314
8.3.2 RDREC and WRREC (Read/write data record) instructions .................................................... 315
8.3.3 RALRM (Receive interrupt) instruction ..................................................................................... 318
8.3.4 STATUS parameter for RDREC, WRREC, and RALRM .......................................................... 322
8.3.5 DPRD_DAT and DPWR_DAT (Read/write consistent data for DP slaves) instructions ........... 326
8.3.6 DPNRM_DG (Read diagnostic data from a DP slave) instruction ............................................ 328
8.4 Interrupts ................................................................................................................................... 331
8.4.1 ATTACH and DETACH (Attach/detach an OB and an interrupt event) instructions................. 331
8.4.2 Cyclic interrupts ......................................................................................................................... 334
8.4.2.1 SET_CINT (Set cyclic interrupt parameters) instruction ........................................................... 334
8.4.2.2 QRY_CINT (Query cyclic interrupt parameters) instruction ...................................................... 336
8.4.3 Time of day interrupts ............................................................................................................... 337
8.4.3.1 SET_TINTL (Set time of day interrupt) ...................................................................................... 337
8.4.3.2 CAN_TINT (Cancel time of day interrupt) ................................................................................. 339
8.4.3.3 ACT_TINT (Activate time of day interrupt) ................................................................................ 339
8.4.3.4 QRY_TINT (Query status of time of day interrupt) .................................................................... 340
8.4.4 Time delay interrupts ................................................................................................................. 342
8.4.5 DIS_AIRT and EN_AIRT (Delay/enable execution of higher priority interrupts and
asynchronous error events) instructions ................................................................................... 344
8.5 Diagnostics (PROFINET or PROFIBUS) .................................................................................. 345
8.5.1 Diagnostic instructions .............................................................................................................. 345
8.5.2 Diagnostic events for distributed I/O ......................................................................................... 345
8.5.3 LED (Read LED status) instruction ........................................................................................... 346
8.5.4 DeviceStates instruction ............................................................................................................ 347
8.5.4.1 DeviceStates example configurations ....................................................................................... 349
8.5.5 ModuleStates instruction ........................................................................................................... 353
8.5.5.1 ModuleStates example configurations ...................................................................................... 354
8.5.6 GET_DIAG (Read diagnostic information) instruction .............................................................. 358
8.6 Pulse ......................................................................................................................................... 364
8.6.1 CTRL_PWM (Pulse width modulation) instruction .................................................................... 364
8.6.2 Operation of the pulse outputs .................................................................................................. 365
8.6.3 Configuring a pulse channel for PWM ...................................................................................... 367
8.7 Recipes and Data logs .............................................................................................................. 369
8.7.1 Recipes ..................................................................................................................................... 369
8.7.1.1 Recipe overview ........................................................................................................................ 369
8.7.1.2 Recipe DB example .................................................................................................................. 370
8.7.1.3 Program instructions that transfer recipe data .......................................................................... 374
8.7.1.4 Recipe example program .......................................................................................................... 378
8.7.2 Data logs ................................................................................................................................... 380
8.7.2.1 Data log record structure ........................................................................................................... 381
8.7.2.2 Program instructions that control data logs ............................................................................... 382
8.7.2.3 Working with data logs .............................................................................................................. 392
8.7.2.4 Limit to the size of data log files ................................................................................................ 393
8.7.2.5 Data log example program ........................................................................................................ 396
8.8 Data block control ..................................................................................................................... 401
8.8.1 READ_DBL and WRIT_DBL (Read/write a data block in load memory) instructions ............... 401
8.9 Address handling ...................................................................................................................... 404
Table of contents
S7-1200 Programmable controller
System Manual, 03/2014, A5E02486680-AG
13
8.9.1 LOG2GEO (Determine the slot from the hardware identifier) instruction .................................. 404
8.9.2 RD_ADDR (Determine the IO addresses from the hardware identifier) instruction ................... 406
8.10 Common error codes for the "Extended" instructions ................................................................ 407
9 Technology instructions....................................................................................................................... 409
9.1 High-speed counter .................................................................................................................... 409
9.1.1 Operation of the high-speed counter ......................................................................................... 411
9.1.2 Configuration of the HSC ........................................................................................................... 417
9.2 PID control ................................................................................................................................. 418
9.2.1 Inserting the PID instruction and technology object ................................................................... 420
9.2.2 PID_Compact instruction ........................................................................................................... 422
9.2.3 PID_Compact instruction ErrorBit parameters ........................................................................... 426
9.2.4 PID_3Step instruction ................................................................................................................ 428
9.2.5 PID_3Step instruction ErrorBit parameters ................................................................................ 435
9.2.6 Configuring the PID controller .................................................................................................... 437
9.2.7 Commissioning the PID controller.............................................................................................. 439
9.3 Motion control ............................................................................................................................. 441
9.3.1 Phasing ...................................................................................................................................... 446
9.3.2 Configuring a pulse generator .................................................................................................... 448
9.3.3 Configuring the axis ................................................................................................................... 449
9.3.4 Configuring the TO_CommandTable_PTO ................................................................................ 452
9.3.5 Motion control instructions ......................................................................................................... 455
9.3.5.1 MC instruction overview ............................................................................................................. 455
9.3.5.2 MC_Power (Release/block axis) instruction .............................................................................. 456
9.3.5.3 MC_Reset (Confirm error) instruction ........................................................................................ 459
9.3.5.4 MC_Home (Home axis) instruction ............................................................................................ 460
9.3.5.5 MC_Halt (Pause axis) instruction ............................................................................................... 462
9.3.5.6 MC_MoveAbsolute (Position axis absolutely) instruction .......................................................... 464
9.3.5.7 MC_MoveRelative (Position axis relatively) instruction ............................................................. 466
9.3.5.8 MC_MoveVelocity (Move axis at predefined velocity) instruction .............................................. 468
9.3.5.9 MC_MoveJog (Move axis in jog mode) instruction .................................................................... 471
9.3.5.10 MC_CommandTable (Run axis commans as movement sequence) instruction ....................... 473
9.3.5.11 MC_ChangeDynamic (Change dynamc settings for the axis) instruction .................................. 476
9.3.5.12 MC_WriteParam (write parameters of a technology object) instruction ..................................... 478
9.3.5.13 MC_ReadParam instruction (read parameters of a technology object) instruction ................... 480
9.3.6 Operation of motion control for S7-1200 .................................................................................... 481
9.3.6.1 CPU outputs used for motion control ......................................................................................... 481
9.3.6.2 Hardware and software limit switches for motion control .......................................................... 483
9.3.6.3 Homing ....................................................................................................................................... 486
9.3.6.4 Jerk limit ..................................................................................................................................... 491
9.3.7 Commissioning........................................................................................................................... 492
9.3.8 Monitoring active commands ..................................................................................................... 497
9.3.8.1 Monitoring MC instructions with a "Done" output parameter ..................................................... 497
9.3.8.2
Monitoring the MC_Velocity instruction ...................................................................................... 501
9.3.8.3 Monitoring the MC_MoveJog instruction .................................................................................... 505
10 Communication ................................................................................................................................... 509
10.1 Number of asynchronous communication connections supported ............................................ 511
10.2 PROFINET ................................................................................................................................. 512
10.2.1 Local/Partner connection ........................................................................................................... 512
Table of contents
S7-1200 Programmable controller
14 System Manual, 03/2014, A5E02486680-AG
10.2.2 Open user communication ........................................................................................................ 514
10.2.2.1 Connection IDs for the Open user communication instructions ................................................ 514
10.2.2.2 Protocols ................................................................................................................................... 517
10.2.2.3 Ad hoc mode ............................................................................................................................. 518
10.2.2.4 TCP and ISO on TCP ................................................................................................................ 519
10.2.2.5 TSEND_C and TRCV_C (Send and receive data via Ethernet) instructions ............................ 520
10.2.2.6 TCON, TDISCON, TSEND, and TRCV (TCP communication) instructions ............................. 527
10.2.2.7 UDP ........................................................................................................................................... 535
10.2.2.8 TUSEND and TURCV ............................................................................................................... 535
10.2.2.9 T_CONFIG ................................................................................................................................ 541
10.2.2.10 Common parameters for instructions ................................................................................... 548
10.2.3 Communication with a programming device ............................................................................. 550
10.2.3.1 Establishing the hardware communications connection ........................................................... 550
10.2.3.2 Configuring the devices ............................................................................................................. 551
10.2.3.3 Assigning Internet Protocol (IP) addresses ............................................................................... 551
10.2.3.4 Testing your PROFINET network ............................................................................................. 551
10.2.4 HMI-to-PLC communication ...................................................................................................... 552
10.2.4.1 Configuring logical network connections between two devices ................................................ 553
10.2.5 PLC-to-PLC communication...................................................................................................... 553
10.2.5.1 Configuring logical network connections between two devices ................................................ 554
10.2.5.2 Configuring the Local/Partner connection path between two devices ...................................... 555
10.2.5.3 Configuring transmit (send) and receive parameters ................................................................ 555
10.2.6 Configuring a CPU and PROFINET IO device.......................................................................... 558
10.2.6.1 Adding a PROFINET IO device................................................................................................. 558
10.2.6.2 Configuring logical network connections between a CPU and a PROFINET IO device .......... 558
10.2.6.3 Assigning CPUs and device names .......................................................................................... 559
10.2.6.4 Assigning Internet Protocol (IP) addresses ............................................................................... 559
10.2.6.5 Configuring the IO cycle time .................................................................................................... 560
10.2.7 Configuring a CPU and PROFINET iDevice ............................................................................. 561
10.2.7.1 I-device functionality .................................................................................................................. 561
10.2.7.2 Properties and advantages of the I-device ............................................................................... 562
10.2.7.3 Characteristics of an I-device .................................................................................................... 562
10.2.7.4 Data exchange between higher- and lower-level IO system .................................................... 565
10.2.7.5 Configuring the I-device ............................................................................................................ 567
10.2.8 Diagnostics ................................................................................................................................ 569
10.2.9 Distributed I/O instructions
........................................................................................................ 569
10.2.10 Diagnostic instructions .............................................................................................................. 569
10.2.11 Diagnostic events for distributed I/O ......................................................................................... 569
10.3 PROFIBUS ................................................................................................................................ 569
10.3.1 Communications services of the PROFIBUS CMs ................................................................... 571
10.3.2 Reference to the PROFIBUS CM user manuals ....................................................................... 572
10.3.3 Configuring a DP master and slave device ............................................................................... 572
10.3.3.1 Adding the CM 1243-5 (DP master) module and a DP slave ................................................... 572
10.3.3.2 Configuring logical network connections between two PROFIBUS devices ............................ 573
10.3.3.3 Assigning PROFIBUS addresses to the CM 1243-5 module and DP slave ............................. 574
10.3.4 Distributed I/O instructions ........................................................................................................ 575
10.3.5 Diagnostic instructions .............................................................................................................. 575
10.3.6 Diagnostic events for distributed ............................................................................................... 576
10.4 AS-i ............................................................................................................................................ 576
10.4.1 Configuring an AS-i master and slave device ........................................................................... 577
10.4.1.1 Adding the AS-i master CM 1243-2 and AS-i slave .................................................................. 577
Table of contents
S7-1200 Programmable controller
System Manual, 03/2014, A5E02486680-AG
15
10.4.1.2 Configuring logical network connections between two AS-i devices ......................................... 578
10.4.1.3 Configuring the properties of the AS-i master CM1243-2 .......................................................... 578
10.4.1.4 Assigning an AS-i address to an AS-i slave .............................................................................. 579
10.4.2 Exchanging data between the user program and AS-i slaves ................................................... 582
10.4.2.1 STEP 7 basic configuration ........................................................................................................ 582
10.4.2.2 Configuring slaves with STEP 7................................................................................................. 583
10.4.3 Distributed I/O instructions ......................................................................................................... 585
10.4.4 Working with AS-i online tools ................................................................................................... 585
10.5 S7 communication ..................................................................................................................... 587
10.5.1 GET and PUT (Read and write from a remote CPU) instructions ............................................. 587
10.5.2 Creating an S7 connection ......................................................................................................... 591
10.5.3 Configuring the Local/Partner connection path between two devices ....................................... 592
10.5.4 GET/PUT connection parameter assignment ............................................................................ 592
10.5.4.1 Connection parameters .............................................................................................................. 593
10.5.4.2 Configuring a CPU-to-CPU S7 connection ................................................................................ 596
11 Web server ......................................................................................................................................... 601
11.1 Enabling the Web server ............................................................................................................ 603
11.2 Configuring Web server users ................................................................................................... 604
11.3 Accessing the Web pages from a PC ........................................................................................ 606
11.4 Accessing the Web pages from a mobile device ....................................................................... 607
11.5 Standard Web pages ................................................................................................................. 609
11.5.1 Layout of the standard Web pages ............................................................................................ 609
11.5.2 Logging in and user privileges ................................................................................................... 610
11.5.3 Introduction ................................................................................................................................ 613
11.5.4 Start ............................................................................................................................................ 614
11.5.5 Identification ............................................................................................................................... 615
11.5.6 Diagnostic Buffer ........................................................................................................................ 616
11.5.7 Module Information .................................................................................................................... 616
11.5.8 Communication .......................................................................................................................... 620
11.5.9 Variable Status ........................................................................................................................... 620
11.5.10 File Browser ............................................................................................................................... 622
11.6 User-defined Web pages ........................................................................................................... 625
11.6.1 Creating HTML pages ................................................................................................................ 626
11.6.2 AWP commands supported by the S7-1200 Web server .......................................................... 627
11.6.2.1 Reading variables ...................................................................................................................... 629
11.6.2.2 Writing variables......................................................................................................................... 630
11.6.2.3 Reading special variables .......................................................................................................... 631
11.6.2.4 Writing special variables ............................................................................................................ 633
11.6.2.5 Using an alias for a variable reference ...................................................................................... 634
11.6.2.6 Defining enum types .................................................................................................................. 635
11.6.2.7 Referencing CPU variables with an enum type ......................................................................... 635
11.6.2.8 Creating fragments .................................................................................................................... 637
11.6.2.9 Importing fragments ................................................................................................................... 638
11.6.2.10 Combining definitions............................................................................................................ 638
11.6.2.11 Handling tag names that contain special characters ............................................................ 639
11.6.3 Configuring use of user-defined Web pages ............................................................................. 641
11.6.4 Programming the WWW instruction for user-defined web pages .............................................. 642
11.6.5 Downloading the program blocks to the CPU ............................................................................ 643
Table of contents
S7-1200 Programmable controller
16 System Manual, 03/2014, A5E02486680-AG
11.6.6 Accessing the user-defined Web pages ................................................................................... 644
11.6.7 Constraints specific to user-defined Web pages....................................................................... 644
11.6.8 Example of a user-defined web page ....................................................................................... 645
11.6.8.1 Web page for monitoring and controlling a wind turbine ........................................................... 645
11.6.8.2 Reading and displaying controller data ..................................................................................... 647
11.6.8.3 Using an enum type .................................................................................................................. 648
11.6.8.4 Writing user input to the controller ............................................................................................ 649
11.6.8.5 Writing a special variable .......................................................................................................... 650
11.6.8.6 Reference: HTML listing of remote wind turbine monitor Web page ........................................ 650
11.6.8.7 Configuration in STEP 7 of the example Web page ................................................................. 654
11.6.9 Setting up user-defined Web pages in multiple languages ....................................................... 656
11.6.9.1 Creating the folder structure...................................................................................................... 656
11.6.9.2 Programming the language switch ............................................................................................ 657
11.6.9.3 Configuring STEP 7 to use a multi-language page structure .................................................... 659
11.6.10 Advanced user-defined Web page control ................................................................................ 660
11.7 Constraints ................................................................................................................................ 664
11.7.1 Feature restrictions when the Internet options disable JavaScript ........................................... 665
11.7.2 Feature restrictions when the Internet options do not allow cookies ........................................ 666
11.7.3 Importing the Siemens security certificate ................................................................................ 666
11.7.4 Importing CSV format data logs to non-USA/UK versions of Microsoft Excel .......................... 667
12 Communication processor and Modbus TCP ........................................................................................ 669
12.1 Using the serial communication interfaces ............................................................................... 669
12.2 Biasing and terminating an RS485 network connector ............................................................. 670
12.3 Point-to-point (PtP) communication .......................................................................................... 671
12.3.1 Configuring the communication ports ....................................................................................... 672
12.3.1.1 Managing flow control ............................................................................................................... 674
12.3.2 Configuring the transmit (send) and receive parameters .......................................................... 675
12.3.2.1 Configuring transmit (send) parameters ................................................................................... 675
12.3.2.2 Configuring receive parameters ................................................................................................ 676
12.3.3 Point-to-point instructions .......................................................................................................... 684
12.3.3.1 Common parameters for Point-to-Point instructions ................................................................. 684
12.3.3.2 PORT_CFG (Configure communication parameters dynamically) instruction .......................... 686
12.3.3.3 SEND_CFG (Configure serial transmission parameters dynamically) instruction .................... 688
12.3.3.4 RCV_CFG (Configure serial receive parameters dynamically) instruction ............................... 689
12.3.3.5 SEND_PTP (Transmit send buffer data) instruction ................................................................. 694
12.3.3.6 RCV_PTP (Enable receive messages) instruction ................................................................... 697
12.3.3.7 RCV_RST (Delete receive buffer) instruction ........................................................................... 698
12.3.3.8 SGN_GET (Query RS-232 signals) instruction ......................................................................... 699
12.3.3.9 SGN_SET (Set RS-232 signals) instruction .............................................................................. 700
12.3.4 Programming the PtP communications ..................................................................................... 702
12.3.4.1 Polling architecture .................................................................................................................... 703
12.3.5 Example: Point-to-Point communication ................................................................................... 704
12.3.5.1 Configuring the communication module .................................................................................... 705
12.3.5.2 RS422 and RS485 operating modes ........................................................................................ 707
12.3.5.3 Programming the STEP 7 program ........................................................................................... 710
12.3.5.4 Configuring the terminal emulator ............................................................................................. 711
12.3.5.5 Running the example program .................................................................................................. 712
12.4 Universal serial interface (USS) communication....................................................................... 712
12.4.1 Requirements for using the USS protocol ................................................................................. 713
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
Table of contents
S7-1200 Programmable controller
18 System Manual, 03/2014, A5E02486680-AG
14.11.3 Capturing the online values of a DB to reset the start values ................................................... 797
14.11.4 Using a watch table to monitor and modify values in the CPU ................................................. 798
14.11.4.1 Using a trigger when monitoring or modifying PLC tags ..................................................... 799
14.11.4.2 Enabling outputs in STOP mode .......................................................................................... 800
14.11.5 Forcing values in the CPU ........................................................................................................ 801
14.11.5.1 Using the force table ............................................................................................................ 801
14.11.5.2 Operation of the Force function ........................................................................................... 802
14.12 Downloading in RUN mode ....................................................................................................... 803
14.12.1 Prerequisites for "Download in RUN mode" .............................................................................. 804
14.12.2 Changing your program in RUN mode ...................................................................................... 805
14.12.3 Downloading selected blocks .................................................................................................... 806
14.12.4 Downloading a single selected block with a compile error in another block ............................. 807
14.12.5 Modifying and downloading existing blocks in RUN mode ....................................................... 808
14.12.6 System reaction if the download process fails .......................................................................... 811
14.12.7 Considerations when downloading in RUN mode .................................................................... 811
14.13 Tracing and recording CPU data on trigger conditions ............................................................. 813
15 SM 1278 4xIO-Link Master ................................................................................................................... 815
15.1 SM 1278 4xIO-Link Master overview ........................................................................................ 815
15.1.1 Overview ................................................................................................................................... 815
15.1.2 IO-Link and your STEP 7 program ............................................................................................ 815
15.1.3 Properties .................................................................................................................................. 816
15.1.4 Functions ................................................................................................................................... 817
15.1.5 Replacing the SM 4xIO-Link signal module .............................................................................. 817
15.1.6 Reset module to factory settings ............................................................................................... 818
15.2 Connecting ................................................................................................................................ 819
15.2.1 Pin assignment .......................................................................................................................... 819
15.2.2 Block diagram ........................................................................................................................... 820
15.3 Parameters/address space ....................................................................................................... 821
15.3.1 Configuration ............................................................................................................................. 821
15.3.2 Parameters ................................................................................................................................ 821
15.3.3 Address space .......................................................................................................................... 822
15.3.4 Parameter data record .............................................................................................................. 822
15.4 Interrupt, error, and system alarms ........................................................................................... 824
15.4.1 Status and error display ............................................................................................................ 824
15.4.2 Diagnostic alarms ...................................................................................................................... 826
A Technical specifications ....................................................................................................................... 829
A.1 General technical specifications ............................................................................................... 829
A.2 CPU 1211C ............................................................................................................................... 837
A.2.1 General specifications and features .......................................................................................... 837
A.2.2 Timers, counters and code blocks supported by CPU 1211C .................................................. 838
A.2.3 Digital inputs and outputs .......................................................................................................... 840
A.2.4 Analog inputs ............................................................................................................................ 842
A.2.4.1 Step response of the built-in analog inputs of the CPU ............................................................ 842
A.2.4.2 Sample time for the built-in analog ports of the CPU ................................................................ 843
A.2.4.3 Measurement ranges of the analog inputs for voltage (CPUs) ................................................. 843
A.2.5 CPU 1211 wiring diagrams ....................................................................................................... 844
A.3 CPU 1212C ............................................................................................................................... 847
Table of contents
S7-1200 Programmable controller
System Manual, 03/2014, A5E02486680-AG
19
A.3.1 General specifications and features........................................................................................... 847
A.3.2 Timers, counters and code blocks supported by CPU 1212C ................................................... 848
A.3.3 Digital inputs and outputs ........................................................................................................... 850
A.3.4 Analog inputs ............................................................................................................................. 852
A.3.4.1 Step response of the built-in analog inputs of the CPU ............................................................. 852
A.3.4.2 Sample time for the built-in analog ports of the CPU ................................................................. 853
A.3.4.3 Measurement ranges of the analog inputs for voltage (CPUs) .................................................. 853
A.3.5 CPU 1212C wiring diagrams ...................................................................................................... 854
A.4 CPU 1214C ................................................................................................................................ 857
A.4.1 General specifications and features........................................................................................... 857
A.4.2 Timers, counters and code blocks supported by CPU 1214C ................................................... 858
A.4.3 Digital inputs and outputs ........................................................................................................... 860
A.4.4 Analog inputs ............................................................................................................................. 862
A.4.4.1 Step response of the built-in analog inputs of the CPU ............................................................. 862
A.4.4.2 Sample time for the built-in analog ports of the CPU ................................................................. 863
A.4.4.3 Measurement ranges of the analog inputs for voltage (CPUs) .................................................. 863
A.4.5 CPU 1214C wiring diagrams ...................................................................................................... 864
A.5 CPU 1215C ................................................................................................................................ 867
A.5.1 General specifications and features........................................................................................... 867
A.5.2 Timers, counters and code blocks supported by CPU 1215C ................................................... 869
A.5.3 Digital inputs and outputs ........................................................................................................... 871
A.5.4 Analog inputs and outputs ......................................................................................................... 872
A.5.4.1 Step response of built-in analog inputs of the CPU ................................................................... 873
A.5.4.2 Sample time for the built-in analog ports of the CPU ................................................................. 873
A.5.4.3 Measurement ranges of the analog inputs for voltage (CPUs) .................................................. 873
A.5.4.4 Analog output specifications ...................................................................................................... 874
A.5.5 CPU 1215C wiring diagrams ...................................................................................................... 875
A.6 CPU 1217C ................................................................................................................................ 879
A.6.1 General specifications and features........................................................................................... 879
A.6.2 Timers, counters and code blocks supported by CPU 1217C ................................................... 880
A.6.3 Digital inputs and outputs ........................................................................................................... 882
A.6.4 Analog inputs and outputs ......................................................................................................... 887
A.6.4.1 Analog input specifications ........................................................................................................ 887
A.6.4.2 Step response of built-in analog inputs of the CPU ................................................................... 888
A.6.4.3 Sample time for the built-in analog ports of the CPU ................................................................. 888
A.6.4.4 Measurement ranges of the analog inputs for voltage (CPUs) .................................................. 889
A.6.4.5 Analog output specifications
...................................................................................................... 889
A.6.5 CPU 1217C wiring diagrams ...................................................................................................... 891
A.7 Digital signal modules (SMs) ..................................................................................................... 892
A.7.1 SM 1221 digital input specifications ........................................................................................... 892
A.7.2 SM 1222 8-point digital output specifications ............................................................................ 894
A.7.3 SM 1222 16-point digital output specifications .......................................................................... 895
A.7.4 SM 1223 digital input/output VDC specifications ....................................................................... 900
A.7.5 SM 1223 digital input/output AC specifications .......................................................................... 904
A.8 Analog signal modules (SMs) .................................................................................................... 907
A.8.1 SM 1231 analog input module specifications ............................................................................ 907
A.8.2 SM 1232 analog output module specifications .......................................................................... 910
A.8.3 SM 1234 analog input/output module specifications ................................................................. 913
A.8.4 Step response of the analog inputs ........................................................................................... 916
A.8.5 Sample time and update times for the analog inputs................................................................. 916
Table of contents
S7-1200 Programmable controller
20 System Manual, 03/2014, A5E02486680-AG
A.8.6 Measurement ranges of the analog inputs for voltage and current (SB and SM) ..................... 916
A.8.7 Measurement ranges of the analog outputs for voltage and current (SB and SM) .................. 917
A.9 Thermocouple and RTD signal modules (SMs) ........................................................................ 919
A.9.1 SM 1231 Thermocouple ............................................................................................................ 919
A.9.1.1 Basic operation for a thermocouple .......................................................................................... 922
A.9.1.2 Selection tables for the SM 1231 thermocouple ....................................................................... 923
A.9.2 SM 1231 RTD ........................................................................................................................... 925
A.9.2.1 Selection tables for the SM 1231 RTD ...................................................................................... 928
A.10 Technology modules ................................................................................................................. 931
A.10.1 SM 1278 4xIO-Link Master SM ................................................................................................. 931
A.10.1.1 SM 1278 4xIO-Link Master signal module specifications ......................................................... 931
A.10.1.2 SM 1278 4xIO-Link Master SM wiring diagrams....................................................................... 934
A.11 Digital signal boards (SBs) ........................................................................................................ 935
A.11.1 SB 1221 200 kHz digital input specifications ............................................................................ 935
A.11.2 SB 1222 200 kHz digital output specifications .......................................................................... 937
A.11.3 SB 1223 200 kHz digital input / output specifications ............................................................... 940
A.11.4 SB 1223 2 X 24 VDC input / 2 X 24 VDC output specifications................................................ 943
A.12 Analog signal boards (SBs)....................................................................................................... 946
A.12.1 SB 1231 1 analog input specifications ...................................................................................... 946
A.12.2 SB 1232 1 analog output specifications .................................................................................... 948
A.12.3 Measurement ranges for analog inputs and outputs ................................................................ 950
A.12.3.1 Step response of the analog inputs .......................................................................................... 950
A.12.3.2 Sample time and update times for the analog inputs ................................................................ 950
A.12.3.3 Measurement ranges of the analog inputs for voltage and current (SB and SM) ..................... 950
A.12.3.4 Measurement ranges of the analog outputs for voltage and current (SB and SM) .................. 951
A.12.4 Thermocouple signal boards (SBs) ........................................................................................... 953
A.12.4.1 SB 1231 1 analog thermocouple input specifications ............................................................... 953
A.12.4.2 Basic operation for a thermocouple .......................................................................................... 954
A.12.5 RTD signal boards (SBs) .......................................................................................................... 957
A.12.5.1 SB 1231 1 analog RTD input specifications .............................................................................. 957
A.12.5.2 Selection tables for the SB 1231 RTD ...................................................................................... 960
A.13 BB 1297 Battery board .............................................................................................................. 962
A.14 Communication interfaces ......................................................................................................... 964
A.14.1 PROFIBUS ................................................................................................................................ 964
A.14.1.1 CM 1242-5 PROFIBUS DP Slave ............................................................................................. 964
A.14.1.2 CM 1243-5 PROFIBUS DP Master ........................................................................................... 965
A.14.2 GPRS ........................................................................................................................................ 967
A.14.2.1 CP 1242
-7 GPRS ...................................................................................................................... 967
A.14.3 CM 1243-2 AS-i master ............................................................................................................. 970
A.14.3.1 Technical data for the AS-i master CM 1243-2 ......................................................................... 970
A.14.3.2 Electrical connections of the AS-i master CM 1243-2 .............................................................. 971
A.14.4 RS232, RS422, and RS485 ...................................................................................................... 973
A.14.4.1 CB 1241 RS485 specifications.................................................................................................. 973
A.14.4.2 CM 1241 RS232 specifications ................................................................................................. 975
A.14.4.3 CM 1241 RS422/485 specifications .......................................................................................... 976
A.15 TeleService (TS Adapter and TS Adapter modular) ................................................................. 978
A.16 SIMATIC memory cards ............................................................................................................ 978
A.17 Input simulators ......................................................................................................................... 978
/