6-2
Primer: S7-300 Programmable Controller, Quick Start
C79000-G7076-C500-01
You can program your programmable controller quite easily by creating a
user program that you download to the CPU of your S7-300. The user
program you have to create consists of different blocks which enable you to
structure your program. For the TLIGHT sample program, you require only
two blocks:
S An organization block (OB1) for cyclic program execution and
S A function (FC1) into which you enter the actual program.
An organization block (OB) is the interface between the operating system of
the CPU and your user program. The order in which the user program is
executed is defined in an OB.
A function (FC) is a logic block without ‘memory’ which can nevertheless
transfer parameters. This block is especially suitable for programming
frequently recurring functions.
Using the TLIGHT sample program, we aim to show you the basic procedure
for programming blocks. Figure 6-1 gives you a task-oriented overview:
Procedure for programming blocks
Create blocks:
S Create FC1 and assign language editor (STL, LAD, or
FBD)
Program blocks (in STL, LAD, or FBD):
S Start language editor, declare variables and enter
program, divided into networks.
Save and download blocks:
S Save the blocks in your programming device/PC and
download them to the CPU
Figure 6-1 Basic Procedure for Programming
Introduction
What is an
Organization Block
(OB)?
What is a Function
(FC)?
Basic Procedure
Programming Logic Blocks with STEP 7
Procedure for Programming Blocks