Cookies are important for this site to function properly, to guarantee your safety, and to provide you with the best experience. By clicking OK, you accept all cookies. For more information, please access our Privacy Policy.
Table of Contents
Tutorials / 
First look at Schneider Electric’s Machine Expert Software
Beginner

First look at Schneider Electric’s Machine Expert Software

Schneider Electric
PLC Programming

Introduction

Schneider Electric's Machine Expert stands as a robust software solution tailored for automation engineers and PLC (Programmable Logic Controller) programmers, providing an integrated platform for the configuration and programming of Schneider’s industrial control systems. Widely embraced in manufacturing and process industries, Machine Expert serves as a centralized hub for creating, managing, and optimizing automation projects. Throughout this guide, we will offer a comprehensive overview of Machine Expert, delving into its functionalities and guiding you through essential steps to efficiently create and configure projects. We'll explore the software's key features, enabling you to harness its capabilities for streamlined and effective automation processes.

In this tutorial, you'll embark on your initial steps into Schneider Electric's Machine Expert, gaining insights into project creation and configuration. Beginning with the basics, we'll guide you through the process of initiating a new project, selecting the appropriate controller model, and defining crucial project parameters. As your project takes shape, we'll navigate through Machine Expert's main interface and its fundamental sections. Essential tools and features will be covered; we'll explore the Device Tree, a crucial space for configuring hardware-related settings such as digital inputs and outputs, extension modules, and communication interfaces. The tutorial will conclude with a detailed examination of the Application Tree, focusing on Global Variable Lists (GVL), PLC tasks, and Program Organization Units (POUs).

Prerequisites

To follow along this tutorial, you will need an installation of Schneider Electric’s Machine Expert. We recommend that you follow the “How to download and install Schneider’s Machine Expert” tutorial beforehand.

Creating a project in Machine Expert

Let’s start by taking a look at how to create a project in Machine Expert. First, launch Machine Expert from your desktop or start menu. Once the loading is done, click on the “New Project” button. This can also be done by clicking on File -> New Project.

Figure 1.1: Creating a new project.
Figure 1.1: Creating a new project.

A small “New Project” window will open. Here, you can define the project type and configure it. Usually, you will mostly use the “Default Project” type. Note that it is also possible to create libraries, projects from templates, projects from examples, and empty projects.

Figure 1.2: New project configuration.
Figure 1.2: New project configuration.

After selecting the project type, we need to select the controller model we will use in the project. For this example, we will select a TM241CEC24T/U. open the controller list and select the right model. 

Figure 1.3: Selecting the controller.
Figure 1.3: Selecting the controller.

After that, we need to define the controller and project names. Also, you can select the default programming language for the project. For now, keep it at LD. Once everything is ready, click on OK.

Figure 1.4: Configuring the new project.
Figure 1.4: Configuring the new project.

Once the project is created, you should end up using Machine Expert's main interface. It is mainly composed of four sections:

  1. Toolbar: Contains essential tools such as the new/open project buttons, save project, PLC login/logout…etc.  
  2. Project trees: Here, you can navigate through the contents of your project. Everything is split into three tabs; Device tree for the hardware configurations, Application tree for your PLC program and software in general, and Tools tree for miscellaneous project tools such as libraries.
  3. Workspace: The actual field where all the configuring and programming are done.
  4. Toolbox: A set of tools and features that can be accessed quickly, such as instructions, devices…etc.
Figure 1.5: Machine Expert’s main interface.
Figure 1.5: Machine Expert’s main interface.

To open an existing project, click on the “Open” button. This can also be done by clicking on File -> Open. Then, select the project you want to open and click on “Open.”

Figure 1.6: Opening a project.
Figure 1.6: Opening a project.

Machine Expert’s Device Tree

As mentioned earlier, all components and features of the Machine Expert project are divided into three project trees. You will have to navigate through these trees to configure and program your controller. The “Device Tree” contains all the hardware-related configurations of your project, such as I/O ports, extension modules, fieldbuses and communications…etc. Its content varies depending on the function of the controller type selected. For example, some controllers may have built-in physical I/Os or require extension modules; they can also have different types of fieldbuses ports…etc. The Device tree will always contain all the hardware features present in your controller model. 

Figure 2.1: Device tree.
Figure 2.1: Device tree.

Digital inputs and outputs

The TM241CEC24T/U controller we selected includes integrated digital inputs and outputs that can be accessed from the Device tree directly. Open the “DI (Digital Inputs)” section. Here, you will be able to configure the controller's built-in DIs.

Figure 2.2: Digital inputs.
Figure 2.2: Digital inputs.

The same logic applies to the “DQ (Digital Outputs)” section. Here, you will be able to configure the controller's built-in DQs. 

Figure 2.3:Digital outputs.
Figure 2.3:Digital outputs.

Please note that other sections may appear depending on the hardware features of your controller. For example, the TM241CEC24T/U model we selected also has built-in counters for frequency inputs and pulse generator outputs. Some other models may also have built-in analog inputs/outputs…etc

Extension modules - I/O Bus

After covering the integrated I/Os, let’s head now to the extension modules. Like the vast majority of PLCs, it is possible to extend the number of inputs and outputs of your system by adding modules. This can be done in the “IO_Bus” section. Here, you will be able to add modules and configure them. To add a module, place your cursor at the top of the “IO_Bus” section. A green plus icon should appear on the right of the section. Click on it.

Figure 2.4: IO Bus.
Figure 2.4: IO Bus.

This will open a device catalog that includes all the modules available that you can add to your system.

Figure 2.5: Module catalog.
Figure 2.5: Module catalog.

Let’s add a basic 8*DI module.  First, open the “TM2 Digital I/O Modules” section. You will find three sections: Inputs, Outputs, and Mixed.

Figure 2.6: Modules types.
Figure 2.6: Modules types.

Then, pen the “Inputs” section and select the “TM2DAI8DT” module. Once done, click on “Add Device.”

Figure 2.7: Selecting a module.
Figure 2.7: Selecting a module.

You should see the added module appear under the IO_bus section. If you open the module, you will find an interface similar to what we saw earlier with the integrated I/Os. You will be able to configure the module channels here.

Figure 2.8: Module I/Os.
Figure 2.8: Module I/Os.

You can give every channel a variable name so that they can be used in your programs. To do it, click on the “Variable” section of the channel you want to name. It will become editable.

Figure 2.9: Naming an input.
Figure 2.9: Naming an input.

Then type the variable name you want to give it. For example, if this would be an input connected to a start button, you can name it “Start_button.” 

Figure 2.10: The input is configured.
Figure 2.10: The input is configured.

Please note that the integrated I/O channels can also be named using the same method.

Ethernet interface configuration

The next important section you will come across during your work on your project is communication. Each Schneider PLC model has communication interfaces such as Ethernet, Serial, CAN….etc. These interfaces will be displayed in your Device tree. Let’s try to configure the Ethernet interface of our TM241CEC24T/U controller. Click on the “Ethernet_1 (Ethernet Network)” section in the Device tree. Here, you will be able to configure the IP address and security parameters of the Ethernet interface.

Figure 2.11: Ethernet - IP configuration.
Figure 2.11: Ethernet - IP configuration.

After configuring the interface, we must add a communication protocol that will be associated with this interface. Click on the green plus button next to the “Ethernet_1 (Ethernet Network)” section. This will open a small window where you will find all the Ethernet protocols available. If you open the “Fieldbuses” section, you will find two TCP/IP-based protocols: Ethernet/IP and Modbus TCP. Select the “EthernetIP” protocol.

Figure 2.12: Ethernet protocol.
Figure 2.12: Ethernet protocol.

You should see the newly added protocol appear in the Device tree under the “Ethernet_1” section. By opening it, you will find further parameters about the memory addressing used in the protocol.

Figure 2.13: Ethernet/IP configuration.
Figure 2.13: Ethernet/IP configuration.

Machine Expert’s Application Tree

We have now covered the hardware section of a Machine Expert project, let’s head now to the software side. Everything that is related to PLC programming is located in the Application tree. To access it, click on the “Application tree” tab. Here, you will find all your PLC tasks, programs, and Global Variable Lists (GVL).

Figure 3.1: Application tree.
Figure 3.1: Application tree.

Global Variable List (GVL)

Let’s have a look first at the GVLs. As their name suggests, these are variable lists that can be accessed globally by any part of your program. They can be used as a way to define the variables you may need in your program or to organize variables as databases. 

By default, a GVL is already created in your Application tree. If you open it, you will find the interface where you can define variables.

Figure 3.2: Global Variable List.
Figure 3.2: Global Variable List.

To create a new GVL, right-click on the blank space of the Application tree, then go to “Add Object” and select “Global Variable List.”  

Figure 3.3: Adding a GVL.
Figure 3.3: Adding a GVL.

This will open a small window where you can edit the name of the new GVL. Once done, click on “Add.”

Figure 3.4: Naming the new GVL.
Figure 3.4: Naming the new GVL.

To create a new variable in your GVL, click on the name section of the first row to edit it.

Figure 3.5: Editing the variable name.
Figure 3.5: Editing the variable name.

After that, type a name of your choice for the variable. Then, press Enter. When the variable is created, you should notice that a default data type (BOOL) has been assigned to the variable.

Figure 3.6: The variable is created.
Figure 3.6: The variable is created.

You can edit the Data type of the variable by typing the desired type. For example, to make it an integer, type “INT” in the Data type section of the variable.

Figure 3.7: Changing the variable’s data type.
Figure 3.7: Changing the variable’s data type.

Once done, the variable has been created. For now, we are using the tabular view of the GVL that displays the variables in a table where you can edit further details about the variable such as the address, initialization, comment…etc. The tabular view is indicated by the table icon on the left side of the interface.

Figure 3.8: Tabular view.
Figure 3.8: Tabular view.

However, it is also possible to display the variables in a textual format that will allow you to define variables using a Structured Text interface. To access the textual view, click on the “Textual view” icon above the tabular view icon. Here, you will be able to define variables textually as you would do in an ST program.

Figure 3.9: Textual view.
Figure 3.9: Textual view.

PLC tasks

We have covered the variables’ side, so let’s head to the program side now. If you are not familiar with how PLCs execute programs, they are executed in a cyclic manner and organized into tasks. Each task consists of a set of programs, functions, and function blocks (Also known as POUs, Program Organization Units) that are processed sequentially, with the PLC repeatedly cycling through these tasks to control and monitor various processes in real-time. For any POU you want to execute, it will need to be called somewhere within a task. 

Let’s have a look at how tasks work in Machine Expert. In your Application tree, open the “Task configuration.” Here, you will be able to manage and configure your PLC tasks. By default, a task called “MAST” (Master Task) is created and can serve as your main task to execute programs.

Figure 3.10: Task configuration.
Figure 3.10: Task configuration.

You can create new tasks by clicking on the green plus icon next to the “Task configuration” and then selecting “Task.”

Figure 3.11: Creating a new task.
Figure 3.11: Creating a new task.

After that, a small window where you can define the name of the task you want to create. Once done, click on “Add”.

Figure 3.12: Naming the new task.
Figure 3.12: Naming the new task.

The newly created task should appear in your Application tree under the Task configuration section. If you click on it, it will open the task’s properties where you can define the task type, priority, and POU calls.

Figure 3.13: Configuring the new task.
Figure 3.13: Configuring the new task.

There are four types of tasks in Machine Expert:

  • Cyclic: The task will be executed cyclicly according to the set time interval.
  • Event: The task is triggered by a rising edge on a defined variable.
  • External: The task is triggered by an external event, such as errors, alarms, and system processes.
  • Freewheeling: The task will be executed cyclicly but not according to a set time. Instead, as soon as a cycle ends, the next one will start immediately.
Figure 3.14: Task types.
Figure 3.14: Task types.

Let’s shift our focus back to the default MAST task. If you open it, you will notice that it is set as a cyclic task with an interval of 20 ms. It is also called the “SR_Main,”  which is a program created by default.

Program Organization Unit (POU)

We come now to the last aspect of this section of the tutorial, the Program Organization Units. As we just mentioned, a program created by default named “SR_Main” is called in the MAST task. This program is intended to be the main program of your PLC application. Let’s open it and have a look at Machine Expert’s programming interface.

Figure 3.15: Main program.
Figure 3.15: Main program.

The programming interface is split into two sections:

  1. Declaring zone: This is where you declare all the local variables and instances of the POU.
  2. Programming zone: Where the actual programming is done by assembling sequences of instructions.

To add a new POU, click on the green plus icon next to the “Application” section and select “POU.”

Figure 3.16: Adding a new POU.
Figure 3.16: Adding a new POU.

A small window will open where you can define the POU’s name, type, and default language. 

Figure 3.17: POU configuration.
Figure 3.17: POU configuration.

There are three types of POUs:

  • Program: Programs are software units that are usually used to call other functions or function blocks, but they can also contain instruction sequences. Programs have an internal memory, cannot be called by other programs but by tasks, and do not have Inputs and Outputs.
  • Function Block: FBs are software units with multiple input/output parameters and internal memory. The value a function block returns depends on the value of its internal memory. Within a function block, it is possible to call other function blocks or functions, but not programs and recursive calls are not allowed.
  • Function: Functions are software units with multiple input parameters and exactly one output parameter (return value). As func­tions do not have an internal memory, calling a function with the same values always returns the same result.

Once you are done configuring the POU, click on “Add.” You should see the POU appear in the Application tree.

Figure 3.18: The new POU is created.
Figure 3.18: The new POU is created.

Now that we created a new POU unless we call it in a task, it won’t be executed. To call a POU in a task, go to the selected task (MAST) and click on “Add Call.”

Figure 3.19: Adding a new POU call in the MAST task.
Figure 3.19: Adding a new POU call in the MAST task.

A window containing all the available POUs to call. Select the newly created POU, then click on “OK.”

Figure 3.20: Selecting the POU to call.
Figure 3.20: Selecting the POU to call.

You should see the POU appear in the calls list of the MAST task.

Figure 3.21: The POU call is created.
Figure 3.21: The POU call is created.

Conclusion

In this tutorial, you learned how to navigate Schneider Electric's Machine Expert, starting with the foundational steps of creating a new project. Beginning with the software's interface overview, you gained familiarity with the essential sections such as the Project trees and Workspaces. The tutorial guided you through the configuration of hardware settings in the Device Tree, covering aspects like digital inputs and outputs, extension modules, and communication interfaces. You also explored the software side with the Application Tree, delving into Global Variable Lists (GVL), PLC tasks, and Program Organization Units (POUs).

Now that we've gained a general view of Machine Expert, the upcoming tutorials will delve into the practical application of the software for PLC and HMI programming. These future guides will provide hands-on insights into utilizing Machine Expert's capabilities to program PLCs efficiently and create intuitive HMI designs.