How to Program a Schneider Electric PLC: Step-by-step Tutorial
Programmable Logic Controllers (PLCs) are specialized industrial computers designed to automate manufacturing and process control tasks. However, setting them up requires technical knowledge and, often, help from industrial automation experts.
Schneider Electric PLCs are top-of-the-line industrial components, widely used for their reliability, scalability, and compatibility across various industries. Though these devices have become essential for industrial applications, the installation and programming remain a challenge since it requires specialized knowledge.
In the Schneider Electric PLC models, the EcoStruxure Machine Expert software integrates PLC and automation programming into one environment, supporting several IEC 61131-3 languages, primarily Ladder Logic for beginners.
Here, we’ll walk you through creating a basic motor control program using Ladder Logic on a Schneider PLC, and covering necessary foundational skills like project setup, function block creation, variable management, simulation, and deployment.
What Are Schneider Electric PLCs?
A PLC (programmable logic controller) is a specialized device designed for industrial automation. It works in harsh industrial environments for automation of electromechanical processes, such as controlling machinery on factory assembly lines, lighting, or robotic devices.
As a leading industrial equipment manufacturer, Schneider Electric makes a wide range of PLC models, each tailored to different scales and requirements. These highly flexible devices support various I/O configurations for digital and analog communication. Plus, they also connect to supervisory systems (like SCADA), for real time process monitoring and control.
Further, the Schneider Electric PLC types can be classified as follows:
- Entry-level models suitable for simple automation tasks with limited I/O points like Zelio.
- Mid-range models featuring expanded I/O, networking, and safety module support, e.g., M221 and M241.
- Advanced controllers that support IIoT technologies, cloud integration, and complex motion control like the M262.
Comparison of the Popular Schneider Electric PLC Models
A feature-wise comparison of the popular Schneider Electric PLC models is as follows:
| Model | Max I/O Points | Communication Ports | Programming Software | Languages Supported | Key Features |
| Zelio | Up to 20 | None/Basic | Zelip Soft | Ladder Logic, Functional Block Diagram | Basic automation, simple HMI display |
| M100 | Up to 40 | Serial Modbus USB | EcoStruxure Machine Expert Basic | Ladder Logic, Instruction List | Cost-effective, overvoltage protection |
| M200 | Up to 168 with expansion | Ethernet, Serial Modbus, USB | EcoStruxure Machine Expert Basic | Ladder, Instruction List | 2-axis motion control, modular |
| M221 | Moderate | Ethernet, USB | EcoStruxure Machine Expert Basic | Ladder, Instruction List | Safety modules support, motor starters communication |
| M241 | Moderate to High | Ethernet, CANopen, Serial, USB | EcoStruxure Machine Expert | All IEC 61131-3 languages | Web server, FTP, safety functions |
| M251 | High | Wi-Fi, Ethernet | Ecostruxure Machine Expert | All IEC 61131-3 languages | MES/ERP connectivity, expansion modules |
| M340 | Upto 1024 discrete, 256 analog | Ethernet, Modbus TCP, CANopen, USB | EcoStrucxure Control Expert | All IEC 61131-3 languages | High performance mid-range PLC, modular, built-in web server, motion control libraries, strong process control, robust communication |
Table 1:Popular Schneider Electric PLC types.
Preparing for PLC Programming
Schneider Electric PLC manuals are designed to give you clarity on how to set up the PLC units and provide information on every related aspect.
You can begin by downloading and installing EcoStruxure Machine Expert or EcoStruxure Control Expert (as needed by the PLC model in question) from Schneider Electric’s official website. These Schneider electric PLC software provide a unified interface to develop, simulate, and deploy PLC programs.
Connect your PLC hardware via USB or Ethernet. You may opt for a demo controller with built-in discrete I/Os, to make the Schneider Electric PLC programming and setup straightforward.
In the software, create a new project by selecting your target PLC model and choosing Ladder as the default programming language. Keep in mind the I/O layout of your PLC model is essential for accurate input/output mapping. Then, follow our 10-step checklist for project setup.
Tabulated Checklist for Project Setup
A checklist for proper project setup streamlines the workflow and mitigates common configuration errors is as follows:
| Step | Action | Description |
| 1 | Install Necessary Software | EcoStruxure Machine Expert or EcoStruxure Control Expert installation |
| 2 | Connect PLC Hardware | Use USB, Ethernet, or other supported protocol |
| 3 | Create New Project | Select controller and programming environment |
| 4 | Define Task and Scan Cycles | Configure task scheduling for program execution |
| 5 | Configure I/O and Variables | Map inputs and outputs, create global variables |
| 6 | Write Program | Develop logic using Ladder or other IEC 61131-3 languages |
| 7 | Compile and Build Project | Error check nd program compilation |
| 8 | Simulate Program | Test logic without hardware |
| 9 | Download to PLC | Upload compiled program to physical device |
| 10 | Test and Monitor Program | Use monitoring tools for real-time diagnostics |
Table 2: Project Setup Checklist
Having prior familiarity with basic industrial electrical wiring, industrial control concepts, and PLC terminology will aid comprehension.
Step-by-Step Programming Tutorial
Once you have gone through the setup checklist, it is time to get started with Schneider Electric PLC programming. This goes through the following steps:
Step 1: Project Setup
Launch the Schneider Electric PLC software (EcoStruxure Machine Expert or EcoStruxure Control Expert). Click “New Project” and select your target controller. Be sure to name your project descriptively for easy identification.
Confirm Ladder as the programming language, as it is intuitive for beginners and prevalent in industrial settings. Once project creation is done, the software interface will display the Application Tree containing POUs (Program Organization Units), Global Variable Lists (GVLs), and tasks.
Step 2: Defining Variables
The predefined Global Variable Lists (GVLs) act as a central repository for program variables like inputs (e.g., switches), outputs (e.g., motors), and internal flags. The Variables are named clearly using descriptive identifiers to enhance code readability and maintainability.
You need to map variables to physical PLC I/O addresses. For example, a start button might map to digital input %I0.0 and a motor output to digital output %Q0.0. Then, define the variables upfront to ensure seamless interaction between software logic and hardware signals.
Step 3: Programming a Function Block (FB)
Create a Function Block named “FB_Motor_Control” (or something similar and recognizable) to encapsulate motor start/stop logic, promoting modularity and reuse.
Ladder Logic will provide an impulsive start and a continuous run until stopped. Use the programming toolbar to drag and drop contacts, coils, and logic rails for visual clarity.
Common Ladder Logic Instructions in Schneider PLCs
The commonly used Ladder Logic instructions in PLC systems can be listed as follows:
| Instruction | Description | Example |
| Normally Open Contact (NO) | Activates when input is TRUE | Start a motor when switch is ON |
| Normally Closed Contact (NC) | Activates when input is FALSE | Stop motor when an emergency stop is pressed |
| Coil | Output energizing element | Turn on an output device |
| Timer (TON) | On-delay timer to delay output activation | Delay the light turning on |
| Counter (CTU) | Counts upward events | Count products on a conveyor belt |
| Compare Instructions | Compares two values (equal, greater than, etc.) | Check if the temperature is greater than the setpoint |
Table 3: Common Ladder Logic Instructions
Step 4: Calling the Function Block
In the main program (usually named “Main” or “SR_Main”), instantiate and call the FB_Motor_Control (the function block that you have created). Ensure that the PLC scan cycle executes this task to refresh program logic periodically. Calling the Function Blocks within tasks allows code organization and prioritization of different automation functions.
Step 5: Simulation and Testing
Both EcoStruxure Machine Expert and EcoStruxure Control Expert include a program simulation mode to verify logic correctness without connecting to hardware. Activate simulation to monitor variable states and outputs visually.
Then, go through the PLC cycles and debug any logic faults or unintended behaviors. This will reduce the commissioning time and prevent potential damage to the machinery.
Once, these five steps are done, you have successfully completed Schneider electric PLC programming.
Finalizing and Deploying the PLC Program
After testing and verifying program operation in simulation and on hardware test benches, compile and build your final program. Connect to the PLC via USB or Ethernet.
Download the program from the Schneider electric PLC software to the PLC device. Use online monitoring to observe live inputs, outputs, and internal variables during operation. Check error logs and performance metrics for any runtime anomalies.
Document your program and configuration thoroughly for production use and future troubleshooting. You may also plan periodic program backups and maintenance schedules as part of industrial uptime strategies.
Best Practices for Schneider Electric PLC Programming
For efficient setup of the installed PLC system, some best practices that you can engage in are as follows:
- Use modular programming with Function Blocks to segment your control logic into manageable units.
- Adopt consistent naming conventions for variables, tasks, and functions to ensure easy identification.
- Comment extensively within your code to explain logic purpose and flow, aiding future maintenance or team collaboration.
- Employ version control and backup copies regularly during development.
- Test programs incrementally, starting with simple operations before adding complexity.
- Opt for structured design techniques aligning to IEC 61131-3 standards to ensure portability and scalability.
- Validate all input/output addresses carefully before deployment to prevent hardware conflicts.
Troubleshooting Common Issues
Further, to troubleshoot some common issues faced during PLC programming, you may do the following:
- Verify peripheral wiring and power supply status physically at the hardware end.
- Confirm correct mapping of variables to PLC addresses.
- Use diagnostic tools in Machine Expert such as status monitoring and trace logs.
- Check communication settings (baud rate, protocols) if connectivity issues arise.
- Review task scheduling and program cycles; overly long or blocking code can disrupt real-time operation.
- Resolve error codes and alerts issued by the software promptly.
- Opt for the Schneider electric PLC manuals to resolve any doubts and queries.
- Consult Schneider Electric online forums and technical support for uncommon or complex problems.
- Frequently test in simulation mode can identify logic bugs before hardware use.
Wrapping Up
When approached in a piecemeal manner, the Schneider Electric PLC programming can be handled with ease. If you are planning to install any of the Schneider Electric PLC models, explore the advanced programming features. You may also look through the Schneider Electric PLC manuals, resources and training courses for more information.
Quick and Easy Installation of Schneider PLCs
Ready to set up the Schneider Electric PLC at your premises? Use our stepwise guide and refer to the manuals for any additional queries.
Frequently Asked Questions
1. Do I Need Physical Hardware to Program Schneider PLCs?
No, EcoStruxure Machine Expert and EcoStruxure Control Expert software include a simulation environment, allowing you to test programs without physical PLC hardware.
2. How Do I Map Inputs and Outputs in a Schneider PLC Program?
Inputs and outputs are declared as variables in the Global Variable List (GVL) and then linked to physical PLC I/O addresses for correct signal processing.
3. Can I Simulate and Debug My PLC Program Before Deployment?
Yes, both Machine Expert and Control Expert have a simulation mode to run and debug your ladder logic to troubleshoot before deploying to hardware.
4. Are There Built-in Functions for Timers and Counters?
Yes, Schneider PLCs include standard IEC timers (TON, TOF) and counters (CTU, CTD) that can be used within programs.
