Timer-Based Sequential PLC Program with One Button

Design a timer-based sequential PLC program using a single button to activate three outputs and understand the logic behind the concept using the XG-5000 software. This system uses 1 button as a Trigger to activate 3 Outputs, each Output has an Active time limit which is controlled by a Timer and the time parameters of the Timer can be Set. The Trigger button is used to switch program Sequences. When the button is Pressed once, Output-1 will be Active, when the button is Pressed a second time the Output-2 will be Active, and when the button is Pressed a third time the Output-3 will be Active. The system will Stop (not turn off) if the Trigger button is Pressed a fourth time or if the Reset button is Pressed.

Timer-Based Sequential PLC Program

Buttons used:

  1. The START (P00000) button is used to turn ON the system (standby state).
  2. The STOP (P00001) button is used to turn OFF the system.
  3. The TRIGGER_SEQUENCE (P00002) button is used to Start running the system.
  4. The RESET_SEQUENCE (P00003) button is used to Reset the sequence counter.

System ON/OFF

When the START (P00000) button is Pressed, the memory bit SYSTEM_ON (M00000) in the HIGH state so that the system is in the ON state (Standby).

When the STOP (P00001) button is Pressed, the memory bit SYSTEM_ON (M00000) returns to the LOW state so that the system becomes OFF.

System Run

Before the system is started, the time parameters of the Timer TIMER_MACHINE1 (T0000), TIMER_MACHINE2 (T0001), TIMER_MACHINE3 (T0002) must be Set in the memory word SV_TIMER_MACHINE1 (D00010), SV_TIMER_MACHINE2 (D00011), SV_TIMER_MACHINE3 (D00012).

This program has 3 Sequences which are stored in memory word SEQUENCE (D0).

Sequence-1

When the TRIGGER_SEQUENCE (P00002) button is Pressed once, the value in memory word SEQUENCE (D0) becomes “1” and Output MACHINE_1 (P00040) will be ON. The Output MACHINE_1 (P00040) will be ON and will be OFF when the Timer TIMER_MACHINE1 (T0000) has finished counting.

Sequence-2

When the TRIGGER_SEQUENCE (P00002) button is Pressed a second time, the value in memory word SEQUENCE (D0) increases (+1) to “2” and Output MACHINE_2 (P00041) will be ON. The MACHINE_2 (P00041) Output will be ON and will be OFF when the Timer TIMER_MACHINE2 (T0001) has finished counting.

Sequence-3

When the TRIGGER_SEQUENCE (P00002) button is Pressed a third time, the value in memory word SEQUENCE (D0) increases (+1) to “3” and Output MACHINE_3 (P00043) will be ON. The output MACHINE_3 (P00043) will be ON and will be OFF when the TIMER_MACHINE3 (T0002) Timer has finished counting.

When the RESET_SEQUENCE (P00003) button is Pressed or if the TRIGGER_SEQUENCE (P00002) button is Pressed a fourth time, the memory word SEQUENCE (D0) is Reset to “0” and the system returns to Standby state.

PLC Sequential Program Example

Input & Output Addressing

CommentInput (I)Output (Q)Memory BitsMemory WordTimers
STARTP00000    
STOPP00001    
TRIGGER_SEQUENCEP00002    
RESET_SEQUENCEP00003    
MACHINE_1 P00040   
MACHINE_2 P00041   
MACHINE_3 P00043   
TIMER_MACHINE1    T0000
TIMER_MACHINE2    T0001
TIMER_MACHINE3    T0002
SYSTEM_ON  M00000  
SEQUENCE   D00000 
SV_TIMER_MACHINE1   D00010 
SV_TIMER_MACHINE2   D00011 
SV_TIMER_MACHINE3   D00012 

PLC Programming

RUNG 1

In this Rung, the memory bit SYSTEM_ON (M00000) changes to the HIGH state if the START (P00000) button 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.

Timer-Based Sequential PLC Program with One Button

RUNG 3

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

RUNG 6

In this Rung, when the NO contact of memory bit SYSTEM_ON (M00000) in the HIGH state and the TRIGGER_SEQUENCE (P00002) button is Pressed, the value in the memory word SEQUENCE (D00000) will increase (+1). Because the ADD instruction adds a value (+1) to the memory word SEQUENCE (D00000).

How to Program Sequential Outputs in PLC

RUNG 14

In this Rung, if the value in memory word SEQUENCE (D00000) is equal to “1”, then the Output MACHINE_1 (P00040) will be ON and the Timer instruction TIMER_MACHINE1 (T0000) will start counting. The timer TIMER_MACHINE1 (T0000) will count according to the “Set value” that has been Set in the memory word SV_TIMER_MACHINE1 (D00010).

When the Timer instruction TIMER_MACHINE1 (T0000) has finished counting, the Output MACHINE_1 (P00040) becomes OFF because of the “Interlock” from TIMER_MACHINE1 (T0000).

RUNG 24

When the value in memory word SEQUENCE (D00000) is equal to “2”, then Output MACHINE_2 (P00041) will be ON and the Timer instruction TIMER_MACHINE2 (T0001) will start counting. The timer TIMER_MACHINE2 (T0001) will count according to the “Set value” that has been Set in the memory word SV_TIMER_MACHINE2 (D00011).

When the Timer instruction TIMER_MACHINE2 (T0001) has finished counting, the Output MACHINE_2 (P00041) becomes OFF because of the “Interlock” from TIMER_MACHINE2 (T0001).

PLC One Button to Activate Three Outputs

RUNG 34

When the value in the memory word SEQUENCE (D00000) is equal to “3”, the Output MACHINE_3 (P00043) will be ON and the Timer instruction TIMER_MACHINE1 (T0002) will start counting. The TIMER_MACHINE1 (T0002) timer will count according to the “Set value” that has been Set in the memory word SV_TIMER_MACHINE3 (D00012).

When the Timer instruction TIMER_MACHINE3 (T0002) has finished counting, the Output MACHINE_3 (P00043) becomes OFF because of the “Interlock” from TIMER_MACHINE3 (T0002).

RUNG 44

In this Rung, if the NO contact of memory bit SYSTEM_ON (M00000) in the HIGH state and the value in memory word SEQUENCE (D00000) is equal to “4”, then the memory word SEQUENCE (D00000) becomes the value “0”.

Or, when the RESET_SEQUENCE (P00003) button is Pressed, the memory word SEQUENCE (D00000) will  becomes the value “0”.

The MOV instruction moves the value “0” to memory word SEQUENCE (D00000).

Read Next:

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

Leave a Comment

Share via
Follow us and never miss an update!