Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 10

SITRAIN

Binary Operations

© Siemens AG 2011. All rights reserved.


Binary logic operations: AND, OR

AND FBD

LAD

change the
change the operation
operation

FBD

OR

LAD
Sensors and Symbols

Process Interpretation in the PLC Program

The The sensor Voltage Signal Check Check


sensor is ... present state for signal state “1” for signal state “0”
is a ... at input? at
input Symbol / Result of Symbol / Result of
Instruction check Instruction check

NO activated
contact LAD: LAD:
yes 1 “Yes” “No”
1 0
“NO contact” “NC contact”

not no
activated 0 “No” “Yes”
0 1
FBD: FBD:

NC activated & &


no
contact 0 “No” “Yes”
0 1

not STL: STL:


activated yes 1 “Yes” “No”
A I x.y 1 AN I x.y 0
:
:

=
=
=

A
A
A

I 2.0
AN I 1.1
I 1.0

Q 8.1
Q 8.0
M 4.0
M 3.4

0
0
0
0
Signal State

Result of Check
First Check, Signal State,

Result of Logic
Operation
Example 1

First Check

1
1
1
1

Signal State
Result of Check and Logic Operation

Result of Check

Result of Logic
Operation
Example 2

First Check
0
1
0
1

Signal State

Result of Check

Result of Logic
Operation
Example 3

First Check
Theory Exercise 1: Sensors and Symbols

Task: In all three examples, the light should be on when S1 is activated and S2 is not activated!

Hardware

S1 S2 S1 S2 S1 S2

E 1.0
I1.0 EI1.1
1.1 E 1.0
I1.0 E 1.1
I1.1 EI1.0
1.0 EI1.1
1.1
Programmable controller Programmable controller Programmable controller
Q 4.0 Q 4.0 Q 4.0

Light Light Light

Software
I 1.0 I 1.1 Q 4.0 I 1.0 I 1.1 Q 4.0 I 1.0 I 1.1 Q 4.0
LAD

I 1.0 & I 1.0 & I 1.0 &

FBD
I 1.1 Q 4.0 I 1.1 Q 4.0 I 1.1 Q 4.0
Binary logic operations: Exclusive - OR (XOR)

FBD

LAD
Assignment, Set, Reset, NOT

FBD LAD

NOT

change the change the


operation operation
Flip-Flops

dominant RESET dominant SET

FBD

LAD
Exercise 2: Program "FC_Mode" block (FC15)

1xR
Exercise 3: Expand the "FC_ConvMotor" (FC 16)

Network x Jog RIGHT in MANUAL mode

"M_Jog_Right"
Conditions for JOGGING (M16.2)
RIGHT Memory bit for
in MANUAL mode Jog RIGHT
= In MANUAL mode

Network y Memory bit run Conveyor RIGHT in AUTO mode


"M_Auto_Right"
Conditions (M16.4)
Run Conveyor RIGHT
S Memory bit for
switch ON Run Conveyor RIGHT
in AUTO mode
switch OF R

Network z Control Run Conveyor RIGHT

"M_Jog_Right"
>=1 "K_Right"
(M16.2) Run Conveyor RIGHT
(Q8.5)

"M_Auto_Right" =
(M16.4)

You might also like