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.
-
MELSEC Tutorial 01 – PLC System Configuration
MELSEC Tutorial 01 – System Configuration, Installation, and Wiring Setting up a MELSEC PLC system is the first step in…
-
MELSEC Tutorial 02 – PLC Module Configuration Diagram
MELSEC Tutorial 02 – Module Configuration Diagram Creating a module configuration diagram is a critical step in setting up a…
-
MELSEC Tutorial 03 – Ladder Program
MELSEC Tutorial 03 – Ladder Program In industrial automation, programming controls the behavior of devices and systems. MELSEC Ladder Programming…
-
MELSEC Tutorial 04 – Create a Ladder Program
MELSEC Tutorial 04 – Create a Ladder Program Industrial automation relies heavily on programming to implement control logic for machines…
-
MELSEC Tutorial 05 – Ladder Sequence Instructions
MELSEC Tutorial 05 – Ladder Logic Programming Sequence Instructions Ladder Logic Programming is a vital skill for developing control systems…
-
MELSEC Tutorial 06 – Ladders Timers and Counters
MELSEC Tutorial 06 – Ladder Logic Programming: Timer and Counter MELSEC Timers and counters are fundamental tools in ladder logic…
-
MELSEC Tutorial 07 – Ladder Logic Programming Data Transfer
MELSEC Tutorial 07 – Ladder Logic Programming: Data Transfer In ladder logic programming, data transfer instructions are crucial for moving…
-
MELSEC Tutorial 08 – Ladder Comparison Operations
MELSEC Tutorial 08 – Ladder Logic Programming: Comparison Operation In industrial automation, MELSEC comparison operations play a vital role in…
-
MELSEC Tutorial 09 – Ladder Arithmetic Operations
MELSEC Tutorial 09 – Ladder Logic Programming: Arithmetic Operations MELSEC arithmetic operations form the backbone of ladder logic programming, enabling…
-
MELSEC Tutorial 10 – Ladder Input Instructions
MELSEC Tutorial 10 – Ladder Logic Programming: Input Instructions MELSEC Ladder logic programming depends on input instructions to define how…
-
MELSEC Tutorial 11 – Creating ladder logic comments
MELSEC ladder logic Creating Comments, Statements, and Notes When programming with ladder logic, clarity is essential to ensure the program…
-
MELSEC Tutorial 12 – Writing to PLC
MELSEC Tutorial 12 – Writing to PLC In this tutorial, we’ll explore how to write programs to a PLC using…
-
MELSEC Tutorial 13 – Debugging and Maintenance
MELSEC Tutorial 13 – Debugging and Maintenance Efficient debugging and maintenance are critical aspects of working with MELSEC PLC systems,…
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:
- Contacts (normally open or normally closed) – Represent input devices or conditions.
- Coils – Represent output devices or actions.
- Timers and Counters – Control timing and counting tasks.
- 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:
- MELSOFT GX Works2 or GX Works3 – Mitsubishi’s software used for programming PLCs.
- MELSEC PLC Hardware – Ensure that your PLC is properly connected and recognized by the software.
- Power Supply and I/O Modules – Ensure that the PLC is powered and connected to the necessary input/output devices.
Software Installation and Setup:
- Install MELSOFT GX Works2 or GX Works3 on your computer.
- Connect your MELSEC PLC to your computer via an appropriate cable (Ethernet, USB, or RS232).
- Open MELSOFT GX Works2/3 and create a new project.
Step 2: Creating a New Ladder Program
Starting the Ladder Program:
- Open your project in MELSOFT GX Works2/3 and navigate to the Ladder Programming screen.
- Select New Ladder Program to begin creating your program.
- 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:
- Normally Open Contact – This contact is energized (closed) when the input device (e.g., a button) is activated.
- 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:
- Start Button (Normally Open Contact)
- 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:
- Load the program into the PLC using MELSOFT GX Works2/3.
- Activate the inputs (e.g., pressing buttons or switching sensors) and check if the outputs respond correctly.
- Modify the ladder program as needed if any issues arise.
Conclusion
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.