Vous êtes sur la page 1sur 18

Introduction to PLCs Programming

Basics
Discussion Topics

Industrial Automation
TIA Portal (Totally Integrated Automation )
Types Of Program Blocks
Data Types
Program Representation
Sample Program


Industrial Automation
The technique of making a machine, a process or a system independently work is
called automation , when this technique is applied on industry for its
production and maintenance is called Industrial Automation.

Industrial
Automation
Quality
Productivity
Manpower
Cost
Time
TIA Portal
TIA (Totally Integrated Automation ) Portal integrates various SIMATIC products in a
Software application with which you can increase your productivity and
efficiency.TIA is an integrated engineering framework for Controller ,HMI & drives.
SIEMENS follows a vision of providing an engineering framework for implementing
automation solution in all industries around globe.

TIA portal Supports in creating an automation solution they are:
1.Creating the project.
2.Configuring the hardware.
3.Networking the device.
4.Programming .
5.Loading the logic .
6.Using the online and diagnostic Function .
Program Blocks
TIA provides a particular space to write the program ,and this space provided by TIA
portal is called Program Block.
Organization Block(OB)
Function (FC)
Function Block(FB)
Data Block(DB)
User Program
A user program can consist of one or several blocks.We have to use at least one
organized block. The blocks include all function that are necessary for processing
specific automation task.

Organization Block(OB)
Organization Block forms the interface between the operating system of the PLC and
the user program. They are called by the operating system and control the following
operation.
Startup of automation System
Cyclic program execution
Interrupts driven program execution
Error handling

The Operating System calls the Organized block in each cycle and thereby starts the
execution of the program contained in the cyclic OBs .

Function (FC)
It is also the part of the program block ,it is a place were we write program(code).
Function dont have it own memory ,it depend on the tags or Data blocks for memory
. It returns a function values to the calling block.
No instances of function block can be called with function.

Application
Functions are primarily used when functions values are to be returned to the calling block.
e.g. : math function, signal control with binary logical operator.


Function Block(FB)
It is also a block were we write program .A Function Block is a block with memory .It is
assigned a data block as its memory.
Data saved in the instance DB(data block) are not lost when execution of function block is
complete. It doesnt not depend on the tags and data blocks for memory it has its on
instance Data Block.

Function Block are blocks of the user program and represent logic block with memory
according to the IEC standards. They can be called by Organized block(OB), Function
Block(FB) and Function Call(FC). It can have as many input/output and in/out
parameters as is required as well as static and temporary variable.







DATA BLOCK
It is part of program block ,a user program also consist of data containing information
about process states, which are then processed according to the instruction in user
program.
It is a block used by the logic blocks of the user program for storing values, the data in
data blocks is not overwritten when execution of the logic block is completed or when
Data block is closed. The maximum size of the storage provided by Data Block is
dependent on CPU.
Types of Data Block
User Data Block : this data remains valid even if block has been closed. Every FB,FC OB
can read or write the data in Data Block.
Instance Data Block: It also remains valid even if block is closed but only FB can read or
write the data in the DB. There can be more than 1DB for 1FB.
System Data Block : These DBs are created by system , user doesn't have any access to
change the structure of the Data Block , but user can modify the data as per his use.




Program Representation
TIA Portal provides various ways in which we can write our instruction and load in the
PLC ,depending upon our knowledge and use we can use the various program
representation techniques. The different program representation are :

LAD(LADDER)
FBD(Functional Block Diagram)
STL(Statement List)
GRAPH
SCL(Structured Control Language )


(LAD) LADDER
Ladder logic is a symbolic representation of an electrical circuit. It is also used as the
symbolic programming language used in industry to communicate with programmable
logic controllers (PLCs). They are called "ladder" diagrams because they look like a
ladder with horizontal and vertical rails. The left vertical leg represent power supply
and right vertical leg represents the ground state. The horizontal rungs represent
each individual control circuit.


FBD (Functional Block Diagram)
Functional Block Diagram are another part of IEC 61131-3 standard. The primary
concept behind a FBD is Data Flow from the input to the output, through function
block. A functional block looks like rectangular block with inputs entering from the
left and output emerging from the right.

STL (Statement List)
STL corresponds to the Instruction List language defined in the IEC 61131-3
specification. The programming is done with very simple mnemonics that can be hard
to remember if you don't use it very often.
STL Commonly we use Operand & Operator, this Language is more powerful than
others hence used by the professionals.


GRAPH
GRAPH is based on the STEP 7 programming software. It is used for describing
procedures with alternative or parallel step sequences. The procedures are configured
and programmed clearly and quickly in a standardized method of representation. The
process is described graphically, and divided into individual steps with an easily
comprehensible scope of functions. Actions can be defined for the steps, and their
execution controlled. Transitions control the conditions required for the next step.
Interlock and monitoring conditions are defined for each step. Its looks like a
Flowchart which has the instructions , which help PLC to perform there task.


example:
Start
Instruction
Output
Stop
Logic
verify

SCL(Structured Control Language)
SCL is a high level programming language. It is a textual based language based on
PASCAL. It is designed in such a way that it matches the standards of PLCs.
SCL is ideally suited for dealing with all the task involved in automation project.SCL
provides development environment which consist of the following :

Editor: It provide the space to the programmers to write the code in different block.
Batch Complier : it is used for translating the code written into machine
understandable language.
Debugger :it enables the programmer to check for logical programming errors .




Questions?

Vous aimerez peut-être aussi