×
Siemens Industry Online Support
Siemens AG
Entry type: Application example Entry ID: 81318674, Entry date: 03/28/2017
(73)
Rate

Programming Guidelines and Programming Styleguide for SIMATIC S7-1200 and S7-1500

  • Entry
  • Associated product(s)
To create an optimal program regarding technical possibilities and consistency, it is recommended to use the programming guidelines and programming styleguide for SIMATIC S7-1200/1500.


Introduction
Two different manuals for optimal programming of S7-1200 and S7-1500 controllers are offered here:

  • programming guideline (optimal programming with regards to technology)
  • programming guideline safety (Recommendations for configuring F-CPUs and programming safety programs)
  • programming styleguide (suggestion for a consistent program style)




Programming Guideline

The new controller generation SIMATIC S7-1200 and S7-1500 has an up-to-date system architecture, and together with the TIA Portal offers new and efficient options of programming and configuration. It is no longer the resources of the controller (e.g. data storage in the memory) that are paramount but the actual automation solution itself.
This document gives you many recommendations and information on the optimal programming of SIMATIC S7-1200/1500 controllers. Some differences in the system architecture of the SIMATIC S7-300/400, as well as the thus connected new programming options are explained in an easy to understand way. This helps you to create a standardized and optimal programming of your automation solutions. The examples described can be universally used for the controllers SIMATIC S7-1200 and S7-1500.

The following key issues on the TIA Portal are dealt with in this document:

  • S7-1200/1500 innovations
    • Programming languages
    • Optimized blocks
    • Data types and instructions
  • Recommendations on general programming
    • Operating system and user program
    • Memory concept
    • Symbolic addressing
    • Libraries
  • Recommendations on hardware-independent programming
  • Overview of the most important recommendations


Advantages and Benefits
Numerous advantages result from applying these recommendations and tips:

  • capable user program
  • clear program structures
  • intuitive and effective programming solutions


Downloads
Programming Guideline for S7-1200/S7-1500


Last Changes

V1.5: various modifications and new chapter (see Chapter 8 History in Programming Guideline 90885040)

 

Programming Guideline Safety

This document is a supplement to the programming guideline above and deals with special aspects of configuring F-CPUs and programming safety programs with STEP 7.


Advantages and Benefits
Following the recommendations given in this document provides you with many advantages:


  • Reusability of program parts

  • Easier acceptance (code review, error detection and correction)

  • More flexibility in terms of program changes

  • Reduction of programming errors

  • Increased plant availability by avoiding CPU stops

  • Easier readability for third parties

  • Reduced runtime of the safety program         


Downloads

Programming Guideline Safety for SIMATIC S7-1200/1500

 

Programming Styleguide

When programming SIMATIC controllers, the task of the programmer is to create as clear and readable a user program as possible. Each user uses its own strategy, for example, how to name tags or blocks or the way of commenting. The different philosophies of the programmers create very different user programs that can only be interpreted by the respective programmer.
The programming styleguide offers you coordinated set of rules for consistent programming. These specifications for example describe a uniform assignment of tags and block names up to clear programming in SCL.
You can user these rules and recommendations at will; they serve as a suggestion (not a standard in programming) for consistent programming.


Advantages and Benefits
If several programmers are working on the same program, it is recommended to stick to a joint and coordinated programming style. This offers the following advantages:

  • consistent continuous style
  • easily readable and comprehensible
  • simple maintenance and reusability
  • easy and quick troubleshooting and error correction
  • efficient working at the same project with several programmers


Additional Keywords
Compendium, programming guidelines, summary

Security information
In order to protect technical infrastructures, systems, machines and networks against cyber threats, it is necessary to implement – and continuously maintain – a holistic, state-of-the-art IT security concept. Siemens’ products and solutions constitute one element of such a concept. For more information about cyber security, please visit
https://www.siemens.com/cybersecurity#Ouraspiration.