Skip to content
Home » Blog » MELSEC Tutorial 03 – Ladder Program

MELSEC Tutorial 03 – Ladder Program

MELSEC Tutorial 03 – Ladder Program

In industrial automation, programming controls the behavior of devices and systems. MELSEC Ladder Programming is one of the most commonly used techniques for programming Mitsubishi Electric PLCs. This tutorial walks you through the key steps of creating a ladder program for MELSEC PLC systems, helping you design and implement logic to control automation processes effectively.


YouTube player


What is Ladder Programming?

Ladder Logic is a graphical language that emulates the structure of electrical relay circuits. It consists of rungs (horizontal lines) that represent logical conditions, similar to how electrical relays operate. MELSEC PLCs use ladder logic to control input and output devices, perform calculations, and manage data flow. It simplifies control tasks, making it a popular method for industrial automation.

Components of a Ladder Program:

  1. Contacts (normally open or normally closed) – Represent input devices or conditions.
  2. Coils – Represent output devices or actions.
  3. Timers and Counters – Control timing and counting tasks.
  4. Other functions – Handle comparison operations, mathematical calculations, and data management.

Step 1: Setting Up the MELSEC PLC and Software Environment

Before you start creating a ladder program, ensure that you have the correct setup for your MELSEC PLC system.

Requirements:

  1. MELSOFT GX Works2 or GX Works3 – Mitsubishi’s software used for programming PLCs.
  2. MELSEC PLC Hardware – Ensure that your PLC is properly connected and recognized by the software.
  3. Power Supply and I/O Modules – Ensure that the PLC is powered and connected to the necessary input/output devices.

Software Installation and Setup:

  1. Install MELSOFT GX Works2 or GX Works3 on your computer.
  2. Connect your MELSEC PLC to your computer via an appropriate cable (Ethernet, USB, or RS232).
  3. Open MELSOFT GX Works2/3 and create a new project.

Step 2: Creating a New Ladder Program

Starting the Ladder Program:

  1. Open your project in MELSOFT GX Works2/3 and navigate to the Ladder Programming screen.
  2. Select New Ladder Program to begin creating your program.
  3. Choose the appropriate PLC model for your project (e.g., FX, Q, iQ-R series).

Organizing the Ladder Program:

  • Rungs: Each rung of the ladder will represent one operation or condition.
  • Contacts: Add contacts at the beginning of each rung to define the inputs (e.g., switches or sensors).
  • Coils: Place coils at the end of the rung to represent the outputs (e.g., motors or lights).

Step 3: Defining Inputs and Outputs

In ladder programming, inputs (contacts) are used to represent physical devices like sensors or switches. Outputs (coils) are used to represent devices like motors or actuators that are controlled by the PLC.

Defining Contacts:

  1. Normally Open Contact – This contact is energized (closed) when the input device (e.g., a button) is activated.
  2. Normally Closed Contact – This contact is energized (closed) when the input device is NOT activated.

Defining Coils:

  • A coil is activated (energized) when the conditions of the rung are met. It can represent an output device such as a motor or valve.

Step 4: Adding Timers and Counters

Timers and counters are essential tools for controlling time-based or count-based operations.

Timers:

  • ON-delay Timer (TON): A timer that activates after a specified delay when the condition is true.
  • OFF-delay Timer (TOF): A timer that deactivates after a specified delay once the condition becomes false.

Counters:

  • Up Counter (CTU): Counts upwards each time the input condition is true.
  • Down Counter (CTD): Counts downwards each time the input condition is true.

Step 5: Writing the Ladder Logic

Example of Basic Ladder Logic:

Let’s create a simple ladder program that turns on a motor when a start button is pressed and keeps it running until a stop button is pressed:

  1. Start Button (Normally Open Contact)
  2. Motor Output (Coil)

Ladder Diagram:

Start Button (Normally Open)Motor (Coil)
–] [– –(M)————–

Here, when the Start Button is pressed (contact closed), the Motor coil will be energized, turning the motor ON. When the button is released, the motor will turn OFF.

Adding Conditions:

For more complex logic, you can add multiple conditions. For example, adding a Stop Button to stop the motor:

Start Button
(Normally Open)
Stop Button
(Normally Closed)
Motor (Coil)
–| |– –|/|––(M)–

In this case, the motor will only run when the Start button is pressed and the Stop button is not pressed.



Step 6: Simulation and Testing

Once your ladder logic is complete, you can simulate the program using the software to ensure that it behaves as expected. This step allows you to debug and verify the functionality before deploying it on the actual PLC.

Testing the Program:

  1. Load the program into the PLC using MELSOFT GX Works2/3.
  2. Activate the inputs (e.g., pressing buttons or switching sensors) and check if the outputs respond correctly.
  3. Modify the ladder program as needed if any issues arise.

Conclusion

A simple MELSEC ladder logic diagram showing a start button controlling a motor output.

In MELSEC Tutorial 03, we introduced the basics of ladder programming for MELSEC PLCs. By understanding contacts, coils, timers, counters, and how to structure your ladder logic, you can begin creating programs for industrial automation.

In the next tutorial, we will explore more advanced ladder programming techniques for more complex applications.

Ads Blocker Image Powered by Code Help Pro

Ads Blocker Detected!!!

We have detected that you are using extensions to block ads. Please support us by disabling these ads blocker.

Powered By
Best Wordpress Adblock Detecting Plugin | CHP Adblock