plc.myforum.ro Forum Index plc.myforum.ro
PLCs users www.plc.myforum.ro!
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

IEC+61131-3+Programming+Industrial+Automation+Systems

 
Post new topic   Reply to topic    plc.myforum.ro Forum Index -> PLC Books
View previous topic :: View next topic  
Author Message
ratko
Member 3
Member 3


Joined: 20 Jul 2012
Posts: 524

PostPosted: 09/12/2013 20:22    Post subject: IEC+61131-3+Programming+Industrial+Automation+Systems Reply with quote

IEC+61131-3+Programming+Industrial+Automation+Systems

IEC+61131-3+Programming+Industrial+Automation+Systems IEC+61131-3+Programming+Industrial+Automation+Systems

Contents
1 Introduction ........................................................................................................9
1.1 Subject of the Book .........................................................................................10
1.2 The IEC 61131 standard ..................................................................................12
1.2.1 Goals and benefits of the standard ................................................................12
Manufacturers (PLC hardware and software) ......................................................................... 13
Customers............................................................................................................................... 13
1.2.2 History and components ...............................................................................14
1.3 The OrganisationPLCopen ..............................................................................16
1.3.1 Aims..............................................................................................................16
1.3.2 Committees and fields of activity..................................................................17
1.3.3 Results ..........................................................................................................18
Certification ........................................................................................................................... 18
Exchange format for user programs........................................................................................ 19
2 Building Blocks of IEC 61131-3.......................................................................21
2.1 Introduction to the New Standard ....................................................................21
2.1.1 Structure of the building blocks ....................................................................22
Declaration of variables.......................................................................................................... 22
Code part of a POU................................................................................................................ 23
2.1.2 Introductory example written in IL ...............................................................25
2.1.3 PLC assignment ............................................................................................27
2.2 The Program Organisation Unit (POU) ...........................................................30
2.3 Elements of a POU ..........................................................................................32
2.3.1 Example ........................................................................................................33
2.3.2 Declaration part ............................................................................................34
Types of variables in POUs. ................................................................................................... 35
Characteristics of the POU interface ...................................................................................... 36
The formal parameters and return values of a POU................................................................ 37
External and internal access to POU variables ....................................................................... 37
2.3.3 Code part ......................................................................................................39
2.4 The Function Block .........................................................................................41
2.4.1 Instances of function blocks..........................................................................41
What is an “instance”? ........................................................................................................... 41
Instance means “structure”. ................................................................................................... 43
Instance means “memory”. .................................................................................................... 45
2 Contents
Relationship between FB instances and data blocks............................................................... 46
2.4.2 Re-usable and object-oriented FBs .............................................................. 47
2.4.3 Types of variables in FBs............................................................................. 48
2.5 The Function ................................................................................................... 48
2.5.1 Types of variables in functions and the function value ................................ 49
2.5.2 Execution control with EN and ENO ........................................................... 50
2.6 The Program.................................................................................................... 52
2.7 Calling Functions and Function Blocks........................................................... 53
2.7.1 Mutual calls of POUs................................................................................... 53
2.7.2 Recursive calls are forbidden ....................................................................... 54
2.7.3 Calling with formal parameters .................................................................... 56
2.7.4 Calls with input parameters omitted or in a different order.......................... 59
2.7.5 FB instances as actual FB parameters .......................................................... 60
Example of an indirect FB call. .............................................................................................. 62
FB instance names as actual parameters of functions............................................................. 63
Function values as actual parameters. .................................................................................... 63
2.8 Summary of POU Features.............................................................................. 64
3 Variables, Data Types and Common Elements.............................................. 65
3.1 Simple Language Elements ............................................................................. 65
3.1.1 Reserved keywords ..................................................................................... 67
3.2 Literals and Identifiers .................................................................................... 68
3.2.1 Literals ......................................................................................................... 68
3.2.2 Identifiers ..................................................................................................... 70
3.3 Meanings of Data Types and Variables........................................................... 71
3.3.1 From direct PLC addresses via symbols to variables ................................... 72
3.3.2 The data type determines the properties of variables ................................... 73
3.3.3 Type-specific use of variables...................................................................... 74
3.3.4 Automatic mapping of variables onto the PLC ............................................ 75
3.4 Data Types ...................................................................................................... 75
3.4.1 Elementary data types .................................................................................. 76
3.4.2 Derived data types (type definition) ............................................................. 77
Additional properties for elementary data types. .................................................................... 78
Arrays. .................................................................................................................................... 80
Data structures........................................................................................................................ 81
Initial values in type definitions. ............................................................................................ 83
3.4.3 Generic data types........................................................................................ 84
3.5 Variables ......................................................................................................... 85
3.5.1 Inputs, outputs and flags as deosebit variables ............................................... 86
3.5.2 Multi-element variables: arrays and structures............................................. 88
3.5.3 Assignment of initial values at the start of a program .................................. 90
3.5.4 Attributes of variable types .......................................................................... 91
3.5.5 Graphical representation of variable declarations ........................................ 93
Contents 3
4 The New Programming Languages of IEC 61131-3 ......................................95
4.1 Instruction List IL ............................................................................................96
4.1.1 Instruction in IL ............................................................................................96
4.1.2 The universal accumulator (Current Result) .................................................97
4.1.3 Operators ....................................................................................................100
Negation of the operand. ...................................................................................................... 100
Nesting levels by parenthesis................................................................................................ 100
Conditional execution of operators....................................................................................... 101
4.1.4 Using functions and function blocks...........................................................104
Calling a function. ................................................................................................................ 104
Calling a function block. ...................................................................................................... 106
4.1.5 IL example: Mountain railway....................................................................107
4.2 Structured Text ST.........................................................................................111
4.2.1 ST statements..............................................................................................111
4.2.2 Expression: Partial statement in ST ...........................................................113
Operands. ............................................................................................................................. 113
Operators. ............................................................................................................................. 113
Function as operator. ............................................................................................................ 115
4.2.3 Statement: Assignment................................................................................116
4.2.4 Statement: Call of function blocks..............................................................118
4.2.5 Statement: RETURN ..................................................................................118
4.2.6 Statement: Selection and Multi- selection...................................................119
Selection............................................................................................................................... 119
Multi- selection. ................................................................................................................... 120
4.2.7 Statement: Iteration.....................................................................................122
WHILE and REPEAT statements. ........................................................................................ 122
FOR statement...................................................................................................................... 123
EXIT statement..................................................................................................................... 125
4.2.8 Example: Stereo cassette recorder ..............................................................125
4.3 Function Block Diagram FBD.......................................................................128
4.3.1 Networks, graphical elements and connections of LD and FBD.................128
Network label. ...................................................................................................................... 128
Network comment. ............................................................................................................... 129
Network graphic. .................................................................................................................. 129
4.3.2 Network architecture in FBD......................................................................131
4.3.3 Graphical objects in FBD ...........................................................................133
Connections.......................................................................................................................... 134
Execution control (jumps). ................................................................................................... 134
Call of functions and function blocks................................................................................... 135
4.3.4 Programming methods in FBD ...................................................................136
Network evaluation. ............................................................................................................. 136
Feedback variable................................................................................................................. 137
4.3.5 Example: Stereo cassette recorder ..............................................................137
Comments on the networks of Example 4.24 and Example 4.31 ......................................... 140
4 Contents
4.4 Ladder Diagram LD...................................................................................... 141
4.4.1 Networks, graphical elements and connections (LD)................................. 141
4.4.2 Network architecture in LD........................................................................ 141
4.4.3 Graphical objects in LD............................................................................. 142
Connections.......................................................................................................................... 142
Contacts and coils. ............................................................................................................... 143
Execution control. ................................................................................................................ 147
Call of functions and function blocks................................................................................... 148
4.4.4 Programming methods in LD..................................................................... 149
Network evaluation. ............................................................................................................. 149
Feedback variable................................................................................................................. 151
4.4.5 Example in Ladder Diagram: Mountain railway ........................................ 153
Comments on the mountain railway networks...................................................................... 156
4.5 The American way of Ladder programming ................................................. 159
4.5.1 Network Layout.......................................................................................... 159
4.5.2 Module addresses and memory areas ......................................................... 161
4.5.3 Configuration ............................................................................................. 163
4.6 Sequential Function Chart SFC..................................................................... 164
4.6.1 Step / Transition combination .................................................................... 165
4.6.2 Step - transition sequence........................................................................... 167
4.6.3 Detailed description of steps and transitions .............................................. 172
Step....................................................................................................................................... 172
Transition. ............................................................................................................................ 174
4.6.4 Step execution using action blocks and actions.......................................... 179
4.6.5 Detailed description of actions and action blocks ...................................... 181
Actions. ................................................................................................................................ 181
Action block. ........................................................................................................................ 182
4.6.6 Relationship between step, transition, action and action block .................. 185
4.6.7 Action qualifiers and execution control ..................................................... 189
Qualifier. .............................................................................................................................. 189
Sequential control................................................................................................................. 195
4.6.8 Example: “Dino Park”................................................................................ 196
Comments on the network for the dinosaur park.................................................................. 200
5 Standardised PLC Functionality .................................................................. 201
5.1 Standard Functions........................................................................................ 202
5.1.1 Overloaded and extensible functions.......................................................... 206
Overloaded functions............................................................................................................ 206
Extensible functions ............................................................................................................. 208
Contents 5
5.1.1 Examples ....................................................................................................209
Type conversion functions.................................................................................................... 210
Numerical functions ............................................................................................................. 211
Arithmetic functions............................................................................................................. 211
Bit-shift functions ................................................................................................................ 212
Bitwise Boolean functions.................................................................................................... 212
Selection functions ............................................................................................................... 213
Comparison functions .......................................................................................................... 214
Character string functions .................................................................................................... 215
Functions for time data types. .............................................................................................. 215
Functions for enumerated data types .................................................................................... 216
5.2 Standard Function Blocks..............................................................................217
5.2.2 Examples ....................................................................................................218
Bistable element (flipflop).................................................................................................... 220
Edge detection...................................................................................................................... 221
Counter................................................................................................................................. 223
Timer .................................................................................................................................... 224
6 State-of-the-Art PLC Configuration.............................................................227
6.1 Structuring Projects with Configuration Elements.........................................227
6.2 Elements of a Real-World PLC Configuration ..............................................228
6.3 Configuration Elements .................................................................................230
6.3.1 Definitions ..................................................................................................230
6.3.2 The CONFIGURATION ............................................................................231
6.3.3 The RESOURCE ........................................................................................232
6.3.4 The TASK with run-time program..............................................................233
6.3.5 ACCESS declarations .................................................................................236
6.4 Configuration Example..................................................................................237
6.5 Communication between Configurations and POUs......................................240
7 Innovative PLC Programming Systems........................................................243
7.1 Requirements of Innovative Programming Tools ..........................................243
7.2 Technological Change ...................................................................................244
7.2.1 Processor performance................................................................................244
7.2.2 Full-graphics display and printout ..............................................................244
7.2.3 Operating systems.......................................................................................244
7.2.4 Uniform user interfaces...............................................................................245
7.3 Decompilation (Reverse Documentation)......................................................245
7.3.1 No decompilation........................................................................................246
7.3.2 Decompilation with symbols and comments...............................................246
7.3.3 Decompilation including graphics ..............................................................246
7.3.4 Sources stored in the PLC...........................................................................247
7.4 Language Compatibility.................................................................................247
6 Contents
7.4.1 Cross-compilation ...................................................................................... 248
The motivation for cross-compilation................................................................................... 248
Different approaches in graphical and textual languages. .................................................... 249
Differences in languages affect cross-compilation. .............................................................. 250
Restrictions in LD/ FBD....................................................................................................... 251
Restrictions in IL/ ST. .......................................................................................................... 251
Cross-compilation IL / ST. ................................................................................................... 251
Full cross-compilation only with additional information...................................................... 252
Quality criteria for cross-compilation................................................................................... 253
7.4.2 Language independence ............................................................................. 254
7.5 Documentation .............................................................................................. 255
7.5.1 Cross-reference list..................................................................................... 255
7.5.2 Allocation list (wiring list) ......................................................................... 256
7.5.3 Comments .................................................................................................. 257
7.6 Project Manager ............................................................................................ 257
7.7 Test & Commissioning Functions ................................................................. 261
7.7.1 Program transfer......................................................................................... 261
7.7.2 Online modification of a program.............................................................. 262
7.7.3 Remote control: Starting and stopping the PLC......................................... 263
7.7.4 Variable and program status....................................................................... 263
7.7.5 Forcing ....................................................................................................... 267
7.7.6 Program test ............................................................................................... 268
7.7.7 Testing Sequential Function Chart programs ............................................. 269
7.8 Data Blocks and Recipes............................................................................... 269
7.9 FB Interconnection........................................................................................ 273
7.9.1 Data exchange and co-ordination of blocks in distributed systems ............ 273
7.9.2 Macro techniques in FB interconnection.................................................... 275
7.10 Diagnostics, Error Detection and Error Handling ....................................... 276
Error concept of IEC 61131-3. ............................................................................................. 277
Extended error handling model (beyond IEC). ..................................................................... 277
7.11 Hardware-Dependence................................................................................ 279
7.12 Readiness for New Functionality ................................................................ 279
7.12.1 Exchange of programs and data ............................................................... 280
7.12.2 Extension with additional software packages........................................... 281
8 Main Advantages of IEC 61131-3................................................................. 283
8.1 Convenience and Security with Variables and Data Types ........................... 283
8.2 Blocks with Extended Capabilities................................................................ 284
8.3 PLC Configuration with Run-Time Behaviour.............................................. 285
8.4 Uniform Programming Languages ................................................................ 286
8.5 Structured PLC Programs.............................................................................. 286
8.6 Trend towards Open PLC Programming Systems ........................................ 286
8.7 Conclusion .................................................................................................... 288
Contents 7
9 Programming by Configuring with IEC 61499............................................289
9.1 Programming by FB Interconnection with IEC 61131-3 ...............................289
9.2 IEC 61499 – The Programming Standard for Distributed PLC Systems .......290
9.2.1 System model..............................................................................................291
9.2.2 Device model..............................................................................................291
9.2.3 Resource model ..........................................................................................292
9.2.4 Application model ......................................................................................293
9.2.5 Function block model .................................................................................294
Composite function blocks................................................................................................... 296
9.2.6 Creating an application ...............................................................................298
9.3 Overview of the Parts of IEC 61499..............................................................298
10 Contents of CD-ROM...................................................................................299
10.1 IEC Programming Systems STEP 7 and OpenPCS .....................................299
Demo versions of STEP 7 (Siemens) and OpenPCS (infoteam)........................................... 299
IL examples .......................................................................................................................... 300
10.2 Buyer's Guide for IEC 61131-3 PLC Programming Systems ......................300
A Standard Functions........................................................................................301
A.1 Type Conversion Functions .........................................................................302
A.2 Numerical Functions ....................................................................................303
A.3 Arithmetic Functions....................................................................................304
A.4 Bit-Shift Functions.......................................................................................305
A.5 Bitwise Boolean Functions ..........................................................................306
A.6 Selection Functions for Max., Min. and Limit .............................................307
A.7 Selection Functions for Binary Selection and Multiplexers .........................308
A.8 Comparison Functions ..................................................................................310
A.9 Character String Functions...........................................................................311
A.10 Functions for Time Data Types..................................................................313
A.11 Functions for Enumerated Data Types.......................................................314
B Standard Function Blocks .............................................................................315
B.1 Bistable Elements (Flip-Flops)......................................................................316
B.2 Edge Detection..............................................................................................317
B.3 Counters ........................................................................................................318
B.4 Timers ...........................................................................................................320
C IL Examples....................................................................................................323
C.1 Example of a FUNCTION ............................................................................323
C.2 Example of a FUNCTION_BLOCK.............................................................325
C.3 Example of a PROGRAM.............................................................................327
D Standard Data Types .....................................................................................331
E Causes of Error ..............................................................................................333
8 Contents
F Implementation-Dependent Parameters ...................................................... 335
G IL Syntax Example........................................................................................ 339
G.1 Syntax Diagrams for IL ................................................................................ 340
G.2 IL Example from Syntax Diagrams .............................................................. 347
H Reserved Keywords and Delimiters............................................................. 349
H.1 Reserved Keywords...................................................................................... 349
H.2 Delimiters ..................................................................................................... 353
I Planned Amendments to the Standard ......................................................... 357
J Glossary .......................................................................................................... 359
K Bibliography .................................................................................................. 365
L Index ............................................................................................................... 331
Author Biographies........................................................................................... 375
Karl-Heinz John .................................................................................................. 375
Michael Tiegelkamp..........................................................................................


http://en.file-upload.net/download-8382363/IEC-61131-3-Programming-Industrial-Automation-Systems.rar.html
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    plc.myforum.ro Forum Index -> PLC Books All times are GMT + 2 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Fa-ti si tu propriul forum GRATUIT, pe www.myforum.ro