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
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

Types of PLC
Software Redundancy in Siemens PLC – Hardware versus Software
PLC Timer Example: Sequential Control of Three Lights with Reset
What is CODESYS? Why Do You Need to Learn it?
Automatic Curtain Control – PLC Programming Solution
Glass Cutting and Polishing Machine: PLC Automation Solution
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

Automatic Vacuum Cleaner Programming in Omron PLC
Concept of Interlocking in PLC
Single-Acting Cylinder Control using Proximity Sensor
Example PLC Program
Product Painting PLC Program using Omron CX-Programmer
Free InTouch SCADA Tutorial Course for Beginners
PLC Analog Input Conversion Formula
Communication between Wincc and Tia Portal

Keep Learning

PLC Program for motor operation based on time cycle

PLC Motor Operation based on Time Cycle Sequence – Program

PLC Ladder Diagram program

Contacts and Coils in PLC Ladder Logic

PLC Batch System for 4 Tanks Mixing using CX-Programmer

PLC Batch System for 4 Tanks Mixing using CX-Programmer

Motor Clock Wise Operation using PLC

CW and CCW Operation of Motor from Same Push button

Example of PID Control Instruction

How to Configure PID in Siemens PLC?

PLC Cabinet

PLC Programming Videos

Delta HMI and VFD Control with Modbus

Delta HMI and VFD Control with Modbus

Example of PLC Programming based on Logic Circuit

Example of PLC Programming based on Logic Circuit

Learn More

HART Communication Tutorial 2

HART Communication Tutorial Part 5

Transmission and Distribution Objective Questions and Answers

175+ Transmission and Distribution Objective Questions and Answers

Advanced Skills Required for a PLC Programmer to Get a Job

Advanced Skills Required for a PLC Programmer to Get a Job

Electric Circuits Objective Questions

Electric Circuits Objective Questions – Set 3

Drum water level control

Closed Loop Control System : Boiler Water Level Control System

Analog Modulators Objective Questions

Analog Modulators Objective Questions

Power Electronics Objective Questions

Power Electronics Applications Objective Questions

Failed Letdown Valve

Failed Letdown Valve Shuts down a Urea Plant Several Hours

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?