Siemens 020-011 User Manual

Page of 79
 
 
 
Industry Sector, IA&DT
 
 
 
 
SCE Training Curriculum 
Page 23 of 79  
To be used only in Educational and R&D  Facilities 
TIA Portal Module 020-011, Edition 04/2014
 
 
                                                 Unrestricted / © Siemens AG 2014. All Rights Reserved
 
SCE_EN _020-011_R1404_Startup Programming with SIMATIC S7-1500 
 
 
 
 
5.7.2  OR Logic Operation 
 
Example of an OR logic operation: 
 
A lamp is to be lit when one or both of two switches is operated as NO contact. 
 
Circuit diagram: 
 
 
 
 
 
 
 
 
 
 
Explanation: 
The lamp is lit exactly when one or both switches are operated; i.e., if switch S1 or S2 is operated, lamp 
P1 is on. 
 
PLC wiring: 
To implement this logic in a PLC program, both switches have to be connected to the inputs of the PLC, 
of course.  Here, S1 is wired to input %I 0.0 and S2 to input %I 0.1. 
 
In addition, lamp P1 has to be connected to an output; for example, %O 0.0. 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
24V 
S1 
S2 
P1 
24V 
 
PLC 
Inputs 
Switch S1 
Switch S2 
%I 0.0 
%O 0.0 
Outputs 
Lamp P1 is to be lit 
when switch S1 or 
S2 is operated. 
24V 
%I 0.1 
24V