Module 3 Programming
Module 3 Programming
Module 3
Programming
T I A Training Document
Page 1 of 13
Module 3
Programming
SIEMENS
This document was provided by Siemens A&D SCE (automation and drive technology, Siemens A&D
Cooperates with Education) for training purposes. Siemens does not make any type of guarantee regarding its
contents.
The passing on or duplication of this document, including the use and report of its contents, is only permitted
within public and training facilities.
T I A Training Document
Page 2 of 13
Module 3
Programming
SIEMENS
Introduction
Programming is the actual development phase where code is written to solve your automation task. By
breaking your task into smaller units, each piece can be written and tested in a variety of different standard
programming language.
T I A Training Document
Page 3 of 13
Module 3
Programming
SIEMENS
Step 2 :
Step 3 :
T I A Training Document
Page 4 of 13
Module 3
Programming
SIEMENS
Step 5 :
Step 6 :
T I A Training Document
Page 5 of 13
Module 3
Programming
SIEMENS
This section shows you how to select and change the programming language.
Inaddition to these basic choices, SIEMENS offers several additional programming languages within STEP 7
to fit your development needs.
Step 1 :
Step 2 :
T I A Training Document
Page 6 of 13
Module 3
Programming
SIEMENS
Step 2 :
Step 3 :
T I A Training Document
Page 7 of 13
Module 3
Programming
SIEMENS
2.
3.
4.
Create a subroutine
Soubroutine is simply group of logic saved in a code block that has been developed to solve a particular task.
By dividing or partitioning program into block, each application task can be developed and tested, the used
later in the program as needed. Subroutine in STEP7 called Functions (FC) and Function Blocks (FB).
Instruction in the block determine the sequence, in which the subroutines are processed Example include
controling various operating modes in a manufacturing process or performing calculation or data collection on
a time/event basis.
Step 1 :
Step 2 :
T I A Training Document
Page 8 of 13
Module 3
Programming
SIEMENS
Step 3 :
catalog
by
Step 4 :
Step 5 :
T I A Training Document
Page 9 of 13
Module 3
Programming
SIEMENS
T I A Training Document
Step 2 :
Step 3 :
Page 10 of 13
Module 3
Programming
SIEMENS
var1
var2
var3
result
temp
INT
INT
INT
INT
INT
Step 5 :
Download a program
After you created, edited and saved a program, the next step is to download this code to the CPU.
Downloading copies the code from your PC (offline) to the CPU (online). Within STEP 7, you can use Simatic
Manager to download the entire program or multiple block. You can use the program editor to download
individual blocks that are open.
Opt. 1 :
T I A Training Document
Page 11 of 13
Module 3
Programming
SIEMENS
Display the instruction status, power flow and the box instruction input/output values.
Display power flow, instruction status and block instruction input/output values.
Display the operand status, the Result of Logic Operation (RLO) and the register values for
instruction/combinations. Additional status options are available.
T I A Training Document
Step 1 :
Step 2 :
Page 12 of 13
Module 3
Programming
SIEMENS
Step 3 :
T I A Training Document
Page 13 of 13
Module 3
Programming