4. S7 PROGRAMMING LANGUAGE & BLOCKS TYPE

Tricom Controls
ا  ما Tricom Controls S.A.E 20 Street 295, New Maadi, Cairo - Postal Code 11435 - Tel: 002 02/25181138, Fax: 002 02/25181137
Email: info@tricomcontrols.com ٢٠ عر ٢٩٥ - ىدا ةا - ى ر١١٤٣٥ - ت : ٢٥١٨١١٣٨/٠٢ ٠٠٢ ف :٢٥١٨١١٣٧/٠٢ ٠٠٢ 42
4. PROGRAMMING LANGUAGE &
BLOCKS TYPE
Here we will illustrate the programming
languages & the block types.
Tricom Controls
ا  ما Tricom Controls S.A.E 20 Street 295, New Maadi, Cairo - Postal Code 11435 - Tel: 002 02/25181138, Fax: 002 02/25181137
Email: info@tricomcontrols.com ٢٠ عر ٢٩٥ - ىدا ةا - ى ر١١٤٣٥ - ت : ٢٥١٨١١٣٨/٠٢ ٠٠٢ ف :٢٥١٨١١٣٧/٠٢ ٠٠٢ 43
Programming languages
Introduction:
There are several programming languages in STEP 7 that can be used depending on preference
and knowledge. By adhering to specific rules, the program can be created in Statement List and
later converted into another programming language.
LAD
Ladder Diagram is very similar to a circuit diagram. Symbols such as contacts and coils are used.
This programming language often appeals to those who have a drafting or electrical background.
STL
The Statement List consists of STEP 7 instructions. You can program fairly freely with STL.
This programming language is preferred by programmers who are already familiar with other
programming languages.
FBD
Tricom Controls
ا  ما Tricom Controls S.A.E 20 Street 295, New Maadi, Cairo - Postal Code 11435 - Tel: 002 02/25181138, Fax: 002 02/25181137
Email: info@tricomcontrols.com ٢٠ عر ٢٩٥ - ىدا ةا - ى ر١١٤٣٥ - ت : ٢٥١٨١١٣٨/٠٢ ٠٠٢ ف :٢٥١٨١١٣٧/٠٢ ٠٠٢ 44
The Function Block Diagram uses “boxes” for the individual functions. The character in the box
indicates the function (such as & --> AND Logic Operation).
This programming language has the advantage that even a “non-programmer can work with it.
Function Block Diagram is available as of Version 3.0 of the STEP7 Software.
View
You choose the View menu to switch from one STEP 7 programming language to another:
• LAD (Ladder Diagram)
• FBD (Function Block Diagram)
• STL (Statement List).
Switching the Program Language
You can switch the programming language as you wish when you create as well as later on.
Tricom Controls
ا  ما Tricom Controls S.A.E 20 Street 295, New Maadi, Cairo - Postal Code 11435 - Tel: 002 02/25181138, Fax: 002 02/25181137
Email: info@tricomcontrols.com ٢٠ عر ٢٩٥ - ىدا ةا - ى ر١١٤٣٥ - ت : ٢٥١٨١١٣٨/٠٢ ٠٠٢ ف :٢٥١٨١١٣٧/٠٢ ٠٠٢ 45
LAD/FBD => STL
You can convert program sections that have been written in the graphical programming
languages (LAD/FBD) into STL. You should, however, be aware that the result of this
conversion is not always the most efficient solution in Statement List.
STL => LAD/FBD
It is not always possible to convert program sections written in STL into LAD or FBD. The
sections of the program that cannot be converted are left in STL.
No sections of the program are lost on conversion.
Block types
Blocks
The programmable logic controller provides various types of blocks in which the user program
and the related data can be stored. Depending on the requirements of the process, the program
can be structured in different blocks.
Organization Block OB
Organization blocks (OBs) form the interface between the operating system and the user
program. The entire program can be stored in OB1 that is cyclically called by the operating
system (linear program) or the program can be divided and stored in several blocks (structured
program).
Tricom Controls
ا  ما Tricom Controls S.A.E 20 Street 295, New Maadi, Cairo - Postal Code 11435 - Tel: 002 02/25181138, Fax: 002 02/25181137
Email: info@tricomcontrols.com ٢٠ عر ٢٩٥ - ىدا ةا - ى ر١١٤٣٥ - ت : ٢٥١٨١١٣٨/٠٢ ٠٠٢ ف :٢٥١٨١١٣٧/٠٢ ٠٠٢ 46
Function FC, SFC
A function (FC) contains a partial functionality of the program. It is possible to program
functions so that they can be assigned parameters. As a result, functions are also suited for
programming recurring, complex partial functionalities such as calculations.
System functions (SFC) are parameter-assignable functions integrated in the CPU‘s operating
system. Both their number and their functionality are fixed.
Function Block FB, SFB
Basically, function blocks offer the same possibilities as functions. In addition, function blocks
have their own memory area in the form of instance data blocks.
As a result, function blocks are suited for programming frequently recurring, complex
functionalities such as closed-loop control tasks.
System function blocks (SFB) are parameter-assignable functions integrated in the CPU‘s
operating system. Both their number and their functionality are fixed.
Data Blocks DB
Data blocks (DB) are data areas of the user program in which user data are managed in a
structured manner.
Permissible Operations
You can use the entire operation set in all blocks (FB, FC and OB).
1 / 12 100%
La catégorie de ce document est-elle correcte?
Merci pour votre participation!

Faire une suggestion

Avez-vous trouvé des erreurs dans linterface ou les textes ? Ou savez-vous comment améliorer linterface utilisateur de StudyLib ? Nhésitez pas à envoyer vos suggestions. Cest très important pour nous !