PLC Exercises

Practice your PLC Programming skills using these exercises

Section 1 - Series & Parallel Circuits (LD, LDI, OUT)

  1. Code a logic when I0.0 is ON, Q0.0 should be ON and when I0.0 is OFF, Q0.0 should be OFF.

  2. Code a series logic such that when I0.0 & I0.1 are ON, Q0.0 is ON

  3. Code a Parallel Input logic such that when either of I0.0 or I0.1 is ON, Q0.0 is ON

  4. Code a Parallel Output logic such that when I0.0 is ON, Q0.0 & Q0.1 are ON

  5. Code a logic when I0.0 is ON, Q0.0 is ON & Q0.1 is OFF & when I0.0 is OFF, Q0.1 should be ON & Q0.0 should be OFF

Section 2 - Latching & Interlocking Circuits – Using OUT Commands

  1. Code a logic when I0.0 is pressed, Q0.0 should be latched & when I0.1 is Pressed, Q0.0 should be unlatched. (In this case consider I0.0 and I0.1 as NO Push Buttons)

  2. Code a logic to interlock Q0.0 & Q0.1 using I0.0 & I0.1. Consider I0.0 & I0.1 as NO Push Buttons & use I0.2 as NC Push Button to reset Q0.0 & Q0.1.

Section 3 - Latching & Interlocking Circuits – Using SET/RESET Commands

  1. Code a logic when I0.0 is pressed, Q0.0 should be latched & when I0.1 is Pressed, Q0.0 should be unlatched. (In this case consider I0.0 and I0.1 as NO Push Button)

  2. Code a logic to interlock Q0.0 & Q0.1 using I0.0 & I0.1. Consider I0.0 & I0.1 as NO Push Buttons & use I0.2 as NC Push Button to reset Q0.0 & Q0.1.

Section 4 – Use to Timers (TMR)

  1. Code a Logic such that when I0.0 is ON, Q0.0 gets ON after delay of 5 secs. When I0.0 is OFF, Q0.0 should be OFF

  2. Do the similar operation, but delay should change to 0.05 seconds (or 50ms)

  3. Do the similar operation, but delay should change to 0.005 seconds (or 5ms)

  4. Code a Logic when I0.0 is ON, Q0.0 gets ON after 3 seconds delay & then after delay of 3 more seconds Q0.1 should be on & after delay of 3 seconds Q0.2 should be ON.

  5. Code a Logic, when I0.0 is ON, Q0.0 is ON for 10 seconds then OFF.

  6. Code a Logic that can be used to start a Motor 1 (Q0.0) using I0.0 (NO) and then after a delay of 10 sec start Motor 2 (Q0.1). When the Motor 1 is switched off using I0.1(NC) there should be delay of 10 sec before the Motor 2 is off.

  7. Code a Logic in which Q0.0 is ON (latch) onlQ0. when I0.1 (NO) is ON in 10 sec. just after start of the Switch I0.0 (NO). Otherwise if I0.1 is pressed after 10 sec. Nothing should happen. Unlatch Q0.0 when I0.0 is OFF.

Section 5- Use of Timers (TMR) with Comparison Commands

  1. Use one push button (I0.0) to turn ON Q0.0 in following sequence: Q0.0 on for 2 sec. then off for 2 sec. then on for 3 sec. then continuouslQ0. off.

  2. Use I0.0 to blink Q0.0. (On Time 0.5 second & OFF time 0.5 second).

  3. Use I0.0 to blink Q0.0. (On Time 0.5 second & OFF time 1 second).

  4. When you press I0.0, Q0.0 and Q0.1 should blink with the delay of 1 sec continuously (such that 1 sec. ON & 1 sec. OFF) and when you press I0.1, Q0.0 and Q0.1 should blink with the delay of 1.5 sec. (such that 1.5 sec. ON & 1.5 sec. OFF)

  5. Section 6- Use of Counters (CNT) with Comparators Commands

    1. Code a logic such that When I0.0 is pressed 3 times, Q0.0 should be ON.

    2. Code a logic such that When I0.0 is pressed 3 times, Q0.0 should be ON & when I0.1 is pressed Q0.0 should be OFF (Use Counter reset command)

    3. Code a logic in which Sensor (I0.1) is being used to count the bottles on the conveyor (Q0.0) which is being latched by I0.0. Use I0.0 to latch the conveyor & after I0.1 counts 10, conveyor should be unlatched.

    4. Code a logic in which

      • When I0.1 is pressed once– Q0.0 gets ON, Q0.1, Q0.2 get off,

      • When I0.1 is pressed twice – Q0.1 gets ON and Q0.0, Q0.2 get OFF

      • When I0.1 is pressed thrice – Q0.2 gets ON and Q0.0, Q0.1 get OFF

      • When I0.1 is pressed fourth time, all outputs should be OFF & CQ0.cle should repeat on pressing I0.1 again

  1. Switch ON a Lamp (Q0.0) after 5 sec. Make a provision using β€œMOV” command to change the delay time to 10 second by pressing I0.1 & then back to 5 sec by pressing I0.2. you have 1 maintained button (I0.0) and 2 push buttons only. Maintained button to switch on/off the lamp. Other two push button for changing the time from 5 to 10 sec and vice-versa

  2. Code a logic to Change the time of above timer using Increment & (I0.3- PB) Decrement (I0.4- PB) commands.

  3. Code a logic to blink the output Q0.0 using I0.0 with following delay time sequence using MOV command

    1. Default Delay Time, ON time 1 Second & OFF Time 1 second

    2. Case A, When I0.1 is pressed ON time 2 seconds & OFF time 1 second

    3. Case B, When I0.2 is pressed ON time 1.5 seconds & OFF Time 2 seconds

  4. Code a logic as above but change the time using Increment (I0.1) & Decrement (I0.2) functions such that minimum blinking time should be 0.5 seconds (ON/OFF) & maximum should be 3 seconds (ON/OFF). The step of Increment & Decrement should be 0.1 second

  5. I have a constant 10 in D0

    • Multiply it with 100

    • Add 56 to it

    • Subtract 14 from it

    • Finally store it in D10

Last updated