Siemens SIMATIC S7-1200 Manual

Siemens SIMATIC S7-1200 Manual

Easy book
Hide thumbs Also See for SIMATIC S7-1200:
Table of Contents

Advertisement

Easy Book


SIMATIC
S7-1200
Easy Book
Manual
11/2011
A5E02486774-04
___________________
Preface
Introducing the powerful and
___________________
flexible S7-1200
STEP 7 makes the work
___________________
easy
___________________
Getting started
___________________
PLC concepts made easy
Easy to create the device
___________________
configuration
___________________
Programming made easy
Easy to communicate
___________________
between devices
___________________
PID is easy
Web server for easy Internet
___________________
connectivity
___________________
Motion control is easy
___________________
Easy to use the online tools
___________________
Technical specifications
1
2
3
4
5
6
7
8
9
10
11
A

Advertisement

Table of Contents
loading

Summary of Contents for Siemens SIMATIC S7-1200

  • Page 1 ___________________ Preface Easy Book Introducing the powerful and ___________________ flexible S7-1200 STEP 7 makes the work ___________________ easy SIMATIC ___________________ Getting started S7-1200 ___________________ Easy Book PLC concepts made easy Easy to create the device ___________________ configuration Manual ___________________ Programming made easy Easy to communicate ___________________ between devices...
  • Page 2 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.
  • Page 3: Preface

    Preface Welcome to the world of S7-1200, the latest in a line of the Siemens SIMATIC controllers. The SIMATIC S7-1200 compact controller is the modular, space-saving controller for small automation systems that require either simple or advanced functionality for logic, HMI and networking.
  • Page 4: Manual, 11/2011, A5E02486774

    STEP 7. 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.
  • Page 5 Siemens products that you are using, they can provide the fastest and most efficient answers to any problems you might encounter.
  • Page 6 Preface Easy Book Manual, 11/2011, A5E02486774-04...
  • Page 7: Table Of Contents

    Table of contents Preface ..............................3 Introducing the powerful and flexible S7-1200 ..................13 Introducing the S7-1200 PLC.......................13 Expansion capability of the CPU....................16 S7-1200 modules.........................18 Basic HMI panels .........................19 Mounting dimensions and clearance requirements ..............20 New features for S7-1200 and STEP 7 V11 ................23 STEP 7 makes the work easy........................
  • Page 8 Table of contents Create an HMI connection to share tags ..................46 3.10 Create an HMI screen ......................... 47 3.11 Select a PLC tag for the HMI element ..................48 PLC concepts made easy ........................49 Tasks performed every scan cycle ..................... 49 Operating modes of the CPU ......................
  • Page 9 Table of contents 6.3.5 Timers ............................103 6.3.6 Counters.............................107 6.3.7 Pulse-width modulation (PWM)....................109 Easy to create data logs ......................110 Easy to monitor and test your user program................112 6.5.1 Watch tables and force tables....................112 6.5.2 Cross reference to show usage ....................113 6.5.3 Call structure to examine the calling hierarchy ................113 6.5.4 Diagnostic instructions to monitor the hardware................114...
  • Page 10 Table of contents PID is easy ............................163 Inserting the PID instruction and technological object .............. 165 PID_Compact instruction......................167 PID_3STEP instruction......................170 Configuring the PID controller ....................178 Commissioning the PID controller..................... 180 Web server for easy Internet connectivity ....................181 Easy to use the standard web pages..................
  • Page 11 Table of contents 11.9 Comparing offline and online CPUs...................226 11.10 Displaying the diagnostic events....................227 11.11 Setting the IP address and time of day..................227 11.12 Resetting to factory settings.......................228 11.13 Downloading an IP address to an online CPU................229 11.14 Using the "unspecified CPU" to upload the hardware configuration..........230 11.15 Downloading in RUN mode......................231 11.15.1 Changing your program in RUN mode ..................232...
  • Page 12 Table of contents A.8.1.1 CM 1242-5 PROFIBUS slave....................271 A.8.1.2 CM 1243-5 PROFIBUS master....................272 A.8.2 GPRS CP ..........................274 A.8.2.1 Technical specifications of the CP 1242-7................274 A.8.3 Teleservice (TS)........................277 A.8.4 RS485, RS232, and RS422 communication................277 A.8.4.1 CB 1241 RS485 Specifications....................
  • Page 13: Introducing The Powerful And Flexible S7-1200

    Introducing the powerful and flexible S7-1200 Introducing the S7-1200 PLC The S7-1200 controller provides the flexibility and power to control a wide variety of devices in support of your automation needs. The compact design, flexible configuration, and powerful instruction set combine to make the S7-1200 a perfect solution for controlling a wide variety of applications.
  • Page 14 Introducing the powerful and flexible S7-1200 1.1 Introducing the S7-1200 PLC Table 1- 1 Comparing the CPU models Feature CPU 1211C CPU 1212C CPU 1214C Physical size (mm) 90 x 100 x 75 90 x 100 x 75 110 x 100 x 75 User memory Work 25 Kbytes...
  • Page 15 Introducing the powerful and flexible S7-1200 1.1 Introducing the S7-1200 PLC Table 1- 2 Blocks, timers and counters supported by S7-1200 Element Description Blocks Type OB, FB, FC, DB Size 25 Kbytes (CPU 1211C and CPU 1212C) 50 Kbytes (CPU 1214C) Quantity Up to 1024 blocks total (OBs + FBs + FCs + DBs) Address range for FBs, FCs,...
  • Page 16: Expansion Capability Of The Cpu

    Introducing the powerful and flexible S7-1200 1.2 Expansion capability of the CPU Expansion capability of the CPU The S7-1200 family provides a variety of modules and plug-in boards for expanding the capabilities of the CPU with additional I/O or other communication protocols. For detailed information about a specific module, see the technical specifications (Page 233).
  • Page 17 Introducing the powerful and flexible S7-1200 1.2 Expansion capability of the CPU Table 1- 4 Analog signal modules and signal boards Type Input only Output only Combination In/Out ③ 1 x 12 bit Analog In 1 x Analog Out  ...
  • Page 18: S7-1200 Modules

    Introducing the powerful and flexible S7-1200 1.3 S7-1200 modules S7-1200 modules Table 1- 6 S7-1200 expansion modules Type of module Description ① The CPU supports one plug-in Status LEDs on expansion board: the SB ② Removable user A signal board (SB) provides ...
  • Page 19: Basic Hmi Panels

    Introducing the powerful and flexible S7-1200 1.4 Basic HMI panels Basic HMI panels Because visualization is becoming a standard component for most machine designs, the SIMATIC HMI Basic Panels provide touch-screen devices for basic operator control and monitoring tasks. All panels have a protection rating for IP65 and have CE, UL, cULus, and NEMA 4x certification.
  • Page 20: Mounting Dimensions And Clearance Requirements

    Introducing the powerful and flexible S7-1200 1.5 Mounting dimensions and clearance requirements Basic HMI Panel Description Technical data 10" touch screen with 8 tactile keys 500 tags  Color (TFT, 256 colors)  50 process screens  211.2 mm x 158.4 mm (10.4") ...
  • Page 21 Introducing the powerful and flexible S7-1200 1.5 Mounting dimensions and clearance requirements Table 1- 7 Mounting dimensions (mm) S7-1200 Devices Width A Width B CPU 1211C and CPU 1212C 90 mm 45 mm CPU 1214C 110 mm 55 mm Signal modules Digital 8- and 16-point, Analog 2-, 4-, and 8-point, 45 mm 22.5 mm...
  • Page 22 Introducing the powerful and flexible S7-1200 1.5 Mounting dimensions and clearance requirements ① ③ Side view Vertical installation ② ④ Horizontal installation Clearance area A 25 mm thermal zone must be provided above and below the unit for free air circulation. WARNING Installation or removal of S7-1200 or related equipment with the power applied could cause electric shock or unexpected operation of equipment.
  • Page 23: New Features For S7-1200 And Step 7 V11

    Introducing the powerful and flexible S7-1200 1.6 New features for S7-1200 and STEP 7 V11 New features for S7-1200 and STEP 7 V11 STEP 7 V11 and the S7-1200 CPU firmware V2.2 provide additional capabilities and features. ● To allow you more control of how you define the data in your user program, S7-1200 provides additional data types, such as pointers, indexed arrays, and structures.
  • Page 24 Introducing the powerful and flexible S7-1200 1.6 New features for S7-1200 and STEP 7 V11 ● You can copy-protect (Page 84) your user program or code blocks by binding them to a specific CPU or memory card. ● You can capture the values of a DB (Page 224) to set those values as the start values. ●...
  • Page 25 Introducing the powerful and flexible S7-1200 1.6 New features for S7-1200 and STEP 7 V11 New modules for the S7-1200 A variety of new modules expand the power of the S7-1200 CPU and to provide the flexibility to meet your automation needs: ●...
  • Page 26 Introducing the powerful and flexible S7-1200 1.6 New features for S7-1200 and STEP 7 V11 Easy Book Manual, 11/2011, A5E02486774-04...
  • Page 27: Step 7 Makes The Work Easy

    STEP 7 makes the work easy STEP 7 provides a user-friendly environment to develop controller logic, configure HMI visualization, and setup network communication. To help increase your productivity, STEP 7 provides two different views of the project: a task-oriented set of portals that are organized on the functionality of the tools (Portal view), or a project-oriented view of the elements within the project (Project view).
  • Page 28: Easy To Insert Instructions Into Your User Program

    STEP 7 makes the work easy 2.1 Easy to insert instructions into your user program Easy to insert instructions into your user program STEP 7 provides task cards that contain the instructions for your program. The instructions are grouped according to function. To create your program, you drag instructions from the task card onto a network.
  • Page 29: Easy To Add Inputs Or Outputs To Lad And Fbd Instructions

    STEP 7 makes the work easy 2.3 Easy to add inputs or outputs to LAD and FBD instructions Easy to add inputs or outputs to LAD and FBD instructions Some of the instructions allow you to create additional inputs or outputs. ●...
  • Page 30: Easy To Change The Operating Mode Of The Cpu

    STEP 7 makes the work easy 2.5 Easy to change the operating mode of the CPU Easy to change the operating mode of the CPU The CPU does not have a physical switch for changing the operating mode (STOP or RUN). Use the "Start CPU"...
  • Page 31: Easy To Modify The Appearance And Configuration Of Step 7

    STEP 7 makes the work easy 2.6 Easy to modify the appearance and configuration of STEP 7 Easy to modify the appearance and configuration of STEP 7 You can select a variety of settings, such as the appearance of the interface, language, or the folder for saving your work.
  • Page 32: Easy To Select A Version Of An Instruction

    STEP 7 makes the work easy 2.8 Easy to select a version of an instruction Easy to select a version of an instruction The development and release cycles for certain sets of instructions (such as Modbus, PID and motion) have created multiple released versions for these instructions. To help ensure compatibility and migration with older projects, STEP 7 allows you to choose which version of instruction to insert into your user program.
  • Page 33: Capturing And Restoring A Block State

    STEP 7 makes the work easy 2.10 Capturing and restoring a block state To toggle between the editors that have been opened, click the icons in the editor bar. 2.10 Capturing and restoring a block state STEP 7 provides a means for capturing the state of a code block to create a benchmark or reference point for the user program.
  • Page 34: Changing The Call Type For A Db

    STEP 7 makes the work easy 2.11 Changing the call type for a DB 2.11 Changing the call type for a DB STEP 7 allows you to easily create or change the association of a DB for an instruction or an FB that is in an FB.
  • Page 35: Temporarily Disconnecting Devices From A Network

    STEP 7 makes the work easy 2.12 Temporarily disconnecting devices from a network 2.12 Temporarily disconnecting devices from a network You can disconnect individual network devices from the subnet. Because the configuration of the device is not removed from the project, you can easily restore the connection to the device.
  • Page 36: Easy To Virtually "Unplug" Modules Without Losing The Configuration

    STEP 7 makes the work easy 2.13 Easy to virtually "unplug" modules without losing the configuration 2.13 Easy to virtually "unplug" modules without losing the configuration STEP 7 provides a storage area for "unplugged" modules. You can drag a module from the rack to save the configuration of that module.
  • Page 37: Getting Started

    Getting started Create a project Working with STEP 7 is easy! See how quickly you can get started with creating a project. In the Start portal, click the "Create new project" task. Enter a project name and click the "Create" button. After creating the project, select the Devices &...
  • Page 38: Create Tags For The I/O Of The Cpu

    Getting started 3.2 Create tags for the I/O of the CPU Create tags for the I/O of the CPU "PLC tags" are the symbolic names for I/O and addresses. After you create a PLC tag, STEP 7 stores the tag in a tag table. All of the editors in your project (such as the program editor, the device editor, the visualization editor, and the watch table editor) can access the tag table.
  • Page 39: Create A Simple Network In Your User Program

    Getting started 3.3 Create a simple network in your user program With the tags entered into the PLC tag table, the tags are available to your user program. Create a simple network in your user program Your program code consists of instructions that the CPU executes in sequence. For this example, use ladder logic (LAD) to create the program code.
  • Page 40 Getting started 3.3 Create a simple network in your user program Use the buttons on the "Favorites" to insert contacts and coils onto the network. 1. Click the "Normally open contact" button on the "Favorites" to add a contact to the network. 2.
  • Page 41: Use The Plc Tags In The Tag Table For Addressing The Instructions

    Getting started 3.4 Use the PLC tags in the tag table for addressing the instructions Use the PLC tags in the tag table for addressing the instructions Using the tag table, you can quickly enter the PLC tags for the addresses of the contacts and coils.
  • Page 42: Add A "Box" Instruction

    Getting started 3.5 Add a "box" instruction Add a "box" instruction The program editor features a generic "box" instruction. After inserting this box instruction, you then select the type of instruction, such as an ADD instruction, from a drop-down list. Click the generic "box"...
  • Page 43: 3.6 Use The Calculate Instruction For A Complex Mathematical Equation

    Getting started 3.6 Use the CALCULATE instruction for a complex mathematical equation Use the CALCULATE instruction for a complex mathematical equation The Calculate instruction lets you create a math function that operates on multiple input parameters to produce the result, according to the equation that you define. In the Basic instruction tree, expand the Math functions folder.
  • Page 44 Getting started 3.6 Use the CALCULATE instruction for a complex mathematical equation For this example, enter the following equation for scaling a raw analog value. (The "In" and "Out" designations correspond to the parameters of the Calculate instruction.) = ((Out - Out ) / (In - In...
  • Page 45: Add An Hmi Device To The Project

    Getting started 3.7 Add an HMI device to the project Add an HMI device to the project Adding an HMI device to your project is easy! 1. Double-click the "Add new device" icon. 2. Click the "SIMATIC HMI" button in the Add new device"...
  • Page 46: Create A Network Connection Between The Cpu And Hmi Device

    Getting started 3.8 Create a network connection between the CPU and HMI device Create a network connection between the CPU and HMI device Creating a network is easy!  Go to "Devices and Networks" and select the Network view to display the CPU and HMI device.
  • Page 47: Create An Hmi Screen

    Getting started 3.10 Create an HMI screen You can use other options for creating an HMI connection: ● Dragging a PLC tag from the PLC tag table, the program editor or the device configuration editor to the HMI screen editor automatically creates an HMI connection. ●...
  • Page 48: Select A Plc Tag For The Hmi Element

    Getting started 3.11 Select a PLC tag for the HMI element 3.11 Select a PLC tag for the HMI element After you create the element on your screen, use the properties of the element to assign a PLC tag to the element. Click the selector button by the tag field to display the PLC tags of the CPU.
  • Page 49: Plc Concepts Made Easy

    PLC concepts made easy Tasks performed every scan cycle Each scan cycle includes writing the outputs, reading the inputs, executing the user program instructions, and performing system maintenance or background processing. The cycle is referred to as a scan cycle or scan. Under default conditions, all digital and analog I/O points are updated synchronously with the scan cycle using an internal memory area called the process image.
  • Page 50: Operating Modes Of The Cpu

    PLC concepts made easy 4.2 Operating modes of the CPU STARTUP ① Clears the input (or "I") memory Writes Q memory to the physical outputs ② Initializes the outputs with either the last Copies the state of the physical inputs to I value or the substitute value memory ③...
  • Page 51: Execution Of The User Program

    PLC concepts made easy 4.3 Execution of the user program You can configure the "startup after POWER ON" setting of the CPU complete with restart method using the programming software. This configuration item appears under the Device Configuration for the CPU under Startup. When power is applied, the CPU performs a sequence of power-up diagnostic checks and system initialization.
  • Page 52: Processing The Scan Cycle In Run Mode

    PLC concepts made easy 4.3 Execution of the user program 4.3.1 Processing the scan cycle in RUN mode For each scan cycle, the CPU writes the outputs, reads the inputs, executes the user program, updates communication modules, and responds to user interrupt events and communication requests.
  • Page 53 PLC concepts made easy 4.3 Execution of the user program OBs control the following operations: ● Program cycle OBs execute cyclically while the CPU is in RUN mode. The main block of the program is a program cycle OB. This is where you place the instructions that control your program and where you call additional user blocks.
  • Page 54: Event Execution Priorities And Queuing

    PLC concepts made easy 4.3 Execution of the user program 4.3.3 Event execution priorities and queuing The CPU processing is controlled by events. An event triggers an interrupt OB to be executed. You can specify the interrupt OB for an event during the creation of the block, during the device configuration, or with an ATTACH or DETACH instruction.
  • Page 55 PLC concepts made easy 4.3 Execution of the user program The time and diagnostic error interrupt events are triggered when the CPU detects an error. These events are at a higher priority class that the other interrupt events and can interrupt the execution of the time delay, cyclic and hardware interrupt events.
  • Page 56 PLC concepts made easy 4.3 Execution of the user program Event OB number Quantity allowed Start event OB priority Diagnostic error OB 82 1 event (only if OB 82 was Module transmits an error loaded) Time error OB 80 1 event (only if OB 80 was Maximum cycle time was ...
  • Page 57 PLC concepts made easy 4.3 Execution of the user program The queue overflow occurred condition results if the interrupts are occurring faster than they can be processed. The number of pending (queued) events is limited using a different queue for each event type. If an event occurs when the corresponding queue is full, a time error event is generated.
  • Page 58 PLC concepts made easy 4.3 Execution of the user program Diagnostic error events trigger the execution of OB 82 if it exists. If OB 82 does not exist, then the CPU ignores the error. No diagnostic error interrupt OB 82 is present when you create a new project.
  • Page 59: Memory Areas, Addressing And Data Types

    PLC concepts made easy 4.4 Memory areas, addressing and data types Memory areas, addressing and data types The CPU provides the following memory areas to store the user program, data, and configuration: ● Load memory is non-volatile storage for the user program, data and configuration. When a project is downloaded to the CPU, it is first stored in the Load memory area.
  • Page 60: Data Types Supported By The S7-1200

    PLC concepts made easy 4.4 Memory areas, addressing and data types 4.4.1 Data types supported by the S7-1200 Data types are used to specify both the size of a data element as well as how the data are to be interpreted. Each instruction parameter supports at least one data type, and some parameters support multiple data types.
  • Page 61 PLC concepts made easy 4.4 Memory areas, addressing and data types Data types Description Array and structure Array contains multiple elements of the same data type. Arrays can be created in the block  data types interface editors for OB, FC, FB, and DB. You cannot create an array in the PLC tags editor. Struct defines a structure of data consisting of other data types.
  • Page 62: Addressing Memory Areas

    PLC concepts made easy 4.4 Memory areas, addressing and data types 4.4.2 Addressing memory areas STEP 7 facilitates symbolic programming. You create symbolic names or "tags" for the addresses of the data, whether as PLC tags relating to memory addresses and I/O points or as local variables used within a code block.
  • Page 63 PLC concepts made easy 4.4 Memory areas, addressing and data types Each different memory location has a unique address. Your user program uses these addresses to access the information in the memory location. The absolute address consists of the following elements: ●...
  • Page 64: Accessing A "Slice" Of A Tagged Data Type

    PLC concepts made easy 4.4 Memory areas, addressing and data types Configuring the I/O in the CPU and I/O modules When you add a CPU and I/O modules to your configuration screen, I and Q addresses are automatically assigned. You can change the default addressing by selecting the address field in the configuration screen and typing new numbers.
  • Page 65: Accessing A Tag With An At Overlay

    PLC concepts made easy 4.4 Memory areas, addressing and data types Note Valid data types that can be accessed by slice are Byte, Char, Conn_Any, Date, DInt, DWord, Event_Any, Event_Att, Hw_Any, Hw_Device, HW_Interface, Hw_Io, Hw_Pwm, Hw_SubModule, Int, OB_Any, OB_Att, OB_Cyclic, OB_Delay, OB_WHINT, OB_PCYCLE, OB_STARTUP, OB_TIMEERROR, OB_Tod, Port, Rtm, SInt, Time, Time_Of_Day, UDInt, UInt, USInt, and Word.
  • Page 66 PLC concepts made easy 4.4 Memory areas, addressing and data types Declaration To overlay a parameter, declare an additional parameter directly after the parameter that is to be overlaid and select the data type "AT". The editor creates the overlay, and you can then choose the data type, struct, or array that you wish to use for the overlay.
  • Page 67 PLC concepts made easy 4.4 Memory areas, addressing and data types The overlay types can be addressed directly in the program logic: IF #AT[1] THEN END_IF; IF (#DW1_Struct.S1 = W#16#000C) THEN END_IF; out1 := #DW1_Struct.S2; See Auto hotspot for syntax for addressing local variables and PLC tags. Rules ●...
  • Page 68: Pulse Outputs

    PLC concepts made easy 4.5 Pulse outputs Pulse outputs The CPU or signal board (SB) can be configured to provide two pulse generators for controlling high-speed pulse output functions, either as pulse-width modulation (PWM) or as pulse-train output (PTO). The basic motion instructions use PTO outputs. You can assign each pulse generator to either PWM or PTO, but not both at the same time.
  • Page 69 PLC concepts made easy 4.5 Pulse outputs Table 4- 7 Output assignments for the pulse generators Description Default output assignment Pulse Direction PTO 1 Onboard CPU Q0.0 Q0.1 Signal board Q4.0 Q4.1 PWM 1 Onboard CPU Q0.0 Signal board Q4.0 PTO 2 Onboard CPU Q0.2...
  • Page 70 PLC concepts made easy 4.5 Pulse outputs Easy Book Manual, 11/2011, A5E02486774-04...
  • Page 71: Easy To Create The Device Configuration

    Easy to create the device configuration You create the device configuration for your PLC by adding a CPU and additional modules to your project. ① Communications module (CM): Up to 3, inserted in slots 101, 102, and 103 ② CPU: Slot 1 ③...
  • Page 72: Detecting The Configuration For An Unspecified Cpu

    Easy to create the device configuration 5.1 Detecting the configuration for an unspecified CPU Detecting the configuration for an unspecified CPU If you are connected to a CPU, you can upload the configuration of that CPU, including any modules, to your project.
  • Page 73: Adding A Cpu To The Configuration

    Easy to create the device configuration 5.2 Adding a CPU to the configuration Adding a CPU to the configuration You create your device configuration by inserting a CPU into your project. Select the CPU in the "Add a new device" dialog and click "OK" to add the CPU to the project.
  • Page 74: Adding Modules To The Configuration

    Easy to create the device configuration 5.3 Adding modules to the configuration Adding modules to the configuration Use the hardware catalog to add modules to the CPU: ● Signal module (SM) provides additional digital or analog I/O points. These modules are connected to the right side of the CPU.
  • Page 75 Easy to create the device configuration 5.3 Adding modules to the configuration Table 5- 1 Adding a module to the device configuration Module Select the module Insert the module Result SB or CB CM or CP Easy Book Manual, 11/2011, A5E02486774-04...
  • Page 76: Configuring The Operation Of The Cpu And Modules

    Easy to create the device configuration 5.4 Configuring the operation of the CPU and modules Configuring the operation of the CPU and modules To configure the operational parameters for the CPU, select the CPU in the Device view and use the "Properties" tab of the inspector window. ...
  • Page 77 Easy to create the device configuration 5.4 Configuring the operation of the CPU and modules Use the CPU properties to configure how the CPU starts up after a power cycle.  In STOP mode  In RUN mode  In the previous mode (prior to the power cycle) The CPU performs a warm restart before going to RUN mode.
  • Page 78: System Memory And Clock Memory Provide Standard Functionality

    Easy to create the device configuration 5.4 Configuring the operation of the CPU and modules 5.4.1 System memory and clock memory provide standard functionality You use the CPU properties to enable bytes for "system memory" and "clock memory". Your program logic can reference the individual bits of these functions by their tag names. ●...
  • Page 79 Easy to create the device configuration 5.4 Configuring the operation of the CPU and modules System memory configures a byte with bits that turn on (value = 1) for a specific event. Table 5- 2 System memory Reserved Always off Always on Diagnostic status First scan indicator...
  • Page 80: Configuring The Ip Address Of The Cpu

    Easy to create the device configuration 5.5 Configuring the IP address of the CPU Configuring the operation of the I/O and communication modules To configure the operational parameters for the signal module (SM), signal board (SB), or communication module (CM), select the module in the Device view and use the "Properties" tab of the inspector window.
  • Page 81 Easy to create the device configuration 5.5 Configuring the IP address of the CPU You can use STEP 7 to determine the IP address of your programming device: 1. Expand the "Online access" folder in the Project tree to display your networks. 2.
  • Page 82: Protecting Access To The Cpu Or Code Block Is Easy

    Easy to create the device configuration 5.6 Protecting access to the CPU or code block is easy After completing the configuration, download the project to the CPU. The IP addresses for the CPU and for the router (if applicable) are configured when you download the project.
  • Page 83: Know-How Protection

    Easy to create the device configuration 5.6 Protecting access to the CPU or code block is easy Table 5- 4 Security levels for the CPU Security level Access restrictions No protection Allows full access without password-protection. Write protection Allows HMI access and all forms of PLC-to-PLC communications without password-protection. Password is required for modifying (writing to) the CPU and for changing the CPU mode (RUN/STOP).
  • Page 84: Copy Protection

    Easy to create the device configuration 5.6 Protecting access to the CPU or code block is easy 1. In the Properties for the code block, click the "Protection" button to display the "Know-how protection" dialog. 2. Click the "Define" button to enter the password.
  • Page 85 Easy to create the device configuration 5.6 Protecting access to the CPU or code block is easy Use the "Properties" task card of the code block to bind the block to a specific CPU or memory card. 1. After opening the code block, select "Protection". 2.
  • Page 86 Easy to create the device configuration 5.6 Protecting access to the CPU or code block is easy Easy Book Manual, 11/2011, A5E02486774-04...
  • Page 87: Programming Made Easy

    Programming made easy Easy to design your user program When you create a user program for the automation tasks, you insert the instructions for the program into code blocks (OB, FB, or FC). Choosing the type of structure for your user program Based on the requirements of your application, you can choose either a linear structure or a modular structure for creating your user program.
  • Page 88 Programming made easy 6.1 Easy to design your user program Calling block (or interrupted block) Called FB or BC (or interrupting OB) ① Program execution ② Instruction (or interrupting event) that initiates the execution of another block ③ Program execution ④...
  • Page 89: Use Obs For Organizing Your User Program

    Programming made easy 6.1 Easy to design your user program 6.1.1 Use OBs for organizing your user program Organization blocks provide the structure for your program. They serve as the interface between the operating system and the user program. OBs are event-driven. An event, such as a diagnostic interrupt or a time interval, will cause the CPU to execute an OB.
  • Page 90: Fbs And Fcs Make Programming The Modular Tasks Easy

    Programming made easy 6.1 Easy to design your user program You can modify the operational parameters for an OB. For example, you can configure the time parameter for a time-delay OB or for a cyclic interrupt OB. Creating an additional OB within a class of OB: You can create multiple OBs for your user program, even for the program cycle and startup OB classes.
  • Page 91: Data Blocks Provide Easy Storage For Program Data

    Programming made easy 6.1 Easy to design your user program You can assign start values to the parameters in the FB interface. These values are transferred to the associated instance DB. If you do not assign parameters, the values currently stored in the instance DB will be used. In some cases, you must assign parameters.
  • Page 92: Creating A New Code Block

    Programming made easy 6.1 Easy to design your user program The data stored in a DB is not deleted when the data block is closed or the execution of the associated code block comes to an end. There are two types of DBs: ●...
  • Page 93: Calling A Code Block From Another Code Block

    Programming made easy 6.2 Easy-to-use programming languages 6.1.5 Calling a code block from another code block You can easily have any code block (OB, FB, or FC) in your user program call an FB or FC in your CPU. 1. Open the code block that will call the other block. 2.
  • Page 94: Function Block Diagram (Fbd)

    Programming made easy 6.2 Easy-to-use programming languages To create the logic for complex operations, you can insert branches to create the logic for parallel circuits. Parallel branches are opened downwards or are connected directly to the power rail. You terminate the branches upwards. LAD provides "box"...
  • Page 95: Scl Overview

    Programming made easy 6.2 Easy-to-use programming languages 6.2.3 SCL overview Structured Control Language (SCL) is a high-level, PASCAL-based programming language for the SIMATIC S7 CPUs. SCL supports the block structure of STEP 7. You can also include program blocks written in SCL with program blocks written in LAD and FBD. SCL instructions use standard programming operators, such as for assignment (:=), mathematical functions (+ for addition, - for subtraction, * for multiplication, and / for division).
  • Page 96 Programming made easy 6.2 Easy-to-use programming languages In the section of the SCL code block you can declare the following types of parameters: ● Input, Output, InOut, and Ret_Val: These parameters define the input tags, output tags, and return value for the code block. The tag name that you enter here is used locally during the execution of the code block.
  • Page 97: Powerful Instructions Make Programming Easy

    Programming made easy 6.3 Powerful instructions make programming easy Powerful instructions make programming easy 6.3.1 Providing the basic instructions you expect Bit logic instructions The basis of bit logic instruction is contacts and coils. Contacts read the status of a bit, while the coils write the status of the operation to a bit.
  • Page 98 Programming made easy 6.3 Powerful instructions make programming easy Output coil Inverted output coil ● If there is power flow through an output coil, then the output bit is set to 1. ● If there is no power flow through an output coil, then the output coil bit is set to 0. ●...
  • Page 99: Compare And Move Instructions

    Programming made easy 6.3 Powerful instructions make programming easy ● All inputs of an AND box must be TRUE for the output to be TRUE. ● Any input of an OR box must be TRUE for the output to be TRUE. ●...
  • Page 100: Conversion Instructions

    Programming made easy 6.3 Powerful instructions make programming easy Table 6- 2 MOVE, MOVE_BLK and UMOVE_BLK instructions LAD / FBD Description Copies a data element stored at a specified out1 := in; address to a new address or multiple addresses. To add another output in LAD or FBD, click the icon by the output parameter.
  • Page 101 Programming made easy 6.3 Powerful instructions make programming easy Table 6- 4 Round and Truncate instructions LAD / FBD Description Converts a real number (Real or LReal) to an integer. The real number out := ROUND (in); fraction is rounded to the nearest integer value (IEEE - round to nearest).
  • Page 102: Math Made Easy With The Calculate Instruction

    Programming made easy 6.3 Powerful instructions make programming easy 6.3.4 Math made easy with the Calculate instruction Table 6- 7 CALCULATE instruction LAD / FBD Description Use the The CALCULATE instruction lets you create a math function that standard SCL operates on inputs (IN1, IN2, ..
  • Page 103: Timers

    Programming made easy 6.3 Powerful instructions make programming easy 6.3.5 Timers The S7-1200 supports the following timers ● The TP timer generates a pulse with a preset width time. ● The TON timer sets the output (Q) to ON after a preset time delay. ●...
  • Page 104 Programming made easy 6.3 Powerful instructions make programming easy Table 6- 10 TON (ON-delay timer) LAD / FBD Timing diagram "timer_db".TON( IN:=_bool_in_, PT:=_undef_in_, Q=>_bool_out_, ET=>_undef_out_); Table 6- 11 TOF (OFF-delay timer) LAD / FBD Timing diagram "timer_db".TOF( IN:=_bool_in_, PT:=_undef_in_, Q=>_bool_out_, ET=>_undef_out_);...
  • Page 105 Programming made easy 6.3 Powerful instructions make programming easy Table 6- 13 Preset timer -(PT)- and Reset timer -(RT)- coil instructions Description Use the Preset timer -(PT)- and Reset timer -(RT)- coil instructions with either box or coil timers. These coil instructions can be placed in a mid-line position.
  • Page 106 Programming made easy 6.3 Powerful instructions make programming easy PT (preset time) and ET (elapsed time) values are stored in the specified IEC_TIMER DB data as signed double integers that represent milliseconds of time. TIME data uses the T# identifier and can be entered as a simple time unit (T#200ms or 200) and as compound time units like T#2s_200ms.
  • Page 107: Counters

    Programming made easy 6.3 Powerful instructions make programming easy Self-resetting timers are useful to trigger actions that need to occur periodically. Typically, self-resetting timers are created by placing a normally-closed contact which references the timer bit in front of the timer instruction. This timer network is typically located above one or more dependent networks that use the timer bit to trigger actions.
  • Page 108 Programming made easy 6.3 Powerful instructions make programming easy The CU, CD, and CTUD instructions use software counters whose maximum counting rate is limited by the execution rate of the OB they are placed in. Note If the events to be counted occur within the execution rate of the OB, use CTU, CTD, or CTUD counter instructions.
  • Page 109: Pulse-Width Modulation (Pwm)

    Programming made easy 6.3 Powerful instructions make programming easy The timing diagram shows the operation of a CTD counter with an unsigned integer count value (where PV = 3). ● If the value of parameter CV (current count value) is equal to or less than 0, the counter output parameter Q = 1.
  • Page 110: Easy To Create Data Logs

    Programming made easy 6.4 Easy to create data logs The CTRL_PWM instruction stores the parameter information in the DB. For SCL, you must first create the DB for the instruction before you can reference it. For LAD and FBD, STEP 7 automatically creates the DB when you insert the instruction.
  • Page 111 Programming made easy 6.4 Easy to create data logs Use the DataLog instructions to programmatically store run-time process data in flash memory of the CPU. The data records are organized as a circular log file of a pre- determined size. New records are appended to the data log file. After the data log file has stored the maximum number of records, the next record written overwrites the oldest record.
  • Page 112: Easy To Monitor And Test Your User Program

    Programming made easy 6.5 Easy to monitor and test your user program Table 6- 23 DataLogOpen and DataLogClose instructions LAD/FBD Description The DataLogOpen instruction opens a pre-existing data log "DataLogOpen_DB"( file. A data log must be opened before you can write new req:=_bool_in_, records to the log.
  • Page 113: Cross Reference To Show Usage

    Programming made easy 6.5 Easy to monitor and test your user program 6.5.2 Cross reference to show usage The Inspector window displays cross-reference information about how a selected object is used throughout the complete project, such as the user program, the CPU and any HMI devices.
  • Page 114: Diagnostic Instructions To Monitor The Hardware

    Programming made easy 6.5 Easy to monitor and test your user program Displaying the call structure provides you with a list of the blocks used in the user program. STEP 7 highlights the first level of the call structure and displays any blocks that are not called by any other block in the program.
  • Page 115: Instructions For Reading The Diagnostic Status Of The Devices

    Programming made easy 6.6 High-speed counter (HSC) 6.5.4.2 Instructions for reading the diagnostic status of the devices STEP 7 also includes instructions for reading the status information that is provided by the hardware devices on your network. Table 6- 26 Diagnostic instructions LAD / FBD Description...
  • Page 116 Programming made easy 6.6 High-speed counter (HSC) Table 6- 27 CTRL_HSC instruction LAD / FBD Description Each CTRL_HSC instruction uses a structure stored "counter_name"( in a DB to maintain data. hsc:=_hw_hsc_in_, HSC:= , The HSC uses a structure stored in a data block to maintain counter data.
  • Page 117: Operation Of The Hsc

    Programming made easy 6.6 High-speed counter (HSC) 6.6.1 Operation of the HSC The high-speed counter (HSC) counts events that occur faster than the OB execution rate. If the events to be counted occur within the execution rate of the OB, you can use CTU, CTD, or CTUD counter instructions.
  • Page 118 Programming made easy 6.6 High-speed counter (HSC) Selecting the functionality for the HSC All HSCs function the same way for the same counter mode of operation. There are four basic types of HSC: ● Single-phase counter with internal direction control ●...
  • Page 119 Programming made easy 6.6 High-speed counter (HSC) Input addresses for the HSC Note The digital I/O points used by high-speed counter devices are assigned during device configuration. When digital I/O point addresses are assigned to these devices, the values of the assigned I/O point addresses cannot be modified by the force function in a watch table.
  • Page 120: Configuration Of The Hsc

    Programming made easy 6.6 High-speed counter (HSC) CPU on-board input (0.x) SB input (4.x) AB-phase HSC 5 1-phase 2-phase AB-phase HSC 6 1-phase 2-phase AB-phase HSC 1 and HSC 2 can be configured for either the on-board inputs or for an SB. HSC 5 and HSC 6 are available only with an SB.
  • Page 121 Programming made easy 6.6 High-speed counter (HSC) After enabling the HSC, configure the other parameters, such as counter function, initial values, reset options and interrupt events. For information about configuring the HSC, refer to the section on configuring the CPU (Page 76).
  • Page 122 Programming made easy 6.6 High-speed counter (HSC) Easy Book Manual, 11/2011, A5E02486774-04...
  • Page 123: Easy To Communicate Between Devices

    The S7-1200 CPU is a PROFINET IO controller and communicates with STEP 7 on a programming device, with HMI devices, and with other CPUs or non-Siemens devices. An Ethernet switch is not required for a direct connection between a programming device or HMI and a CPU.
  • Page 124: Creating A Network Connection

    Easy to communicate between devices 7.1 Creating a network connection Creating a network connection Use the "Network view" of Device configuration to create the network connections between the devices in your project. After creating the network connection, use the "Properties" tab of the inspector window to configure the parameters of the network.
  • Page 125: Communication Options

    Easy to communicate between devices 7.2 Communication options Communication options The S7-1200 offers several types of communication between CPUs and programming devices, HMIs, and other CPUs: ● PROFINET (for exchanging data through the user program with other communications partners via Ethernet): –...
  • Page 126: Number Of Asynchronous Communication Connections

    Easy to communicate between devices 7.3 Number of asynchronous communication connections Number of asynchronous communication connections The CPU supports the following maximum number of simultaneous, asynchronous communication connections for PROFINET and PROFIBUS: ● 8 connections for Open User Communications (active or passive): TSEND_C, TRCV_C, TCON, TDISCON, TSEND, and TRCV.
  • Page 127: Profinet

    Easy to communicate between devices 7.5 PROFINET Use the IP_CONF instruction to change the IP configuration parameters from your user program. IP_CONF works asynchronously. The execution extends over multiple calls. PROFIBUS instructions The DPNRM_DG (read diagnostics) instruction reads the current diagnostic data of a DP slave in the format specified by EN 50 170 Volume 2, PROFIBUS.
  • Page 128: Ad Hoc Mode

    Easy to communicate between devices 7.5 PROFINET Protocol Usage examples Entering data in the Communication Addressing type receive area instructions CPU-to-CPU User Datagram Protocol TUSEND and TURCV Assigns port numbers to communication the Local (active) and Partner (passive) User program devices, but is not a communications dedicated connection...
  • Page 129: Connection Ids For The Profinet Instructions

    Easy to communicate between devices 7.5 PROFINET 7.5.2 Connection IDs for the PROFINET instructions When you insert the TSEND_C, TRCV_C or TCON PROFINET instructions into your user program, STEP 7 creates an instance DB to configure the communications channel (or connection) between the devices.
  • Page 130 Easy to communicate between devices 7.5 PROFINET The following example shows the communication between two CPUs that utilize 1 connection for both sending and receiving the data. ● Each CPU uses a TCON instruction to configure the connection between the two CPUs. ●...
  • Page 131 Easy to communicate between devices 7.5 PROFINET As shown in the following example, you can also use individual TSEND and TRCV instruction to communication over a connection created by a TSEND_C or TRCV_C instruction. The TSEND and TRCV instructions do not themselves create a new connection, so must use the DB and connection ID that was created by a TSEND_C, TRCV_C or TCON instruction.
  • Page 132: Configuring The Local/Partner Connection Path

    Easy to communicate between devices 7.5 PROFINET 7.5.3 Configuring the Local/Partner connection path The inspector window displays the properties of the connection whenever you have selected any part of the instruction. Specify the communication parameters in the "Configuration" tab of the "Properties" for the communication instruction. Table 7- 3 Configuring the connection path (using the properties of the instruction) TCP, ISO-on-TCP, and UDP...
  • Page 133 Easy to communicate between devices 7.5 PROFINET Table 7- 4 Configuring the connection path for S7 communication (Device configuration) S7 communication (GET and PUT) Connection properties For S7 communication, use the "Devices & networks" editor of the network to configure the Local/Partner connections.
  • Page 134 Easy to communicate between devices 7.5 PROFINET Table 7- 5 Parameters for the multiple CPU connection Parameter Definition Address Assigned IP addresses General End point Name assigned to the partner (receiving) CPU Interface Name assigned to the interfaces Subnet Name assigned to the subnets S7 communication only Interface type : Type of interface...
  • Page 135: Parameters For The Profinet Connection

    Easy to communicate between devices 7.5 PROFINET 7.5.4 Parameters for the PROFINET connection The TSEND_C, TRCV_C and TCON instructions require that connection-related parameters be specified in order to connect to the partner device. These parameters are specified by the TCON_Param structure for the TCP, ISO-on-TCP and UDP protocols. Typically, you use the "Configuration"...
  • Page 136 Easy to communicate between devices 7.5 PROFINET Byte Parameter and data type Description 12 … 27 local_tsap_id Array [1..16] of Local address component of connection: Byte TCP and ISO-on-TCP: local port no. (possible values: 1 to  49151; recommended values: 2000...5000): –...
  • Page 137: Profibus

    Easy to communicate between devices 7.6 PROFIBUS PROFIBUS A PROFIBUS system uses a bus master to poll slave devices distributed in a multi-drop fashion on an RS485 serial bus. A PROFIBUS slave is any peripheral device (I/O transducer, valve, motor drive, or other measuring device) which processes information and sends its output to the master.
  • Page 138: Distributed I/O Instructions

    Below, you will find examples of configurations in which the CM 1242-5 is used as a PROFIBUS slave and the CM 1243-5 is used as a PROFIBUS master. PG/PC/IPC SIMATIC S7-300 Operator control & monitoring PROFIBUS SIMATIC S7-1200 with CM 1242-5 PROFINET/ Industrial Ethernet PROFIBUS Operator control & SIMATIC S7-1200...
  • Page 139 Easy to communicate between devices 7.6 PROFIBUS SIMATIC S7-1200 Operator control & with CM 1243-5 monitoring PROFIBUS PG/PC/IPC SINAMICS ET 200S Figure 7-2 Configuration example with a CM 1243-5 as PROFIBUS master Connecting the S7-1200 to PROFIBUS DP The S7-1200 can be connected to a PROFIBUS fieldbus system with the following communications modules: ●...
  • Page 140 ● CM 1242-5 The CM 1242-5 (DP slave) can be the communications partner of the following DP V0/V1 masters: – SIMATIC S7-1200, S7-300, S7-400, S7 Modular Embedded Controller – DP master modules and the distributed IO SIMATIC ET200 – SIMATIC PC stations –...
  • Page 141 If you want to configure the module in a third-party system, there is a GSD file available for the CM 1242-5 (DP slave) on the CD that ships with the module and on Siemens Automation Customer Support pages on the Internet.
  • Page 142: Adding The Cm 1243-5 (Dp Master) Module And A Dp Slave

    Easy to communicate between devices 7.6 PROFIBUS 7.6.3 Adding the CM 1243-5 (DP master) module and a DP slave Use the hardware catalog to add PROFIBUS modules to the CPU. These modules are connected to the left side of the CPU. To insert a module into the hardware configuration, select the module in the hardware catalog and either double-click or drag the module to the highlighted slot.
  • Page 143: Assigning Profibus Addresses To The Cm 1243-5 Module And Dp Slave

    ● Address 0: Reserved for network configuration and/or programming tools attached to the ● Address 1: Reserved by Siemens for the first master ● Address 126: Reserved for devices from the factory that do not have a switch setting and must be re-addressed through the network ●...
  • Page 144 Easy to communicate between devices 7.6 PROFIBUS In the Properties window, select the "PROFIBUS address" configuration entry. STEP 7 displays the PROFIBUS address configuration dialog, which is used to assign the PROFIBUS address of the device. Table 7- 10 Parameters for the PROFIBUS address Parameter Description Subnet...
  • Page 145: As-I

    Easy to communicate between devices 7.7 AS-i AS-i The S7-1200 CM 1243-2 AS-i Master allows the attachment of an AS-i network to an S7- 1200 CPU. The actuator/sensor interface, or AS-i, is a single master network connection system for the lowest level in automation systems.
  • Page 146: Assigning As-I Addresses To The Cm 1243-2 As-I Master Module And As-I Slave

    Easy to communicate between devices 7.7 AS-i Use the hardware catalog to add AS-i slaves as well. For example, to add an "I/O module, compact, digital, input" slave, in the Hardware Catalog, expand the following containers: ● Field devices ● AS-Interface slaves Next, select "3RG9 001-0AA00"...
  • Page 147: S7 Communication

    Easy to communicate between devices 7.8 S7 communication A new slave that has not been assigned an address always has address 0. It is detected by the master as a new slave without an address assignment and is not included in normal communication until assigned an address.
  • Page 148: Creating An S7 Connection

    Easy to communicate between devices 7.8 S7 communication STEP 7 automatically creates the DB when you insert the instruction. Note To ensure data consistency, always evaluate when the operation has been completed (NDR = 1 for GET, or DONE = 1 for PUT) before accessing the data or initiating another read or write operation.
  • Page 149: Get/Put Connection Parameter Assignment

    Easy to communicate between devices 7.8 S7 communication 7.8.3 GET/PUT connection parameter assignment The GET/PUT instructions connection parameter assignment is a user aid for configuring S7 CPU-CPU communication connections. After inserting a GET or PUT block, the GET/PUT instructions connection parameter assignment is started: The inspector window displays the properties of the connection whenever you have selected any part of the instruction.
  • Page 150: Gprs

    Easy to communicate between devices 7.9 GPRS GPRS 7.9.1 Connection to a GSM network IP-based WAN communication via GPRS Using the CP 1242-7 communications processor, the S7-1200 can be connected to GSM networks. The CP 1242-7 allows WAN communication from remote stations with a control center and inter-station communication.
  • Page 151 Sending messages by SMS Figure 7-3 Sending messages by SMS from an S7-1200 station A SIMATIC S7-1200 with a CP 1242-7 can send messages by SMS to a configured mobile phone or a configured S7-1200 station. Easy Book Manual, 11/2011, A5E02486774-04...
  • Page 152 Figure 7-4 Communication between S7-1200 stations and a control center In telecontrol applications, SIMATIC S7-1200 stations with a CP 1242-7 communicate with a control center via the GSM network and the Internet. The TELECONTROL SERVER BASIC application is installed on the telecontrol server in the master station. This results in the following use cases: ●...
  • Page 153 Figure 7-5 Direct communication between two S7-1200 stations In this configuration, two SIMATIC S7-1200 stations communicate directly with each other using the CP 1242-7 via the GSM network. Each CP 1242-7 has a fixed IP address. The relevant service of the GSM network provider must allow this.
  • Page 154 In TeleService via GPRS, an engineering station on which STEP 7 is installed communicates via the GSM network and the Internet with a SIMATIC S7-1200 station with a CP 1242-7. The connection runs via a telecontrol server that serves as an intermediary and is connected to the Internet.
  • Page 155 Easy to communicate between devices 7.9 GPRS Other services and functions of the CP 1242-7 ● Time-of-day synchronization of the CP via the Internet You can set the time on the CP as follows: – In "Telecontrol" mode, the time of day is transferred by the telecontrol server. The CP uses this to set its time.
  • Page 156 Easy to communicate between devices 7.9 GPRS The ANT794-4MR GSM/GPRS antenna The following antennas are available for use in GSM/GPRS networks and can be installed both indoors and outdoors: ● Quadband antenna ANT794-4MR Figure 7-7 ANT794-4MR GSM/GPRS antenna Short name Order no.
  • Page 157: Ptp, Uss, And Modbus Communication Protocols

    Easy to communicate between devices 7.10 PtP, USS, and Modbus communication protocols 7.10 PtP, USS, and Modbus communication protocols The CPU supports the PtP protocol for character-based serial communication, in which the user application completely defines and implements the protocol of choice. PtP enables a wide variety of possibilities: ...
  • Page 158: Ptp Instructions

    Easy to communicate between devices 7.10 PtP, USS, and Modbus communication protocols LED indicators The communication modules have three LED indicators: ● Diagnostic LED (DIAG): This LED flashes red until it is addressed by the CPU. After the CPU powers up, it checks for a CB or CMs and addresses them. The diagnostic LED begins to flash green.
  • Page 159: Uss Instructions

    Easy to communicate between devices 7.10 PtP, USS, and Modbus communication protocols 7.10.3 USS instructions S7-1200 supports the USS protocol and provides instructions that are specifically designed for communicating with drives over the RS485 port of a CM or a CB. You can control the physical drive and the read/write drive parameters with the USS instructions.
  • Page 160: Modbus Instructions

    Easy to communicate between devices 7.10 PtP, USS, and Modbus communication protocols 7.10.4 Modbus instructions The CPU supports Modbus communication over different networks: ● Modbus RTU (Remote Terminal Unit) is a standard network communication protocol that uses the RS232 or RS485 electrical connection for serial data transfer between Modbus network devices.
  • Page 161 Easy to communicate between devices 7.10 PtP, USS, and Modbus communication protocols A Modbus TCP client (master) must control the client-server connection with the DISCONNECT parameter. The basic Modbus client actions are shown below. 1. Initiate a connection to a particular server (slave) IP address and IP port number 2.
  • Page 162 Easy to communicate between devices 7.10 PtP, USS, and Modbus communication protocols Easy Book Manual, 11/2011, A5E02486774-04...
  • Page 163: Pid Is Easy

    PID is easy STEP 7 provides the following PID instructions for the S7-1200 CPU: ● The PID_Compact instruction is used to control technical processes with continuous input- and output variables. ● The PID_3Step instruction is used to control motor-actuated devices, such as valves that require discrete signals for open- and close actuation.
  • Page 164 PID is easy The PID controller uses the following formula to calculate the output value for the PID_Compact instruction. · s y = K (b · w - x) + (w - x) + (c · w - x) · s a ·...
  • Page 165: Inserting The Pid Instruction And Technological Object

    PID is easy 8.1 Inserting the PID instruction and technological object Inserting the PID instruction and technological object STEP 7 provides two instructions for PID control: ● The PID_Compact instruction and its associated technological object provide a universal PID controller with tuning. The technological object contains all of the settings for the control loop.
  • Page 166 PID is easy 8.1 Inserting the PID instruction and technological object Table 8- 2 (Optional) Creating a technological object from the project navigator You can also create technological objects for your project before inserting the PID instruction. By creating the technological object before inserting a PID instruction into your user program, you can then select the technological object when you insert the PID instruction.
  • Page 167: Pid_Compact Instruction

    PID is easy 8.2 PID_Compact instruction PID_Compact instruction The PID controller uses the following formula to calculate the output value for the PID_Compact instruction. · s y = K (b · w - x) + (w - x) + (c · w - x) ·...
  • Page 168 PID is easy 8.2 PID_Compact instruction Table 8- 4 Data types for the parameters Parameter and type Data type Description Setpoint Real Setpoint of the PID controller in automatic mode. Default value: 0.0 Input Real Process value. Default value: 0.0 You must also set sPid_Cmpt.b_Input_PER_On = FALSE.
  • Page 169 PID is easy 8.2 PID_Compact instruction Parameter and type Data type Description State Current operating mode of the PID controller. Default value: 0 Use sRet.i_Mode to change the mode. State = 0: Inactive  State = 1: Pretuning  State = 2: Manual fine tuning ...
  • Page 170: Pid_3Step Instruction

    PID is easy 8.3 PID_3STEP instruction Figure 8-2 Operation of the PID_Compact controller as a PIDT1 controller with anti-windup PID_3STEP instruction The PID controller uses the following formula to calculate the output value for the PID_3Step instruction. · s Δ y = K ·...
  • Page 171 PID is easy 8.3 PID_3STEP instruction Table 8- 5 PID_3Step instruction LAD / FBD Description PID_3Step configures a PID controller with "PID_3Step_1"( self-tuning capabilities that has been SetpoInt:=_real_in_, optimized for motor-controlled valves and Input:=_real_in_, actuators. It provides two Boolean outputs. ManualValue:=_real_in_, PID_3Step is a PIDT1controller with anti- Feedback:=_real_in_,...
  • Page 172 PID is easy 8.3 PID_3STEP instruction Parameter and type Data type Description ManualUP Bool In manual mode, every rising edge opens the valve by 5% of the total actuating range, or for the duration of the minimum motor actuation time. ManualUP is evaluated only if you are using OutputPer and if position feedback is available.
  • Page 173 PID is easy 8.3 PID_3STEP instruction Parameter and type Data type Description Output_UP Bool Digital output value for opening the valve. Default value: FALSE If Config.OutputPerOn = FALSE, then parameter Output_UP is evaluated. Output_DN Bool Digital output value for closing the valve. Default value: FALSE If Config.OutputPerOn = FALSE, then parameter Output_DN is evaluated.
  • Page 174 PID is easy 8.3 PID_3STEP instruction Figure 8-3 Operation of the PID_3Step controller as a PIDT1 controller with anti-windup Easy Book Manual, 11/2011, A5E02486774-04...
  • Page 175 PID is easy 8.3 PID_3STEP instruction Figure 8-4 Operation of the PID_3Step controller without position feedback Easy Book Manual, 11/2011, A5E02486774-04...
  • Page 176 PID is easy 8.3 PID_3STEP instruction Figure 8-5 Operation of the PID_3Step controller the position feedback enabled Easy Book Manual, 11/2011, A5E02486774-04...
  • Page 177 PID is easy 8.3 PID_3STEP instruction If several errors are pending, the values of the error codes are displayed by means of binary addition. The display of error code 0003, for example, indicates that the errors 0001 and 0002 are also pending. Table 8- 7 ErrorBit parameters ErrorBit (DW#16#...)
  • Page 178: Configuring The Pid Controller

    PID is easy 8.4 Configuring the PID controller Configuring the PID controller The parameters of the technological object determine the operation of the PID controller. Use the icon to open the configuration editor. Figure 8-6 Configuration editor for PID_Compact (Basic settings) Table 8- 8 Sample configuration settings for the PID_Compact instruction Settings...
  • Page 179 PID is easy 8.4 Configuring the PID controller Figure 8-7 Configuration editor for PID_3Step (Basic settings) Table 8- 9 Sample configuration settings for the PID_3Step instruction Settings Description Basic Controller type Selects the engineering units. Invert the control logic Allows selection of a reverse-acting PID loop. If not selected, the PID loop is in direct-acting mode, and the output of PID loop ...
  • Page 180: Commissioning The Pid Controller

    PID is easy 8.5 Commissioning the PID controller Settings Description Scale Position "High stop" and "Lower limit stop" define the maximum positive position (full-open)  Feedback and the maximum negative position (full-closed). "High stop" must be greater than "Lower limit stop". "High limit process value"...
  • Page 181: Web Server For Easy Internet Connectivity

    Web server for easy Internet connectivity The Web server provides Web page access to data about your CPU and to the process data within the CPU. A set of standard Web pages are integrated into the firmware of the CPU. With these Web pages, you access the CPU with the Web browser of your PC.
  • Page 182: Constraints That Can Affect The Use Of The Web Server

    "ww.xx.yy.zz" represents the IP address of the CPU. ● Siemens provides a security certificate for secure access to the Web server. From the Introduction standard Web page, you can download and import the certificate into the Internet options of your Web browser.
  • Page 183: Constraints When Javascript Is Disabled

    Web server for easy Internet connectivity 9.2 Constraints that can affect the use of the Web server 9.2.1 Constraints when JavaScript is disabled Disabling JavaScript restricts some features The standard Web pages are implemented using HTML, JavaScripts, and cookies. Unless your site restricts the use of JavaScripts and cookies, enable them for the pages to function properly.
  • Page 184: Easy To Create User-Defined Web

    Web server for easy Internet connectivity 9.3 Easy to create user-defined web pages Easy to create user-defined web pages 9.3.1 Easy to create custom "user-defined" web pages The S7-1200 Web server also provides the means for you to create your own application- specific HTML pages that incorporate data from the PLC.
  • Page 185: Constraints Specific To User-Defined Web Pages

    Web server for easy Internet connectivity 9.3 Easy to create user-defined web pages Also be sure to also save the file from the editor in UTF-8 character encoding: You use STEP 7 to compile everything in your HTML pages into STEP 7 data blocks. These data blocks consist of one control data block that directs the display of the Web pages and one or more fragment data blocks that contain the compiled Web pages.
  • Page 186: Configuration Of A User-Defined Web Page

    Web server for easy Internet connectivity 9.3 Easy to create user-defined web pages 9.3.3 Configuration of a user-defined Web page To configure the user-defined Web pages, edit the "Web server" properties of the CPU. After you enable the Web server functionality, enter the following information: ●...
  • Page 187: Using The Www Instruction

    Web server for easy Internet connectivity 9.3 Easy to create user-defined web pages 9.3.4 Using the WWW instruction The WWW instruction allows your user-defined Web pages to be accessible from the standard Web pages. Your user program only has to execute the WWW instruction once to enable access to the user-defined Web pages.
  • Page 188 Web server for easy Internet connectivity 9.3 Easy to create user-defined web pages Easy Book Manual, 11/2011, A5E02486774-04...
  • Page 189: Motion Control Is Easy

    Motion control is easy The CPU provides motion control functionality for the operation of stepper motors and servo motors with pulse interface. The motion control functionality takes over the control and monitoring of the drives. ● The "Axis" technology object configures the mechanical drive data, drive interface, dynamic parameters, and other drive properties.
  • Page 190 Motion control is easy Table 10- 1 Maximum number of controllable drives Type of CPU No SB installed With an SB With an SB (2 x DC outputs) (4 x DC outputs) CPU 1211C DC/DC/DC AC/DC/RLY DC/DC/RLY CPU 1212C DC/DC/DC AC/DC/RLY DC/DC/RLY CPU 1214C...
  • Page 191 Motion control is easy 1. Configure a pulse generator: Select the "Pulse generators (PTO/PWM)" properties for a CPU (in Device configuration) and enable a pulse generator. Two pulse generators are available for each S7-1200 CPU. In this same configuration area under "Pulse options", select Pulse generator used as: "PTO".
  • Page 192: Configuration Of The Axis

    Motion control is easy 10.1 Configuration of the axis 10.1 Configuration of the axis STEP 7 provides the configuration tools, the commissioning tools, and the diagnostic tools for the "Axis" technological object. ① ④ Drive Commissioning ② ⑤ Technological object Diagnostics ③...
  • Page 193 Motion control is easy 10.1 Configuration of the axis After you create the technological object for the axis, you configure the axis by defining the basic parameters, such as the PTO and the configuration of the drive interface. You also configure the other properties of the axis, such as position limits, dynamics, and homing.
  • Page 194: Mc_Power Instruction

    Motion control is easy 10.2 MC_Power instruction You also configure the homing behavior (passive and active). Use the "Commissioning" control panel to test the functionality independently from your user program. Click the "Startup" icon to commission the axis. The control panel shows the current status of the axis. Not only can you enable and disable the axis, but you can also test the positioning of the axis (both in absolute and relative terms) and can specify the velocity, acceleration and deceleration.
  • Page 195 Motion control is easy 10.2 MC_Power instruction Table 10- 5 Parameters for the MC_Power instruction Parameter and type Data type Description Axis TO_Axis_1 Axis technology object Enable Bool FALSE (default): All active tasks are aborted according to the  parameterized "StopMode" and the axis is stopped. TRUE: Motion Control attempts to enable the axis.
  • Page 196 Motion control is easy 10.2 MC_Power instruction ① An axis is enabled and then disabled again. After the drive has signaled "Drive ready" back to the CPU, the successful enable can be read out via "Status_1". ② Following an axis enable, an error has occurred that caused the axis to be disabled. The error is eliminated and acknowledged with "MC_Reset".
  • Page 197: Mc_Reset Instruction

    Motion control is easy 10.3 MC_Reset instruction 10.3 MC_Reset instruction Table 10- 6 MC_Reset instruction LAD / FBD Description Use the MC_Reset instruction to acknowledge "MC_Reset_DB"( "Operating error with axis stop" and Axis:=_multi_fb_in_, "Configuration error". The errors that require Execute:=_bool_in_, acknowledgement can be found in the "List of Done=>_bool_out_, ErrorIDs and ErrorInfos"...
  • Page 198: Mc_Home Instruction

    Motion control is easy 10.4 MC_Home instruction 10.4 MC_Home instruction Table 10- 8 MC_Home instruction LAD / FBD Description Use the MC_Home instruction to match "MC_Home_DB"( the axis coordinates to the real, physical Axis:=_multi_fb_in_, drive position. Homing is required for Execute:=_bool_in_, absolute positioning of the axis: Position:=_real_in_,...
  • Page 199 Motion control is easy 10.4 MC_Home instruction Parameter and type Data type Description Mode Homing mode 0: Direct homing absolute  New axis position is the position value of parameter "Position". 1: Direct homing relative  New axis position is the current axis position + position value of parameter "Position".
  • Page 200 Motion control is easy 10.4 MC_Home instruction Table 10- 10 Override response Mode Description 0 or 1 The MC_Home task cannot be aborted by any other motion control task. The new MC_Home task does not abort any active motion control tasks. Position-related motion tasks are resumed after homing according to the new homing position (value at the Position input parameter).
  • Page 201 Motion control is easy 10.4 MC_Home instruction The MC_Home instruction initiates the homing of the axis. There are 4 different homing functions. The first two functions allow the user to set the current position of the axis and the second two position the axis with respect to a Home reference Sensor.
  • Page 202: Mc_Halt Instruction

    Motion control is easy 10.5 MC_Halt instruction 10.5 MC_Halt instruction Table 10- 11 MC_Halt instruction LAD / FBD Description Use the MC_Halt instruction to stop all "MC_Halt_DB"( motion and to brings the axis to a stand- Axis:=_multi_fb_in_, still. The stand-still position is not defined. Execute:=_bool_in_, In order to use the MC_Halt instruction, Done=>_bool_out_,...
  • Page 203 Motion control is easy 10.5 MC_Halt instruction The following values were configured in the "Dynamics > General" configuration window: Acceleration = 10.0 and Deceleration = 5.0 ① The axis is braked by an MC_Halt task until it comes to a standstill. The axis standstill is signaled via "Done_2". ②...
  • Page 204: Mc_Moveabsolute Instruction

    Motion control is easy 10.6 MC_MoveAbsolute instruction 10.6 MC_MoveAbsolute instruction Table 10- 13 MC_MoveAbsolute instruction LAD / FBD Description Use the MC_MoveAbsolute "MC_MoveAbsolute_DB"( instruction to start a positioning Axis:=_multi_fb_in_, motion of the axis to an absolute Execute:=_bool_in_, position. Position:=_real_in_, In order to use the Velocity:=_real_in_, MC_MoveAbsolute instruction, the Done=>_bool_out_,...
  • Page 205 Motion control is easy 10.6 MC_MoveAbsolute instruction The following values were configured in the "Dynamics > General" configuration window: Acceleration = 10.0 and Deceleration = 10.0 ① An axis is moved to absolute position 1000.0 with a MC_MoveAbsolute task. When the axis reaches the target position, this is signaled via "Done_1".
  • Page 206: Mc_Moverelative Instruction

    Motion control is easy 10.7 MC_MoveRelative instruction 10.7 MC_MoveRelative instruction Table 10- 15 MC_MoveRelative instruction LAD / FBD Description Use the MC_MoveRelative "MC_MoveRelative_DB"( instruction to start a positioning Axis:=_multi_fb_in_, motion relative to the start position. Execute:=_bool_in_, In order to use the Distance:=_real_in_, MC_MoveRelative instruction, the Velocity:=_real_in_,...
  • Page 207 Motion control is easy 10.7 MC_MoveRelative instruction The following values were configured in the "Dynamics > General" configuration window: Acceleration = 10.0 and Deceleration = 10.0 ① The axis is moved by an MC_MoveRelative task by the distance ("Distance") 1000.0. When the axis reaches the target position, this is signaled via "Done_1".
  • Page 208: Mc_Movevelocity Instruction

    Motion control is easy 10.8 MC_MoveVelocity instruction 10.8 MC_MoveVelocity instruction Table 10- 17 MC_MoveVelocity instruction LAD / FBD Description Use the MC_MoveVelocity "MC_MoveVelocity_DB"( instruction to move the axis Axis:=_multi_fb_in_, constantly at the specified velocity. Execute:=_bool_in_, In order to use the Velocity:=_real_in_, MC_MoveVelocity instruction, the Direction:=_int_in_,...
  • Page 209 Motion control is easy 10.8 MC_MoveVelocity instruction Parameter and type Data type Description InVelocity Bool TRUE: If "Current" = FALSE: The velocity specified in parameter  "Velocity" was reached. If "Current" = TRUE: The axis travels at the current velocity at ...
  • Page 210: Mc_Movejog Instruction

    Motion control is easy 10.9 MC_MoveJog instruction Override response The MC_MoveVelocity task can be aborted The new MC_MoveVelocity task aborts the by the following motion control tasks: following active motion control tasks:  MC_Home Mode = 3  MC_Home Mode = 3 ...
  • Page 211 Motion control is easy 10.9 MC_MoveJog instruction Table 10- 20 Parameters for the MC_MoveJog instruction Parameter and type Data type Description Axis TO_Axis_1 Axis technology object JogForward Bool As long as the parameter is TRUE, the axis moves in the positive direction at the velocity specified in parameter "Velocity".
  • Page 212: Mc_Commandtable Instruction

    Motion control is easy 10.10 MC_CommandTable instruction Override response The MC_MoveJog task can be aborted by The new MC_MoveJog task aborts the the following motion control tasks: following active motion control tasks:  MC_Home Mode = 3  MC_Home Mode = 3 ...
  • Page 213 Motion control is easy 10.10 MC_CommandTable instruction Parameter and type Data type Initial value Description Done Bool FALSE MC_CommandTable processing completed successfully Busy Bool FALSE Operation in progress CommandAborted Bool FALSE The task was aborted during processing by another task. Error Bool FALSE...
  • Page 214 Motion control is easy 10.10 MC_CommandTable instruction Table 10- 23 MC_CommandTable command types Command type Description Empty The empty serves as a placeholder for any commands to be added. The empty entry is ignored when the command table is processed Halt Pause axis.
  • Page 215: Mc_Changedynamic

    Motion control is easy 10.11 MC_ChangeDynamic 10.11 MC_ChangeDynamic Table 10- 24 MC_ChangeDynamic instruction LAD / FBD Description Changes the dynamic settings of "MC_ChangeDynamic_DB"( a motion control axis.: Execute:=_bool_in_, ChangeRampUp:=_bool_in_, Value for acceleration change  RampUpTime:=_real_in_, Value for delay change  ChangeRampDown:=_bool_in_, Value for emergency stop- ...
  • Page 216 Motion control is easy 10.11 MC_ChangeDynamic Parameter and type Data type Description ChangeJerkEnable Bool TRUE = Change the jerk limitation according to the input parameter JerkEnable. Inital value: FALSE JerkEnable Bool TRUE = Enable the jerk limitation. Inital value: FALSE Status of the affected variable stored in: <Axisname>.
  • Page 217: Easy To Use The Online Tools

    Easy to use the online tools 11.1 Going online and connecting to a CPU An online connection between the programming device and CPU is required for loading programs and project engineering data as well as for activities such as the following: ●...
  • Page 218: Interacting With The Online Cpu

    Easy to use the online tools 11.2 Interacting with the online CPU 11.2 Interacting with the online CPU The Online and Diagnostics portal provides an operator panel for changing the operating mode of the online CPU. The "Online tools" task card displays an operator panel that shows the operating mode of the online CPU.
  • Page 219: Going Online To Monitor The Values In The Cpu

    Easy to use the online tools 11.3 Going online to monitor the values in the CPU 11.3 Going online to monitor the values in the CPU To monitor the tags, you must have an online connection to the CPU. Simply click the "Go online"...
  • Page 220: Displaying Status Of The User Program Is Easy

    Easy to use the online tools 11.4 Displaying status of the user program is easy 11.4 Displaying status of the user program is easy You can monitor the status of the tags in the LAD and FBD program editors. Use the editor bar to display the LAD editor.
  • Page 221: Using The Force Table

    Easy to use the online tools 11.6 Using the force table To create a watch table: 1. Double-click "Add new watch table" to open a new watch table. 2. Enter the tag name to add a tag to the watch table.
  • Page 222 Easy to use the online tools 11.6 Using the force table In the "Force value" cell, enter the value for the input or output to be forced. You can then use the check box in the "Force" column to enable forcing of the input or output. Use the "Start or replace forcing"...
  • Page 223 Easy to use the online tools 11.6 Using the force table If the CPU is executing the user program from a write-protected memory card, you cannot initiate or change the forcing of I/O from a watch table because you cannot override the values in the write-protected user program.
  • Page 224: Capturing The Online Values Of A Db To Reset The Start Values

    Easy to use the online tools 11.7 Capturing the online values of a DB to reset the start values 11.7 Capturing the online values of a DB to reset the start values You can capture the current values being monitored in an online CPU to become the start values for a global DB.
  • Page 225: Copying Elements Of The Project

    Easy to use the online tools 11.8 Copying elements of the project 11.8 Copying elements of the project You can also copy the program blocks from an online CPU or a memory card attached to your programming device. Prepare the offline project for the copied program blocks: 1.
  • Page 226: Comparing Offline And Online Cpus

    Easy to use the online tools 11.9 Comparing offline and online CPUs 11.9 Comparing offline and online CPUs You can compare the code blocks in an online CPU with the code blocks in your project. If the code blocks of your project do not match the code blocks of the online CPU, the "Compare"...
  • Page 227: Displaying The Diagnostic Events

    Easy to use the online tools 11.10 Displaying the diagnostic events 11.10 Displaying the diagnostic events The CPU provides a diagnostic buffer which contains an entry for each diagnostic event, such as transition of the CPU operating mode or errors detected by the CPU or modules. To access the diagnostic buffer, you must be online.
  • Page 228: Resetting To Factory Settings

    Easy to use the online tools 11.12 Resetting to factory settings 11.12 Resetting to factory settings You can reset an S7-1200 to its original factory settings under the following conditions: ● No memory card is inserted in the CPU. ● The CPU has an online connection. ●...
  • Page 229: Downloading An Ip Address To An Online Cpu

    Easy to use the online tools 11.13 Downloading an IP address to an online CPU 11.13 Downloading an IP address to an online CPU To assign an IP address, you must perform the following tasks:  Configure the IP address for the CPU (Page 80).
  • Page 230: Using The "Unspecified Cpu" To Upload The Hardware Configuration

    Easy to use the online tools 11.14 Using the "unspecified CPU" to upload the hardware configuration 11.14 Using the "unspecified CPU" to upload the hardware configuration If you have a physical CPU that you can connect to the programming device, it is easy to upload the configuration of the hardware.
  • Page 231: Downloading In Run Mode

    Easy to use the online tools 11.15 Downloading in RUN mode 11.15 Downloading in RUN mode The CPU supports "Download in RUN mode". This capability is intended to allow you to make small changes to a user program with minimal disturbance to the process being controlled by the program.
  • Page 232: Changing Your Program In Run Mode

    Easy to use the online tools 11.15 Downloading in RUN mode 11.15.1 Changing your program in RUN mode To change the program in RUN mode, your must first ensure that the CPU supports "Download in RUN mode" and that the CPU is in RUN mode: 1.
  • Page 233: Technical Specifications

    ● EC Directive 94/9/EC (ATEX) "Equipment and Protective Systems Intended for Use in Potentially Explosive Atmosphere" – EN 60079-15:2005: Type of Protection 'n' The CE Declaration of Conformity is held on file available to competent authorities at: Siemens AG IA AS RD ST PLC Amberg Werner-von-Siemens-Str. 50 D92224 Amberg...
  • Page 234 ● Canadian Standards Association: CSA C22.2 Number 142 (Process Control Equipment) NOTICE The SIMATIC S7-1200 series meets the CSA standard. The cULus logo indicates that the S7-1200 has been examined and certified by Underwriters Laboratories (UL) to standards UL 508 and CSA 22.2 No. 142.
  • Page 235 Maritime approval The S7-1200 products are periodically submitted for special agency approvals related to specific markets and applications. Consult your local Siemens representative if you need additional information related to the latest listing of exact approvals by part number. Classification societies: ●...
  • Page 236 Technical specifications A.1 General Technical Specifications Electromagnetic compatibility Electromagnetic Compatibility (EMC) is the ability of an electrical device to operate as intended in an electromagnetic environment and to operate without emitting levels of electromagnetic interference (EMI) that may disturb other electrical devices in the vicinity. Table A- 2 Immunity per EN 61000-6-2 Electromagnetic compatibility - Immunity per EN 61000-6-2...
  • Page 237 Technical specifications A.1 General Technical Specifications Table A- 5 Operating conditions Environmental conditions - Operating Ambient temperature range 0° C to 55° C horizontal mounting (Inlet Air 25 mm below unit) 0° C to 45° C vertical mounting 95% non-condensing humidity Atmospheric pressure 1080 to 795 hPa (corresponding to an altitude of -1000 to 2000m) Concentration of contaminants...
  • Page 238 Technical specifications A.1 General Technical Specifications NOTICE When a mechanical contact turns on output power to the S7-1200 CPU, or any digital signal module, it sends a "1" signal to the digital outputs for approximately 50 microseconds. This could cause unexpected machine or process operation which could result in death or serious injury to personnel and/or damage to equipment.
  • Page 239: Cpu Modules

    ④ Rated Operating Current (A) CPU modules For a more complete list of modules available for S7-1200, refer to the S7-1200 System Manual or to the customer support web site (http://www.siemens.com/automation/support- request). Table A- 8 General specifications General specifications CPU 1211C...
  • Page 240 Technical specifications A.2 CPU modules Table A- 9 CPU features CPU features CPU 1211C CPU 1212C CPU 1214C User memory Work memory 25 Kbytes 25 Kbytes 50 Kbytes     Load memory 1 Mbytes 1 Mbytes 2 Mbytes ...
  • Page 241 Technical specifications A.2 CPU modules Table A- 10 Communication Technical data CPU 1211C CPU 1212C CPU 1214C Communication 1 Ethernet port 1 Ethernet port 1 Ethernet port Data rates 10/100 Mb/s 10/100 Mb/s 10/100 Mb/s     Isolation (external signal Transformer isolated, Transformer isolated, Transformer isolated,...
  • Page 242: Digital I/O Modules

    Digital I/O modules For a more complete list of modules available for S7-1200, refer to the S7-1200 System Manual or to the customer support web site (http://www.siemens.com/automation/support- request). A.3.1 SB 1221, SB 1222, and SB 1223 digital input/output (DI, DQ, and DI/DQ)
  • Page 243 Technical specifications A.3 Digital I/O modules General SB 1221 4 DI (200 kHz) SB 1222 4 DQ (200 kHz) Current SM Bus 40 mA 35 mA consumption 24 VDC 15 mA 24 VDC: 7 mA / input + 20 mA ...
  • Page 244 Technical specifications A.3 Digital I/O modules Table A- 15 Wiring diagrams for digital SBs SB 1221 input module SB 1222 output module SB 1223 input/output module SB 1221 DI 4 (200 kHz) SB 1222 DQ 4 (200 kHz) SB 1223 DI 2 / DQ2 (200 kHz) ①...
  • Page 245: Sm 1221 Digital Input (Di)

    Technical specifications A.3 Digital I/O modules A.3.2 SM 1221 digital input (DI) Table A- 16 SM 1221 digital input (DI) Technical data SM 1221 DI 8 (24VDC) SM 1221 DI 16 (24VDC) Order number 6ES7 221-1BF30-0XB0 6ES7 221-1BH30-0XB0 Number of inputs (DI) See specifications (Page 249).
  • Page 246: Sm 1222 Digital Output (Dq)

    Technical specifications A.3 Digital I/O modules A.3.3 SM 1222 digital output (DQ) Table A- 18 SM 1222 digital output (DQ) Technical data SM 1222 DQ (Relay) SM1222 DQ (24VDC) Order number DQ 8: 6ES7 222-1HF30-0XB0 DQ 8: 6ES7 222-1BF30-0XB0  ...
  • Page 247: Sm 1223 Vdc Digital Input/Output (Di / Dq)

    Technical specifications A.3 Digital I/O modules Table A- 19 Wiring diagram for SM 1222 digital output (DQ) modules SM 1222 DQ 16 (24 VDC output) SM 1222 DQ 16 (Relay output) A.3.4 SM 1223 VDC digital input/output (DI / DQ) Table A- 20 SM 1223 combination digital input / output (DI / DQ) Technical data...
  • Page 248: Sm 1223 120/230 Vac Input / Relay Output

    Technical specifications A.3 Digital I/O modules Table A- 21 Wiring diagram for SM 1223 combination DI / DQ modules SM 1223 DI 16 (24 VDC) / DQ 16 (24 VDC) SM 1223 DI 16 (24 VDC) / DQ 16 (Relay) ①...
  • Page 249: Specifications For The Digital Inputs And Outputs

    Technical specifications A.4 Specifications for the digital inputs and outputs Note The SM 1223 DI 8 x 120/230 VAC, DQ 8 x Relay signal module (6ES7 223-1QH30-0XB0) is approved for use in Class 1, Division 2, Gas Group A, B, C, D, Temperature Class T4 Ta = 40°...
  • Page 250 Technical specifications A.4 Specifications for the digital inputs and outputs Technical data CPU, SM and SB High-speed SB (200 KHz) Continuous permissible 30 VDC, max. 24 VDC SB: 28.8 VDC voltage 5 VDC SB: 6 VDC Surge voltage 35 VDC for 0.5 sec. 24 VDC SB: 35 VDC for 0.5 sec 5 VDC SB: 6 V Logic 1 signal (min.)
  • Page 251: 120/230 Vac Digital Ac Inputs

    Technical specifications A.4 Specifications for the digital inputs and outputs Table A- 25 HSC clock input rates (max.) Technical data Single phase Quadrature phase CPU 1211C 100 KHz 80 KHz CPU 1212C 100 KHz (Ia.0 to Ia.5) and 80 KHz (Ia.0 to Ia.5) and 30 KHz (Ia.6 to Ia.7) 20 KHz (Ia.6 to Ia.7) CPU 1214C...
  • Page 252: Digital Outputs (Dq)

    Technical specifications A.4 Specifications for the digital inputs and outputs A.4.3 Digital outputs (DQ) Table A- 27 Specifications for the digital outputs (DQ) Technical data Relay 24V DC 200 KHZ 24V DC (CPU and SM) (CPU, SM, and SB) (SB) Type Relay, dry contact Solid state - MOSFET...
  • Page 253 Technical specifications A.4 Specifications for the digital inputs and outputs Technical data Relay 24V DC 200 KHZ 24V DC (CPU and SM) (CPU, SM, and SB) (SB) Current per common CPU: CPU: 0.4 A SM Relay: SB: 1 A  SM 1222: 10 A (DQ 8 ...
  • Page 254: Analog I/O Modules

    Analog I/O modules For a more complete list of modules available for S7-1200, refer to the S7-1200 System Manual or to the customer support web site (http://www.siemens.com/automation/support- request). A.5.1 SB 1231 and SB 1232 analog input (AI) and output (AQ)
  • Page 255: Sm 1231 Analog Input (Ai)

    Technical specifications A.5 Analog I/O modules A.5.2 SM 1231 analog input (AI) Table A- 30 SM 1231 analog inputs (AI) Technical data SM 1231 AI 4 (13 bit) SM 1231 AI 8 (13 bit) Order number (MLFB) 6ES7 231-4HD30-0XB0 6ES7 231-4HF30-0XB0 Number of inputs 4 inputs (AI) 8 inputs (AI)
  • Page 256: Wiring Diagrams For Sm 1231 (Ai), Sm 1232 (Aq), And Sm 1234 (Ai/Aq)

    Technical specifications A.5 Analog I/O modules Technical data SM 1234 AI 4 (13 bit) / AQ 2 (14 bit) Current consumption (SM Bus) 80 mA Current consumption (24 VDC) 60 mA (no load) A.5.5 Wiring diagrams for SM 1231 (AI), SM 1232 (AQ), and SM 1234 (AI/AQ) Table A- 33 Wiring diagrams for the analog SMs SM 1231 AI 8 (13 bit)
  • Page 257: Specifications For The Analog I/O

    Technical specifications A.6 Specifications for the analog I/O Specifications for the analog I/O A.6.1 Specifications for the analog inputs (CPU, SM, and SB) Table A- 34 Specifications for analog inputs (AI) Technical data Type Voltage (single-ended) Voltage or current Voltage or current (differential) (differential), selectable in groups of 2...
  • Page 258: Input (Ai) Measurement Ranges For Voltage And Current

    Technical specifications A.6 Specifications for the analog I/O Technical data Isolation (field side to logic) None None None Cable length (meters) 100 m, shielded twisted pair 100 m, twisted and shielded 100 m twisted and shielded Diagnostics Overflow / underflow Overflow / underflow Overflow / underflow (see note 3)
  • Page 259: Step Response For The Analog Inputs (Ai)

    Technical specifications A.6 Specifications for the analog I/O A.6.3 Step response for the analog inputs (AI) The following table shows the step response times for the analog inputs (AI) of the CPU, SB and SM. Table A- 36 Step response (ms) for the analog inputs Smoothing selection (sample averaging) Integration time selection 400 Hz (2.5 ms)
  • Page 260: Specifications For The Analog Outputs (Sb And Sm)

    Technical specifications A.6 Specifications for the analog I/O Table A- 38 Sample time and update time for SB Rejection frequency (Integration Sample time SB update time time) 400 Hz (2.5 ms) 0.156 ms 0.156 ms 60 Hz (16.6 ms) 1.042 ms 1.042 ms 50 Hz (20 ms) 1.250 ms...
  • Page 261: Output (Aq) Measurement Ranges For Voltage And Current

    Technical specifications A.6 Specifications for the analog I/O A.6.6 Output (AQ) measurement ranges for voltage and current Table A- 40 Analog output representation for current System Current Output Range Decimal Hexadecimal 0 mA to 20 mA 32767 7FFF See note 1 Overflow 32512 7F00...
  • Page 262: Rtd And Thermocouple Modules

    Technical specifications A.7 RTD and Thermocouple modules RTD and Thermocouple modules The thermocouple (TC) modules (SB 1231 TC and SM 1231 TC) measure the value of voltage connected to the analog inputs. This value can be either temperature from a TC or volts.
  • Page 263 Technical specifications A.7 RTD and Thermocouple modules Table A- 42 General specifications Technical data SB 1231 AI 1 (16 bit) TC SB 1231 AI 1 (16 bit) RTD Order number 6ES7 231-5QA30-0XB0 6ES7 231-5PA30-0XB0 Dimensions W x H x D (mm) 38 x 62 x 21 mm 38 x 62 x 21 mm Weight...
  • Page 264: Sm 1231 Rtd Specifications

    Technical specifications A.7 RTD and Thermocouple modules A.7.2 SM 1231 RTD specifications Table A- 44 General specifications Technical data SM 1231 AI 4 x RTD x 16 bit SM 1231 AI 8 x RTD x16 bit Order number 6ES7 231-5PD30-0XB0 6ES7 231-5PF30-0XB0 Dimensions 45 x 100 x 75...
  • Page 265: Sm 1231 Tc Specifications

    Technical specifications A.7 RTD and Thermocouple modules A.7.3 SM 1231 TC specifications Table A- 46 General specifications Model SM 1231 AI4 x 16 bit TC SM 1231 AI8 x 16 bit TC Order number 6ES7 231-5QD30-0XB0 6ES7 231-5QF30-0XB0 Dimensions 45 x 100 x 75 45 x 100 x 75 W x H x D (mm) Weight...
  • Page 266: Analog Input Specifications For Rtd And Tc (Sm And Sb)

    Technical specifications A.7 RTD and Thermocouple modules Table A- 47 Wiring diagrams for the TC SMs SM 1231 AI 4 TC (16 bit) SM 1231 AI 8 TC (16 bit) Notes ① SM 1231 AI 8 TC: For clarity, TC 2, 3, 4, and 5 are not shown connected.
  • Page 267: Thermocouple Type

    Technical specifications A.7 RTD and Thermocouple modules Technical data RTD and Thermocouple (TC) Field to 24 VDC SM RTD and SM TC: 500 VAC (Not applicable for SB RTD and SB TC) 24 VDC to logic SM RTD and SM TC: 500 VAC (Not applicable for SB RTD and SB TC) Channel to channel isolation SM RTD: None...
  • Page 268: Thermocouple Filter Selection And Update Times

    Technical specifications A.7 RTD and Thermocouple modules Type Under range Nominal Nominal Over range Normal range Normal range 3, 4 3, 4 minimum range low limit range high maximum accuracy @ 25°C accuracy limit 0°C to 55°C TXK / XK(L) -200.0°C -150.0°C 800.0°C...
  • Page 269 Technical specifications A.7 RTD and Thermocouple modules Temperature RTD type Under range Nominal Nominal Over range Normal Normal coefficient minimum range range maximum range range low limit high limit accuracy @ accuracy 25°C 0°C to 55°C Pt 1000 Pt 0.003902 Pt 100 -243.0°C -200.0°C...
  • Page 270: Rtd Filter Selection And Update Times

    100 Hz and 200 Hz noise. Communication interfaces For a more complete list of modules available for S7-1200, refer to the S7-1200 System Manual or to the customer support web site (http://www.siemens.com/automation/support- request). A.8.1 PROFIBUS master/slave Note...
  • Page 271: Cm 1242-5 Profibus Slave

    Technical specifications A.8 Communication interfaces A.8.1.1 CM 1242-5 PROFIBUS slave Table A- 54 Technical specifications of the CM 1242-5 Technical specifications Order number 6GK7 242-5DX30-0XE0 Interfaces Connection to PROFIBUS 9-pin D-sub female connector Maximum current consumption on the PROFIBUS interface 15 mA at 5 V (only for bus termination) * when network components are connected (for example optical network components)
  • Page 272: Cm 1243-5 Profibus Master

    Technical specifications A.8 Communication interfaces PROFIBUS interface Table A- 55 Pinout of the D-sub socket Description Description - not used - P5V2: +5V power supply - not used - - not used - RxD/TxD-P: Data line B RxD/TxD-N: Data line A - not used - M5V2: Data reference potential Housing...
  • Page 273 Technical specifications A.8 Communication interfaces Technical specifications Effective power loss (typical) from 24 V DC 2.4 W   from the S7-1200 backplane bus   Power supply 24 VDC / external Min. cable cross section min.: 0.14 mm (AWG 25) ...
  • Page 274: Gprs Cp

    Technical specifications A.8 Communication interfaces A.8.2 GPRS CP Note S7-1200 PROFIBUS CMs and the GPRS CP are not approved for Maritime applications The following modules do not have Maritime approval:  CM 1242-5 PROFIBUS Slave module  CM 1243-5 PROFIBUS Master module ...
  • Page 275 Technical specifications A.8 Communication interfaces Technical specifications Relative humidity at 25 °C during operation, without 95 % condensation, maximum Degree of protection IP20 Power supply, current consumption and power loss Type of power supply Power supply / external 24 V minimum 19.2 V ...
  • Page 276 Technical specifications A.8 Communication interfaces ANT794-4MR Max. power 20 W Polarity linear vertical Connector Length of antenna cable External material Hard PVC, UV-resistant Degree of protection IP20 Permitted ambient conditions Operating temperature -40 °C through +70 °C   Transport/storage temperature -40 °C through +70 °C ...
  • Page 277: Teleservice (Ts)

    Technical specifications A.8 Communication interfaces A.8.3 Teleservice (TS) The following manuals contain the technical specification for the TS Adapter IE Basic and the TS Adapter modular: ● Industrial Software Engineering Tools Modular TS Adapter ● Industrial Software Engineering Tools TS Adapter IE Basic A.8.4 RS485, RS232, and RS422 communication A.8.4.1...
  • Page 278 Technical specifications A.8 Communication interfaces Technical data CB 1241 RS485 Isolation 500 VAC, 1 minute RS485 signal to chassis ground RS485 signal to CPU logic common Cable length, shielded 1000 m max. Baud rate 300 baud, 600 baud, 1.2 kbits, 2.4 kbits, 4.8 kbits, 9.6 kbits (default), 19.2 kbits, 38.4 kbits, 57.6 kbits, 76.8 kbits, 115.2 kbits, Parity No parity (default), even, odd, Mark (parity bit always set to 1),...
  • Page 279: Cm 1241 Rs485 And Rs232

    Technical specifications A.8 Communication interfaces You terminate only the two ends of the RS485 network. The devices in between the two end devices are not terminated or biased. See the section on "Biasing and terminating an RS485 network connector". A.8.4.2 CM 1241 RS485 and RS232 Table A- 62 General specifications...
  • Page 280: Cm 1241 Rs422/485 Specifications

    Technical specifications A.8 Communication interfaces Technical data Description Flow control (RS232) Not supported Flow control (RS485) Hardware, software Wait time 0 to 65535 ms Table A- 64 CM 1241 RS485 connector and wiring Description Connector Description (female) 1 GND Logic or communication ground 6 PWR +5V with 100 ohm series resistor: Output Not connected...
  • Page 281 Technical specifications A.8 Communication interfaces Table A- 67 Transmitter and receiver Technical data CM 1241 RS422/485 Type RS422 or RS485, 9-pin sub D female connector Common mode voltage range -7 V to +12 V, 1 second, 3 VRMS continuous Transmitter differential output voltage 2 V min.
  • Page 282: Companion Products

    Companion products A.9.1 PM 1207 power module The PM 1207 is a power supply module for the SIMATIC S7-1200. It provides the following features: ● Input 120/230 VAC, output 24 VDC/2.5A ● Order number 6ESP 332-1SH71 For more information about this product and for the product documentation, refer to the customer support web site (http://www.siemens.com/automation/support-request).
  • Page 283: Index

    Index maritime approval, 235 AS-i add AS-i slave, 146 add CM 1243-2 AS-i Master module, 145 AS-i address, 146 Access protection AS-i address properties, 147 CPU, 82 AS-i address, 146, 147 Active/passive communication configuring, 146 configuring the partners, 132, 149 AS-i Master Module, 145 connection IDs, 129 CM 1243-2 AS-i Module Features, 145...
  • Page 284 Index PtP, 157 TCON_Param, 135 CALCULATE, 43, 102 USS, 157 scaling analogs, 44 Communication board (CB) Call structure, 113 add modules, 74 Capturing the status of a code block, 33 CB 1241 RS485, 278 Capturing values from an online DB, 224 comparison chart, 16 CB 1241 RS485 specifications, 278 LED indicators, 158...
  • Page 285 Index PROFIBUS address, 143 capturing values of a DB, 224 PROFIBUS port, 143 communication board (CB), 18 PROFINET, 80 comparing and synchronizing blocks, 226 Startup parameters, 76 comparison chart, 14 user-defined Web pages, 186 configuring communication to HMI, 123 Configuring parameters Configuring parameters, 76, 80 CPU, 76, 80 copying blocks from an online CPU, 225...
  • Page 286 Index Creating user-defined Web pages, 184 status indicator, 79 Cross-references, 113 Diagnostics buffer, 227 Introduction, 113 Digital signal module (SM) Uses, 113 Input and output specifications, 249 C-Tick approval, 235 SM 1221, 245 CTRL_PWM instruction, 109 SM 1222, 246 cULus approval, 234 SM 1223, 247, 248 Customer support, 5 Discover, 230...
  • Page 287 Index FBD (function block diagram), 94 program block, 92 FC (function), 90 Project, 37 First scan indicator, 79 split editors, 38, 41 FLOOR, 101 tags, 38, 41 FM approval, 234 Global data block, 62, 91 Force, 221, 222 Global library I memory, 221, 222 USS, 159 inputs and outputs, 222...
  • Page 288 Index drag and drop between editors, 32 expandable instructions, 29 I memory favorites, 28 force, 221 FLOOR, 101 force operation, 222 force, 221 force table, 221 force operation, 222 HSC (high-speed counter), 117 GET, 147 monitor, 219 GET_DIAG, 115 monitor LAD, 220 Getting started, 41, 42 peripheral input addresses (force table), 221 HSC (high-speed counter), 116, 117...
  • Page 289 Index parameters, 135 work memory, 59 Memory areas addressing Boolean or bit values, 63 data block, 62 global memory, 62 JavaScript restrictions, standard Web pages, 183 immediate access, 62 process image, 62 temp memory, 62 Memory card Know-how protection load memory, 59 password protection, 83 Memory usage monitoring, online, 218 Modbus, 157...
  • Page 290 Index MC_Home, 198 status, 219, 220 MC_MoveAbsolute, 204 time of day, 227 MC_MoveJog, 210 watch table, 219, 220 MC_MoveRelative, 206 Online and diagnostic tools MC_MoveVelocity, 208 downloading in RUN mode, 231 MC_Power, 194 OPC, 152 MC_Reset, 197 Operating mode, 30, 51, 218 overview, 189 Operator panel, 30, 51, 218 Mounting...
  • Page 291 Index know-how protection, 83 types of communication, 125 monitoring, 219 PROFINET interface overview of the CPU, 13 Ethernet address properties, 80 tags, 38, 41 PROFINET RT, 127 using blocks, 51, 87 Program PLC tags binding to a CPU or memory card, 84 Getting started, 38, 41 calling a block, 93 Podcasts, 4...
  • Page 292 Index Structured, 87 Refreshing user-defined Web pages, 185 unplugged modules, 36 Relay electrical service life, 239 unspecific CPU, 72, 230 Replacing modules, 36 Project Reset to factory settings, 228 access protection, 82 Resetting the start values of a DB, 224 adding an HMI device, 45 Restoring the status of a code block, 33 binding to a CPU or memory card, 84...
  • Page 293 Program execution, 49 Service and support, 5 resetting the start values of a DB, 224 Settings, 31 restoring the status of a code block, 33 Siemens technical support, 5 RUN/STOP buttons, 30 Signal board (SB) signal board (SB), 18 add modules, 74...
  • Page 294 Index CPU 1214C, 239 drag and drop between editors, 32 C-Tick approval, 235 Ethernet port, 80 cULus approval, 234 expandable inputs or outputs, 29 Digital inputs and outputs (SM), 249 favorites, 28 electromagnetic compatibility (EMC), 236 force, 221 environmental conditions, 236 force operation, 222 FM approval, 234 HSC configuration, 121...
  • Page 295 Index connection IDs, 129 parameters, 135 parameters, 135 protocol, 127 TCP/IP communication, 123, 127 Technical specifications, 233 Technical support, 5 connection configuration, 132 Technological objects parameters, 135 HSC (high-speed counter), 117 UDP protocol, 127 Telecontrol, 154 Uninterruptible move (UMOVE_BLK) instruction, 99 TeleService via GPRS, 153, 154 Unplugged modules, 36 Temp memory (L), 62...
  • Page 296 Index monitor, 219 Watch tables, 220 Web pages STEP 7, 4 Web pages, user-defined, 184 Web server, 181 constraints, 182 Work memory, 14, 59 WWW, 187 Easy Book Manual, 11/2011, A5E02486774-04...

Table of Contents