Inst ToolsInst ToolsInst Tools
  • Courses
  • Automation
    • PLC
    • Control System
    • Safety System
    • Communication
    • Fire & Gas System
  • Instrumentation
    • Design
    • Pressure
    • Temperature
    • Flow
    • Level
    • Vibration
    • Analyzer
    • Control Valve
    • Switch
    • Calibration
    • Erection & Commissioning
  • Interview
    • Instrumentation
    • Electrical
    • Electronics
    • Practical
  • Q&A
    • Instrumentation
    • Control System
    • Electrical
    • Electronics
    • Analog Electronics
    • Digital Electronics
    • Power Electronics
    • Microprocessor
  • Request
Search
  • Books
  • Software
  • Projects
  • Process
  • Tools
  • Basics
  • Formula
  • Power Plant
  • Root Cause Analysis
  • Electrical Basics
  • Animation
  • Standards
  • 4-20 mA Course
  • Siemens PLC Course
Reading: Flip-Flop PLC Programming: Lights with Adjustable Timers
Share
Notification Show More
Font ResizerAa
Inst ToolsInst Tools
Font ResizerAa
  • Courses
  • Design
  • PLC
  • Interview
  • Control System
Search
  • Courses
  • Automation
    • PLC
    • Control System
    • Safety System
    • Communication
    • Fire & Gas System
  • Instrumentation
    • Design
    • Pressure
    • Temperature
    • Flow
    • Level
    • Vibration
    • Analyzer
    • Control Valve
    • Switch
    • Calibration
    • Erection & Commissioning
  • Interview
    • Instrumentation
    • Electrical
    • Electronics
    • Practical
  • Q&A
    • Instrumentation
    • Control System
    • Electrical
    • Electronics
    • Analog Electronics
    • Digital Electronics
    • Power Electronics
    • Microprocessor
  • Request
Follow US
All rights reserved. Reproduction in whole or in part without written permission is prohibited.
Inst Tools > Blog > PLC Tutorials > Flip-Flop PLC Programming: Lights with Adjustable Timers

Flip-Flop PLC Programming: Lights with Adjustable Timers

Learn Flip-Flop PLC programming techniques to operate lights with adjustable timer intervals with start and stop buttons.

Last updated: October 21, 2024 10:24 pm
Editorial Staff
PLC Tutorials
1 Comment
Share
7 Min Read
SHARE

This article discusses the PLC program “Flip-Flop Lamp” using the XG-5000 PLC software. This Flip-Flop program has 2 lights that will light up alternately at adjustable time intervals. The quantity of repetitions of the lights on can be adjusted. Lights 1 and 2 will stop lighting when the quantity of repetitions has been reached. The system can only be Run if the “Set Value” parameter of the timer interval and the “Set Value” parameter of the quantity of repetitions have been Set. This Flip-Flop program has a Start and Stop button to turn the system On and Off, and a Trigger button to Run the system.

Contents
Flip-Flop PLC ProgrammingAddressingLights with Adjustable Timers PLC Programming

Flip-Flop PLC Programming

Buttons used:

  1. The START (P00000) button is used to turn ON the system.
  2. The STOP (P00001) button is used to turn OFF the system.
  3. The TRIGGER button (P00002) is used to RUN the system.

SYSTEM ON (Standby)

When the START button (P00000) is Pressed, the system will be ON in the “Standby” state and when the STOP button (P00001) is Pressed, the system will be OFF.

Before the system is Run, the “Set Value” Timer parameter TIMER1 (T0000) & TIMER2 (T0001) in the memory word SV_TIMER1 (D00002) & SV_TIMER2 (D00003) must be set.  The Parameter “Set Value” of repetitions can be Set on the word memory SV_LOOP (D00000).

SYSTEM RUNNING

When the TRIGGER button (P00002) is Pressed, the system will Run.

Lamp 1 LAMP1 (P00043) will turn ON according to the “Set Value” time that has been set in the word memory SV_TIMER1 (D00002).

Next, Lamp 2 LAMP2 (P00044) will turn ON according to the “Set Value” time that has been set in the memory word SV_TIMER2 (D00003).

Lamp 1 LAMP1 (P00043) and Lamp 2 LAMP2 (P00044) will turn ON alternately with repetitions according to the “Set Value” that has been set in the memory word SV_LOOP (D00000).

The system will Stop if the quantity of repetitions has been reached.

PLC Flip-Flop Lamp Program

Addressing

CommentInput (I)Output (Q)Memory WordMemory BitsTimer
STARTP00000    
STOPP00001    
TRIGGERP00002    
LAMP1 P00043   
LAMP2 P00044   
TIMER1    T0000
TIMER2    T0001
SYSTEM_ON   M00000 
IR_FLIP_FLOP   M00001 
SV_LOOP  D00000  
PV_LOOP  D00001  
SV_TIMER1  D00002  
SV_TIMER2  D00003  

Lights with Adjustable Timers PLC Programming

RUNG 1

In this Rung, the memory bit SYSTEM_ON (M00000) changes to the HIGH state if the START button (P00000) is Pressed. Because it uses the SET Coil Instruction, the memory bit SYSTEM_ON (M00000) will remain in the HIGH state even though the START (P00000) button has been Released.

Flip-Flop PLC Programming

RUNG 3

Because it uses the RESET Coil Instruction, the memory bit SYSTEM_ON (M00000) will be in the LOW state if the STOP (P00001) button is Pressed.

RUNG 6

In this Rung, the memory bit IR_FLIP_FLOP (M00001) will become the HIGH state if the NO contact of memory bit SYSTEM_ON (M00000) in the HIGH state and the TRIGGER (P00002) button is Pressed and the value in the memory word SV_TIMER1 (D00002), SV_TIMER2 (D00003) and SV_LOOP (D00000) is not equal to zero “0”.

Because it uses the SET Coil Instruction, the memory bit SYSTEM_ON (M00000) will remain in the HIGH state even though the TRIGGER (P00002) button has been Released.

Lights with Adjustable Timers PLC Programming

RUNG 16

In this Rung, if the NO contact of memory bit IR_FLIP_FLOP (M00001) in the HIGH state, then Timer TIMER1 (T0000) will start counting. When Timer TIMER1 (T0000) finishes counting, the NO contact of Timer TIMER1 (T0000) will be in the HIGH state and Timer TIMER2 (T0001) will start counting.

When Timer TIMER2 (T0001) has finished counting, Timer TIMER1 (T0000) and TIMER2 (T0001) will be OFF, because the NC contact of Timer TIMER2 (T0001) in the HIGH state.

RUNG 24

In this Rung, if the NO contact of the memory bit IR_FLIP_FLOP (M00001) in the HIGH state, then the Output LAMP1 (P00043) becomes ON. The Output LAMP1 (P00043) will be OFF if NC contact of

Timer TIMER1 (T0000) in HIGH state.

Output LAMP2 (P00044) will be ON if the NO contact of Timer TIMER1 (T0000) in the HIGH state.

Flip-Flop Lamp Logic

RUNG 32

In this Rung, if the NO contact of the memory bit TIMER2 (T0001) in the HIGH state, then the value in memory word PV_LOOP (D00001) will increase (+1), because it uses the ADD instruction.

RUNG 39

In this Rung, if the NO contact of memory bit SYSTEM_ON (M00000) in the HIGH state and the value in memory word PV_LOOP (D00001) is equal to SV_LOOP (D00000), then the memory bit IR_FLIP_FLOP (M00001) becomes in the LOW state and the value in memory word PV_LOOP (D00001) will be zero “0”, because the MOV instruction moves the zero value “0” to memory word PV_LOOP (D00001).

Read Next:

  • PLC 1 Button To Activate 4 Different Machines
  • Vijeo Designer software Import and Export
  • FactoryTalk View Studio Import and Export
  • System Architecture in Industrial Automation
  • Structured Text vs. Instruction List Languages
Don't Miss Our Updates
Be the first to get exclusive content straight to your email.
We promise not to spam you. You can unsubscribe at any time.
Invalid email address
You've successfully subscribed !

Continue Reading

Conveyor Sorting Machine PLC Program with Calculation Function
PLC based Auto/Manual Operation of Roll down Shutters in Industry
Getting to Know the LED Indications on GE Make PLC
PLC Timer Practice Exercise: Coffee Machine Programming
Define the Order of Execution in Functional Block Diagram of Studio 5000
Comparing ICS and IT Systems Security
Share This Article
Facebook Whatsapp Whatsapp LinkedIn Copy Link
Share
1 Comment
  • Nik Kinze says:
    January 14, 2025 at 1:56 am

    I see this as more of an advertisement of how to use as many different obtuse methods as possible,
    If you are just trying to demonstrate a Flip/Flop, you should be able to do it with less than rungs.
    If you have been doing this as long as I have, you know to use economy in your code. Each line adds up to execution time, which increases scan times.
    Keep your programs as simple as possible, document your code so that a 5th grader could follow it, and save the bells and whistles for where you need them.

    Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Stay Connected

128.3kFollowersLike
69.1kFollowersFollow
210kSubscribersSubscribe
38kFollowersFollow

Categories

Explore More

PLC Alarm and Trip Documentation
Example of Controlling the PLC Output using Push Buttons
Ladder Logic for Flow Meter Totalizer
Automatic Vacuum Cleaner Programming in Omron PLC
PLC Digital Signals Wiring Techniques
How to Start Writing SCL Language in Siemens Tia Portal?
Dosing Pump PLC Logic
Studio 5000: Programming Three Motors with Fixed Priorities

Keep Learning

How to Use Symbol Factory Software for Graphic Design in HMI or SCADA

How to Use Symbol Factory Software for Graphic Design in HMI or SCADA?

Using Clock Memory Bits in TIA Portal - Siemens PLC

Using Clock Memory Bits in TIA Portal – Siemens PLC

Batch Mixing with PLC Ladder Logic Program

Batch Mixing with PLC Ladder Logic Program

PLC Ladder Logic for Lube Oil Pump Motor

PLC Ladder Logic for Lube Oil Pump Motor

3 to 8 Line Decoder Circuit Diagram

3 to 8 Line Decoder PLC Ladder Diagram

Sourcing output module in PLC

Which Connection is Best for PLC? – Sinking or Sourcing

Automation Engineer Troubleshooting Tips

Best Way to Build Troubleshooting Mindset for Automation Engineer

Push button Motor PLC Logic

Push button Motor PLC Logic

Learn More

RTD Connection Diagram

Difference Between 2 wire RTD, 3 wire RTD, and 4 wire RTD’s

Resistance firing of an SCR in a half-wave circuit

Thyristor Triggering Circuits – Types, Explanation, Waveforms (SCR)

calibration potentiometer for simulating the millivoltage output

Temperature Standards

C programming language

What is C Programming Language? Fundamentals, Pros & Cons

Technology is Shaping the Future of Education

How Technology is Shaping the Future of Education?

Electrical Machines Questions and Answers

Synchronous Machine Multiple Choice Questions

Power Electronics Objective Questions

Choppers Objective Questions

Reliability Techniques for Analyzing Fault Tolerance in Industries

Reliability Techniques for Analyzing Fault Tolerance in Industries

Menu

  • About
  • Privacy Policy
  • Copyright

Quick Links

  • Learn PLC
  • Helping Hand
  • Part Time Job

YouTube Subscribe

Follow US
All rights reserved. Reproduction in whole or in part without written permission is prohibited.
Welcome Back!

Sign in to your account

Username or Email Address
Password

Lost your password?