Infoplc Net Sitrain 07 Binary Operations
Infoplc Net Sitrain 07 Binary Operations
F1
SIMATIC S7
Siemens AG 2006. All rights reserved.
Date:
File:
2/4/2012
PRO1_07E.1
Objectives
Upon completion of the chapter the participant will
SIMATIC S7
Siemens AG 2006. All rights reserved.
...
...
...
Date:
File:
2/4/2012
PRO1_07E.2
Circuit Diagram
FBD
STL
S1 (I 0.0)
I 0.0
I 0.1
Q 8.0
&
I 0.1
S2 (I 0.1)
AND
I 0.0
Q 8.1
=
Q 8.1
L1
(Q 8.0)
A
A
=
=
I 0.0
I 0.1
Q 8.0
Q 8.1
O
O
=
I 0.2
I 0.3
Q 8.2
L2
(Q 8.1)
S3
(I 0.2)
I 0.2
S4
(I 0.3)
OR
Q 8.0
=
Q 8.2
I 0.2
I 0.3
I 0.3
>=1
Q 8.2
=
L3 (Q 8.2)
SIMATIC S7
Siemens AG 2006. All rights reserved.
Date:
File:
2/4/2012
PRO1_07E.3
LAD
FBD
I 0.4
I 0.4
I 0.5
Q 8.0
I 0.4
I 0.5
&
I 0.5
I 0.4
>=1
I 0.5
I 0.5
Q 8.0
=
&
I 0.4
SIMATIC S7
STL
Date:
File:
2/4/2012
PRO1_07E.4
XOR
Q 8.0
=
A
AN
O
AN
A
=
I 0.4
I 0.5
X
X
=
I 0.4
I 0.5
Q8.0
I 0.4
I 0.5
Q8.0
The
sensor
is a ...
NO
contact
The sensor
is ...
Voltage
present
at input?
Signal
state
at
input
activated
yes
Check
for signal state 1
Check
for signal state 0
Symbol /
Instruction
Result of
check
Symbol /
Instruction
LAD:
Yes
1
LAD:
NO contact
not
activated
no
0
FBD:
NC
contact
activated
not
activated
yes
A I x.y
SIMATIC S7
Siemens AG 2006. All rights reserved.
No
0
Date:
File:
2/4/2012
PRO1_07E.5
FBD:
Yes
1
&
No
0
STL:
No
0
NC contact
&
no
Result of
check
Yes
1
Yes
1
STL:
AN I x.y
No
0
S2
E
1.0
I1.0
S1
EI1.1
1.1
EI1.0
1.0
Programmable controller
E 1.1
I1.1
Programmable controller
Q 4.0
I 1.1
I 1.0
Q 4.0
I 1.1
E I1.1
1.1
Programmable controller
Q 4.0
Light
Software
S2
EI1.0
1.0
Q 4.0
Light
I 1.0
S1
S2
Light
Q 4.0
I 1.0
I 1.1
Q 4.0
LAD
I 1.0
&
FBD
Q 4.0
I 1.1
STL
SIMATIC S7
Siemens AG 2006. All rights reserved.
&
I 1.0
Q 4.0
I 1.1
....... I 1.0
....... I 1.1
....... Q 4.0
....... I 1.0
....... I 1.1
....... Q 4.0
Date:
File:
I 1.0
2/4/2012
PRO1_07E.6
&
Q 4.0
I 1.1
....... I 1.0
....... I 1.1
....... Q 4.0
Stop
R
ON
CPU
Digital
Input
Module
CPU
Digital
Output
Module
Start
I0.0
Stop
SIMATIC S7
Siemens AG 2006. All rights reserved.
Date:
File:
2/4/2012
PRO1_07E.7
ON
I0.1 3
4
.
.
4
.
.
Q4.1
I 1.0
I 1.1
FBD
Q 8.0
( )
Assignment
I 1.0
&
I 1.3
Q 8.1
(S )
Set
I 1.2
&
SIMATIC S7
Siemens AG 2006. All rights reserved.
A I 1.0
A I 1.1
= Q 8.0
A I 1.2
A I 1.3
S Q 8.1
Q 8.1
(R)
Reset
Q 8.1
S
I 1.3
I 1.4
Q 8.0
=
I 1.1
I 1.2
STL
I 1.5
I 1.4
I 1.5
Date:
File:
2/4/2012
PRO1_07E.8
>=1
Q 8.1
R
O I 1.4
O I 1.5
R Q 8.1
LAD
M 5.7
I1.2
Dominant
Reset
FBD
SR
STL
M 5.7
Q 9.3
Q
I1.2
SR
Q9.3
I1.3
I1.3
M 5.7
I1.3
Dominant
Set
RS
M 5.7
Q 9.3
Q
I1.3
RS
Q9.3
I1.2
I1.2
SIMATIC S7
Siemens AG 2006. All rights reserved.
Date:
File:
2/4/2012
PRO1_07E.9
A
S
A
R
A
=
I 1.2
M 5.7
I 1.3
M 5.7
M 5.7
Q 9.3
A
R
A
S
A
=
I 1.3
M 5.7
I 1.2
M 5.7
M 5.7
Q 9.3
LAD
I 1.0
I 1.1
STL
M 20.7
I 2.0
I 2.1
Q 4.0
( )
( )
FBD
I 1.0
A
A
=
A
A
A
=
I
I
M
M
I
I
Q
1.0
1.1
20.7
20.7
2.0
2.1
4.0
&
M 20.7
I 1.1
SIMATIC S7
Siemens AG 2006. All rights reserved.
&
I 2.0
Q 4.0
I 2.1
Date:
File:
2/4/2012
PRO1_07E.10
I 1.0
AN I 1.1
M 4.0
Q 8.0
Q 8.1
I 2.0
SIMATIC S7
Siemens AG 2006. All rights reserved.
Date:
File:
2/4/2012
PRO1_07E.11
First Check
M 3.4
Result of Logic
Operation
:
:
=
Result of Check
Signal State
Example 3
First Check
Result of Logic
Operation
Result of Check
Signal State
Example 2
First Check
Result of Logic
Operation
Result of Check
Signal State
Example 1
LAD
NOT
I 0.0
FBD
Q 8.0
I0.1
NOT
( )
I 0.0
&
I 0.1
STL
Q 8.0
=
A I 0.0
A I 0.1
NOT
= Q 8.0
Examples:
STAT 0 Bit memory
CLR
not available
not available
CLR
= M 0.0
SET
SIMATIC S7
Siemens AG 2006. All rights reserved.
not available
not available
Date:
File:
2/4/2012
PRO1_07E.12
SET
= M 0.1
DI
DO
I 0.0
T_System_ON
I 0.1
T_System_OFF
I 0.2
I 0.3
I 0.4
S_M/A_ModeSelect
I 0.5
T_M/A_Accept
L_SYSTEM
Q 4.1
T_Jog_RIGHT
L_MAN
T_Jog_LEFT
L_AUTO
Q 4.2
Q 4.3
-15V...+15V
AI2
AO1
-15V...+15V
AO2
AI1
AI1
AI2
0 8 1 5
SIMATIC S7
Siemens AG 2006. All rights reserved.
Date:
File:
2/4/2012
PRO1_07E.13
AI1
AI2
AO1
AO2
Q 4.1
SR
Network 2:
ON-Condition
OFF-Condition
Q 4.2
SR
Network 3:
ON-Conditions
OFF-Conditions
Q 4.3
SR
SIMATIC S7
Siemens AG 2006. All rights reserved.
ON-Conditions
OFF-Conditions
Date:
File:
2/4/2012
PRO1_07E.14
Transport Phase
Conv. Stop
Prox.Sens.Bay 1
I 8.5
Mom.Cont.Bay 1
I 8.1
Prox.Sens.Bay 2
I 8.6
Mom.Cont.Bay 2
I 8.2
Light Barrier
I 8.0
Run Conveyor
RIGHT
Q8.5
SIMATIC S7
Siemens AG 2006. All rights reserved.
Date:
File:
2/4/2012
PRO1_07E.15
Network y
M 16.2
Conditions for
Run Conveyor RIGHT
in AUTO mode
Network z
S
R
>=1
Q 8.5
M 16.4
SIMATIC S7
Date:
File:
2/4/2012
PRO1_07E.16
I 1.1
FBD
M1.0
M8.0
P
I 1.0
I 1.1
M1.1
I 1.0
&
STL
M1.0
M8.0
I 1.1
M8.1
I 1.0
&
M1.1
M8.1
I 1.1
A
A
FP
=
I 1.0
I 1.1
M1.0
M8.0
A
A
FN
=
I 1.0
I 1.1
M1.1
M8.1
I 1.0
I 1.1
& -RLO
M8.0
OB1 Cycle
OB1 Cycle
M8.1
OB1 Cycle
SIMATIC S7
Siemens AG 2006. All rights reserved.
Date:
File:
OB1 Cycle
2/4/2012
PRO1_07E.17
I 1.1
POS
M_BIT
I 1.0
I 1.1
M1.1
M1.0
I 1.1
POS
M_BIT
M1.1
I 1.1
NEG
M_BIT
M8.0
Q
M1.0
NEG
FBD
M8.1
Q
M_BIT
I 1.0
I 1.0
STL
&
M8.0
=
I 1.0
&
M8.1
A
I 1.0
A
(
A
I 1.1
FP
M1.0
)
=
M8.0
A
I 1.0
A
(
A
I 1.1
FN
M1.1
)
=
M8.1
I 1.1
M8.0
OB1 Cycle
M8.1
OB1 Cycle
SIMATIC S7
Siemens AG 2006. All rights reserved.
Date:
File:
2/4/2012
PRO1_07E.18
Conv. Start
Transport Phase
Conv. Stop
Part at
Light barrier
Start condition
in AUTO mode
Light Barrier
(I 8.0)
Run Conveyor
RIGHT
(Q8.5)
SIMATIC S7
Siemens AG 2006. All rights reserved.
Date:
File:
2/4/2012
PRO1_07E.19
T_System_OFF
(I 0.1, NC contact)
L_SYSTEM
(Q4.1)
T_System_OFF
(I 0.1, NC contact)
L_SYSTEM
(Q 4.1)
SIMATIC S7
Siemens AG 2006. All rights reserved.
Date:
File:
2/4/2012
PRO1_07E.20
LAD
Network 1
FBD
NEW1
( JMP )
Network 2
:
:
:
:
Network x
NEW1
JMP
....
Network 1
JU NEW1
Network 2
:
:
:
:
Network x
Network 2
:
:
:
:
Network x
NEW1
NEW1
M5.5
Network 1
STL
I 4.7
M69.0
( )
SIMATIC S7
Siemens AG 2006. All rights reserved.
M5.5
I 4.7
Date:
File:
&
NEW1:
M69.0
=
2/4/2012
PRO1_07E.21
AN M5.5
AN I 4.7
=
M69.0
LAD
Jump if
RLO=1
Jump if
RLO=0
I 0.0
I 0.2
SIMATIC S7
Siemens AG 2006. All rights reserved.
I 0.1
I 0.3
FBD
NEW1
I 0.0
(JMP)
I 0.1
I 0.2
NEW2
(JMPN)
Date:
File:
I 0.3
2/4/2012
PRO1_07E.22
&
&
STL
NEW1
JMP
A I 0.0
A I 0.1
JC NEW1
NEW2
JMPN
A I 0.2
A I 0.3
JCN NEW2
"BAY1"
(I 8.5)
in MANUAL mode:
2Hz pulsed honking
while conveyor jogging
"BAY2"
(I 8.6)
"Horn"
(Q 8.7)
"L_Bay1"
(Q 8.1)
"L_Bay2"
(Q 8.2)
in AUTO mode:
- Constant light at both bays when a new part can be placed (both bays empty)
- 1Hz flashing light at the bay where the part is placed and the conveyor has not yet been started
- 2Hz flashing light at both bays during conveyor movement
SIMATIC S7
Siemens AG 2006. All rights reserved.
Date:
File:
2/4/2012
PRO1_07E.23