# Simatic

SIMATIC is a series of programmable logic controller and automation systems, developed by Siemens. Introduced in 1958, the series has gone through four major generations, the latest being the SIMATIC S7 generation. The series is intended for industrial automation and production.
The name SIMATIC is a registered trademark of Siemens. It is a portmanteau of "Siemens" and "Automatic".

## Function

As with other programmable logic controllers, SIMATIC devices are intended to separate the control of a machine from the machine's direct operation, in a more lightweight and versatile manner than controls hard-wired for a specific machine. Early SIMATIC devices were transistor-based, intended to replace relays attached and customized to a specific machine. Microprocessors were introduced in 1973, allowing programs similar to those on general-purpose digital computers to be stored and used for machine control. SIMATIC devices have input and output modules to connect with controlled machines. The programs on the SIMATIC devices respond in real time to inputs from sensors on the controlled machines, and send output signals to actuators on the machines that direct their subsequent operation.
Depending on the device and its connection modules, signals may be a simple binary value ("high" or "low") or more complex. More complex inputs, outputs, and calculations were also supported as the SIMATIC line developed. For example, the SIMATIC 505 could handle floating point quantities and trigonometric functions.

## Product lines

Siemens has developed four product lines to date:
* 1958: SIMATIC Version G
* 1973: SIMATIC S3
* 1979: SIMATIC S5
* 1995: SIMATIC S7

### SIMATIC S5

The S5 line was sold in 90U, 95U, 101U, 100U, 105, 110, 115,115U, 135U, and 155U chassis styles. Within each chassis style, several CPUs were available, with varying speed, memory, and capabilities. Some systems provided redundant CPU operation for ultra-high-reliability control, as used in pharmaceutical manufacturing, for example.
Each chassis consisted of a power supply, and a backplane with slots for the addition of various option boards. Available options included serial and Ethernet communications, digital input and output cards, analog signal processing boards, counter cards, and other specialized interface and function modules.

### SIMATIC S7

The first entries in the S7 line were released in 1994, available under three performance classes: S7-200, S7-300 and S7-400. The introduction of SIMATIC S7 saw also the release of a new fieldbus standard Profibus, and the pioneer use of industrial Ethernet to facilitate communication between automation devices. The great success of the S7-300 CPU family in particular helped to cement the role of Siemens as one of the global leaders in automation technology. These series are expected to be phased out in 2033.
The first generation of S7 CPUs were later succeeded by the S7-1200 and S7-1500, released in 2012. These models came with standard Profinet interface.

## Software

Programs running on SIMATIC devices run in software environments created by Siemens. The environment varies by product line:
* The SIMATIC S5 product line is programmed in STEP 5.
* The SIMATIC S7 product line is programmed in STEP 7 (V5.x or TIA Portal).

### Step 5

The S5 product line was usually programmed with a PC based software programming tool called STEP 5. STEP 5 was used for programming, testing, and commissioning, and for documentation of programs for S5 PLCs.
The original STEP 5 versions ran on the CP/M operating system. Later versions ran on MS-DOS, and then versions of Windows through Windows XP. The final version of STEP 5 was version 7.2 (upgradable to version 7.23 Hotfix 1 with patches).
In addition to STEP 5, Siemens offered a proprietary State logic programming package called Graph5. Graph5 is a sequential programming language intended for use on machines that normally run through a series of discrete steps. It simulates a State machine on the S5 platform.
Several third-party programming environments were released for the S5. Most closely emulated STEP 5, some adding macros and other minor enhancements, others functioning drastically differently from STEP 5. One allowed STEP 5 programs to be cross-compiled to and from the C programming language and BASIC.

### Structured programming

STEP 5 allowed the creation of structured or unstructured programming, from simple AND/OR operations up to complex subroutines. A STEP 5 program may, therefore, contain thousands of statements.
To maintain maximum transparency, STEP 5 offers a number of structuring facilities:
* Block technique - A linear operation sequence is divided into sections and packed into individual blocks.
* Segments - Within blocks, fine structuring is possible by programming subtasks in individual segments.
* Comments - Both a complete program as well as individual blocks or segments and individual statements can be directly provided with comments.

### Methods of representation

STEP 5 programs can be represented in three different ways:
* Statement List (STL) - The program consists of a sequence of mnemonic codes of the commands executed one after another by the PLC.
* Ladder Diagram (LAD) - Graphical representation of the automation task with symbols of the circuit diagram
* Function Block Diagram (FBD) - Graphical representation of the automation task with symbols to DIN 40700/ DIN 40719.
Absolute or symbolic designations can be used for operands with all three methods of representation.
In LAD and FBD complex functions and function block calls can be entered via function keys. They are displayed on the screen as graphical symbols.
There are several program editors, from either genuine Siemens, or from other suppliers. After Siemens discontinued support, other suppliers started to develop new STEP 5 version which can run on Windows XP, or Windows 7.

### Blocks

Five types of blocks are available:
* Organization blocks (OB) - for managing the control program
* Programming blocks (PB) - contain the control program structured according to functional or process-oriented characteristics
* Sequence blocks (SB) - for programming sequential controls
* Function blocks (FB) - contain frequently occurring and particularly complex program parts
* Data blocks (DB) - for storing data required for processing the control program.
Some S5 PLCs also have block types FX (Extended Function Blocks), and DX(Extended Data Blocks); these are not distinct block types, but rather are another set of available blocks due to the CPU having more memory and addressing space.

### Operations

STEP 5 differentiates between three types of operations:
* Basic operations, (e.g. linking, saving, loading & transferring, counting, comparing, arithmetic operations, module operations) - These can be performed in all three representations.
* Supplementary operations and complex functions, (e.g. substitution statements, testing functions, word-by-word logic operations, decrement/increment and jump functions.) - These can only be executed in STL.
* System operations (direct access the operating system) - These can only be executed in STL.

## Stuxnet

The Stuxnet computer worm specifically targets SIMATIC S7 PLCs via its STEP 7 programming environment.