By using this site, you agree to the Privacy Policy and Terms of Use.
Accept
Inst ToolsInst ToolsInst Tools
  • Ask
  • Courses
  • Videos
  • Q & A
    • Interview
      • Instrumentation
      • Electronics
      • Electrical
      • Practical Questions
    • MCQ
      • Instrumentation MCQ
      • Electrical MCQ
      • Electronics MCQ
      • Control Systems MCQ
      • Analog Electronics MCQ
      • Digital Electronics MCQ
      • Power Electronics MCQ
      • Microprocessor MCQ
      • Multiple Choice Questions
  • EE
    • Electronics
      • Electronics Q & A
      • Electronic Basics
      • Electronic Devices & Circuits
      • Electronics Animation
      • Digital Electronics
    • Electrical
      • Electrical Basics
      • Electrical Q & A
      • Power Electronics
      • Electrical Machines
      • Electrical Animation
      • Power Systems
      • Switchgear & Protection
      • Transmission & Distribution
  • Measure
    • Control Valves
    • Calibration
    • Temperature
    • Pressure
    • Flow
    • Level
    • Analyzers
    • Switches
    • Vibration
    • Solenoid Valve
  • Control
    • PLC Tutorials
    • Control Systems
    • Safety Instrumented System (SIS)
    • Communication
    • Fire & Gas System
  • More
    • Design
    • Tools
    • Animation
    • Basics
    • Formulas
    • Standards
    • TextBooks
    • Common
    • Software
    • Excel Tools
    • Erection & Commissioning
    • Process Fundamentals
    • Videos
    • Books
Search
All rights reserved. Reproduction in whole or in part without written permission is prohibited.
Reading: Flip-Flop PLC Programming: Lights with Adjustable Timers
Share
Notification Show More
Font ResizerAa
Inst ToolsInst Tools
Font ResizerAa
  • Ask
  • Courses
  • Videos
  • Q & A
  • EE
  • Measure
  • Control
  • More
Search
  • Ask
  • Courses
  • Videos
  • Q & A
    • Interview
    • MCQ
  • EE
    • Electronics
    • Electrical
  • Measure
    • Control Valves
    • Calibration
    • Temperature
    • Pressure
    • Flow
    • Level
    • Analyzers
    • Switches
    • Vibration
    • Solenoid Valve
  • Control
    • PLC Tutorials
    • Control Systems
    • Safety Instrumented System (SIS)
    • Communication
    • Fire & Gas System
  • More
    • Design
    • Tools
    • Animation
    • Basics
    • Formulas
    • Standards
    • TextBooks
    • Common
    • Software
    • Excel Tools
    • Erection & Commissioning
    • Process Fundamentals
    • Videos
    • Books
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 ProgrammingSYSTEM ON (Standby)SYSTEM RUNNINGAddressingLights 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 !
Mitsubishi Electric GOC Controllers
How to take Backup from Siemens S7-300 PLC?
Ladder Logic Example with Timers
How to Connect PLC with SCADA System via OPC UA?
Timers using Statement List (STL) PLC Programming
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
208kSubscribersSubscribe
38kFollowersFollow

Recent Comments

  • MIHARITSOA Aina Sitraka on Top Non-PLC Certification Courses for Automation Professionals
  • Vaishnavi on Free Instrumentation Course for Trainee Engineers
  • anuj kapoor on DCS Program to Maintain Draft in Furnace
  • anuj kapoor on IoT based Smart Boiler Control System with Cloud PLC and SCADA

Related Articles

Interlock

Process Interlocks and Trips

Compile Project in Tia Portal

Communication between Wincc and Tia Portal

PLC Code to Start & Stop Motor and Pump as per Logic

PLC Code to Start & Stop Motor and Pump as per Logic

PLC railway crossing program

Automatic Railway Crossing Gate Control PLC Program

Simulating Level Sensor and the Pump Logic in PLC

PLC Basics – Manual Control, Closed Loop, ON-OFF with Hysteresis

PLC Math instructions

PLC Math instructions

Field Instrument package

Package System Architecture – Control & Instrumentation

Design a PLC program for Operational Sequence of Packaging Process

Design a PLC program for Operational Sequence of Packaging Process

More Articles

Working Principle of Overload Relay

Working Principle of Overload Relay

Fire-Triangle-in-Gas-Detection-System

Basics of Fire Detection System

Transmitters 4-20mA Current Failure Alarm Limits

Transmitters 4-20mA Current Failure Alarm Limits

Free Schneider PLC Training - Automation Course

Free Schneider PLC Training – Automation Course

Motor Disconnector Switch

What is a Motor Disconnector Switch? – Purpose, Principle, Factors

Instrumentation Standards

Blowdown Valve (BDV) and Shutdown Valve (SDV)

Difference between Blowdown Valve (BDV) and Shutdown Valve (SDV) ?

Single Phase Preventer Relay

Working Principle of Single Phase Preventer Relay

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?