0% found this document useful (0 votes)
18 views19 pages

Chapter 2 - Introduction To TwinCAT Automation System and PLC Basic Principles

The document provides an overview of programmable logic controllers (PLCs) and the IEC 61131-3 standard for programming PLCs. It discusses the basic elements of PLCs including inputs, outputs, contacts, coils, counters, timers and functions. It also describes industrial hosts like PLCs and industrial PCs. Additionally, it outlines the key aspects of the IEC 61131-3 standard such as the programming languages, data types, variables, and program organization units used to program PLCs.

Uploaded by

Ananthan Srijith
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)
18 views19 pages

Chapter 2 - Introduction To TwinCAT Automation System and PLC Basic Principles

The document provides an overview of programmable logic controllers (PLCs) and the IEC 61131-3 standard for programming PLCs. It discusses the basic elements of PLCs including inputs, outputs, contacts, coils, counters, timers and functions. It also describes industrial hosts like PLCs and industrial PCs. Additionally, it outlines the key aspects of the IEC 61131-3 standard such as the programming languages, data types, variables, and program organization units used to program PLCs.

Uploaded by

Ananthan Srijith
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/ 19

Chapter 2 -

Introduction to TwinCAT
Automation System and
PLC Basic Principles

Joe Yang & Arun Kumar


Outlines
• Introduction to Industrial Hosts and Controllers

• Overview of IEC 61131-3 Standard

• PLC Basic Elements

• TwinCAT 3 Quick Start

ET0802 (AI for Automation) 2


Introduction to Industrial Hosts and Controllers
PLC (Programmable Logic Controller)
• A PLC, is a ruggedized computer used for industrial automation.
These controllers can automate a specific process, machine
function, or even an entire production line.

• The PLC receives information from connected sensors or input


devices, processes the data, and triggers outputs based on pre-
programmed parameters.

• Programmable Logic Controllers are a flexible and robust control


solution, adaptable to almost any industrial application.

ET0802 (AI for Automation) 3


Introduction to Industrial Hosts and Controllers
IPC (Industrial PC)
The IPC is a PC built to operate reliably in an industrial
environment with newer and smaller component designs
and more compact operating systems.
The IPC no longer looks like a desktop PC or even a panel-
mount PC, two of the most common form factors.
The IPC is now being designed for DIN-rail or rack
mounting, which expands the application space. Because
an IPC is a PC at heart, its theoretical maximum processing
power and communications and data storage capabilities
are unmatched by PLCs or PACs (Programmable
Automation Controller).
Source: https://www.machinedesign.com/motion-control/how-choose-best-controller-each-application
ET0802 (AI for Automation) 4
The 7 Parts of IEC61131 Standard
1. General overview, definitions IS

2. TheHardware
7 parts of the IEC 61131 Standard IS
3. Programming Languages IS
4. User Guidelines IS
5. Messaging Service Specification IS
7. Fuzzy Logic IS
8. Technical Report
IS = International Standard

Overview of IEC 61131-3 Standard


ET0802 (AI for Automation) 5
IEC 61131 is an IEC standard for Programmable logic controllers (PLCs).

Conventional Style Software IEC Style Software

1) Direct hardware address 1)IEC address


X0, X1...Y0,Y1....DT0,DT1..... %IX0.....%QX0.....%MW5.0
- each Variable have a name
2) Single Program from start to end - each Variable have a data type
-global and local Variables

2) Single or more programs


- Function Blocks and Functions

Overview of IEC 61131-3 Standard


ET0802 (AI for Automation) 6
IEC 61131 Common elements

Data Types
Type Size Bit Range
Bit 1 (0 or 1)
Byte 8 (0 to 255)
Word 16 (0 to 65,535)
Integer 16 (−32,768 to +32,767)
DWORD 32 (0 to +4,294,967,295)
DINT 32 (−2,147,483,648 to +2,147,483,647)
Real 32 (4 byte floating point)
Time (encoding depends on the PLC)
String (depends on PLC, but typically the max length 255 characters)
Arrays (any of the above types grouped into an array)

Overview of IEC 61131-3 Standard


ET0802 (AI for Automation) 7
IEC 61131 Common elements

Variables Declaration

Local Variables: VAR,VAR_INPUT,VAR_OUTPUT


Scope of these variables is limited to POU in which they are created.

Global Variables: VAR_GLOBAL


Scope of these variables is not limited and are available in all POU’s

Retain Variables: VAR RETAIN, VAR_GLOBAL RETAIN


Values are Retained/stored even after power failure

Overview of IEC 61131-3 Standard


ET0802 (AI for Automation) 8
IEC 61131 Common elements

Configuration, Resources and Tasks

Configuration
Resource Resource

Task Task Task Task

Program Program Program Program

FB FB FB FB

Access Path

FB Function Block

Overview of IEC 61131-3 Standard


ET0802 (AI for Automation) 9
IEC 61131 Common elements

Configuration, Resources and Tasks

Configuration : At the highest level, the entire software required to solve a particular control problem can
be formulated as a Configuration. A configuration is specific to a particular type of control system,
including the arrangement of the hardware, i.e. processing resources, memory addresses for I/O channels
and systemcapabilities.

Resource : Within a configuration one can define one or more resources. One can look at a
resource as a processing facility that is able to execute IECprograms.

Tasks : Within a resource, one or more Tasks can be defined. Tasks control the execution of a set of
programs and/or function blocks. These can either be executed periodically or upon the occurrence of a
specified trigger, such as the change of avariable.

Overview of IEC 61131-3 Standard


ET0802 (AI for Automation) 10
IEC 61131 Common elements

Program Organization Units :Within IEC 61131-3, the Programs, Function Blocks and Functions are called
Program Organization Units, POUs.

• Program
Program is a network of Functions and Function Blocks.

• Function & Function Blocks are the basic building blocks, containing a data structure and an algorithm

IEC has defined standard functions and user defined functions. Standard functions are for instance
ADD(addition), ABS (absolute), SQRT, SINus and COSinus. User defined functions, once defined, can be
used over and over again.

Overview of IEC 61131-3 Standard


ET0802 (AI for Automation) 11
IEC 61131 Common elements

• Programming Languages : Within IEC 61131-3, the syntax and semantics are defined for six standard programming
languages, leaving no room fordialects.

There are two textual languages and four graphicallanguages.


Textual languages Graphical languages
• Instruction List (IL) • Function Block Diagram (FBD)
• Structured Text (ST) • Ladder Diagram (LD)
• Continuous Function Chart (CFC)
• Sequential Function Chart (SFC)

Overview of IEC 61131-3 Standard


ET0802 (AI for Automation) 12
Advantages of IEC 61131-3

• Unified rules , reduces misunderstandings and shortens training

• Reuse of ready-made Functions and Function Blocks, Reduced waste of human resources, in training,
debugging, maintenance.

• Better overview through structure and modularity

• Fewer errors through defined data types and encapsulation

• Enables parallel software development by many programmers

Overview of IEC 61131-3 Standard


ET0802 (AI for Automation) 13
PLC Basic Ladder Diagram (LD) Elements
(Contact, Coil, Counter, Timers, Other Functions)
IEC 61131

Other Functions
Variable Declaration

Counter Down
Contact Coil
Counter Up
Power Rail
Set Coil
Inverted Contact

Reset Coil OFF Timer

ON Timer
Output
Other Functions
Input
ET0802 (AI for Automation) 14
PLC Basic Ladder Diagram (LD) Elements (Series, Parallel)
IEC 61131

Variable Declaration Boolean Operators

Power Rail
Parallel Coils Function Blocks

Series Contacts

General Blocks
Parallel Contacts

More LD elements will be discussed during the hands-on session.


ET0802 (AI for Automation) 15
PLC Basic Structured Text (ST) (comparing with LD)

Variable Declaration

ET0802 (AI for Automation) 16


Any Questions?

Check point!

1. What are differences between PLC and IPC?

2. List the data types.

3. Define the advantage of IEC 61131 standard.

4. What are the textual languages?

5. What are the graphical languages?

ET0802 (AI for Automation) 17


TwinCAT 3 Quick Start
ET0802 (AI for Automation) 18
ET0802 (AI for Automation) 19

You might also like