How To Use Timer in Mitsubishi’s GX Developer| Beginner Tutorial on PLC Programming

In PLC programming, the control of time is an essential factor when it comes to timely control in automation. Learn how to represent timers in the Mitsubishi’s MELSEC series FX-3u PLC using the GX Developer software.

Programming timers is an essential skill when working with PLCs. It allows for precise control over various time-based operations within an automated industrial system. Timers play a crucial role by delaying action, scheduling events, or monitoring elapsed time in controlling processes. Among the important types of timers is the operational timer. It tracks the duration of a specific operation taking place. In this guide, we will explore more and focus on operational timer instructions.

Prerequisites

One of the prerequisites for this tutorial is having the GX Works 2 or GX Developer Software installed on your programming PC. You can use a simulation tool or the PLC hardware itself.

Getting started with timers

Timers are devices that are used to produce time counts relative to the output. In Mitsubishi PLCs, timers are represented by the T followed by the time variable where a prefix K is placed before the variable. The timers are also numbered. The syntax for representing timers is therefore defined by; -(T0 K20)- where 20 is the time variable.

Writing a simple ladder example with a timer

With the syntax knowledge of timers, we can control how long an output should be on or off using after which we can write the program to PLC or GX simulator. For This tutorial, we are going to use the GX simulator tool.

Steps involved to program an operational timer

Consider the Ladder logic program examples below. In this section, we are going to run a motor for 100 milliseconds and show how we manipulate the time count step-by-step.

In this example, we have a start and a stop switch as an input, a motor as an output, and is connected to a timer of 100 milliseconds also as an output. Below are some of the steps followed for this example.

 

1. Open the GX software and create a folder to save your program

With the GX Developer or GX Works 2 software installed on your programming PC, we can go ahead and launch it. For this tutorial, we are going to use GX Developer. Once launched, we need to create a new project. In the New Project window, we need to select our PLC series, type, and programming type. A name for the project should also be fed in the text input boxes provided in the window. For this tutorial, we are going to name it ‘INTRODUCTION TO TIMERS’.

 

 

Figure 1: image showing you have saved your work
Figure 1: image showing you have saved your work

2. Addition of START/STOP switch program

This program is essential for initiating and stopping the program. For this tutorial, we are going to use normally open contact (N.O)  X000 as our start/ stop switch that can be toggled ON/OFF. We will additionally use an internal relay M0 to transfer the state of X0.

Begin by creating a START/STOP switch by inserting a normally open contact switch and give it an address (x0) as shown below.



Image showing start/ stop input contact
Figure 2: Image showing start/ stop input contact



3. Addition of The Output and The Time Count

Introduce the motor as an OUTPUT and give it an address (Y0). The internal relay is used to power our output. At this point in this tutorial, the output is not affected by any time, as there is no time count added to the ladder as shown below.



Image showing a motor(output)
Figure 3: Image showing a motor(output)

 

Introduce the timer coil in the same rung where the motor has been connected as shown below.

 

image showing an introduced timer
Figure 4. image showing an introduced timer

 

At this point, we are able to run our motor when we convert our program by clicking f4, however, our output still will not run for the specified time because the time condition is not added to its branch. 

Therefore to overcome this problem, we introduce a normally closed contact of the timer T0 between m0 and y0 so that the motor output can now run in the specified time.

 

image showing closed contact for timer
Figure 5: Image showing closed contact for timer

 

4. Simulate The Ladder Logic Program

In this last step, carry out a simulation of your program and confirm it is working. When X000 is forced ON using the simulator device test, M0 is activated which in turn starts the count of time T0. When X000 is turned OFF the timer resets to zero.

 

image showing a motor running within the specified time
Figure 6: image showing a motor running within the specified time
image showing running time has elapsed
Figure 7: image showing running time has elapsed

 

Timers in Mitsubishi PLC with GX Developer

Understanding timers is crucial in ensuring that time-based operations are handled correctly and effectively. Follow this guide if you want to get started with Timers in Mitsubishi PLCs.

If you prefer watching to reading, follow up on the video tutorial below.

2 thoughts on “How To Use Timer in Mitsubishi’s GX Developer| Beginner Tutorial on PLC Programming

Leave a Reply

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