Easy Book ___________________ Preface Introducing the powerful and 1 ___________________ flexible S7-1200 SIMATIC S7-1200 Easy Book STEP 7 makes the work 2 ___________________ easy 3 ___________________ Getting started ___________________ 4 PLC concepts made easy Easy to create the device ___________________ 5 configuration Manual ___________________ 6 Programming made easy Easy to communicate ___________________ 7 between devices ___________________ 8 PID is easy Web server for easy Internet ______
Legal information Warning notice system This manual contains notices you have to observe in order to ensure your personal safety, as well as to prevent damage to property. The notices referring to your personal safety are highlighted in the manual by a safety alert symbol, notices referring only to property damage have no safety alert symbol. These notices shown below are graded according to the degree of danger.
Preface Welcome to the world of S7-1200. 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. The compact design, low cost, and powerful features make the S7-1200 a perfect solution for controlling small applications.
Preface This manual describes the following products: ● STEP 7 V13 SP1 Basic and Professional ● S7-1200 CPU firmware release V4.0 Documentation and information S7-1200 and STEP 7 provide a variety of documentation and other resources for finding the technical information that you require. ● The S7-1200 system manual provides specific information about the operation, programming, and the specifications for the complete S7-1200 product family.
Preface Service and support In addition to our documentation, Siemens offers technical expertise on the Internet and on the customer support web site (http://www.siemens.com/automation/). Contact your Siemens distributor or sales office for assistance in answering any technical questions, for training, or for ordering S7 products.
Preface Easy Book 6 Manual, 03/2014, A5E02486774-AF
Table of contents Preface ................................................................................................................................................... 3 1 2 3 Introducing the powerful and flexible S7-1200 ....................................................................................... 15 1.1 Introducing the S7-1200 PLC.......................................................................................................15 1.2 Expansion capability of the CPU...............
Table of contents 4 5 6 3.10 Create an HMI screen ................................................................................................................. 49 3.11 Select a PLC tag for the HMI element ........................................................................................ 50 PLC concepts made easy ..................................................................................................................... 51 4.1 Tasks performed every scan cycle .....................
Table of contents 7 6.3.4 6.3.5 6.3.6 6.3.7 Math made easy with the Calculate instruction .........................................................................103 Timers ........................................................................................................................................104 Counters .....................................................................................................................................109 Pulse-width modulation (PWM) ....................
Table of contents 7.10.5 8 9 10 Modbus instructions .................................................................................................................. 167 PID is easy ..........................................................................................................................................169 8.1 Inserting the PID instruction and technology object .................................................................. 171 8.2 PID_Compact instruction.........................
Table of contents 10.6.3.2 Configuration of homing parameters .........................................................................................249 10.6.3.3 Sequence for active homing ......................................................................................................251 10.7 11 Commissioning...........................................................................................................................252 Easy to use the online tools....................................
Table of contents A.3.4 A.3.5 SM 1223 VDC digital input/output (DI / DQ) ............................................................................. 299 SM 1223 120/230 VAC input / Relay output ............................................................................. 300 A.4 A.4.1 A.4.2 A.4.3 Specifications for the digital inputs and outputs ........................................................................ 302 24 VDC digital inputs (DI).......................................................
Table of contents B Exchanging a V3.0 CPU for a V4.0 CPU ............................................................................................. 345 B.1 Exchanging a V3.0 CPU for a V4.0 CPU ...................................................................................345 Index...................................................................................................................................................
Table of contents Easy Book 14 Manual, 03/2014, A5E02486774-AF
1 Introducing the powerful and flexible S7-1200 1.1 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.
Introducing the powerful and flexible S7-1200 1.
Introducing the powerful and flexible S7-1200 1.
Introducing the powerful and flexible S7-1200 1.2 Expansion capability of the CPU 1.2 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 281).
Introducing the powerful and flexible S7-1200 1.
Introducing the powerful and flexible S7-1200 1.2 Expansion capability of the CPU Table 1- 6 Technology modules Module Type Description ④ IO Link SM 1278 4xIO-Link Master Supports 4 IO link slaves Table 1- 7 Other boards Module Description ③ Battery board Plugs into expansion board interface on front of CPU.
Introducing the powerful and flexible S7-1200 1.3 S7-1200 modules 1.3 Table 1- 8 S7-1200 modules S7-1200 expansion modules Type of module The CPU supports one plug-in expansion board: • A signal board (SB) provides additional I/O for your CPU. The SB connects on the front of the CPU. • A communication board (CB) allows you to add another communication port to your CPU. • A battery board (BB) allows you to provide long term backup of the realtime clock.
Introducing the powerful and flexible S7-1200 1.4 Basic HMI panels 1.4 Basic HMI panels 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. Basic HMI Panel KP 300 Basic PN Description Technical data 3.
Introducing the powerful and flexible S7-1200 1.5 Mounting dimensions and clearance requirements 1.5 Mounting dimensions and clearance requirements The S7-1200 PLC is designed to be easy to install. Whether mounted on a panel or on a standard DIN rail, the compact size makes efficient use of space. Refer to the S7-1200 System Manual for specific requirements and guidelines for installation.
Introducing the powerful and flexible S7-1200 1.5 Mounting dimensions and clearance requirements Table 1- 9 Mounting dimensions (mm) S7-1200 Devices CPU Signal modules Width A (mm) Width B (mm) Width C (mm) CPU 1211C and CPU 1212C 90 45 -- CPU 1214C 110 55 -- CPU 1215C 130 65 (top) Bottom: C1: 32.5 C2: 65 C3: 32.5 CPU 1217C 150 75 Bottom: C1: 37.5 C2: 75 C3: 37.5 Digital 8 and 16 point 45 22.
Introducing the powerful and flexible S7-1200 1.5 Mounting dimensions and clearance requirements The S7-1200 equipment is designed to be easy to install. You can install an S7-1200 either on a panel or on a standard rail, and you can orient the S7-1200 either horizontally or vertically. The small size of the S7-1200 allows you to make efficient use of space. WARNING Installation requirements for S7-1200 PLCs The SIMATIC S7-1200 PLCs are Open Type Controllers.
Introducing the powerful and flexible S7-1200 1.5 Mounting dimensions and clearance requirements ① ② Side view Horizontal installation ③ ④ Vertical installation Clearance area WARNING Installation or removal of S7-1200 or related equipment with the power applied could cause electric shock or unexpected operation of equipment.
Introducing the powerful and flexible S7-1200 1.6 New features 1.6 New features The following features are new in this release: ● The S7-1200 supports new Organization Blocks (OBs) (Page 89) with differences in priority levels and interrupts. ● The Web server (Page 193) now supports the display of standard Web pages and userdefined Web pages from a mobile device as well as from a PC.
Introducing the powerful and flexible S7-1200 1.6 New features New modules for the S7-1200 New modules expand the power of the S7-1200 CPU and provide the flexibility to meet your automation needs: ● New CPU 1217C DC/DC/DC with high-speed differential points ● New and improved S7-1200 signal modules. The new signal modules (6ES7 2xx-xxx320XB0) replace existing signal modules (6ES7 2xx-xxx30-0XB0).
2 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). Choose which view helps you work most efficiently.
STEP 7 makes the work easy 2.1 Easy to insert instructions into your user program 2.1 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. 2.
STEP 7 makes the work easy 2.3 Easy to add inputs or outputs to LAD and FBD instructions 2.3 Easy to add inputs or outputs to LAD and FBD instructions Some of the instructions allow you to create additional inputs or outputs. ● To add an input or output, click the "Create" icon or right-click on an input stub for one of the existing IN or OUT parameters and select the "Insert input" command.
STEP 7 makes the work easy 2.5 Easy to change the operating mode of the CPU 2.5 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" and "Stop CPU" toolbar buttons to change the operating mode of the CPU. When you configure the CPU in the device configuration, you configure the start-up behavior in the properties of the CPU (Page 76).
STEP 7 makes the work easy 2.6 Easy to modify the appearance and configuration of STEP 7 2.6 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. Select the "Settings" command from the "Options" menu to change these settings. 2.
STEP 7 makes the work easy 2.8 Easy to select a version of an instruction 2.8 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.
STEP 7 makes the work easy 2.10 Changing the call type for a DB To toggle between the editors that have been opened, click the icons in the editor bar. 2.10 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. • You can switch the association between different DBs. • You can switch the association between a singleinstance DB and a multi-instance DB.
STEP 7 makes the work easy 2.11 Temporarily disconnecting devices from a network 2.11 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. Right-click the interface port of the network device and select the "Disconnect from subnet" command from the context menu.
STEP 7 makes the work easy 2.12 Easy to virtually "unplug" modules without losing the configuration 2.12 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. These unplugged modules are saved with your project, allowing you to reinsert the module in the future without having to reconfigure the parameters. One use of this feature is for temporary maintenance.
STEP 7 makes the work easy 2.
3 Getting started 3.1 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 & Networks portal. Click the "Add new device" task. Select the CPU to add to the project: 1. In the "Add new device" dialog, click the "SIMATIC PLC" button. 2. Select a CPU from the list. 3.
Getting started 3.2 Create tags for the I/O of the CPU 3.2 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. With the device editor open, open a tag table. You can see the open editors displayed in the editor bar.
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. 3.3 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. The LAD program is a sequence of networks that resemble the rungs of a ladder. To open the program editor, follow these steps: 1.
Getting started 3.3 Create a simple network in your user program 1. Click the "Normally open contact" button on the "Favorites" to add a contact to the network. 2. For this example, add a second contact. 3. Click the "Output coil" button to insert a coil. The "Favorites" also provides a button for creating a branch 1. Select the left rail to select the rail for the branch. 2. Click the "Open branch" icon to add a branch to the rail of the network. 3.
Getting started 3.4 Use the PLC tags in the tag table for addressing the instructions 3.4 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. 1. Double-click the default address ?.?> above the first normally open contact. 2. Click the selector icon to the right of the address to open the tags in the tag table. 3. From the drop-down list, select "Start" for the first contact. 4.
Getting started 3.5 Add a "box" instruction 3.5 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" instruction in the "Favorites" tool bar. The generic "box" instruction supports a variety of instructions. For this example, create an ADD instruction: 1.
Getting started 3.6 Use the CALCULATE instruction for a complex mathematical equation 3.6 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. Double-click the Calculate instruction to insert the instruction into your user program.
Getting started 3.
Getting started 3.7 Add an HMI device to the project 3.7 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" dialog. 3. Select the specific HMI device from the list. You can choose to run the HMI wizard to help you configure the screens for the HMI device. 4. Click "OK" to add the HMI device to your project. The TIA Portal adds the HMI device to the project.
Getting started 3.8 Create a network connection between the CPU and HMI device 3.8 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. • To create a PROFINET network, drag a line from the green box (Ethernet port) on one device to the green box on the other device. A network connection is created for the two devices. 3.
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. ● Using the HMI wizard to browse for the PLC automatically creates the HMI connection. 3.10 Create an HMI screen Even if you do not utilize the HMI wizard, configuring an HMI screen is easy.
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. You can also drag and drop PLC tags from the Project tree to the HMI screen. Display the PLC tags in the "Details" view of the project tree and then drag the tag to the HMI screen.
4 PLC concepts made easy 4.1 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.
PLC concepts made easy 4.
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 STEP 7. This configuration item appears under the Device Configuration for the CPU under Startup. At power up, the CPU performs a sequence of power-up diagnostic checks and system initialization. During system initialization, the CPU deletes all nonretentive bit memory and resets all non-retentive DB contents to initial values.
PLC concepts made easy 4.3 Execution of the user program The size of the user program, data, and configuration is limited by the available load memory and work memory in the CPU (Page 15). There is no specific limit to the number of each individual OB, FC, FB and DB block. However, the total number of blocks is limited to 1024. 4.3.
PLC concepts made easy 4.3 Execution of the user program 4.3.2 OBs help you structure your user program OBs control the execution of the user program. Specific events in the CPU trigger the execution of an organization block. OBs cannot call each other or be called from an FC or FB. Only an event such as a diagnostic interrupt or a time interval, can start the execution of an OB.
PLC concepts made easy 4.3 Execution of the user program Consider the following two cases where interrupt events trigger a cyclic OB and a time delay OB. In both cases, the time delay OB (OB201) has no process image partition assignment and executes at priority 4. The cyclic OB (OB200) has a process image partition assignment of PIP1 and executes at priority 2.
PLC concepts made easy 4.
PLC concepts made easy 4.4 Memory areas, addressing and data types Table 4- 2 Additional events Event Description CPU action I/O access error Direct I/O read/write error The CPU logs the first occurrence in the diagnostic buffer and stays in RUN mode. Max cycle time error CPU exceeds the configured cycle time twice The CPU logs the error in the diagnostic buffer and transitions to STOP mode.
PLC concepts made easy 4.4 Memory areas, addressing and data types An optional SIMATIC memory card provides an alternative memory for storing your user program or a means for transferring your program. If you use the memory card, the CPU runs the program from the memory card and not from the memory in the CPU. Check that the memory card is not write-protected. Slide the protection switch away from the "Lock" position.
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. Hold the cursor over the parameter field of an instruction to see which data types are supported for a given parameter.
PLC concepts made easy 4.4 Memory areas, addressing and data types Data types Description Array and structure data types • Array contains multiple elements of the same data type. Arrays can be created in the block 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. The Struct data type can be used to handle a group of related process data as a single data unit.
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. To use these tags in your user program, simply enter the tag name for the instruction parameter.
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.
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 device configuration and typing new numbers. • Digital inputs and outputs are assigned in groups of 8 points (1 byte), whether the module uses all the points or not.
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. PLC Tags of type Real can be accessed by slice, but data block tags of type Real cannot.
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. Example This example shows the input parameters of a standard-access FB.
PLC concepts made easy 4.5 Pulse outputs Rules ● Overlaying of tags is only possible in FB and FC blocks with standard access. ● You can overlay parameters for all block types and all declaration sections. ● An overlaid parameter can be used like any other block parameter. ● You cannot overlay parameters of type VARIANT. ● The size of the overlaying parameter must be less than or equal to the size of the overlaid parameter.
PLC concepts made easy 4.5 Pulse outputs Note Do not exceed the maximum pulse frequency. The maximum pulse frequency of the pulse output generators is 1 MHz for the CPU 1217C and 100 KHz for CPUs 1211C, 1212C, 1214C, and 1215C; 20 KHz (for a standard SB); or 200 KHz (for a high-speed SB). The four pulse generators have default I/O assignments; however, they can be configured to any digital output on the CPU or SB. Pulse generators on the CPU cannot be assigned to distributed I/O.
PLC concepts made easy 4.5 Pulse outputs Description Pulse Direction Built-in I/O Q0.62 Q0.72 SB I/O Q4.2 Q4.3 Built-in outputs Q0.62 - SB outputs Q4.3 - PTO4 PWM4 1 The CPU 1211C does not have outputs Q0.4, Q0.5, Q0.6, or Q0.7. Therefore, these outputs cannot be used in the CPU 1211C. 2 The CPU 1212C does not have outputs Q0.6 or Q0.7. Therefore, these outputs cannot be used in the CPU 1212C.
PLC concepts made easy 4.
Easy to create the device configuration 5 You create the device configuration for your PLC by adding a CPU and additional modules to your project.
Easy to create the device configuration 5.1 Detecting the configuration for an unspecified CPU 5.1 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. Simply create a new project and select the "unspecified CPU" instead of selecting a specific CPU. (You can also skip the device configuration entirely by selecting the "Create a PLC program" from the "First steps".
Easy to create the device configuration 5.2 Adding a CPU to the configuration 5.2 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. The Device view shows the CPU and rack. Selecting the CPU in the Device view displays the CPU properties in the inspector window. Use these properties to configure the operational parameters of the CPU (Page 76).
Easy to create the device configuration 5.3 Changing a device 5.3 Changing a device You can change the device type of a configure CPU or module. From Device configuration, right-click the device and select "Change device" from the context menu. From the dialog, navigate to and select the CPU or module that you want to replace. The Change device dialog shows you combatibility information between the two devices. Note Device exchange: replacing a V3.0 CPU with a V4.
Easy to create the device configuration 5.
Easy to create the device configuration 5.5 Configuring the operation of the CPU and modules 5.5 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.
Easy to create the device configuration 5.5 Configuring the operation of the CPU and modules • 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. Warm restart resets all nonretentive memory to the default start values, but the CPU retains the current values stored in the retentive memory.
Easy to create the device configuration 5.5 Configuring the operation of the CPU and modules The CPU initializes these bytes on the transition from STOP mode to STARTUP mode. The bits of the clock memory change synchronously to the CPU clock throughout the STARTUP and RUN modes.
Easy to create the device configuration 5.5 Configuring the operation of the CPU and modules Table 5- 3 Clock memory Bit number 7 6 5 4 3 2 1 0 Period (s) 2.0 1.6 1.0 0.8 0.5 0.4 0.2 0.1 Frequency (Hz) 0.5 0.625 1 1.25 2 2.5 5 10 Tag name Because clock memory runs asynchronously to the CPU cycle, the status of the clock memory can change several times during a long cycle.
Easy to create the device configuration 5.6 Configuring the IP address of the CPU Communication module (CM) and communication board (CB) • Port configuration: Configure the communication parameters, such as baud rate, parity, data bits, stop bits, and wait time. ● Transmit and receive message: Configure options related to transmitting and receiving data (such as the message-start and message-end parameters) You can also change these configuration parameters with your user program. 5.
Easy to create the device configuration 5.6 Configuring the IP address of the CPU The "Properties" window displays the settings for the programming device. After determining the IP address and subnet mask for the CPU, enter the IP address for the CPU and for the router (if applicable). Refer to the S7-1200 System Manual for more information. After completing the configuration, download the project to the CPU.
Easy to create the device configuration 5.7 Protecting access to the CPU or code block is easy 5.7 Protecting access to the CPU or code block is easy The CPU provides four levels of security for restricting access to specific functions. When you configure the security level and password for a CPU, you limit the functions and memory areas that can be accessed without entering a password. Each level allows certain functions to be accessible without a password.
Easy to create the device configuration 5.7 Protecting access to the CPU or code block is easy When you download this configuration to the CPU, the user has HMI access and can access HMI functions without a password. To read data, the user must enter the configured password for "Read access" or the password for "Full access (no protection)". To write data, the user must enter the configured password for "Full access (no protection)".
Easy to create the device configuration 5.7 Protecting access to the CPU or code block is easy When you download this configuration to the CPU, the CPU permits PUT/GET communication from remote partners 5.7.1 Know-how protection Know-how protection allows you to prevent one or more code blocks (OB, FB, FC, or DB) in your program from unauthorized access. You create a password to limit access to the code block. The password-protection prevents unauthorized reading or modification of the code block.
Easy to create the device configuration 5.7 Protecting access to the CPU or code block is easy After entering and confirming the password, click "OK". 5.7.2 Copy protection An additional security feature allows you to bind program blocks for use with a specific memory card or CPU. This feature is especially useful for protecting your intellectual property. When you bind a program block to a specific device, you restrict the program or code block for use only with a specific memory card or CPU.
Easy to create the device configuration 5.7 Protecting access to the CPU or code block is easy 1. After opening the code block, select "Protection". 2. From the drop-down list under "Copy protection" task, select the option to bind the code block either to a memory card or to a specific CPU. 3. Select the type of copy protection and enter the serial number for the memory card or CPU. Note The serial number is case-sensitive.
6 Programming made easy 6.1 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. ● A linear program executes all of the instructions for your automation tasks in sequence, one after the other.
Programming made easy 6.1 Easy to design your user program A Calling block (or interrupted block) B Called FB or BC (or interrupting OB) ① ② Program execution ③ ④ Program execution Instruction (or interrupting event) that initiates the execution of another block Block end (returns to calling block) You can nest the block calls for a more modular structure. In the following example, the nesting depth is 3: the program cycle OB plus 3 layers of calls to code blocks.
Programming made easy 6.1 Easy to design your user program 6.1.1 Use OBs for organizing your user program Organization blocks provide 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, causes the CPU to execute an OB. Some OBs have predefined start events and behavior. The program cycle OB contains your main program.
Programming made easy 6.1 Easy to design your user program Creating additional OBs You can create multiple OBs for your user program, even for the program cycle and startup OB events. Use the "Add new block" dialog to create an OB and enter a name for your OB. If you create multiple program cycle OBs for your user program, the CPU executes each program cycle OB in numerical sequence, starting with the program cycle OB with the lowest number (such as OB 1).
Programming made easy 6.1 Easy to design your user program A function block (FB) is like a subroutine with memory. An FB is a code block whose calls can be programmed with block parameters. The FB stores the input (IN), output (OUT), and in/out (IN_OUT) parameters in variable memory that is located in a data block (DB), or "instance" DB. The instance DB provides a block of memory that is associated with that instance (or call) of the FB and stores data after the FB finishes.
Programming made easy 6.1 Easy to design your user program 6.1.3 Data blocks provide easy storage for program data You create data blocks (DB) in your user program to store data for the code blocks. All of the program blocks in the user program can access the data in a global DB, but an instance DB stores data for a specific function block (FB). Your user program can store data in the specialized memory areas of the CPU, such as for the inputs (I), outputs (Q), and bit memory (M).
Programming made easy 6.1 Easy to design your user program 6.1.5 Creating reusable code blocks Use the "Add new block" dialog under "Program blocks" in the Project navigator to create OBs, FBs, FCs, and global DBs. When you create a code block, you select the programming language for the block. You do not select a language for a DB because it only stores data. Selecting the "Add new and open" check box (default) opens the code block in the Project view.
Programming made easy 6.2 Easy-to-use programming languages 6.1.6 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. In the project tree, select the code block to be called. 3. Drag the block to the selected network to create a call to the code block. Note Your user program cannot call an OB because OBs are event-driven (Page 55).
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" instructions for a variety of functions, such as math, timer, counter, and move. STEP 7 does not limit the number of instructions (rows and columns) in a LAD network.
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.
Programming made easy 6.2 Easy-to-use programming languages In the Interface 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. You typically would not use the global tag name in the tag table.
Programming made easy 6.3 Powerful instructions make programming easy 6.3 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. Contacts test the binary status of the bit, with the result being "power flow" if on (1) or "no power flow" if off (0).
Programming made easy 6.3 Powerful instructions make programming easy Note the following output results for power flow through output and inverted output coils: ● 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. ● If there is power flow through an inverted output coil, then the output bit is set to 0.
Programming made easy 6.3 Powerful instructions make programming easy In FBD programming, the contact networks of LAD are represented by AND (&), OR (>=1), and exclusive OR (x) box networks where you can specify bit values for the box inputs and outputs. You may also connect to other logic boxes and create your own logic combinations.
Programming made easy 6.3 Powerful instructions make programming easy Table 6- 2 LAD / FBD 6.3.3 Table 6- 3 LAD / FBD MOVE, MOVE_BLK and UMOVE_BLK instructions SCL out1 := in; Description Copies a data element stored at a specified address to a new address or multiple addresses. To add another output in LAD or FBD, click the icon by the output parameter. For SCL, use multiple assignment statements. You might also use one of the loop constructions.
Programming made easy 6.3 Powerful instructions make programming easy Table 6- 4 LAD / FBD Round and Truncate instructions SCL out := ROUND (in); Description Converts a real number (Real or LReal) to an integer. The instruction rounds the real number to the nearest integer value (IEEE - round to nearest). If the number is exactly one-half the span between two integers (for example, 10.5), then the instruction rounds the number to the even integer.
Programming made easy 6.3 Powerful instructions make programming easy Table 6- 6 SCALE_X and NORM_X instructions LAD / FBD SCL Description out := SCALE_X( min,:=_undef_in_ value:=_real_in_, max:=undef_in_); Scales the normalized real parameter VALUE where ( 0.0 <= VALUE <= 1.0 ) in the data type and value range specified by the MIN and MAX parameters: OUT = VALUE (MAX - MIN) + MIN out := NORM_X( min:=_,undef_in_ value:=_undef_in_, max:=_undef_in_); 1 OUT = (VALUE - MIN) / (MAX - MIN), where ( 0.
Programming made easy 6.3 Powerful instructions make programming easy Note You also must create an input for any constants in your function. The constant value would then be entered in the associated input for the CALCULATE instruction. By entering constants as inputs, you can copy the CALCULATE instruction to other locations in your user program without having to change the function. You then can change the values or tags of the inputs for the instruction without modifying the function.
Programming made easy 6.3 Powerful instructions make programming easy When you create the DB, you can also use a multi-instance DB. Because the timer data is contained in a single DB and does not require a separate DB for each timer, the processing time for handling the timers is reduced. There is no interaction between the timer data structures in the shared multi-instance DB. Table 6- 9 LAD / FBD Table 6- 10 LAD / FBD TP (Pulse timer) SCL "timer_db".
Programming made easy 6.3 Powerful instructions make programming easy Table 6- 11 TOF (OFF-delay timer) LAD / FBD Table 6- 12 SCL "timer_db".TOF( IN:=_bool_in_, PT:=_undef_in_, Q=>_bool_out_, ET=>_undef_out_); TONR (ON-delay Retentive timer) LAD / FBD Table 6- 13 LAD Timing diagram SCL "timer_db".
Programming made easy 6.
Programming made easy 6.3 Powerful instructions make programming easy Timer programming The following consequences of timer operation should be considered when planning and creating your user program: ● You can have multiple updates of a timer in the same scan. The timer is updated each time the timer instruction (TP, TON, TOF, TONR) is executed and each time the ELAPSED or Q member of the timer structure is used as a parameter of another executed instruction.
Programming made easy 6.3 Powerful instructions make programming easy As long as the timer runs, the state of DB1.MyIEC_Timer.Q=1 and the Tag_Output value=1. When the Tag_Time value has elapsed, then DB1.MyIEC_Timer.Q=0 and the Tag_Output value=0. 6.3.6 Counters You use the counter instructions to count internal program events and external process events. ● The "count up" counter (CTU) counts up by 1 when the value of the input parameter CU changes from 0 to 1.
Programming made easy 6.3 Powerful instructions make programming easy Table 6- 17 LAD / FBD CTU (count up) counter SCL "ctu_db".CTU( CU:=_bool_in, R:=_bool_in, PV:=_undef_in, Q=>_bool_out, CV=>_undef_out); Operation The timing diagram shows the operation of a CTU counter with an unsigned integer count value (where PV = 3). ● If the value of parameter CV (current count value) is greater than or equal to the value of parameter PV (preset count value), then the counter output parameter Q = 1.
Programming made easy 6.3 Powerful instructions make programming easy Table 6- 19 LAD / FBD CTUD (count up and down) counter SCL "ctud_db".CTUD( CU:=_bool_in, CD:=_bool_in, R:=_bool_in, LOAD:=_bool_in, PV:=_undef_in, QU=>_bool_out, QD=>_bool_out, CV=>_undef_out); Operation The timing diagram shows the operation of a CTUD counter with an unsigned integer count value (where PV = 4).
Programming made easy 6.4 Easy to create data logs ① ② Cycle time Duty cycle can be expressed, for example, as a percentage of the cycle time or as a relative quantity (such as 0 to 1000 or 0 to 10000). The pulse width can vary from 0 (no pulse, always off) to full scale (no pulse, always on). Pulse width time The PWM output can be varied from 0 to full scale, providing a digital output that in many ways is the same as an analog output.
Programming made easy 6.
Programming made easy 6.5 Easy to monitor and test your user program Table 6- 23 LAD/FBD DataLogOpen and DataLogClose instructions SCL "DataLogOpen_DB"( req:=_bool_in_, mode:=_uint_in_, done=>_bool_out_, busy=>_bool_out_, error=>_bool_out_, status=>_word_out_, name:=_string_inout_, ID:=_dword_inout_); "DataLogClose_DB"( req:=_bool_in_, done=>_bool_out_, busy=>_bool_out_, error=>_bool_out_, status=>_word_out_, ID:=_dword_inout_); Description The DataLogOpen instruction opens a pre-existing data log file.
Programming made easy 6.5 Easy to monitor and test your user program STEP 7 also provides the capability of tracing and recording program variables based on trigger conditions. 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.
Programming made easy 6.5 Easy to monitor and test your user program 6.5.3 Call structure to examine the calling hierarchy The call structure describes the call hierarchy of the block within your user program. It provides an overview of the blocks used, calls to other blocks, the relationships between blocks, the data requirements for each block, and the status of the blocks. You can open the program editor and edit blocks from the call structure.
Programming made easy 6.5 Easy to monitor and test your user program 6.5.4 Diagnostic instructions to monitor the hardware 6.5.4.1 Reading the states of the LEDs on the CPU The LED instruction allows your user program to determine the state of the LEDs on the CPU. You can use this information for programming a tag for your HMI device. Table 6- 25 LAD / FBD 6.5.4.
Programming made easy 6.6 High-speed counter (HSC) 6.6 High-speed counter (HSC) Use the high-speed counters (HSC) for counting events that occur faster than the OB execution rate. The CTRL_HSC instruction controls the operation of the HSC. Note If the events to be counted occur within the execution rate of the OB, use CTU, CTD, or CTUD counter instructions. If the events occur faster than the OB execution rate, then use the HSC.
Programming made easy 6.
Programming made easy 6.6 High-speed counter (HSC) HSC input channel selection Use the following table and ensure that the CPU and SB input channels that you connect can support the maximum pulse rates in your process signals. Note CPU and SB input channels (V4 or later firmware) have configurable input filter times Earlier firmware versions had fixed HSC input channels and fixed filter times that could not be changed. V4 or later versions allow you to assign input channels and filter times.
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. Counter mode, direction control, and initial direction are assigned in the CPU device configuration for HSC function properties.
Programming made easy 6.6 High-speed counter (HSC) Input addresses for the HSC When you configure the CPU, you have the option to enable and configure the "Hardware inputs" for each HSC. All HSC inputs must be connected to terminals on the CPU module or optional signal board that plugs into the front of the CPU module. Note As shown in the following tables, the default assignments for the optional signals for the different HSCs overlap.
Programming made easy 6.6 High-speed counter (HSC) HSC counter mode CPU on-board input (default 0.x) 0 1 Optional SB input (default 4.x) 1 2 3 0 1 1-phase C [d] [R] 2-phase CU CD [R] A B [R] AB-phase HSC 5 4 5 A B AB-phase HSC 6 1 3 1-phase [R] C [d] 2-phase [R] CU CD AB-phase [R] A B An SB with only 2 digital inputs provides only the 4.0 and 4.1 inputs. Table 6- 32 CPU 1212C: HSC default address assignments HSC counter mode CPU on-board input (default 0.
Programming made easy 6.6 High-speed counter (HSC) Table 6- 33 CPU 1214C, CPU 1215C, and CPU1217C: HSC default address assignments (on-board inputs only, see next table for optional SB addresses) HSC counter mode HSC 1 Digital input byte 0 (default: 0.x) 0 1 C [d] [R] CU CD [R] 1-phase 2-phase AB-phase HSC 2 HSC 3 A [R] 2-phase [R] AB-phase [R] 2-phase AB-phase HSC 4 HSC 5 B 1-phase 1-phase 2 3 Digital input byte 1 (default: 1.
Programming made easy 6.6 High-speed counter (HSC) Note The digital I/O points used by high-speed counter devices are assigned during CPU device configuration. When digital I/O point addresses are assigned to HSC devices, the values of the assigned I/O point addresses cannot be modified by the force function in a watch table. 6.6.2 Configuration of the HSC You may configure up to 6 high-speed counters. Edit the CPU device configuration and assign the HSC properties of each individual HSC.
Programming made easy 6.6 High-speed counter (HSC) For additional information about configuring the HSC, refer to the section on configuring the CPU (Page 76).
Easy to communicate between devices 7 For a direct connection between the programming device and a CPU: • The project must include the CPU. • The programming device is not part of the project, but must be running STEP 7. For a direct connection between an HMI panel and a CPU, the project must include both the CPU and the HMI. For a direct connection between two CPUs: • The project must include both CPUs. • You must configure a network connection between the two CPUs.
Easy to communicate between devices 7.1 Creating a network connection 7.1 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. Table 7- 1 Creating a network connection Action Result Select "Network view" to display the devices to be connected.
Easy to communicate between devices 7.2 Communication options 7.2 Communication options The S7-1200 offers several types of communication between CPUs and programming devices, HMIs, and other CPUs. WARNING If an attacker can physically access your networks, the attacker can possibly read and write data. The TIA Portal, the CPU, and HMIs (except HMIs using GET/PUT) use secure communication that protects against replay and "man-in-the-middle" attacks.
Easy to communicate between devices 7.2 Communication options PROFIBUS PROFIBUS is used for exchanging data through the user program with other communications partners through the PROFIBUS network: ● With CM 1242-5, the CPU operates as a PROFIBUS DP slave. ● With CM 1243-5, the CPU operates as a PROFIBUS DP master class1. ● PROFIBUS DP Slaves, PROFIBUS DP Masters, and AS-i (the 3 left-side communication modules) and PROFINET are separate communications networks that do not limit each other.
Easy to communicate between devices 7.3 Number of asynchronous communication connections 7.3 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.
Easy to communicate between devices 7.4 PROFINET and PROFIBUS instructions 7.4 PROFINET and PROFIBUS instructions PROFINET instructions The TSEND_C and TRCV_C instructions make PROFINET communications simpler by combining the functionality of the TCON and TDISCON instructions with the TSEND or TRCV instruction. ● TSEND_C establishes a TCP or ISO on TCP communication connection to a partner station, sends data, and can terminate the connection.
Easy to communicate between devices 7.5 PROFINET 7.5 PROFINET 7.5.
Easy to communicate between devices 7.5 PROFINET 7.5.1.1 Ad hoc mode Typically, TCP and ISO-on-TCP receive data packets of a specified length, ranging from 1 to 8192 bytes. However, the TRCV_C and TRCV communication instructions also provide an "ad hoc" communications mode that can receive data packets of a variable length from 1 to 1472 bytes. Note If you store the data in an "optimized" DB (symbolic only), you can receive data only in arrays of Byte, Char, USInt, and SInt data types.
Easy to communicate between devices 7.5 PROFINET The following example shows the communication between two CPUs that utilize 2 separate connections for sending and receiving the data. ● The TSEND_C instruction in CPU_1 links to the TRCV_C in CPU_2 over the first connection ("connection ID 1" on both CPU_1 and CPU_2). ● The TRCV_C instruction in CPU_1 links to the TSEND_C in CPU_2 over the second connection ("connection ID 2" on both CPU_1 and CPU_2).
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. ● The TSEND instruction in CPU_1 links to the TRCV instruction in CPU_2 by using the connection ID ("connection ID 1") that was configured by the TCON instruction in CPU_1.
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. ① TSEND_C on CPU_1 creates a connection and assigns a connection ID to that connection (ID=1).
Easy to communicate between devices 7.5 PROFINET TCON_Param Table 7- 3 Structure of the connection description (TCON_Param) Byte Parameter and data type 0…1 block_length UInt Description Length: 64 bytes (fixed) 2…3 id CONN_OUC (Word) Reference to this connection: Range of values: 1 (default) to 4095. Specify the value of this parameter for the TSEND_C, TRCV_C or TCON instruction under ID.
Easy to communicate between devices 7.5 PROFINET Byte Parameter and data type 12 … 27 local_tsap_id Description Array [1..16] of Byte Local address component of connection: • • TCP and ISO-on-TCP: local port no. (possible values: 1 to 49151; recommended values: 2000...
Easy to communicate between devices 7.5 PROFINET 7.5.2 Configuring the Local/Partner connection path After inserting a TSEND_C, TRCV_C or TCON instruction into the user program, 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.
Easy to communicate between devices 7.5 PROFINET Table 7- 5 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. You can click the "Highlighted: Connection" button to access the "Properties".
Easy to communicate between devices 7.6 PROFIBUS Parameter Definition TSAP 1 and Subnet ID: 1 ISO on TCP (RFC 1006) and S7 communication: Local and partner CPU TSAPs in ASCII and hexadecimal formats When configuring a connection with an S7-1200 CPU for ISO-on-TCP, use only ASCII characters in the TSAP extension for the passive communication partners.
Easy to communicate between devices 7.6 PROFIBUS The S7-1200 is connected to a PROFIBUS network as a DP slave with the CM 1242-5 communication module. The CM 1242-5 (DP slave) module can be the communications partner of DP V0/V1 masters. 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 (http://support.automation.siemens.com/WW/llisapi.dll?func=cslib.
Easy to communicate between devices 7.6 PROFIBUS 7.6.1 Communications services of the PROFIBUS CMs The PROFIBUS CMs use the PROFIBUS DP-V1 protocol. Types of communication with DP-V1 The following types of communication are available with DP-V1: ● Cyclic communication (CM 1242-5 and CM 1243-5) Both PROFIBUS modules support cyclic communication for the transfer of process data between DP slave and DP master. Cyclic communication is handled by the operating system of the CPU.
Easy to communicate between devices 7.6 PROFIBUS 7.6.2 Reference to the PROFIBUS CM user manuals Further information You can find detailed information on the PROFIBUS CMs in the manuals for the devices. You can find these on the Internet in the pages of Siemens Industrial Automation Customer Support under the following entry IDs: ● CM 1242-5 (http://support.automation.siemens.com/WW/view/en/49852105) ● CM 1243-5 (http://support.automation.siemens.com/WW/view/en/49851842) 7.6.
Easy to communicate between devices 7.6 PROFIBUS Next, select "6ES7 151-1BA02-0AB0" (IM151-1 HF) from the list of part numbers, and add the ET200 S DP slave as shown in the figure below. Table 7- 8 Adding an ET200 S DP slave to the device configuration Insert the DP slave 7.6.
Easy to communicate between devices 7.6 PROFIBUS Assigning the PROFIBUS address In a PROFIBUS network, each device is assigned a PROFIBUS address.
Easy to communicate between devices 7.7 AS-i Parameter Description Transmission rate Transmission rate of the configured PROFIBUS network: The PROFIBUS transmission rates range from 9.6 Kbits/sec to 12 Mbits/sec. The transmission rate setting depends on the properties of the PROFIBUS nodes being used. The transmission rate should not be greater than the rate supported by the slowest node.
Easy to communicate between devices 7.7 AS-i 7.7.1 Adding the AS-i master CM 1243-2 and AS-i slave Use the hardware catalog to add AS-i master CM1243-2 modules to the CPU. These modules are connected to the left side of the CPU, and a maximum of three AS-i master CM1243-2 modules can be used. 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.
Easy to communicate between devices 7.7 AS-i 7.7.2 Assigning an AS-i address to an AS-i slave Configuring the AS-i slave interface To configure parameters for the AS-i interface, click the yellow AS-i box on the AS-i slave, and the "Properties" tab in the inspector window displays the AS-i interface. ① AS-i port Assigning the AS-i slave address In an AS-i network, each device is assigned an AS-i slave address.
Easy to communicate between devices 7.
Easy to communicate between devices 7.
Easy to communicate between devices 7.8 S7 communication 7.8 S7 communication 7.8.1 GET and PUT instructions You can use the GET and PUT instructions to communicate with S7 CPUs through PROFINET and PROFIBUS connections.
Easy to communicate between devices 7.8 S7 communication 7.8.2 Creating an S7 connection Connection mechanisms To access remote connection partners with PUT/GET instructions, the user must also have permission. By default, the "Permit access with PUT/GET communication" option is not enabled. In this case, read and write access to CPU data is only possible for communication connections that require configuration or programming both for the local CPU and for the communication partner.
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.
Easy to communicate between devices 7.9 GPRS 7.9 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. Inter-station communication is possible only via a GSM network.
Easy to communicate between devices 7.9 GPRS Requirements The equipment used in the stations or the control center depends on the particular application. ● For communication with or via a central control room, the control center requires a PC with Internet access.
Easy to communicate between devices 7.9 GPRS Telecontrol by a control center Figure 7-2 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.
Easy to communicate between devices 7.9 GPRS Direct communication between stations Figure 7-3 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.
Easy to communicate between devices 7.9 GPRS 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.
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. – In "GPRS direct" mode, the CP can request the time using SNTP. To synchronize the CPU time, you can read out the current time from the CP using a block.
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-5 ANT794-4MR GSM/GPRS antenna Short name Order no.
Easy to communicate between devices 7.10 PtP, USS, and Modbus communication protocols 7.10 PtP, USS, and Modbus communication protocols 7.10.1 Point-to-point communication The CPU supports the following Point-to-Point communication (PtP) for character-based serial protocols: ● PtP (Page 164) ● USS (Page 165) ● Modbus (Page 167) PtP provides maximum freedom and flexibility, but requires extensive implementation in the user program.
Easy to communicate between devices 7.10 PtP, USS, and Modbus communication protocols The serial communication interfaces have the following characteristics: ● Have an isolated port ● Support Point-to-Point protocols ● Are configured and programmed through the point-to-point communication processor instructions ● Display transmit and receive activity by means of LEDs ● Display a diagnostic LED (CMs only) ● Are powered by the CPU: No external power connection is needed.
Easy to communicate between devices 7.10 PtP, USS, and Modbus communication protocols The dynamic configuration changes are not permanently stored in the CPU. After a power cycle, the initial static configuration from the device configuration will be used. The SEND_PTP, RCV_PTP, and RCV_RST instructions control the PtP communication: ● SEND_PTP transfers the specified buffer to the CM or CB. The CPU continues to execute the user program while the module sends the data at the specified baud rate.
Easy to communicate between devices 7.10 PtP, USS, and Modbus communication protocols Calculating the time required for communicating with the drive Communications with the drive are asynchronous to the CPU scan. The CPU typically completes several scans before one drive communications transaction is completed. The USS_PORT interval is the time required for one drive transaction. The table below shows the minimum USS_PORT interval for each communication baud rate.
Easy to communicate between devices 7.10 PtP, USS, and Modbus communication protocols 7.10.5 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. You can add PtP (Point to Point) network ports to a CPU with a RS232 or RS485 CM or a RS485 CB.
Easy to communicate between devices 7.10 PtP, USS, and Modbus communication protocols Table 7- 15 Modbus instructions Type of communication Instruction Modbus RTU (RS232 or RS485) MB_COMM_LOAD: One execution of MB_COMM_LOAD is used to set up PtP port parameters like baud rate, parity, and flow control. After the CPU port is configured for the Modbus RTU protocol, it can only be used by either the MB_MASTER or MB_SLAVE instructions.
8 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. Note Changes that you make to the PID configuration and download in RUN do not take effect until the CPU transitions from STOP to RUN mode.
PID is easy PID algorithm The PID (Proportional/Integral/Derivative) controller measures the time interval between two calls and then evaluates the results for monitoring the sampling time. A mean value of the sampling time is generated at each mode changeover and during initial startup. This value is used as reference for the monitoring function and is used for calculation. Monitoring includes the current measuring time between two calls and the mean value of the defined controller sampling time.
PID is easy 8.1 Inserting the PID instruction and technology object 8.1 Inserting the PID instruction and technology object STEP 7 provides two instructions for PID control: ● The PID_Compact instruction and its associated technology object provide a universal PID controller with tuning. The technology object contains all of the settings for the control loop. ● The PID_3Step instruction and its associated technology object provide a PID controller with specific settings for motor-activated valves.
PID is easy 8.1 Inserting the PID instruction and technology object Table 8- 2 (Optional) Creating a technology object from the project navigator You can also create technology objects for your project before inserting the PID instruction. By creating the technology object before inserting a PID instruction into your user program, you can then select the technology object when you insert the PID instruction. To create a technology object, double-click the "Add new object" icon in the project navigator.
PID is easy 8.2 PID_Compact instruction 8.2 PID_Compact instruction The PID_Compact instruction provides a universal PID controller with integrated self-tuning for automatic and manual mode.
PID is easy 8.2 PID_Compact instruction Parameter and type ManualEnable IN Data type Description Bool Enables or disables the manual operation mode. (Default value: FALSE): • A FALSE to TRUE edge activates "manual mode", while State = 4, Mode remains unchanged. As long as ManualEnable = TRUE, you cannot change the operating mode using a rising edge at ModeActivate or use the commissioning dialog. A TRUE to FALSE edge activates the operating mode that is assigned by Mode.
PID is easy 8.2 PID_Compact instruction Parameter and type Data type Description InputWarning_L OUT Bool If InputWarning_L = TRUE, the process value has reached or fallen below the warning low limit. (Default value: FALSE) State OUT Int Current operating mode of the PID controller.
PID is easy 8.
PID is easy 8.3 PID_Compact instruction ErrorBit parameters 8.3 PID_Compact instruction ErrorBit parameters 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- 5 PID_Compact instruction ErrorBit parameters ErrorBit (DW#16#...) Description 0000 No error 0001 1, 2 The Input parameter is outside the process value limits. Input > Config.
PID is easy 8.3 PID_Compact instruction ErrorBit parameters ErrorBit (DW#16#...) Description 20000 Invalid value at the SubstituteValue tag: Value has an invalid number format. PID_Compact uses the output value low limit as the output value. Note: If automatic mode was active before the error occurred, ActivateRecoverMode = TRUE, and the error is no longer pending, PID_Compact switches back to automatic mode. 40000 Invalid value at the Disturbance parameter: Value has an invalid number format.
PID is easy 8.4 PID_3Step instruction 8.4 PID_3Step instruction The PID_3Step instruction configures a PID controller with self-tuning capabilities that has been optimized for motor-controlled valves and actuators.
PID is easy 8.4 PID_3Step instruction Table 8- 7 Data types for the parameters Parameter and type Data type Description Setpoint IN Real Setpoint of the PID controller in automatic mode. (Default value: 0.0) Input IN Real A tag of the user program is used as the source of the process value. (Default value: 0.0) If you are using the Input parameter, you must set Config.InputPerOn = FALSE. Input_PER IN Word An Analog input is used as the source of the process value.
PID is easy 8.4 PID_3Step instruction Parameter and type ManualUP IN Data type Description Bool • • Manual_UP = TRUE: – The valve is opened even if you use Output_PER or a position feedback. The valve is no longer moved if the high end stop has been reached. – See also Config.VirtualActuatorLimit Manual_UP = FALSE: – If you use Output_PER or a position feedback, the valve is moved to ManualValue. Otherwise, the valve is no longer moved.
PID is easy 8.4 PID_3Step instruction Parameter and type Data type Description Output_DN OUT Bool Digital output value for closing the valve. (Default value: FALSE) Output_PER OUT Word If Config.OutputPerOn = FALSE, the parameter Output_DN is used. Analog output value. If Config.OutputPerOn = TRUE, the parameter Output_PER is used. SetpointLimitH OUT Bool Setpoint high limit.
PID is easy 8.
PID is easy 8.
PID is easy 8.
PID is easy 8.5 PID_3Step instruction ErrorBit parameters 8.5 PID_3Step instruction ErrorBit parameters 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- 8 PID_3STEP instruction ErrorBit parameters ErrorBit (DW#16#...) Description 0000 No error 0001 1, 2 The Input parameter is outside the process value limits. Input > Config.
PID is easy 8.5 PID_3Step instruction ErrorBit parameters ErrorBit (DW#16#...) Description 10000 Invalid value at the ManualValue parameter: Value has an invalid number format. The actuator cannot be moved to the manual value and remains in its current position. Assign a valid value in ManualValue or move the actuator in manual mode with Manual_UP and Manual_DN. 20000 Invalid value at the SavePosition tag: Value has an invalid number format.
PID is easy 8.6 Configuring the PID controller 8.6 Configuring the PID controller The parameters of the technology object determine the operation of the PID controller. Use the icon to open the configuration editor. Table 8- 9 Sample configuration settings for the PID_Compact instruction Settings Basic Process value Description Controller type Selects the engineering units. Invert the control logic Allows selection of a reverse-acting PID loop.
PID is easy 8.6 Configuring the PID controller Table 8- 10 Sample configuration settings for the PID_3Step instruction Settings Basic Description Controller type Selects the engineering units. Invert the control logic Allows selection of a reverse-acting PID loop. Activate mode after CPU restart • If not selected, the PID loop is in direct-acting mode, and the output of PID loop increases if the input value < setpoint).
PID is easy 8.7 Commissioning the PID controller Settings Advanced Description Reaction to error Defines the behavior of the valve when an error is detected or when the PID loop is reset. If you select to use a substitute position, enter the "Safety position". For analog feedback or analog output, select a value between the upper or lower limit for the output. For digital outputs, you can choose only 0% (off) or 100% (on).
PID is easy 8.7 Commissioning the PID controller PID start value control You can edit the actual values of the PID configuration parameters so that the behavior of the PID controller can be optimized in online mode. Open the "Technology objects" for your PID controller and its "Configuration" object.
PID is easy 8.
Web server for easy Internet connectivity 9 The Web server provides Web page access to data about your CPU and to the process data within the CPU. With these Web pages, you access the CPU with the Web browser of your PC or mobile device. The standard web pages allow authorized users to perform a variety of functions: ● You can change the operating mode (STOP and RUN) of the CPU. ● You can monitor and modify the status of the PLC tags. ● You can view and download any data logs being collected by the CPU.
Web server for easy Internet connectivity 9.1 Easy to use the standard Web pages 9.1 Easy to use the standard Web pages Using the standard Web pages is easy! You only have to enable the Web server when configuring the CPU. The Start page displays a representation of the CPU to which you are connected and lists general information about the CPU. If you log in as a user with the required privileges, you can change the operating mode of the CPU (STOP and RUN) or flash the LEDs.
Web server for easy Internet connectivity 9.1 Easy to use the standard Web pages The File Browser page allows you to view, download, or edit files in the load memory of the CPU such as data logs (Page 112) and recipes. Unless the CPU has Level 4 protection, all users can view the files from the File Browser page. Users with privileges to modify files can delete, edit and rename files.
Web server for easy Internet connectivity 9.2 Constraints that can affect the use of the Web server 9.2 Constraints that can affect the use of the Web server The following IT considerations can affect your use of the Web server: ● Typically, you must use the IP address of the CPU to access the standard Web pages or user-defined Web pages, or the IP address of a wireless router with a port number. If your Web browser does not allow connecting directly to an IP address, see your IT administrator.
Web server for easy Internet connectivity 9.2 Constraints that can affect the use of the Web server 9.2.1 Feature restrictions when the Internet options disable JavaScript The standard Web pages use HTML, JavaScript, and cookies. If your site restricts the use of JavaScript and cookies, then enable them for the pages to function properly. If you cannot enable JavaScript for your Web browser, the features that use JavaScript controls cannot run. General The pages do not update dynamically.
Web server for easy Internet connectivity 9.3 Easy to create user-defined web pages 9.2.2 Feature restrictions when the Internet options do not allow cookies If you disable cookies in your Web browser, the following restrictions apply: ● You cannot log in. ● You cannot change the language setting. ● You cannot switch from UTC time to PLC time. Without cookies, all times are in UTC time. 9.3 Easy to create user-defined web pages 9.3.
Web server for easy Internet connectivity 9.3 Easy to create user-defined web pages You can use the software package of your choice to create your own HTML pages for use with the Web server. Be sure that your HTML code is compliant to the HTML standards of the W3C (World Wide Web Consortium). STEP 7 does not perform any verification of your HTML syntax. You can use a software package that lets you design in WYSIWYG or design layout mode, but you need to be able to edit your HTML code in pure HTML form.
Web server for easy Internet connectivity 9.3 Easy to create user-defined web pages Load memory space Your user-defined Web pages become data blocks when you click "Generate blocks", which require load memory space. If you have a memory card installed, you have up to the capacity of your memory card as external load memory space for the user-defined Web pages. If you do not have a memory card installed, these blocks take up internal load memory space, which is limited according to your CPU model.
Web server for easy Internet connectivity 9.3 Easy to create user-defined web pages After you enable the Web server functionality, enter the following information: ● Name and the current location of the HTML default start page to generate the DBs for the user-defined Web pages. ● Name for your application (optional). The application name is used to further subcategorize or group web pages. When an application name exists, the URL will appear in the following format: http://ww.xx.yy.
Web server for easy Internet connectivity 9.
10 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. ● You configure the pulse and direction outputs of the CPU for controlling the drive.
Motion control is easy The four pulse generators have default I/O assignments; however, they can be configured to any digital output on the CPU or SB. Pulse generators on the CPU cannot be assigned to SMs or to distributed I/O. Note Pulse-train outputs cannot be used by other instructions in the user program When you configure the outputs of the CPU or signal board as pulse generators (for use with the PWM or motion control instructions), the corresponding output addresses no longer control the outputs.
Motion control is easy Table 10- 2 CPU output: maximum frequency CPU CPU output channel Pulse and direction output A/B, quadrature, up/down, and pulse/direction 1211C Qa.0 to Qa.3 100 kHz 100 kHz 1212C Qa.0 to Qa.3 100 kHz 100 kHz Qa.4, Qa.5 20 kHz 20 kHz Qa.0 to Qa.3 100kHz 100kHz Qa.4 to Qb.1 20 kHz 20 kHz DQa.0 to DQa.3 1 MHz 1 MHz 100 kHz 100 kHz 1214C and 1215C 1217C (.0+, .0- to .3+, .3-) DQa.4 to DQb.
Motion control is easy CPU 1217C example output speed configurations Note The CPU 1217C can generate pulse outputs up to 1 MHz, using the onboard differential outputs.
Motion control is easy CPU 1211C, CPU 1212C, CPU 1214C, and CPU 1215C example output speed configurations The examples below show four possible output speed combinations: ● Example 1: 4 - 100 KHz PTOs, no direction output ● Example 2: 2 - 100 KHz PTOs and 2 - 20 KHz PTOs, all with direction output ● Example 3: 4 - 200 KHz PTOs, no direction output ● Example 4: 2 - 100 KHz PTOs and 2 - 200 KHz PTOs, all with direction output P = Pulse CPU on-board outputs High-speed SB outputs Low-speed SB outputs 200KH
Motion control is easy 10.1 Phasing 10.1 Phasing You have four options for the "Phasing" interface to the stepper/servo drive. These options are as follows: ● PTO (pulse A and direction B): If you select a PTO (pulse A and direction B) option, then one output (P0) controls the pulsing and one output (P1) controls the direction. P1 is high (active) if pulsing is in the positive direction.
Motion control is easy 10.1 Phasing ● PTO (A/B phase-shifted): If you select a PTO (A/B phase-shifted) option, then both outputs pulse at the speed specified, but 90 degrees out-of-phase. It is a 1X configuration, meaning one pulse is the amount of time between positive transitions of P0. In this case, the direction is determined by which output transitions high first. P0 leads P1 for the positive direction. P1 leads P0 for the negative direction.
Motion control is easy 10.2 Configuring a pulse generator ● PTO (pulse and direction (direction de-selected)): If you de-select the direction output in a PTO (pulse and direction (direction de-selected)), then output (P0) controls the pulsing. Output P1 is not used and is available for other program uses. Only positive motion commands are accepted by the CPU in this mode. Motion control restricts you from making illegal negative configurations when you select this mode.
Motion control is easy 10.3 Configuring the axis Note Configuring a pulse generator to signal board outputs: 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 V1.0, V2.0, V2.1, and V2.2. S7-1200 CPU V3.0 and V4.0 CPUs have four pulse generators available. In this same configuration area under "Pulse options", select Pulse generator used as: "PTO".
Motion control is easy 10.3 Configuring the axis Table 10- 5 STEP 7 tools for motion control Tool Description Configuration Configures the following properties of the "Axis" technology object: • Selection of the PTO to be used and configuration of the drive interface • Properties of the mechanics and the transmission ratio of the drive (or machine or system) • Properties for position limits, dynamics, and homing Save the configuration in the data block of the technology object.
Motion control is easy 10.3 Configuring the axis Configure the properties for the drive signals, drive mechanics, and position monitoring (hardware and software limit switches). You configure the motion dynamics and the behavior of the emergency stop command. 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.
Motion control is easy 10.4 Configuring the TO_CommandTable_PTO 10.4 Configuring the TO_CommandTable_PTO You can configure a CommandTable instruction using the Technology objects. Adding a Technology object 1. In the Project tree, expand the node "Technology Objects" and select "Add new object". 2. Select the "CommandTable" icon (rename if required), and click "OK" to open the configuration editor for the CommandTable object.
Motion control is easy 10.4 Configuring the TO_CommandTable_PTO Table 10- 6 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. Note: The command only takes place after a "Velocity setpoint" command. Positioning Relative Positions the axis based upon distance. The command moves the axis by the given distance and velocity.
Motion control is easy 10.4 Configuring the TO_CommandTable_PTO In the figure below, "Blending motion" is used as the transition to the next step. This type of transition allows your device to maintain its velocity into the start of the next step, resulting in a smooth transition for the device from one step to the next. Using blending can shorten the total time required for a profile to execute completely. Without blending, the example takes seven seconds to run.
Motion control is easy 10.5 Motion control instructions 10.5 Motion control instructions 10.5.1 MC instruction overview The motion control instructions use an associated technology data block and the dedicated PTO (pulse train outputs) of the CPU to control the motion on an axis. ● MC_Power (Page 217) enables and disables a motion control axis. ● MC_Reset (Page 221) resets all motion control errors. All motion control errors that can be acknowledged are acknowledged.
Motion control is easy 10.5 Motion control instructions Table 10- 7 MC_Power instruction LAD / FBD SCL "MC_Power_DB"( Axis:=_multi_fb_in_, Enable:=_bool_in_, StopMode:=_int_in_, Status=>_bool_out_, Busy=>_bool_out_, Error=>_bool_out_, ErrorID=>_word_out_, ErrorInfo=>_word_out_); Description The MC_Power motion control instruction enables or disables an axis. Before you can enable or disable the axis, ensure the following conditions: • • There is no pending enable-inhibiting error.
Motion control is easy 10.5 Motion control instructions Parameter and type Data type Description Status Bool Status of axis enable: OUT • • Busy OUT Bool FALSE: The axis is disabled: – The axis does not execute motion control tasks and does not accept any new tasks (exception: MC_Reset task). – The axis is not homed. – Upon disabling, the status does not change to FALSE until the axis reaches a standstill. TRUE: The axis is enabled: – The axis is ready to execute motion control tasks.
Motion control is easy 10.5 Motion control instructions To enable an axis with configured drive interface, follow these steps: 1. Check the requirements indicated above. 2. Initialize input parameter "StopMode" with the desired value. Set input parameter "Enable" to TRUE. The enable output for "Drive enabled" changes to TRUE to enable the power to the drive. The CPU waits for the "Drive ready" signal of the drive.
Motion control is easy 10.5 Motion control instructions 10.5.3 Table 10- 9 MC_Reset (Confirm error) instruction MC_Reset instruction LAD / FBD SCL "MC_Reset_DB"( Axis:=_multi_fb_in_, Execute:=_bool_in_, Restart:=_bool_in_, Done=>_bool_out_, Busy=>_bool_out_, Error=>_bool_out_, ErrorID=>_word_out_, ErrorInfo=>_word_out_); Description Use the MC_Reset instruction to acknowledge "Operating error with axis stop" and "Configuration error".
Motion control is easy 10.5 Motion control instructions 10.5.4 MC_Home (Home axis) instruction Table 10- 11 MC_Home instruction LAD / FBD SCL "MC_Home_DB"( Axis:=_multi_fb_in_, Execute:=_bool_in_, Position:=_real_in_, Mode:=_int_in_, Done=>_bool_out_, Busy=>_bool_out_, CommandAborted=>_bool_out_, Error=>_bool_out_, ErrorID=>_word_out_, ErrorInfo=>_word_out_); 1 STEP 7 automatically creates the DB when you insert the instruction. 2 In the SCL example, "MC_Home_DB" is the name of the instance DB.
Motion control is easy 10.5 Motion control instructions Parameter and type Mode IN Data type Description Int 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". • 2: Passive homing Homing according to the axis configuration. Following homing, the value of parameter "Position" is set as the new axis position.
Motion control is easy 10.5 Motion control instructions Table 10- 13 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).
Motion control is easy 10.5 Motion control instructions Table 10- 15 Parameters for the MC_Halt instruction Parameter and type Data type Description Axis IN TO_Axis_1 Axis technology object Execute IN Bool Start of the task with a positive edge Done OUT Bool TRUE = Zero velocity reached Busy OUT Bool TRUE = The task is being executed. CommandAborted OUT Bool TRUE = During execution the task was aborted by another task.
Motion control is easy 10.5 Motion control instructions Override response 10.5.
Motion control is easy 10.5 Motion control instructions Parameter and type Data type Description Busy OUT Bool TRUE = The task is being executed. CommandAborted OUT Bool TRUE = During execution the task was aborted by another task. Error OUT Bool TRUE = An error has occurred during execution of the task. The cause of the error can be found in parameters "ErrorID" and "ErrorInfo".
Motion control is easy 10.5 Motion control instructions Override response The MC_MoveAbsolute task can be aborted by the following motion control tasks: The new MC_MoveAbsolute task aborts the following active motion control tasks: • MC_Home Mode = 3 • MC_Halt • MC_Halt • MC_MoveAbsolute • MC_MoveAbsolute • MC_MoveRelative • MC_MoveRelative • MC_MoveVelocity • MC_MoveVelocity • MC_MoveJog • MC_MoveJog 10.5.
Motion control is easy 10.5 Motion control instructions Parameter and type Data type Description Busy OUT Bool TRUE = The task is being executed. CommandAborted OUT Bool TRUE = During execution the task was aborted by another task. Error OUT Bool TRUE = An error has occurred during execution of the task. The cause of the error can be found in parameters "ErrorID" and "ErrorInfo".
Motion control is easy 10.5 Motion control instructions Override response 10.5.
Motion control is easy 10.5 Motion control instructions Parameter and type Direction Current IN IN Data type Description Int Direction specification: Bool • 0: Direction of rotation corresponds to the sign of the value in parameter "Velocity" (Default value) • 1: Positive direction of rotation (The sign of the value in parameter "Velocity" is ignored.) • 2: Negative direction of rotation (The sign of the value in parameter "Velocity" is ignored.
Motion control is easy 10.5 Motion control instructions The following values were configured in the "Dynamics > General" configuration window: Acceleration = 10.0 and Deceleration = 10.0 ① ② An active MC_MoveVelocity task signals via "InVel_1" that its target velocity has been reached. It is then aborted by another MC_MoveVelocity task. The abort is signaled via "Abort_1". When the new target velocity 15.0 is reached, this is signaled via "InVel_2".
Motion control is easy 10.5 Motion control instructions Note Behavior with zero set velocity (Velocity = 0.0) An MC_MoveVelocity task with "Velocity" = 0.0 (such as an MC_Halt task) aborts active motion tasks and stops the axis with the configured deceleration. When the axis comes to a standstill, output parameter "InVelocity" indicates TRUE for at least one program cycle. "Busy" indicates the value TRUE during the deceleration operation and changes to FALSE together with "InVelocity".
Motion control is easy 10.5 Motion control instructions Parameter and type Data type Description Velocity IN Real Preset velocity for jog mode (Default value: 10.0) InVelocity OUT Bool TRUE = The velocity specified in parameter "Velocity" was reached. Busy OUT Bool TRUE = The task is being executed. CommandAborted OUT Bool TRUE = During execution the task was aborted by another task. Error OUT Bool TRUE = An error has occurred during execution of the task.
Motion control is easy 10.5 Motion control instructions 10.5.
Motion control is easy 10.5 Motion control instructions You can create the desired movement sequence in the "Command Table" configuration window and check the result against the graphic view in the trend diagram. You can select the command types that are to be used for processing the command table. Up to 32 jobs can be entered. The commands are processed in sequence. Table 10- 26 MC_CommandTable command types Command type Description Empty The empty serves as a placeholder for any commands to be added.
Motion control is easy 10.5 Motion control instructions Override response The MC_CommandTable task can be aborted by the following motion control tasks: The new MC_CommandTable task aborts the following active motion control tasks: • MC_Home Mode = 3 • MC_Halt • MC_Halt • MC_MoveAbsolute • MC_MoveRelative • MC_MoveVelocity • MC_MoveJog • MC_CommandTable 10.5.
Motion control is easy 10.5 Motion control instructions Table 10- 28 Parameters for the MC_ChangeDynamic instruction Parameter and type Data type Description Axis IN TO_Axis_1 Axis technology object Execute IN Bool Start of the command with a positive edge. Default value: FALSE ChangeRampUp IN Bool TRUE = Change ramp-up time in line with input parameter "RampUpTime".
Motion control is easy 10.5 Motion control instructions Override response An MC_ChangeDynamic command cannot be aborted by any other Motion Control command. A new MC_ChangeDynamic command does not abort any active Motion Control jobs. Note The input parameters "RampUpTime", "RampDownTime", "EmergencyRampTime" and "RoundingOffTime" can be specified with values that makes the resultant axis parameters "acceleration", "delay", "emergency stop-delay" and "jerk" outside the permissible limits.
Motion control is easy 10.5 Motion control instructions Writeable parameter name Writeable parameter name Sensor[1].PassiveHoming.Mode PositionLimitsSW.Active Sensor[1].PassiveHoming.SideInput PositionLimitsSW.MinPosition Sensor[1].PassiveHoming.SwitchedLevel PositionLimitsSW.MaxPosition Units.LengthUnit Homing.AutoReversal Mechanics.LeadScrew Homing.ApproachDirection DynamicLimits.MinVelocity Homing.ApproachVelocity DynamicLimits.MaxVelocity Homing.
Motion control is easy 10.5 Motion control instructions 10.5.13 MC_ReadParam instruction (read parameters of a technology object) instruction You use the MC_ReadParam instruction to read a select number of parameters that indicate the current position, velocity, and so forth of the axis defined in the Axis input.
Motion control is easy 10.6 Operation of motion control for S7-1200 Table 10- 34 Condition codes for ERRORID and ERRORINFO ERRORID ERRORINFO Description (W#16#...) (W#16#...) 0 0 Successful read of a parameter 8410 0028 Invalid parameter (incorrect length) 8410 0029 Invalid parameter (no TO-DB) 8410 0030 Invalid parameter (not readable) 8411 0032 Invalid parameter (wrong value) TO parameters The axis "MotionStatus" consists of four values.
Motion control is easy 10.6 Operation of motion control for S7-1200 The table below shows the default I/O assignments; however, the four pulse generators can be configured to any digital output. Note Pulse-train outputs cannot be used by other instructions in the user program. When you configure the outputs of the CPU or signal board as pulse generators (for use with the PWM or motion control instructions), the corresponding output addresses no longer control the outputs.
Motion control is easy 10.6 Operation of motion control for S7-1200 Drive interface For motion control, you can optionally configure a drive interface for "Drive enabled" and "Drive ready". When using the drive interface, the digital output for the drive enable and the digital input for "drive ready" can be freely selected. Note The firmware will take control through the corresponding pulse and direction outputs if the PTO (Pulse Train Output) has been selected and assigned to an axis.
Motion control is easy 10.6 Operation of motion control for S7-1200 Hardware limit switches Hardware limit switches determine the maximum travel range of the axis. Hardware limit switches are physical switching elements that must be connected to interrupt-capable inputs of the CPU. Use only hardware limit switches that remain permanently switched after being approached. This switching status may only be revoked after a return to the allowed travel range.
Motion control is easy 10.6 Operation of motion control for S7-1200 WARNING Risks with changes to filter time for digital input channel If the filter time for a digital input channel is changed from a previous setting, a new "0" level input value may need to be presented for up to 20.0 ms accumulated duration before the filter becomes fully responsive to new inputs. During this time, short "0" pulse events of duration less than 20.0 ms may not be detected or counted.
Motion control is easy 10.6 Operation of motion control for S7-1200 Use additional hardware limit switches if a mechanical endstop is located after the software limit switches and there is a risk of mechanical damage. Additional information Your user program can override the hardware or software position limits by enabling or disabling both hardware and software limits functionality. The selection is made from the Axis DB.
Motion control is easy 10.6 Operation of motion control for S7-1200 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. ● Mode 0 - Direct Referencing Absolute: When executed this mode tells the axis exactly where it is. It sets the internal position variable to the value of the Position input of the Homing instruction.
Motion control is easy 10.6 Operation of motion control for S7-1200 10.6.3.2 Configuration of homing parameters Configure the parameters for active and passive homing in the "Homing" configuration window. The homing method is set using the "Mode" input parameter of the motion control instruction. Here, Mode = 2 means passive homing and Mode = 3 means active homing.
Motion control is easy 10.6 Operation of motion control for S7-1200 Parameter Description Reference point switch • Active homing: Select whether the axis is to be referenced on the left or right side of the reference point switch. Depending on the start position of the axis and the configuration of the homing parameters, the reference point approach sequence can differ from the diagram in the configuration window.
Motion control is easy 10.6 Operation of motion control for S7-1200 10.6.3.3 Sequence for active homing You start active homing with motion control instruction "MC_Home" (input parameter Mode = 3). Input parameter "Position" specifies the absolute reference point coordinates in this case. Alternatively, you can start active homing on the control panel for test purposes.
Motion control is easy 10.7 Commissioning Note If the homing search does not function as you expected, check the inputs assigned to the hardware limits or to the reference point. These inputs may have had their edge interrupts disabled in device configuration. Examine the configuration data for the axis technology object of concern to see which inputs (if any) are assigned for "HW Low Limit Switch Input", "HW High Limit Switch Input", and "Input reference point switch".
Motion control is easy 10.7 Commissioning Table 10- 41 Drive status Status Drive ready Description The drive is ready for operation. (Tag of technology object: .StatusBits.DriveReady) Error The drive has reported an error after failure of its ready signal. (Tag of technology object: .ErrorBits.DriveFault) Table 10- 42 Status of the axis motion Status Description Standstill The axis is at a standstill. (Tag of technology object: .StatusBits.
Motion control is easy 10.7 Commissioning Error Description Max software limit exceeded The upper software limit switch has been exceeded. (Tag of technology object: .ErrorBits.SwLimitMaxExceeded) Negative hardware limit The lower hardware limit switch has been approached. (Tag of technology object: .ErrorBits.HwLimitMin) Positive hardware limit The upper hardware limit switch has been approached. (Tag of technology object: .ErrorBits.
Motion control is easy 10.7 Commissioning Motion start value control You can edit the actual values of the Motion configuration parameters so that the behavior of the process can be optimized in online mode. Open the "Technology objects" for your motion control and its "Configuration" object. To access the start value control, click the "eyeglasses icon" in the upper left corner of the dialog: You can now change the value of any of your motion control configuration parameters as shown in the figure below.
Motion control is easy 10.7 Commissioning The figure above shows the Motion parameter screen with compare icons showing which values are different between online and offline projects. A green icon indicates that the values are the same; a blue/orange icon indicates that the values are different. Additionally, click the parameter button with the downward arrow to open a small window that shows the project (offline) start value and the PLC (online) start value of each parameter.
11 Easy to use the online tools 11.
Easy to use the online tools 11.2 Interacting with the online CPU 11.2 Interacting with the online CPU The "Online tools" task card in the project view displays an operator panel that shows the operating mode of the online CPU. The operator panel also allows you to change the operating mode of the online CPU. Use the button on the operator panel to change the operating mode (STOP or RUN). The operator panel also provides an MRES button for resetting the memory.
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" button in the toolbar. When you have connected to the CPU, STEP 7 turns the headers of the work areas orange. The project tree displays a comparison of the offline project and the online CPU.
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. The editor bar allows you to change the view between the open editors without having to open or close the editors. In the toolbar of the program editor, click the "Monitoring on/off" button to display the status of your user program.
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. To monitor the tags, you must have an online connection to the CPU. The following options are available for modifying tags: ● "Modify now" immediately changes the value for the selected addresses for one scan cycle. ● "Modify with trigger" changes the values for the selected addresses.
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" button to force the value of the tags in the force table. Click the "Stop forcing" button to reset the value of the tags. In the force table, you can monitor the status of the forced value for an input.
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. Any attempt to force the write-protected values generates an error. If you use a memory card to transfer a user program, any forced elements on that memory card will be transferred to the CPU.
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. ● You must have an online connection to the CPU. ● The CPU must be in RUN mode. ● You must have opened the DB in STEP 7.
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. Add a CPU device that matches the online CPU. 2. Expand the CPU node once so that the "Program blocks" folder is visible. To upload the program blocks from the online CPU to the offline project, follow these steps: 1.
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" editor allows you to synchronize your project with the online CPU by downloading the code blocks of your project to the CPU, or by deleting blocks from the project that do not exist in the online CPU.
Easy to use the online tools 11.10 Displaying the diagnostic events 11.10 Displaying the diagnostic events The CPU provides a diagnostic buffer that 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. Each entry includes a date and time the event occurred, an event category, and an event description.
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. ● The CPU is in STOP mode. Note If the CPU is in RUN mode and you start the reset operation, you can place it in STOP mode after acknowledging a confirmation prompt. Procedure To reset a CPU to its factory settings, follow these steps: 1.
Easy to use the online tools 11.13 Updating firmware 11.13 Updating firmware You can update the firmware of the connected CPU from the STEP 7 online and diagnostics tools. To perform a firmware update, follow these steps: 1. Open the Online and Diagnostics view of the connected CPU. 2. Select "Firmware update" from the "Functions" folder. 3. Click the Browse button and navigate to the location that contains the firmware update file.
Easy to use the online tools 11.14 Downloading an IP address to an online CPU 11.14 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). • Save and download the configuration to the CPU. The IP address and subnet mask for the CPU must be compatible with the IP address and subnet mask of the programming device. Consult your network specialist for the IP address and subnet mask for your CPU.
Easy to use the online tools 11.15 Using the "unspecified CPU" to upload the hardware configuration 11.15 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. You must first connect the CPU to your programming device, and you must create a new project.
Easy to use the online tools 11.16 Downloading in RUN mode 11.16 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. However, implementing this capability also allows massive program changes that could be disruptive or even dangerous.
Easy to use the online tools 11.16 Downloading in RUN mode 11.16.1 Changing your program in RUN mode To change the program in RUN mode, your must first ensure that the CPU and program meet the prerequisites, and then follow these steps: 1. To download your program in RUN mode, select one of the following methods: – Select the "Download to device" command from the "Online" menu. – Click the "Download to device" button in the toolbar.
Easy to use the online tools 11.17 Tracing and recording CPU data on trigger conditions 11.17 Tracing and recording CPU data on trigger conditions STEP 7 provides trace and logic analyzer functions with which you can configure variables for the PLC to trace and record. You can then upload the recorded trace data to your programming device and use STEP 7 tools to analyze, manage, and graph your data. You use the Traces folder in the STEP 7 project tree to create and manage traces.
IO-Link is easy 12.1 12 Overview of IO-Link technology IO-Link is an innovative communication technology for sensors and actuators defined by the PROFIBUS user organization (PNO). IO-Link is an international standard according to IEC 61131-9. It is based on a point-to-point connection between the sensors and actuators (slaves) and the controller (master). It does not therefore represent a bus system, but is an upgrade of the conventional point-to-point connection.
IO-Link is easy 12.4 IO-Link protocol 12.4 IO-Link protocol The IO-Link system can exchange three types of data: ● Cyclic process data (process data inputs, outputs) → Cyclic data ● Device parameters (on-request data objects) → Acyclic data ● Events → Acyclic data The IO-Link device only sends data after being requested by the IO-Link master to do so. Process data is sent after the IDLE frame of the master, and the master explicitly requests device parameter data and events. 12.
IO-Link is easy 12.7 The SM 1278 4xIO-Link Master 12.7 The SM 1278 4xIO-Link Master The SM 1278 4xIO-Link Master is a 4-port module that functions as both a signal module and a communication module. Each port can operate in the IO-Link mode, single 24 VDC digital input or 24 VDC digital output. You can connect up to four IO-Link devices (3-wire connection) or four standard actuators or standard encoders.
IO-Link is easy 12.
IO-Link is easy 12.
IO-Link is easy 12.
Technical specifications A.1 A General technical specifications Standards compliance The S7-1200 automation system design conforms with the following standards and test specifications. The test criteria for the S7-1200 automation system are based on these standards and test specifications. Note that not all S7-1200 models may be certified to these standards, and certification status may change without notification.
Technical specifications A.1 General technical specifications cULus approval Underwriters Laboratories Inc. complying with: ● Underwriters Laboratories, Inc.: UL 508 Listed (Industrial Control Equipment) ● Canadian Standards Association: CSA C22.2 Number 142 (Process Control Equipment) Note 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.
Technical specifications A.1 General technical specifications C-Tick approval The S7-1200 automation system satisfies requirements of standards to AS/NZS 2064 (Class A). Korea Certification The S7-1200 automation system satisfies the requirements of the Korean Certification (KC Mark). It has been defined as Class A Equipment and is intended for industrial applications and has not been considered for home use.
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.
Technical specifications A.1 General technical specifications Table A- 3 Conducted and radiated emissions per EN 61000-6-4 Electromagnetic compatibility - Conducted and radiated emissions per EN 61000-6-4 Conducted Emissions 0.15 MHz to 0.5 MHz <79dB (μV) quasi-peak; <66 dB (μV) average EN 55011, Class A, Group 1 0.
Technical specifications A.
Technical specifications A.1 General technical specifications Reverse voltage protection Reverse voltage protection circuitry is provided on each terminal pair of +24 VDC power or user input power for CPUs, signal modules (SMs), and signal boards (SBs). It is still possible to damage the system by wiring different terminal pairs in opposite polarities. Some of the 24 VDC power input ports in the S7-1200 system are interconnected, with a common logic circuit connecting multiple M terminals.
Technical specifications A.1 General technical specifications Table A- 8 Typical performance data Data for selecting an actuator Continuous thermal current 2 A max. Switching capacity and life of the contacts For ohmic load Voltage Current Number of operating cycles (typical) 24 VDC 2.0 A 0.1 million 24 VDC 1.0 A 0.2 million 24 VDC 0.5 A 1.0 million 48 VAC 1.5 A 1.5 million 60 VAC 1.5 A 1.5 million 120 VAC 2.0 A 1.0 million 120 VAC 1.0 A 1.5 million 120 VAC 0.5 A 2.
Technical specifications A.2 CPU modules A.2 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/).
Technical specifications A.
Technical specifications A.2 CPU modules CPU features CPU 1211C CPU 1212C CPU 1214C CPU 1215C CPU 1217C Real time clock +/- 60 seconds/ month +/- 60 seconds/ month +/- 60 seconds/ month +/- 60 seconds/ month • Accuracy • • Retention time (maintenance-free Super Capacitor) +/- 60 seconds/ month • • 20 days typ./12 days min. at 40 °C • 20 days typ./12 days min. at 40 °C • 20 days typ./12 days min. at 40 °C • 20 days typ./12 days min. at 40 °C 20 days typ./12 days min.
Technical specifications A.2 CPU modules Table A- 12 Wiring diagram for CPU 1214C AC/DC/Relay CPU 1214C AC/DC/Relay ① 24 VDC Sensor Power Out. For additional noise immunity, connect "M" to chassis ground even if not using sensor supply. ② For sinking inputs, connect "-" to "M" (shown). For sourcing inputs, connect "+" to "M". Note 1: X11 connectors must be gold. See the S7-1200 System Manual, Appendix C, Spare Parts for order number.
Technical specifications A.3 Digital I/O modules Table A- 13 Wiring diagram for CPU 1214C DC/DC/DC CPU 1214C DC/DC/DC ① 24 VDC Sensor Power Out. For additional noise immunity, connect "M" to chassis ground even if not using sensor supply. ② For sinking inputs, connect "-" to "M" (shown). For sourcing inputs, connect "+" to "M". Note 1: X11 connectors must be gold. See the S7-1200 System Manual, Appendix C, Spare Parts for order number. A.
Technical specifications A.3 Digital I/O modules Table A- 15 SB 1223 combination digital input/output (DI / DQ) modules General SB 1223 DI / DQ (200 kHz) Order number • 24 VDC: 6ES7 223-3BD30-0XB0 • 5 VDC: 6ES7 223-3AD30-0XB0 SB 1223 2 DI / 2 DQ 24 VDC: 6ES7 223-0BD30-0XB0 Dimensions W x H x D (mm) 38 x 62 x 21 38 x 62 x 21 Weight 35 grams 40 grams Power dissipation • 24 VDC: 1.0 W • 5 VDC: 0.
Technical specifications A.3 Digital I/O modules Table A- 16 Wiring diagrams for digital SBs SB 1221 input module SB 1221 DI 4 (200 kHz) ① Supports sourcing inputs only. SB 1222 output module SB 1222 DQ 4 (200 kHz) ① For sourcing outputs, connect "Load" to "-" (shown). For sinking outputs, connect "Load" to "+". Because both sinking and sourcing configurations ae supported by the same circuitry, the active state of a sourcing load is opposite that of a sinking load.
Technical specifications A.3 Digital I/O modules Note The high-speed (200 kHz) SBs (SB 1221 and SB 1223) support only sinking inputs. The standard SB 1223 supports only sourcing inputs. The high-speed (200 kHz) outputs (SB 1222 and SB 1223) can be either sourcing or sinking. For sourcing outputs, connect "Load" to "-" (shown). For sinking outputs, connect "Load" to "+".
Technical specifications A.3 Digital I/O modules Table A- 18 Wiring diagram for SM 1221 digital input (DI) modules SM 1221 DI 8 (24 VDC) SM 1221 DI 16 (24 VDC) ① For sinking inputs, connect "-" to "M" (shown). For sourcing inputs connect "+" to "M". A.3.
Technical specifications A.3 Digital I/O modules Technical data SM 1222 DQ (Relay) Power dissipation • DQ 8: 4.5 W • DQ 8: 1.5 W • DQ 8 Changeover: 5 W • DQ 16: 2.5 W • DQ 16: 8.5 W • DQ 8: 120 mA • DQ 8: 120 mA • DQ 8 Changeover: 140 mA • DQ 16: 140 mA • DQ 16: 135 mA • DQ 8 and DQ 16:11 mA / Relay coil used • DQ 8: -- • • DQ 8 Changeover: 16.
Technical specifications A.3 Digital I/O modules A.3.
Technical specifications A.3 Digital I/O modules Table A- 22 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) ① For sinking inputs, connect "-" to "M" (shown). For sourcing inputs, connect "+" to "M". A.3.
Technical specifications A.3 Digital I/O modules Note The SM 1223 DI 8 x 120/230 VAC, DQ 8 x Relay signal module (6ES7 223-1QH32-0XB0) is approved for use in Class 1, Division 2, Gas Group A, B, C, D, Temperature Class T4 Ta = 40 °C.
Technical specifications A.4 Specifications for the digital inputs and outputs A.4 Specifications for the digital inputs and outputs A.4.
Technical specifications A.4 Specifications for the digital inputs and outputs Note When switching frequencies above 20 KHz, it is important that the digital inputs receive a square wave.
Technical specifications A.4 Specifications for the digital inputs and outputs Technical data SM Cable length Unshielded 300 meters Shielded 500 meters Number of inputs on simultaneously 1 8 Channels within a group must be of the same phase. A.4.
Technical specifications A.4 Specifications for the digital inputs and outputs Technical data Relay (CPU and SM) Isolation groups • 24 VDC (CPU, SM, and SB) CPU 1211C: 1 • CPU: 1 • CPU 1212C: 2 • SB: 1 • CPU 1214C: 2 • SM (DQ 8): 1 • CPU 1215C: 2 • SM (DQ 16): 1 • SM DQ 8: 2 • SM DQ 8 Changeover:8 • SM DQ 16: 4 200 KHZ 24 VDC (SB) 15 Isolation resistance 100 MΩ min.
Technical specifications A.
Technical specifications A.5 Analog I/O modules Table A- 30 Wiring diagrams for the analog SBs SB 1231 AI 1 x12 bit SB 1232 AQ 1 x 12 bit ① Connect "R" and "0+" for current. A.5.
Technical specifications A.5 Analog I/O modules A.5.3 Table A- 32 SM 1232 analog output (AQ) SM 1232 analog outputs (AQ) Technical data SM 1232 AQ 2 x 14 bit SM 1232 AQ 4 x 14 bit Order number (MLFB) 6ES7 232-4HB32-0XB0 6ES7 232-4HD32-0XB0 Number and type of outputs 2 outputs (AQ) 4 outputs (AQ) Dimensions W x H x D (mm) 45 x 100 x 75 45 x 100 x 75 Weight 180 grams 180 grams Power dissipation 1.5 W 1.
Technical specifications A.6 BB 1297 battery board A.5.5 Table A- 34 Wiring diagrams for SM 1231 (AI), SM 1232 (AQ), and SM 1234 (AI/AQ) Wiring diagrams for the analog SMs SM 1231 AI 8 x 13 bit SM 1232 AQ 4 x 13 bit SM 1234 AI 4 x13 bit / AQ2 x 14 bit Note Unused voltage input channels should be shorted. Unused current input channels should be set to the 0 to 20 mA range and/or disable broken wire error reporting.
Technical specifications A.6 BB 1297 battery board A.
Technical specifications A.7 Specifications for the analog I/O A.7 Specifications for the analog I/O A.7.1 Specifications for the analog inputs (CPU, SM, and SB) Table A- 36 Specifications for analog inputs (AI) Technical data CPU SB SM Type Voltage (single-ended) Voltage or current (differential) Voltage or current (differential), selectable in groups of 2 Range 0 to 10 V ±10 V, ±5 V, ±2.5, ±10 V, ±5 V, ±2.
Technical specifications A.7 Specifications for the analog I/O Technical data CPU SB SM Load impedance Single-ended: ≥100 KΩ Differential: 220 KΩ (voltage), 250 Ω (current) Differential: 9 MΩ (voltage), 250 Ω (current) Common mode: 55 KΩ (voltage), 55 KΩ (current) Common mode: 4.5 MΩ (voltage), 4.
Technical specifications A.7 Specifications for the analog I/O Table A- 38 Analog input representation for current (SB and SM) System Current measuring range Decimal Hexadecimal 0 mA to 20 mA 4 mA to 20 mA 32767 7FFF 23.70 mA 22.96 mA Overflow 32512 7F00 32511 7EFF 23.52 mA 22.81 mA Overshoot range 27649 6C01 27648 6C00 20 mA 20 mA Nominal range 20736 5100 15 mA 16 mA 1 1 723.4 nA 4 mA + 578.7 nA 0 0 0 mA 4 mA -1 FFFF -4864 ED00 -3.52 mA 1.
Technical specifications A.7 Specifications for the analog I/O Smoothing selection (sample averaging) Integration time selection 400 Hz (2.5 ms) Weak (4 cycles): 4 samples Medium (16 cycles): 16 samples Strong (32 cycles): 32 samples Sample rate A.7.4 Table A- 41 50 Hz (20 ms) 10 Hz (100 ms) N/A 84 93 340 SB 10.6 59.3 70.8 346 SM 9 52 63 320 CPU N/A 221 258 1210 SB 33.0 208 250 1240 SM 32 203 241 1200 CPU N/A 424 499 2410 SB 63.
Technical specifications A.7 Specifications for the analog I/O A.7.
Technical specifications A.7 Specifications for the analog I/O System Voltage Output Range Decimal Hexadecimal ± 10 V -1 FFFF -361.7 μ V -20736 AF00 -7.5 V -27648 9400 -10 V -27649 93FF -32512 8100 -11.76 V -32513 80FF See note 1 -32768 8000 See note 1 Undershoot range Underflow In an overflow or underflow condition, analog outputs will take on the substitute value of the STOP mode.
Technical specifications A.8 RTD and Thermocouple modules Table A- 46 Analog output representation for current (CPU 1215C and CPU 1217C) System Decimal Hexadecimal 0 mA to 20 mA 32767 7FFF See note 1 32512 7F00 See note 1 32511 7EFF 23.
Technical specifications A.8 RTD and Thermocouple modules Note After power is applied, the module performs internal calibration for the analog-to-digital converter. During this time the module reports a value of 32767 on each channel until valid data is available on that channel. Your user program may need to allow for this initialization time. Because the configuration of the module can vary the length of the initialization time, you should verify the behavior of the module in your configuration.
Technical specifications A.8 RTD and Thermocouple modules Table A- 48 Wiring diagrams for SB 1231 TC and RTD SB 1231 AI 1 x 16 bit TC SB 1231 AI 1 x 16 bit RTD ① Loop-back unused RTD input ② 2-wire RTD ③ 3-wire RTD ④ 4-wire RTD A.8.
Technical specifications A.8 RTD and Thermocouple modules Technical data SM 1231 AI 4 x RTD x 16 bit SM 1231 AI 8 x RTD x 16 bit Number of inputs (Page 323) 4 8 Type Module-referenced RTD and Ω Diagnostics • Overflow / underflow • • Module-referenced RTD and Ω • Overflow / underflow 2,3 24 VDC low voltage 2 • 24 VDC low voltage 2 Wire break (current mode only) 4 • Wire break (current mode only) 4 2,3 1 20.4 to 28.
Technical specifications A.8 RTD and Thermocouple modules Table A- 50 Wiring diagrams for the RTD SMs SM 1231 RTD 4 x 16 bit SM 1231 RTD 8 x 16 bit ① Loop-back unused RTD inputs ② 2-wire RTD ③ 3-wire RTD ④ 4-wire RTD Note: Connectors must be gold. See the S7-1200 Programmable controller system manual, Appendix C. A.8.
Technical specifications A.8 RTD and Thermocouple modules Model SM 1231 AI 4 x 16 bit TC SM 1231 AI 8 x 16 bit TC Number of inputs (Page 323) 4 8 Type Floating TC and mV Diagnostics • Overflow / underflow • • Floating TC and mV • Overflow / underflow 2 24 VDC low voltage 2 • 24 VDC low voltage 2 Wire break (current mode only) 3 • Wire break (current mode only) 3 2 1 20.4 to 28.
Technical specifications A.8 RTD and Thermocouple modules Table A- 52 Wiring diagrams for the TC SMs SM 1231 AI 4 x 16 bit TC SM 1231 AI 8 x 16 bit TC ① SM 1231 AI 8 TC: For clarity, TC 2, 3, 4, and 5 are not shown connected. A.8.
Technical specifications A.
Technical specifications A.8 RTD and Thermocouple modules 1 Type Under range minimum1 Nominal Nominal range low limit range high limit Over range maximum2 Normal range 3, 4 accuracy @ 25 °C Normal range 3, 4 accuracy -20 °C to 60 °C C 0.0 °C 100.0 °C 2315.0 °C 2500.0 °C ±0.7 °C ±2.7 °C TXK / XK(L) -200.0 °C -150.0 °C 800.0 °C 1050.0 °C ±0.6 °C ±1.2 °C Voltage -32512 -27648 -80 mV 27648 80 mV 32511 ±0.05% ±0.
Technical specifications A.8 RTD and Thermocouple modules A.8.7 Table A- 56 RTD sensor type selection table Ranges and accuracy for the different sensors supported by the RTD modules Temperature coefficient Pt 0.003850 ITS90 DIN EN 60751 RTD type Under range minimum1 Nominal range low limit Nominal range high limit Over range maximu m2 Normal range accuracy @ 25 °C Normal range accuracy -20 °C to 60 °C Pt 100 climatic -145.00 °C -120.00 °C 145.00 °C 155.00 ° C ±0.20 °C ±0.
Technical specifications A.8 RTD and Thermocouple modules Table A- 57 Range 1 Under range minimum Nominal range low limit Nominal range high limit Over range maximum1 Normal range accuracy @ 25 °C Normal range accuracy -20 °C to 60 °C 150 Ω n/a 0 (0 Ω) 27648 (150 Ω) 176.383 Ω ±0.05% ±0.1% 300 Ω n/a 0 (0 Ω) 27648 (300 Ω) 352.767 Ω ±0.05% ±0.1% 600 Ω n/a 0 (0 Ω) 27648 (600 Ω) 705.534 Ω ±0.05% ±0.1% Resistance values above the over-range maximum value are reported as 32767. A.8.
Technical specifications A.9 Communication interfaces A.9 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/). A.9.1 PROFIBUS master/slave A.9.1.
Technical specifications A.9 Communication interfaces Technical specifications Weight • Net weight • 115 g • Weight including packaging • 152 g *)The current load of an external consumer connected between VP (pin 6) and DGND (pin 5) must not exceed a maximum of 15 mA (short-circuit proof) for bus termination. PROFIBUS interface Table A- 60 Pinout of the D-sub socket Pin A.9.1.
Technical specifications A.9 Communication interfaces Technical specifications Power supply / external 24 V • minimum • 19.2 V • maximum • 28.8 V Current consumption (typical) • from 24 V DC • 100 mA • from the S7-1200 backplane bus • 0 mA Effective power loss (typical) • from 24 V DC • 2.4 W • from the S7-1200 backplane bus • 0W Power supply 24 VDC / external • Min. cable cross section • min.: 0.14 mm2 (AWG 25) • Max. cable cross section • max.: 1.
Technical specifications A.9 Communication interfaces PROFIBUS cable Note Contacting the shield of the PROFIBUS cable The shield of the PROFIBUS cable must be contacted. To do this, strip the insulation from the end of the PROFIBUS cable and connect the shield to functional earth. A.9.2 GPRS CP Note The GPRS CP is not approved for Maritime applications The following module does not have Maritime approval: • CP 1242-7 GPRS module Note To use these modules, your CPU firmware must be V2.0 or higher. A.9.2.
Technical specifications A.
Technical specifications A.9 Communication interfaces Technical specifications of the ANT794-4MR GSM/GPRS antenna ANT794-4MR Order number 6NH9860-1AA00 Mobile wireless networks GSM/GPRS Frequency ranges • 824 to 960 MHz (GSM 850, 900) • 1 710 to 1 880 MHz (GSM 1 800) • 1 900 to 2 200 MHz (GSM / UMTS) Characteristics omnidirectional Antenna gain 0 dB Impedance 50 ohms Standing wave ratio (SWR) < 2,0 Max.
Technical specifications A.9 Communication interfaces A.9.3 Max. power 10 W Antenna cable HF cable RG 174 (fixed) with SMA male connector Cable length 1.2 m Degree of protection IP64 Permitted temperature range -40°C to +75°C Flammability UL 94 V2 External material ABS Polylac PA-765, light gray (RAL 7035) Dimensions (W x L x H) in mm 70.5 x 146.5 x 20.
Technical specifications A.9 Communication interfaces Table A- 65 Transmitter and receiver Technical data CB 1241 RS485 Type RS485 (2-wire half-duplex) Common mode voltage range -7 V to +12 V, 1 second, 3 VRMS continuous Transmitter differential output voltage 2 V min. at RL = 100 Ω 1.5 V min.
Technical specifications A.9 Communication interfaces CB 1241 RS485 (6ES7 241-1CH30-1XB0) ① Connect "TA" and TB" as shown to terminate the network. (Terminate only the end devices on the RS485 network.) ② Use shielded twisted pair cable and connect the cable shield to ground. You terminate only the two ends of the RS485 network. The devices in between the two end devices are not terminated or biased.
Technical specifications A.9 Communication interfaces A.9.4.
Technical specifications A.
Technical specifications A.
Technical specifications A.10 Technology modules Technical data SM 1278 4xIO-Link Master signal module Valid range high limit (DC) 28.8 VDC Polarity reversal protection Yes Input current Current consumption 65 mA; without load Encoder supply Number of outputs 4 Output current, rated value 200 mA Power loss Power loss, typ. 1 W, excluding port loading Digital inputs/outputs Cable length (meters) 20 m, unshielded, max. Cable length (meters) 20 m, unshielded, max.
Technical specifications A.
Technical specifications A.10 Technology modules A.10.1.
Technical specifications A.11 Companion products A.11 Companion products A.11.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-4AA0 For more information about this product and for the product documentation, refer to the product catalog web site for the PM 1207. See also Customer support (http://www.siemens.com/automation/) A.11.
Technical specifications A.11 Companion products A.11.3 CM CANopen module The CM CANopen module is a plug-in module between the SIMATIC S7-1200 PLC and any device running CANopen. The CM CANopen can be configured to be both master or slave. There are two CM CANopen modules: the CANopen module (order number 021620-B), and the CANopen (Ruggedized) module (order number 021730-B).
Exchanging a V3.0 CPU for a V4.0 CPU B.1 B Exchanging a V3.0 CPU for a V4.0 CPU You can replace your V3.0 CPU with a V4.0 CPU (Page 74) and use your existing STEP 7 project that you designed for the V3.0 CPU. You might also want to check for and apply firmware updates (Page 269) to your connected modules. Note No device exchange possible from V4.0 to V3.0 You can exchange a V3.0 CPU for a V4.0 CPU, but you cannot exchange a V4.0 CPU for a V3.0 CPU after you download the configuration.
Exchanging a V3.0 CPU for a V4.0 CPU B.1 Exchanging a V3.0 CPU for a V4.0 CPU Web server If you exchange a V3.0 CPU for a V4.0 CPU, your Web server project settings for activating the Web server and whether or not to require HTTPS access will be the same as they were in V3.0. You can then configure users, privileges, passwords (Page 193), and languages as needed to use the Web server.
Exchanging a V3.0 CPU for a V4.0 CPU B.1 Exchanging a V3.0 CPU for a V4.0 CPU V3.0 V4.0 Config.DynamicLimits.MaxVelocity DynamicLimits.MaxVelocity Config.DynamicDefaults.Acceleration DynamicDefaults.Acceleration Config.DynamicDefaults.Deceleration DynamicDefaults.Deceleration Config.DynamicDefaults.EmergencyDeceleration DynamicDefaults.EmergencyDeceleration Config.DynamicDefaults.Jerk DynamicDefaults.Jerk Config.PositionLimits_SW.Active PositionLimitsSW.Active Config.PositionLimits_SW.
Exchanging a V3.0 CPU for a V4.0 CPU B.1 Exchanging a V3.0 CPU for a V4.0 CPU HMI panel communication If you had one or more HMI panels (Page 22) connected to your S7-1200 V3.0 CPU, the communication to the S7-1200 V4.0 CPU depends on the type of communication you use and the firmware version of the HMI panel. Recompile and download your project to the CPU and the HMI and/or update your HMI firmware. Requirement to recompile program blocks After exchanging a V3.0 CPU for a V4.
Index A Access protection, CPU, 82 Active/passive communication configuring the partners, 140, 155 connection IDs, 134 parameters, 137 Ad hoc mode, TCP and ISO on TCP, 134 Add new device detect existing hardware, 72 unspecific CPU, 72, 271 Adding inputs or outputs to LAD or FBD instructions, 31 Addressing Boolean or bit values, 63 data block, 62 global memory, 62 individual inputs (I) or outputs (Q), 63 memory areas, 62 process image, 62 temp memory, 62 Air flow, 25 Analog I/O conversion to engineering unit
Index scaling analogs, 45 using for complex equations, 45 Call structure, 116 CANopen modules 021620-B, 021630-B, 344 Capturing values from an online DB, 264 CB 1241 RS485, 335 CE approval, 281 CEIL (ceiling), 102 Change device, 74 Changing settings for STEP 7, 33 Clearance, airflow and cooling, 25 Clock memory byte, 79 Code block, 87 binding to a CPU or memory card, 85 calling a block, 94 copy protection, 85 counters (quantity and memory requirements), 17 DB (data block), 92 FB (function block), 91 FC (fu
Index configuration, 137 connection IDs, 134 Ethernet protocols, 154 HMI connection, 48 network connection, 48 number of connections (PROFINET), 131 partners, 140, 155 S7 connection, 154 types of communication, 129 types, multi-node connections, 154 Web server, 196 Consistency check, 116 Constraints user-defined Web pages, 199 Web server, 196 Contact information, 5, 74 Contacts programming, 41 Control DB for user-defined Web pages parameter to WWW instruction, 201 CONV (convert), 101 Cookie restrictions, s
Index capturing values, 264 global data block, 62, 92 instance data block, 62 organization blocks (OBs), 89 resetting the start values, 264 Data handling block (DHB), 92 Data log data log overview, 112 Data types, 60 DTL, 60 Date and Time Long data type, 60 DB (data block), 92 DC outputs, 287 Debugging downloading in RUN mode, 272 Degree of protection, 286 Designing a PLC system, 53, 87 Device configuration, 71 add modules, 74 Add new device, 73 AS-i, 150 AS-i port, 150 changing a device type, 74 Configuri
Index from STEP 7, 269 First scan indicator, 78 FLOOR, 102 FM approval, 282 Force, 261, 262 I memory, 261, 262 inputs and outputs, 262 peripheral inputs, 261, 262 scan cycle, 262 Force table addressing peripheral inputs, 261 force, 261 force operation, 262 Fragment DBs (user-defined Web pages) generating, 200 Freeport protocol, 163 Frequency, clock bits, 79 Function (FC), 90 know-how protection, 84 Function block (FB) Initial value, 91 Instance data block, 91 know-how protection, 84 Output parameters, 91
Index force operation, 262 force table, 261 monitor, 259 monitor LAD, 260 peripheral input addresses (force table), 261 watch table, 259 CTRL_PWM), 111 DeviceStates, 117 drag and drop, 30 drag and drop between editors, 34 expandable instructions, 31 favorites, 30 I/O FLOOR, 102 addressing, 64 force, 261 analog input representation (current), 313 force operation, 262 analog input representation (voltage), 312 GET, 153 analog output representation (current), 316 GET_DIAG, 117 analog output representation (v
Index IO-Link components, 275 configuring, 276 data, 276 device profile, 276 power-up, 275 technology overview, 275 IO-Link Master block diagram, 278 connection examples, 279 illustration, 277 IO-Link Master signal module, 339 IP address, 80 configuring the online CPU, 267 IP router, 80 ISO on TCP ad hoc mode, 134 ISO on TCP protocol, 133 ISO-on-TCP connection configuration, 140 connection IDs, 134 parameters, 137 J JavaScript restrictions, standard Web pages, 197 K Know-how protection password protectio
Index signal modules (SM), 21 thermal zone, 23, 24, 25 ModuleStates, 117 Monitor capturing values of a DB, 264 resetting the start values of a DB, 264 Monitoring force operation, 262 force table, 261 LAD status, 259, 260 LED instruction, 117 watch table, 259 Monitoring the program, 114 Motion control configuring the axis, 211 hardware and software limit switches, 244 homing (sequence for active homing), 251 homing configuration parameters, 249 homing the axis, 247 MC_ChangeDynamic (change dynamic settings
Index P Panels (HMI), 22 Parameter assignment, 91 Passive/active communication configuring the partners, 140, 155 connection IDs, 134 parameters, 137 Password protection access to the CPU, 82 binding to a CPU or memory card, 85 code block, 84 copy protection, 85 CPU, 82 PID overview, 170 PID_3STEP (PID controller with tuning for valves), 179 PID_3Step algorithm, 170 PID_Compact (universal PID controller with integrated tuning), 173 PID_Compact algorithm, 170 PLC add modules, 74 calling a block, 94 comparin
Index getting started, 39 Program card, 58 Program editor capturing values of a DB, 264 monitor, 260 resetting the start values of a DB, 264 status, 260 Program execution block structure, 53 overview, 51 Program information In the call structure, 116 Program structure, 87 Programming adding inputs or outputs to LAD or FBD instructions, 31 binding to a CPU or memory card, 85 comparing and synchronizing code blocks, 266 drag and drop between editors, 34 expandable instructions, 31 favorites, 30 FBD (function
Index RUN mode, 52, 54 force operation, 262 operator panel, 32, 53, 258 Program execution, 51 toolbar buttons, 32 RUN/STOP buttons, 32 S S7 communication configuring the connection, 141 S7-1200 access protection, 82 add modules, 74 Add new device, 73 airflow, 25 AS-i, 150 AS-i address, 150 calling a block, 94 capturing values of a DB, 264 clearance, 25 compare code blocks, 266 comparison chart of CPU models, 16 Configuring the CPU parameters, 76, 79 Configuring the modules, 76, 79 cooling, 25 device confi
Index Signal board (SB) step response times for analog inputs, 313 Signal board (SM) Add new device, 73 Signal boards (SB) add modules, 74 analog output representation (current), 316 analog output representation (voltage), 315 device configuration, 71 input representation (current), 313 input representation (voltage), 312 overview, 21 SB 1221 4 DI 24 VDC 200 kHz, 293 SB 1221 4 DI 5 VDC 200 kHz, 293 SB 1222 4 DQ 24 VDC 200 kHz, 293 SB 1222 4 DQ 5 VDC 200 kHz, 293 SB 1223 2 DI/2 DQ 24 VDC, 294 SB 1223 DI/DQ
Index SM 1231 AI 4 x 16 bit TC, 321 SM 1231 AI 4 x RTD x 16 bit, 319 SM 1231 AI 8 x 13 bit, 307 SM 1231 AI 8 x 16 bit TC, 321 SM 1231 AI 8 x RTD x 16 bit, 319 SM 1232 AQ 2 x 14 bit, 308 SM 1232 AQ 4 x 14 bit, 308 SM 1234 AI 4 x 13 bit/AQ 2 x 14 bit, 308 SM 1278 4xIO-Link Master, 339 step response times for inputs, 313 Split editors Getting started, 40, 43 Standard Web pages, 193, 194 cookie restrictions, 198 JavaScript restrictions, 197 STARTUP mode force operation, 262 Program execution, 51 Startup parame
Index TIA Portal Add new device, 73 Configuring the CPU, 76, 79 Configuring the modules, 79 device configuration, 71 Portal view, 29 PROFINET, 80 Project view, 29 Time of day configuring the online CPU, 267 Timers quantity, 17 size, 17 Trace feature, 274 TRCV ad hoc mode, 134 connection IDs, 134 TRCV_C ad hoc mode, 134 configuration, 140 connection IDs, 134 connection parameters, 137 TRCV_C instruction, 132 TRUNC (truncate), 102 TS Adapter, 18 TSAP, 133 TSAP (transport service access points), 142 TSEND con
Index CPU 1214C DC/DC/DC, 293 SB 1221 DI 4 200 kHz, 295 SB 1222 DQ 4 200 kHzl;, 295 SB 1223 DI 2/DQ 2 200 kHz, 295 SB 1231 AI 1 x 12 bit, 307 SB 1231 AI 1 x 16 bit RTD, 319 SB 1231 AI 1 x 16 bit TC, 319 SB 1232 AQ 1 x 12 bit, 307 SM 1221 DI 16 24 VDC, 297 SM 1221 DI 8 24 VDC, 297 SM 1222 DQ 16 24 VDC, 298 SM 1222 DQ 16 Relay, 298 SM 1223 DI 16 VDC / DQ 16 Relay, 300 SM 1223 DI 16 VDC/ DQ 16 24 VDC, 300 SM 1223 DI 8 120/230 VAC/DQ 8 Relay, 301 SM 1231 AI 8 x 13 bit, 309 SM 1231 RTD 4 x 16 bit, 321 SM 1231 R
Index Easy Book 364 Manual, 03/2014, A5E02486774-AF