Siemens S7-1200
CPU 1212C AC/DC/Relay
Bit Logic Operations
• Understanding NO/ NC and OUT
• Exercise Example
www.codeandcompile.com
Code and Compile
Learning Made Easy
www.codeandcompile.com
Bit Logic Instructions in LAD - NO
Normally Open Contact
Symbol
The Normally Open contact is closed (ON) when the assigned bit value
I0.0 is TRUE or equal to 1 and is Open (OFF) when I0.0 is FALSE or
equal to 0.
Siemens TIA
www.codeandcompile.com
Normally Open contact
Example in Series – AND Logic
Example in Parallel- OR Logic
I0.0
I0.1
Output
0
0
FALSE
0
1
TRUE
I0.0
I0.1
Output
1
0
TRUE
0
0
FALSE
1
1
TRUE
0
1
FALSE
1
0
FALSE
1
1
TRUE
Bit Logic Instructions in FBD- NO
Normally Open Contact
Symbol
The block “&” is TRUE when the assigned bit value I0.0 is
TRUE or equal to 1 and is FALSE when the assigned bit value
I0.0 is FALSE or equal to 0 .
Siemens TIA
www.codeandcompile.com
Normally Open contact
Example in Series – AND Logic
Example in Parallel- OR Logic
I0.0
I0.1
Output
I0.0
I0.1
Output
0
0
FALSE
0
0
FALSE
0
1
FALSE
0
1
TRUE
1
0
FALSE
1
0
TRUE
1
1
TRUE
1
1
TRUE
Bit Logic Instructions in LAD- NC
Normally Close Contact
Symbol
The Normally Close contact is closed (ON) when the assigned bit value I0.0
is FALSE or equal to 0 and it’s open (OFF) when the assigned bit value I0.0
is TRUE or equal to 1.
Siemens TIA
www.codeandcompile.com
Normally Close contact
Example in Series – NOR Logic
Example in Parallel- NAND Logic
I0.0
I0.1
Output
0
0
TRUE
0
1
TRUE
I0.0
I0.1
Output
1
0
TRUE
0
0
TRUE
1
1
FALSE
0
1
FALSE
1
0
FALSE
1
1
FALSE
Bit Logic Instructions in FBD- NC
Normally Close Contact
Symbol
The block “&” is TRUE when the assigned bit value I0.0 is
FALSE or equal to 0 and is FALSE when the assigned bit value
I0.0 is TRUE of equal to 1
Siemens TIA
www.codeandcompile.com
Normally close contact
Example in Series – NOR Logic
Example in Parallel- NAND Logic
I0.0
I0.1
Output
I0.0
I0.1
Output
0
0
TRUE
0
0
TRUE
0
1
FALSE
0
1
TRUE
1
0
FALSE
1
0
TRUE
1
1
FALSE
1
1
FALSE
Bit Logic Instructions in LAD & FBD- OUT
Output Coil
Ladder Symbol
FBD Symbol
The coil output instruction writes a value for
an output bit. The OUT instruction is TRUE
when state before in the branch is TRUE
www.codeandcompile.com
Siemens TIA
Output Coil
Example in Ladder
Example in FBD
Truth Table
I0.0
I0.1
Q0.0
0
0
FALSE
0
1
FALSE
1
0
FALSE
1
1
TRUE
Exercise Example
Ladder Solution
2
3
L1 N
4
5
6
L+ M 1M
120-240
VAC
7
8
9
10
11
12
13
X11
1
14
24VDC
1
2M
0.0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
X10
1. Design XOR gate such that output is TRUE if only one of
the two inputs is TRUE. - Assume you have two toggle
buttons connected to PLC input
2
0 1
Analog
Inputs
24VDC Inputs
SIEMENS
SIMATIC
S7-1200
www.codeandcompile.com
X12
FBD Solution
1
Profinet (LAN)
Ethernet Port
2
3
4
5
2L
6
0.4
0.5
1L
0.0
0.1
0.2
0.3
Relay Outputs
X1 P1
3
7
K0
Required Condition
I0.0
I0.1
Q0.0
0
0
FALSE
0
1
TRUE
1
0
TRUE
1
1
FALSE
8
What did we learn in this lesson?
The Normally Open contact is closed (ON)
when the assigned bit value is equal to 1.
The Normally Closed contact is closed (ON)
when the assigned bit value is equal to 0.
The LAD NOT contact inverts the logical state
of power flow input.
www.codeandcompile.com
If there is power flow through an output coil or
an FBD "=" box is enabled, then the output bit
is set to 1.
Thank you
Get copy of this presentation
in the course!
Code and Compile
Learning Made Easy
www.codeandcompile.com