Professional Documents
Culture Documents
Simple PLC Program
Simple PLC Program
Learn Instrumentation and Control Engineering. Inst Tools covers topics of Industrial
Instrumentation, PLC, DCS, SCADA, Field Instruments, Analyzers and so on.
https://instrumentationtools.com
om
s .c
ol
To
i on
at
nt
me
ru
st
In
This is PLC Program for an Alternate output circuit (with latched function).
Problem Description
Setting the light ON by pressing a SWITCH on 1st time, 3rd time, 5th time etc. and setting the
same light OFF by pressing the SWITCH by 2nd time , 4th time, 6th time etc.
Restore the output status to 0 when system or cycle power up. Output can be START by
pressing a BUTTON in ODD number of times and can be STOP by pressing the same BUTTON
by EVEN number of times.
Problem Diagram
InstrumentationTools.com
Instrumentation Tools
Learn Instrumentation and Control Engineering. Inst Tools covers topics of Industrial
Instrumentation, PLC, DCS, SCADA, Field Instruments, Analyzers and so on.
https://instrumentationtools.com
om
s .c
ol
To
i on
at
nt
Problem Solution
me
We can solve this problem by using simple Ladder logic. In this we consider one simple
ru
Here we consider one LED and one BUTTON. Press the BUTTON alternately and output should
be ON/OFF alternately, here during the Button pressed odd number times then output should
In
be ON and during the button pressing even number of times then the output should be OFF.
Program
Here is PLC program for alternate output circuit (with latched function).
List of Inputs/Outputs
Inputs List:-
SWITCH=I0.0
Output List:-
LED=Q0.0
M Memory:-
InstrumentationTools.com
Instrumentation Tools
Learn Instrumentation and Control Engineering. Inst Tools covers topics of Industrial
Instrumentation, PLC, DCS, SCADA, Field Instruments, Analyzers and so on.
https://instrumentationtools.com
om
s .c
ol
To
i on
at
nt
me
ru
st
In
InstrumentationTools.com
Instrumentation Tools
Learn Instrumentation and Control Engineering. Inst Tools covers topics of Industrial
Instrumentation, PLC, DCS, SCADA, Field Instruments, Analyzers and so on.
https://instrumentationtools.com
om
s .c
ol
To
i on
at
nt
me
ru
Program Description
st
In this application we have used Siemens S7-300 PLC and TIA Portal Software for
In
programming.
Network 1: In network 1 we have used SET instruction to set the LED (Q0.0). Here we have
taken NO contact of BUTTON (I0.0) so LED (Q0.0) can be activated by pressing BUTTON
(I0.0).
Network 2: Here we used a counter so it will count the switching times of the BUTTON (I0.0).
This counter will tell us about the number of times the button is pressed, its value or the value is
a EVEN number or ODD number.
Network 3: When counter will reach its preset value (2) or say EVEN number of times, NO
contact of the counter will set the M0.0 (LED reset condition).
Network 4: In this network NO contact of the M0.0 will RESET the LED and counter. Here M0.1
(counter reset memory) will RESET the counter.
Network 5: If M0.0 is ON and negative transition (from 1 to 0) of button (I0.0) will be triggered
then RESET condition of LED will be OFF.
InstrumentationTools.com
Instrumentation Tools
Learn Instrumentation and Control Engineering. Inst Tools covers topics of Industrial
Instrumentation, PLC, DCS, SCADA, Field Instruments, Analyzers and so on.
https://instrumentationtools.com
Note : This example is provided to understand the basic concept of alternate output circuit, it is
not full application but we can use this concept in any automation application or any system.
Test Cases
om
s .c
Article by
ol
Bhavesh Diyodara
To
i on
at
nt
me
ru
st
In
InstrumentationTools.com
Powered by TCPDF (www.tcpdf.org)