Moeller GmbH, IM-S
Sch
utz
verm
erk
na
ch D
IN 3
4 b
eac
hte
n
IEC-Basics and basic logic circuits
Moeller GmbH, IM-S
Sch
utz
verm
erk
na
ch D
IN 3
4 b
eac
hte
n
1. General information2. Equipment requirements and tests
3. Programming languages
4. User guidelines5. Messaging service specification6. (not used)
7. Fuzzy
IEC EN 61131 Overview
Moeller GmbH, IM-S
Sch
utz
verm
erk
na
ch D
IN 3
4 b
eac
hte
n
IEC 61131-3
• How data is declared• the structure of an application• the syntax and the semantics of five different
programming languages
The international standard defines:
XSoft is an IEC 61131-3 programming system!
Moeller GmbH, IM-S
Sch
utz
verm
erk
na
ch D
IN 3
4 b
eac
hte
n
• Supplier independent programming
• Reduction of software investment thanks to re-usable function blocks
• Reduced training effort
runready
not readyerror
change
power . 0. 1. 2. 3. 4. 5. 6. 7. 8. 9. 1 0. 1 1. 1 2. 1 3. 1 4. 1 5. 1 6. 1 7. 1 8. 1 9. 2 0. 2 1. 2 2. 2 3. 2 4. 2 5. 2 6. 2 7. 2 8. 2 9. 3 0. 3 1
. 0
. 1
. 2
. 3
. 4
. 5
. 6
. 7
. 8
. 9
. 1 0
. 1 1
. 1 2
. 1 3
. 1 4
. 1 5
. 1 6
. 1 7
. 1 8
. 1 9
. 2 0
. 2 1
. 2 2
. 2 3
. 2 4
. 2 5
. 2 6
. 2 7
. 2 8
. 2 9
. 3 0
. 3 1
. 0
. 1
. 2
. 3
. 4
. 5
. 6
. 7
. 8
. 9
. 1 0
. 1 1
. 1 2
. 1 3
. 1 4
. 1 5
. 1 6
. 1 7
. 1 8
. 1 9
. 2 0
. 2 1
. 2 2
. 2 3
. 2 4
. 2 5
. 2 6
. 2 7
. 2 8
. 2 9
. 3 0
. 3 1
. 0
. 1
. 2
. 3
. 4
. 5
. 6
. 7
. 8
. 9
. 1 0
. 1 1
. 1 2
. 1 3
. 1 4
. 1 5
. 1 6
. 1 7
. 1 8
. 1 9
. 2 0
. 2 1
. 2 2
. 2 3
. 2 4
.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.5
.6
.7
PS4-341-M M 1
Arguments for IEC systems
Moeller GmbH, IM-S
Sch
utz
verm
erk
na
ch D
IN 3
4 b
eac
hte
n
Overview of the programming languages
Automation project
LD / FBDIL
ST
SFC
Moeller GmbH, IM-S
Sch
utz
verm
erk
na
ch D
IN 3
4 b
eac
hte
n
Label
END: LD % IX0.0or
Motor1_ON
Comment
(* Feeder raw parts *)
Director
Symbolic
IL - the programming line structure in instruction list
Moeller GmbH, IM-S
Sch
utz
verm
erk
na
ch D
IN 3
4 b
eac
hte
n
JMP JMPC JMPCNJump/Branch Operators
& &N AND ANDN OR ORN XOR XORNLogic Operators
ADD DIV MUL SUBArithmet. Operators
CAL CALC CALCN RET RETC RETCNCalls & Returns
EQ GE GT LE LT NEComparators
LD LDN ST STN S R Assignmentoperators
Operators
Moeller GmbH, IM-S
Sch
utz
verm
erk
na
ch D
IN 3
4 b
eac
hte
n
Variable names must not contain national symbols (ä, ü, ö), blanks or hyphens !
Variable names must not begin with a number !
Variable names and file (program) namesMUST differ !
Keywords must not be used as variable names !
Sample: A variable named LT (e.g. for the function „lamp test“) will lead to an error messagebecause LT is the reserved keyword for a comparator ! (LT=Less Than)
Stör-M1:BOOL Stoer_M1:BOOL
1_Start:BOOL Start_1:BOOL
Pump:BOOL Pump1:BOOLPump.POE Pump.POE
LT:BOOL L_Test:BOOL
Hints for the use of identifiers
Moeller GmbH, IM-S
Sch
utz
verm
erk
na
ch D
IN 3
4 b
eac
hte
n
Chose your variable name in a way that they are self-explanatory.Use a capital letter as the first letter and use small letter for the rest.
Separate variable names consisting of several word by underscores between the words and start each word with a capital letter.
When working with brackets please use indentions for each level.e.g. use one TAB for each new bracket level.
Always put jump labels in a separate line and highlight them by e.g.framing them with comments
All below mentioned hints serve the purpose of making your programs easy to readand give them a well-defined structure:
Hints for the creation of programs
Moeller GmbH, IM-S
Sch
utz
verm
erk
na
ch D
IN 3
4 b
eac
hte
n
&
&
>=
>=
Result LD AND OR ( AND ( OR ) )ST Result
LD (
....................
LD
LD
AND
ST
LD
AND ( ( .......
......................
AND )
...........
1Value
Value2
Value3
Value4
Value5
1ValueValue2
Value3Value4
Value5
1Value
Value2X....
1ValueX1Value
X Value5X
Working with brackets
Moeller GmbH, IM-S
Sch
utz
verm
erk
na
ch D
IN 3
4 b
eac
hte
n
Standard operators
Programming in LD (Ladder diagram)
Moeller GmbH, IM-S
Sch
utz
verm
erk
na
ch D
IN 3
4 b
eac
hte
n
Storing within networks
Direct support via menu bar
Enable networks at
FB inputs
Specialities in the LD / FBD editors
Moeller GmbH, IM-S
Sch
utz
verm
erk
na
ch D
IN 3
4 b
eac
hte
n
Information : Schedule for programming
Moeller GmbH, IM-S
Sch
utz
verm
erk
na
ch D
IN 3
4 b
eac
hte
n
Information : Schedule for programming
Moeller GmbH, IM-S
Sch
utz
verm
erk
na
ch D
IN 3
4 b
eac
hte
n
Information : Schedule for programming
Moeller GmbH, IM-S
Sch
utz
verm
erk
na
ch D
IN 3
4 b
eac
hte
n
Information : Schedule for programming
Moeller GmbH, IM-S
Sch
utz
verm
erk
na
ch D
IN 3
4 b
eac
hte
n
Information : Schedule for programming
Moeller GmbH, IM-S
Sch
utz
verm
erk
na
ch D
IN 3
4 b
eac
hte
n
Information : Schedule for programming
Moeller GmbH, IM-S
Sch
utz
verm
erk
na
ch D
IN 3
4 b
eac
hte
n
Information : Schedule for programming
Moeller GmbH, IM-S
Sch
utz
verm
erk
na
ch D
IN 3
4 b
eac
hte
n
Information : Schedule for programming
Moeller GmbH, IM-S
Sch
utz
verm
erk
na
ch D
IN 3
4 b
eac
hte
n
Information : Schedule for programming
Moeller GmbH, IM-S
Sch
utz
verm
erk
na
ch D
IN 3
4 b
eac
hte
n
Information : Schedule for programming
Moeller GmbH, IM-S
Sch
utz
verm
erk
na
ch D
IN 3
4 b
eac
hte
n
Information : Schedule for programming
Moeller GmbH, IM-S
Sch
utz
verm
erk
na
ch D
IN 3
4 b
eac
hte
n
Information : Schedule for programming
Moeller GmbH, IM-S
Sch
utz
verm
erk
na
ch D
IN 3
4 b
eac
hte
n
Information : Schedule for programming
Moeller GmbH, IM-S
Sch
utz
verm
erk
na
ch D
IN 3
4 b
eac
hte
n
Information : Schedule for programming
Moeller GmbH, IM-S
Sch
utz
verm
erk
na
ch D
IN 3
4 b
eac
hte
n
Information : Schedule for programming
Moeller GmbH, IM-S
Sch
utz
verm
erk
na
ch D
IN 3
4 b
eac
hte
n
Information : Schedule for programming
Moeller GmbH, IM-S
Sch
utz
verm
erk
na
ch D
IN 3
4 b
eac
hte
n
Information : Schedule for programming
Moeller GmbH, IM-S
Sch
utz
verm
erk
na
ch D
IN 3
4 b
eac
hte
n
Exercise: IEC basics and basic circuits
Moeller GmbH, IM-S
Sch
utz
verm
erk
na
ch D
IN 3
4 b
eac
hte
n
Exercise: IEC basics and basic circuits