0% found this document useful (0 votes)
20 views

PLC-Designer IEC61131 Basics-En

LENZE PLC Training Introduction

Uploaded by

JosephM.Pascua
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views

PLC-Designer IEC61131 Basics-En

LENZE PLC Training Introduction

Uploaded by

JosephM.Pascua
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 14

Controller-based Automation

Lenze training: IEC-61131-3 introduction

PLC-Designer VisiWinNET®

Logic Visu

Motion
Controller-based Automation
Lenze training: IEC-61131-3 introduction

Training content
• Introduction to the IEC-61131-3 definition
IEC-61131-3 introduction

With the standard of IEC 61131-3, in Dec.1993 the


PLCopen user organisation established the basis for standardised
PLC programming, which for instance describes and defines terms
such as
• configuration, resources, task,
• programming languages,
• programs, function block, functions
• variables, operands, data types,
• identifiers, keywords, comments, literals,
• control restart,
• communication,
e.g. in order to be able to port programs to other systems more
easily by standardised language.

3 020_PLC-Designer_IEC61131_Basics-en.pptx V2.0 04.09.2013


IEC-61131-3 introduction
Configuration, resources

• The top level in the software model is constituted by the configuration,


which defines the structure of the device. This device can for instance be a
PLC with several networked central processing units (CPUs).
• A configuration contains one or several resources, which represent a
control unit (CPU).
• The programs associated to the resource are controlled by tasks
representing an active program unit.

4 020_PLC-Designer_IEC61131_Basics-en.pptx V2.0 04.09.2013


IEC-61131-3 introduction
Task

• Tasks can be processed periodically or on the basis of an event; furthermore


they are provided with a priority.
• The following types of tasks are distinguished:
− Unsolicited task (free wheeling task)
− Time-controlled task (cyclic task)
− Event-controlled task (EVENT task)
− Interrupt task (is not supported by the L-force Controller)
• The declaration of a task consists of the name of the task, an entry for the
priority, and the condition of the task execution.
• The condition may either be a time interval, an event (e.g. rising edge at the
digital input), or an interrupt.
• For each task, a sequence of programs that are to be called by the task can
be specified. These programs are processed in the sequence specified.

5 020_PLC-Designer_IEC61131_Basics-en.pptx V2.0 04.09.2013


IEC-61131-3 introduction
Programming languages

• In IEC 61131-3, the following five programming languages are defined:


− IL: instruction list
− ST: structured text
− SFC: sequential function chart
− FBD: function block diagram
− LD: ladder diagram
• Each language for itself has special use cases or versions that are particularly
suitable for solving specific problems.

6 020_PLC-Designer_IEC61131_Basics-en.pptx V2.0 04.09.2013


IEC-61131-3 introduction
Programs, function block, functions

• In IEC 61131-3, the following program organisation units (POUs) are


defined:
− Programs
− Function blocks
− Functions
• The properties of a POU allow for extensive modularisation of the
application program and reuse of software modules that have already
been implemented and tested.
• In order to enable program modules to access POUs, it is at least required
to declare the call interface. After its declaration, the POU is globally
provided to all other POUs.

7 020_PLC-Designer_IEC61131_Basics-en.pptx V2.0 04.09.2013


IEC-61131-3 introduction
Variables

• In IEC 61131-3, five different variable classes are defined:


− Global variables
− Local variables
− Input variables
− Output variables
− Input and output variables
• The variables are declared in the source text between the keywords VAR and
END_VAR.
• When a variable is declared, the following attributes can be additionally used:
− RETAIN: These variables even maintain their value after a power failure.
When the program is restarted, processing continues with the values saved.
− CONSTANT: Variable values cannot be changed.
− AT: Variables have a fixed position in the memory map (permanent address)

8 020_PLC-Designer_IEC61131_Basics-en.pptx V2.0 04.09.2013


IEC-61131-3 introduction
Data types

• In IEC 61131-3, different standard data types are defined, from which
derived and user-defined data types can be compiled.
• Standard data types:
− BOOL (logical values TRUE/FALSE)
− BYTE, WORD, DWORD, SINT, USINT, INT, UINT, DINT, UDINT
(integer data types)
− REAL (floating point data type)
− STRING (string)
− TIME, TIME_OF_DAY, DATE, DATE_AND_TIME (time-related data
types)

9 020_PLC-Designer_IEC61131_Basics-en.pptx V2.0 04.09.2013


IEC-61131-3 introduction
Data types

• Defined data types:


− ARRAY (one-, two-, three-dimensional field)
− POINTER (contains the address of the variable/function block during
the execution time of the program)
− Enumeration type (enumerated, consists of a set of string constants)
− STRUCT (structure)
− Reference (generates an alternative name for the variable/constant/
function block)

10 020_PLC-Designer_IEC61131_Basics-en.pptx V2.0 04.09.2013


IEC-61131-3 introduction
Identifiers, keywords, comments, literals

• The general language elements of IEC 61131-3 include identifiers, keywords,


comments, and literals:
− An identifier is a sequence of letters, digits, and underline characters
starting with a letter or an underline character.
− Keywords are unique combinations of characters, which are used as
individual syntax elements (e.g. TRUE, VAR).
− Comments on program parts support their traceability and therefore
serve as an important means of documentation.
− A literal in IEC 61131-3 is either a string, a number, or a time
specification.

11 020_PLC-Designer_IEC61131_Basics-en.pptx V2.0 04.09.2013


IEC-61131-3 introduction
Control restart

• The restart behaviour of the control is also defined in the software model of
IEC 61131-3.
− Cold boot
In the case of a cold boot, the program is reloaded. All variables are set to
their initial value. Either a standard initial value (e.g. 0 or FALSE) or the
initial value specified in the variable declaration (optional) is set. All
resource tasks are started. Apart from the "normal" variables, retain
variables are also reset to their initialisation values.
− Warm boot
In the case of a warm boot (restart), the variables are not set to their initial
values, but the values available in the memory before the interruption are
adopted.
− Reset source(PLC Designer)
Resets the values of all variables, including the remanent variables of the
active application to their initialisation values and deletes the application
program on the control.

12 020_PLC-Designer_IEC61131_Basics-en.pptx V2.0 04.09.2013


IEC-61131-3 introduction
Communication

• The communication model of IEC 61131-3 describes the data exchange of


the elements of a configuration via
− access paths
− global variables
− request parameters
− communication blocks (IEC 61131-5)
By means of these uniquely defined interfaces, in particular the
modularisation and therefore the reusability of program parts is to be
supported.

13 020_PLC-Designer_IEC61131_Basics-en.pptx V2.0 04.09.2013


Lenze training

As easy as that.

You might also like