0% found this document useful (0 votes)
63 views206 pages

EcoStruxure Control Expert V15.1 Guide

The document provides an overview of EcoStruxure Control Expert, a programming platform for various Modicon hardware, detailing its features, supported drivers, and licensing options. It outlines the software's scalability, available editions, and tools necessary for the automation and control system lifecycle. Additionally, it includes sections on programming languages, project management, and cybersecurity considerations.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
63 views206 pages

EcoStruxure Control Expert V15.1 Guide

The document provides an overview of EcoStruxure Control Expert, a programming platform for various Modicon hardware, detailing its features, supported drivers, and licensing options. It outlines the software's scalability, available editions, and tools necessary for the automation and control system lifecycle. Additionally, it includes sections on programming languages, project management, and cybersecurity considerations.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

2020

EcoStruxure Control
Expert
V15.1 - BASIC CONFIGURATION - 1
MARIANA GOMEZ

Internal
Content
Introduction. 12
Objectives ................................................................................................................................................. 12
Generalitys ......................................................................................................................................... 12
What is EcoStruxure Control Expert?. 12
Overview of EcoStruxure Control Expert. 12
Four different sizes. 13
What is EcoStruxure Control Expert?. 14
Supported drivers. 15
Modicon M340. 15
Modicon M580 and M580 Safety. 16
Modicon Premium. 17
Modicon Quantum. 17
Modicon Momentum. 17
Bus architectures. 19
Licensingo ........................................................................................................................................ 20
Easy and secure licensing systemo ............................................................................................ 20
License activation methods. 20
How does floating licensing work?? ...................................................................................... 20
EcoStruxure Control Expert References. 21
How to register the software?. 21
Standard programming languages. 22
Standard IEC Languages. 22
Effective Supervision of the Plant. 22
EcoStruxure Control Expert Functions. 22
Use of EcoStruxure Control Expert. 23
Forget about the Hardware while you develop.. 23
Simulations. 23
EcoStruxure Control Expert Interface. 24
Graphical User Interface. 24
How to start EcoStruxure Control Expert. 25
Methods of using the interface. 25
Exercise– Examine the user interface. 26

Internal
Summary. 29
Questions. 29
Driver programming. 30
Objectives ................................................................................................................................................. 30
Standardized programming of controllers. 31
The programming languages of IEC 61131-3. 31
Exercise– See examples of programs.... 32
Creation of new projects. 35
Overview of the project for the workshop.. 35
First step in the configuration. 36
How to create a new project. 36
Exercise– Create a new project.. 37
Language editors. 39
Common tools. 39
Palette. 39
Context menu. 39
Unlimited quantity and extent of comments. 40
Data input functions. 40
Standard editing functions. 40
Bookmarks. 40
Tareas...................................................................................................................................................... 41
Types of taskss.................................................................................................................................... 41
Master. 41
Fast. 42
Auxiliary. 42
I/O and Timer Eventss ...................................................................................................................... 42
Sections. 43
Organization of Programs. 43
Autonomous Entitiess......................................................................................................................... 43
Subroutines. 44
Exercise– Create a section. 45
Elementary functions. 46
Included functionss ............................................................................................................................. 46

Internal
AND Function. 47
Function OR.......................................................................................................................................... 47
More basic functions. 47
Exercise– Use a function block. 48
Variables. 51
Localized variables. 51
Localized variables (cont.). 52
Variables not locateds ...................................................................................................................... 52
Variable Naming Conventionss ............................................................................................ 52
Data Types I/O ................................................................................................................................ 53
Data types of Device (DDT). 53
Exercise– Variables. 54
Exercise– link functions. 56
Summary. 57
Questions. 57
Test a projecto ..................................................................................................................................... 58
Objectives ................................................................................................................................................. 58
Analyze and Generate a project. 58
Analysis. 58
How to analyze a projecto ................................................................................................................. 58
Exit window. 58
Generate a project. 59
How to generate a projecto ................................................................................................................. 59

Exercise– Analyze and generate a project. 59


Software Simulator. 60
EcoStruxure Control Expert Simulator. 60
How to start simulation mode. 60
How to connect to the simulator. 60
Exercise - PLC Simulator. 61
Animation. 63
Run mode (execution) ......................................................................................................................... 63
Animation Tablesn ............................................................................................................................... 64
Online tool. 64

Internal
Probar la lógica de un programa......................................................................................................... 64
Working with animation tablesn....................................................................................................... 64
Exercise– Create an Animation Table. 65
Exercise– Working with animation tables. 66
Resumen ................................................................................................................................................. 68
Questions. 68
Project managements .................................................................................................................................. 69
Objectives ................................................................................................................................................. 69
Project File Types. 69
File types. 69
Documents .STU. 69
Documents .STA. 69
Documents .XEF. 70
Documents .ZEF. 70
Exported project components. 70
Exported project components– Extensions. 70
Export of projects. 71
Useful for scaling............................................................................................................................. 71
Content of the fileo ......................................................................................................................... 71
How to export a project. 71
Exercise– Export a project. 72
Import projects ................................................................................................................................. 73
Scale projects. 73
Import protected elements.. 73
Import Operator Screens. 73
How to import a project. 73
Exercise– Import projects. 74
Archive projects .................................................................................................................................. 75
Save the compiled project. 75
Properties of a Fileo ................................................................................................................. 75
How to create a file. 75
Exercise– Archiving projects with EcoStruxure Control Expert. 76
Project Explorer. 78

Internal
Deploy the contents of a project. 78
Structural view. 78
Project directory. 78
How to rename the project directory. 78
Exercise– The project tree. 79
Functional view. 80
Functional module. 80
How to switch between views. 80
Exercise– Change views. 81
Resumen ................................................................................................................................................. 82
Questions. 82
Ladder Language. 83
Objectives ................................................................................................................................................. 83
Ladder Diagram Language. 83
Introduction. 83
Ladder Diagram Links. 84
Priorities when defining the flow of the ladder diagram.... 84
Programming Window. 85
Properties of the LD window. 85
LD Tool Palette. 85
Ladder Diagram Contacts. 86
Scales Diagram Coilsa .......................................................................................................... 87
Functions of the Ladder Editor. 88
Flexible column width. 88
Adjustable font sizess ............................................................................................................ 88
Copy, paste, and delete columns and rowss ........................................................................................... 88
Copy and paste variables. 88
Mnemonic LD. 89
Insert functions. 89
Quick access to standard features. 90
Customization of LD color. 90
Exercise– Create a new Ladder section.. 91
Summary. 98

Internal
Questions. 98
Function Block Languagen ................................................................................................................. 99
Objective. 99
Function Block Diagram Language. 100
Introduction. 100
Programming window. 101
Properties of the FBD window. 101
FBD tool palette. 101
Exerciseo............................................................................................................................................. 102
Comments. 103
Why use comments?. 103
How to add a comment. 104
How to show/hide comments ................................................................................................. 104
Exercise - Comments. 105
Execution sequence. 106
Adjustable font sizess .......................................................................................................... 106
Add favorite functionss ................................................................................................................ 106
Show and hide comments. 107
Color customization of FBDs. 107
Exercise– Execution sequence.................................................................................................... 108
Exercise– Connect the functions. 111
Exercise– Complete the FBD.. 112
Summary. 114
Questions .............................................................................................................................................. 114
Function Blocks. 115
Objectives ............................................................................................................................................... 115
Bloques de Función Elemental.............................................................................................................. 115
Internal States. 115
Representation of an EFB. 116
Failure Processing and Counters................................................................................................. 117
Why use fault processing?. 117
Current status of the program. 117
Manejo de Excepciones .................................................................................................................... 117

Internal
Logical design. 117
Exercise - Fault Processing. 118
Derived Function Blocks (DFB) .................................................................................................... 120
Function blocks used as templates. 120
Structure. 120
Advantages of DFBs ......................................................................................................................... 121
Exercise– Create a derived function block.. 122
Exercise– Use the DFB Liquid Pump block.. 126
Exercise– Test and detail the DFB ................................................................................................... 127
Exercise– Renumber the Piness ........................................................................................................ 128
User Derived Data Types and Function Blocksn .................................................................. 129
Derived Data Types (DDT))......................................................................................................... 129
EcoStruxure Control Expert EFB Toolkit. 129
Summary. 130
Questions. 130
Structured Text Languageo ............................................................................................................... 131
Objectives ............................................................................................................................................... 131
Structured Text Language. 132
Introduction to Structured Text. 132
Texto estructurado............................................................................................................................ 133
Blank spaceso ............................................................................................................................ 134
Equal signs. 135
Expressions. 136
Text operatorso ......................................................................................................................... 137
Programming Window. 138
Window properties. 138
Tool palette. 138
ST Expressions. 139
ST operators. 139
Operands ST.................................................................................................................................... 140
ST Instructions. 140
Exercise– Create a new Section ST............................................................................................. 141
Summary. 143

Internal
Questions. 143
Instruction List Language. 144
Objectives ............................................................................................................................................... 144
Instruction List Language. 145
List of Instructions. 145
Scheduling Window. 147
Properties of the window. 147
Instruction palette. 147
Instructions IL. 148
IL Operators. 148
Operands IL ..................................................................................................................................... 148
IL Modifiers. 149
Exercise– Create a new section IL .................................................................................................. 150
Summary. 151
Questions. 151
Operator screens. 152
Objectives ............................................................................................................................................... 152
Dynamically Monitor Processes. 152
Provide a set of information.. 152
Online modea ................................................................................................................................... 153
Graphic Screena..................................................................................................................................... 153
Operator Screens. 153
Toolbars. 153
Design Operator Screens. 154
Standard Graphic Techniques. 154
How to Create an Operator Screen. 154
Exercise– Create an Operated Screenr...................................................................................... 154
Exercise– Add Text as Labels. 155
Exercise– Push Button Controls. 157
Exercise– Add Failure Tests ................................................................................................... 160
Exercise– Display Text in the Runtime. 161
Exercise– Test the logic of the pump.. 163
Resumen ............................................................................................................................................... 164

Internal
Questions. 164
Sequential function diagram. 165
Objectives ............................................................................................................................................... 165
SFC Sections. 165
Size of the sections. 165
Exercise - SFC Sections. 166
SF EditorC ......................................................................................................................................... 170
Components. 170
Test Sequences. 170
Toolbars. 170
Structure of an SF SectionC.......................................................................................................... 171
Exercise– Create the first step.. 172
Times of Steps. 172
Times of Steps. 172
Minimum Supervision Time. 173
Maximum supervision time........................................................................................................ 173
Delay Time. 173
Exercise– Step times. 174
Actions ................................................................................................................................................ 175
Instruction Game. 175
Descriptors ...................................................................................................................................... 175
Exercise– Actions. 176
Exercise– Comments. 178
Transitions. 180
Verify the condition.... 180
Exercise– Transitions ..................................................................................................................... 181
Ejercicio – Add steps to the transitions.. 182
Exercise– Add a jump. 186
Exercise– Animation in SFC language. 188
Summary. 191
Questions. 191
Communication to the controller. 192
Objectives ............................................................................................................................................... 192

10

Internal
Communication drivers. 192
Installation Page - Communication Driversn .............................................................................. 192
Connection Mode. 193
Switch to Standard Mode. 193
Configure a USB port. 193
Exercise– Configure the USB port.. 194
Ethernet Networks. 196
Ethernet Configurationt..................................................................................................................... 196
Embedded Ethernet M580. 196
Ethernet Configuration M580– Directions IP ................................................................................ 197
Ethernet configuration of other controllerss ............................................................................... 198
Map the module. 198
Create a Link in a named network. 198
Configure a Link. 199
Add the link. 201
Exercise– Ethernet Port Configuration M580. 201
Cybersecurity with EcoStruxure Control Expert. 202
Introduction to Cybersecurity– What is Cybersecurity?. 202
Cybersecurity and EcoStruxure Control Expert. 202
Cybersecurity with M580................................................................................................................. 202
Security services. 203
Cybersecurity Audits (Event Storage) .......................................................... 204
Event Storage Functionality. 204
Syslog with EcoStruxure Control Expert. 205
Syslog Originators. 205
Enable the Syslo clientg .................................................................................................................. 205
Summary. 206
Questions. 206

11

Internal
Introduction

The configuration environment of EcoStruxure Control Expert consists of a variety of bars of


tools, navigation windows, and programming editors. This chapter introduces the user to
configuration environment using an example project with predefined elements.

Objectives
By the end of this chapter you will be able to:

• Examine the key elements of the EcoStruxure Control Expert interface


• Identify the ranges of programmable controllers with EcoStruxure Control Expert
• Investigate the components of an EcoStruxure Control Expert project

Generalities
What is EcoStruxure Control Expert?
EcoStruxure Control Expert (formerly Unity Pro) is a common programming platform for seven
specialized hardware: Modicon M340, M580, Atrium, Momentum, Premium, and Quantum.

EcoStruxure Control Expert includes everything necessary to program a complete system of


automation and control throughout its entire life cycle from design, development,
commissioning, operation and maintenance.

Overview of EcoStruxure Control Expert


The scalability of the software is based on the supported platforms and not on the functions. This means
you can standardize your software platform to support the full range of hardware. This
it allows you to manage control systems from relatively small to large systems and
extremely complex and even security systems.

The following software packages are available:

• EcoStruxure Control Expert S


• EcoStruxure Control Expert L
• EcoStruxure Control Expert XL
• EcoStruxure Control Expert XL Safety (for safety applications)

12

Internal
• EcoStruxure Control Expert Safety Addon (offer to extend an existing XL version)

EcoStruxure Control Expert provides all the tools required for the complete life cycle of
your systems: Design, Commissioning, Operation, and Maintenance.

The software is available for different numbers of users ranging from a single user to everyone.
the employees of a site.

Four different sizes


EcoStruxure Control Expert is available in 4 different editions: S, L, XL, and XL Safety. It is also
the EcoStruxure Control Expert Safety Addon offer is available as a plug-in for the existing version
from EcoStruxure Control Expert XL (non-safety).

The main difference between editions is the supported references of families and models of
drivers.

The following table is used to determine which version of EcoStruxure Control Expert is required.

Platform EcoStruxure EcoStruxure EcoStruxure EcoStruxure


Control Expert S Control Expert L Control Expert XL Control Expert XL
Safety
Momentum All the All the All the All the
models models models models
171CBU***** 171CBU***** 171CBU***** 171CBU*****
Modicon M340 All the All the All the All the
models models models models
BMXP34**** BMXP34**** BMXP34**** BMXP34****
Modicon M580 - BME P58 10** All the All of the
BME P58 20** models models
BME P58 30** BME *58 **** BME *58 ****
BME H58 2040 All the
safety models
BME *58 ****S
Premium - TSX P57 00 All the All the
TSX P57 10 models models
TSX P57 20 TSX * 57 **** TSX * 57 ****
TSX P57 30
TSX P57 40
TSX H57 40
Quantum - 140 CPU 311 10 All the All the
140 CPU 434 12 U models models
140 CPU 534 14 U 140 CPU *** ** 140 CPU *** **

13

Internal
What is EcoStruxure Control Expert?

EcoStruxure Control Expert is the common software for programming, commissioning, and operation for
the families of PAC Modicon M340, M580, Momentum, Premium, and Quantum.

• EcoStruxure Control Expert fully complies with IEC programming standards


61131-3 to ensure portability between program designs
• EcoStruxure Control Expert provides unparalleled productivity for designing, operating, and maintaining
PAC applications
• Offers freedom to choose the best solution for your application and the benefit of
total portability between EcoStruxure Control Expert controllers
• EcoStruxure Control Expert takes the standards established by the PL7 and Concept software and
open the door to a full range of new features for greater productivity and openness to
other software solutions.
Using converters included in EcoStruxure Control Expert, PL7, ProWORX and
Concept
The IEC 61131-3 standards and applications are automatically converted.
investment in software is optimized and training costs are reduced.

Tip:

Support for Modicon M580 and Momentum was added in UnityPro version 8.0.
The support for BME NOC was added in UnityPro version 8.1
IPsec support, CCOTF event storage for local racks and timestamping of variables
internal was added in version 10.0

14

Internal
Supported drivers
Modicon M340
The Modicon M340 is a mid-range controller for industrial processes and infrastructure, which
enables performance with simplicity and integrated features.

With its compact shape, the M340 offers flexibility and services in a small box.
high-end controller. At the heart of the application, it provides easy integration with other devices
from Schneider Electric.

Applications

• Complex machines (Packaging, textile, material handling, cranes)


• Manufacturing
• Infrastructure

All-in-one CPU

• 7K inst/ms
• Multitasking system for guaranteed response time
• USB port for programming and HMI
• 2 additional ports as required: Ethernet, CANopen, Modbus

Memory foam

• Programming code up to 70 Kinst


• Application backup on included memory card
• Additional file storage of up to 128 MB with FTP access

Specific applications

• Integrated RTU solution for Water, O&G, Energy, and Infrastructure


• Process control (Integrated Process Control Library)
• High density of I/O modules to reduce system dimensions
• PTO counting module
And more ...

• No batteries required
• Extended temperature (-25°C to 70°C)
• Intellectual property protection of SI and OEMs using SD Card technology

15

Internal
Modicon M580 and M580 Safety
The ePAC Modicon M580 (Ethernet Programmable Automation Controller) is the first controller
based on Ethernet technology and is the significantly improved version of the already present and known in
the PAC Modicon M340 market

The Modicon M580 combines existing controller functions with innovative technologies to
deliver Schneider Electric's first completely Ethernet-based PAC, and offers:

• Native Ethernet Capabilities


• High performance
• Redundant processors, power supplies, and networks
• Enhanced cybersecurity
• Redundant Safety processors, Safety power supplies and safety I/Os
• Greater flexibility in design and greater agility for operations
• Simple modernization solutions

Ideal for medium to large process application:

• Water and Treatment Plants: WWTP, Pumping, Desalination…


• Alimentos y Bebidas: Alimentos líquidos, Lácteos, Alimentos de mascotas---
• Mining, Minerals and Metals: Mine water treatment, Cement, Conveyors...
• Hydroelectric plants: small / medium / large
• O&G: Midstream
• Transport: Metro, Tunnels, Airports...
• OEM processes: Material handling, turbo machinery...
• Safety Applications for Machines and Processes.

16

Internal
Modicon Premium
The Modicon Premium is a modular controller primarily used for specialized functions and
high-speed manufacturing processes. Premium offers unmatched performance, reducing the
cycle times and avoiding the need for optimization, thanks to the integration of more diagnostics.

• High-level multitasking system


• A compact system (very high density modules) particularly available for
extended architectures (distribution of 16 racks in real time without a repeater)
• An extensive catalog of specific application modules: safety, reflex processing,
counting, position control, movement, weighing, data storage
• Numerous ports included: USB, Ethernet TCP/IP with Web server, CANopen or master FIP,
Modbus serial
• The offer with the widest connectivity in the market: AS-Interface, Modbus Plus, Interbus or
Profibus DP

Applications

• Complex and special machines


• Manufacturing Processes and Infrastructure

Modicon Quantum
The Modicon Quantum range is designed for a high number of I/Os and complex control of
processes with optional Hot-Standby operation to provide reliability in the processes.

• High-level multitasking system


• Memory capacity of up to 7 MB using PCMIA extensions
• Especially for process control applications with conformal coating modules,
Intrinsically safe I/Os and an extensive catalog of partner modules
• Security processors and I/Os
• High-performance Plug & Play solutions

Applications

• Process Control and Safety


• Infrastructure

Modicon Momentum
The Modicon Momentum family is a simple controller that helps increase capacity and
efficiency of old Modicon applications.

This controller can replace an old Modicon controller with minimal wiring work.
programming or can serve as a standalone controller in a distributed network as in a
application of a conveyor or a remote RTU.

The functions of the common core of the new Modicon Momentum Unity family are:

• CPU Spear @333 MHz


• Mini USB 12 Mb/s

17

Internal
• Embedded real-time clock
• Distributed I/O for 32 slaves
• Improved LEDs
There are 3 different CPUs. The most widespread is the Unity M1E Global Data CPU.

The main functions of this CPU are:

• Functions of the common core plus:


• 10/100 Ethernet Auto Sense, Auto Cross
• I/O Scanner Ethernet, 32 Devices
• Ethernet Global Data 64 Variables, 128 words Pub/Suv, 2048 words in total
• Web Designer embedded via USB/Ethernet
• Improved front LED panel for Run, Err IO, MB1, Eth Link/Status/Act

18

Internal
Bus Architectures
For Unity class hardware, a number of communication systems are supported. The following diagram
illustrates the correlation between the families of controllers and the possible communication systems.

Modicon Modicon Modicon Modicon


M340 M580 Premium Quantum

Ethernet I/O Ethernet I/O Ethernet I/O Ethernet I/O


scanning scanning scanning scanning

CANopen CANopen CANopen

AS-i AS-i AS-i AS-i

Profibus* Profibus* Profibus Profibus

Interbus*

Fipio

Modbus Modbus Modbus Modbus


Plus* Plus* Plus Plus

Modbus Modbus Modbus Modbus

Unitelway

Client/
Field Bus Serial
Server

= via Gateway Module

via Partner Module

19

Internal
Licensing
Easy and secure licensing system
A software license is a document that provides legality using guidelines for use and distribution.
of the software. Software licenses typically grant users the right to one or more copies.
of the software without violating copyright.

Schneider Electric has an easy and secure way to license the software. Using the software License
Manager, it is possible to activate, update, return, and repair licenses for all products. Licenses
blocked by easy-to-use nodes, such as:

• Corporate Licenses - dedicated to companies with multiple users in global locations


• Flexibility with floating licenses
• Simple licenses (1), group (3), team (10), entity (100) or corporate (unlimited)

The advantages of using Floating Licenses are:

• Ability to view and manage all licenses from an account in the Licensing Portal
of Software (SLP). It allows the user to see all active licenses, remaining activations and
who carried them out, etc.…
• Update licenses – upgrade software from one version to a more recent one
• Return licenses - send back a license of a software product to activate it in
otro Servidor de Licencias.
• Repair licenses - restore a software license for later use after this.
being damaged, for example, due to the replacement of hardware components.

License activation methods


The following are some methods for activating a floating license:

• By phone
Or if you only have a phone available and wish to speak with an operator
• Via web
If the PC with the software product to activate has internet access
• Through the web portal
If the PC with the software product to activate does not have internet access.
Requires another PC with internet access to connect to the Licensing Web Portal.
from Software, where you will receive a response XML file
• Via e-mail
or does not require the transaction to be completed immediately. This request may
take some time

How does floating licensing work?


The license activation is obtained from the Schneider Electric License Server via the web,
web portal, email or by phone. The license for use will be activated on a specific PC.

20

Internal
Floating Licenses are extremely flexible and customizable:

• The license can be activated on a Local Server, using the same mechanism as a license
Node Locked using the Floating License Manager
• Licenses are used when they are needed from various PCs connected to the corporate server.
of licenses using the License Manager
• Disassociated licenses can be taken offline, for example, for the computer of
maintenance for the selected duration. It simply behaves like a
license blocked by node.

EcoStruxure Control Expert References


The part number references of EcoStruxure Control Expert come in different sizes and
options

• The DVD is optional and is ordered separately from the license.


• {"unique_references_for_each_size":{"S":"S","L":"L","XL":"XL","XL_safety":"XL safety"}}

Part number with Safety included


Add-on with optional Safety
For schools and educational uses
For System Integrators
• A digital copy of the EcoStruxure Control Expert .iso file is available for
download from the Schneider Electric website.

How to register the software?


The behavior of unactivated software products depends on the type of product and the
version. Registration is optional but recommended. Authorization is mandatory to activate the license.
(Activation ID) so that the software can run on the selected PC.

The registered software will have an account in the Licensing Portal (SLP) where the user
you can benefit from viewing all your current licenses, remaining activations, active licenses and
many other functions. Having the ability to increase the number of authorized transfers of
licenses between PCs or to repair them.

• Start the Schneider Electric License Manager from Windows:


Start -> Programs -> Schneider Electric -> License Manager
• After starting the License Manager, the following dialog box is displayed:

• Enter the Activation ID by clicking the "Activate" button

21

Internal
Standard programming languages
Standard IEC Languages
EcoStruxure Control Expert incluye, como estándar, 5 lenguajes IEC (International Electrotechnical
Commission) that comply with the IEC 61131-3 standard. Depending on the requirements, the
the application can use any mix of these different languages.

• Ladder diagram (LD)


• Function Block Diagram (FBD)
• Structured Text (ST)
• Sequential Function Chart (SFC)
• List of Instructions (IL)

Tip:

EcoStruxure Control Expert also includes support for LL984 language. This allows for the editing of
LL984 logics and it is one of the modernization tools available that enable customers to
migrate from old platforms to more modern controllers.

Effective Supervision of the Plant


With its programs, variables, application-specific modules, and diagnostics, EcoStruxure Control
Expert includes all the tools that users need to have an effective view of the
execution of an application.

EcoStruxure Control Expert supports:

• Animation of language editors: links in Ladder Diagrams or FBD language, variables,


minimum and maximum times for SFCs
• View the values of a variable via tooltips
• Automatic creation of animation tables
• Synchronization of animations in a given program line
• Operator screens: for easy adjustment of the application using graphic objects
• Application status screens for communication, motion control, etc.

EcoStruxure Control Expert Functions


EcoStruxure Control Expert has the following functions:

• Data not located independent of physical memory


• User-defined data types - arrays and structures
• User-defined function blocks written in languages compliant with IEC
• The ability to program independently of the physical direction of the modules
• Multitasking

22

Internal
Use of EcoStruxure Control Expert
With EcoStruxure Control Expert, it is possible:

• Reuse and share all or part of an application using the import/export function.
what includes an assistant to name and relocate sections of programs and variables
• Optimize memory usage by changing the settings for data distribution and
programs
• Determine through simple graphs the amount of data and program memory used by
an application
• Determine the energy usage by the hardware configured in each rack, again with
simple graphs to read
• Develop animated runtime graphics for maintenance operators, without the need for
program. These fully integrated HMI screens reduce downtime.
• Embedded hyperlinks in user comments provide direct access to the tools and
documents required by the maintenance technician.
• The implementation of I/Os Réflex (Special smart coprocessor modules) when
they require response times of less than one millisecond.

Forget about hardware while you develop


Create generic program modules regardless of hardware configuration:

• Use a set of generic instructions


• Module or I/O configuration is not necessary
• Use a generic data structure to map I/Os
• EcoStruxure Control Expert is a single software for five specialized platforms of
hardware.

Simulations
EcoStruxure Control Expert is capable of simulating the operation of the selected controller by
it is possible to run preliminary tests of the programs without the need to be connected to a
controller. In addition, the PLC simulator allows users to test failure conditions without
need to cause failures in the equipment.

23

Internal
EcoStruxure Control Expert Interface
Graphical User Interface
EcoStruxure Control Expert uses a graphical interface. Many of the functions of this interface allow you
They will be familiar to users who have used other Windows programs.

The Interface consists of:

1 Menus and Toolbars


All functions are accessible from the toolbars, through menus or icons.
2 Application browser
The Project Explorer provides access to all elements of EcoStruxure Control Expert.
3 Tool Windows
Catalog of Hardware available to configure the current project
4 Workspace
Configuration, program editor, etc.
5 Results window
Provides information about the status or results of an operation
6 Status Bar
Provides information related to the operation of the PAC and the software

24

Internal
How to start EcoStruxure Control Expert
Select the EcoStruxure Control Expert item from the Windows start menu:

Home >> Programs >> Schneider Electric >> EcoStruxure Control Expert

Methods of using the interface


Many actions have more than one way to be performed. For example, a typical action
it can be done

• Clicking on a tool in the toolbar


• Selecting an item from the main menu
• Using a keyboard command
• Right-clicking inside a window and selecting an item from the context menu

25

Internal
Exercise - Examine the user interface
Expected results
By the end of this exercise, you will be able to:

• Open existing demo projects of EcoStruxure Control Expert.


• Navigate through the components of a project with ease
• Feeling familiar with the toolbars of EcoStruxure Control Expert
1. Open EcoStruxure Control Expert
a. From the Windows start menu, launch the EcoStruxure Control Expert program

b. When installing EcoStruxure Control Expert, three example projects are installed. These
they can be found by clicking the Open button and navigating to the location
next (this is the default location for installations in Microsoft
Windows
C:\Users\Public\Public Documents\Schneider Electric\ EcoStruxure Control Expert

c. Select the file. Click on open.

26

Internal
2. Navigate the project tree
a. Open the three sections by clicking on the (+) symbol. Navigate to Variables and
FB instances

b. Double click on the item Basic variables. This opens the Data Editor that displays
all the variables defined in this project

27

Internal
3. Examine the objects in the example project
a. Expand the operator screens block
[Link] a sample operator screen:

[Link] barras de herramientas son sensibles al contexto. Cuando la Pantalla de Operador es


the selected window, the toolbar below the main bar changes to
editor IOS Editor

[Link] the Project Browser and the toolbar will change back to the bar
navigation original

28

Internal
Summary
In this chapter, the topics were addressed

• Introduction to EcoStruxure Control Expert


• Supported drivers
• Standard programming languages
• The EcoStruxure Control Expert Interface

Questions
The following questions are to check the understanding of the topics addressed in the chapter:

• What PAC models are programmed using EcoStruxure Control Expert?


o_____________
o_____________
o_____________
o_____________
o_____________
• What programming languages for controllers does EcoStruxure Control Expert support?
o_____________
o_____________
o_____________
o_____________
o_____________
o_____________
• What is the main purpose of the PLC simulator?
o______________________________________
______________________________________
______________________________________

29

Internal
Driver programming
During a period of ten to fifteen years, the programming languages for drivers became
developed independently of each other. The control applications were developed in
their own proprietary languages based on Ladder programming, C, BASIC, and many others. Given
that all these languages were different, the people who needed to use them had to have
a long time to learn each one.

During the early 1990s, the International Electrotechnical Commission (IEC) developed a standard for
all controllers called IEC 61131. In 1993, IEC 61131-3 (part 3) was developed. This part of the
standard has to do with programming languages for drivers.

EcoStruxure Control Expert is capable of using the five standard IEC languages. These are Diagram of
función secuencialy cuatro leguajes interoperables:Lista de instrucciones (IL), Diagrama de Escalera
(LD), Function Block Diagram (FBD) and Structured Text (ST).

SFC is mainly used to control highly sequential processes, such as operations.


repetitive machinery. This specifically refers to a state machine. It can be used
also as a supervisory control mechanism.

Objectives
Al concluir este capítulo podrás:

• Identify the main components of an EcoStruxure Control Expert application


• Generate a Task within EcoStruxure Control Expert
• Explain a variable within EcoStruxure Control Expert

30

Internal
Standardized controller programming
The programming languages of IEC 61131-3
The International Electrotechnical Commission (IEC) has defined the IEC 61131 standard for controllers.
programmable devices and their peripherals.

The third part of this standard, IEC 61131-3, defines the programming languages in controllers.
programmable (PLC/PAC). Five programming languages have been defined. This means that their syntax
and semantics have been defined in such a way that each vendor uses the same languages. Once that
these languages have been learned it is possible to use a wide variety of systems based on this
standard.

The languages consist of three graphical tools and two text tools:

Graphs:

• Function Block Diagram (FBD)


• Ladder Diagram (LD)
• Sequential Function Chart (SFC)

Texto:

• List of instructions (IL)


• Structured Text (ST)

31

Internal
Exercise - See examples of programs
Expected results
By completing this exercise you will be able to:

• Navigate within the edit windows


1. View the different programming languages in EcoStruxure Control Expert
a. Restart EcoStruxure Control Expert, then reopen the used project
previously
b. Navigate to Program >> Tasks >> MAST >> Sections

32

Internal
c. Many sections with different languages will be displayed. Double-click on
Transportation_Belt. This will open the Function Block Diagram in the panel.
right.

Note:
The icon indicates that this is a Function Block Diagram. A blue mark on
An icon indicates that the code section has been modified since the last compilation.
from the project file.

d. Examine the toolbars. Note that when the FBD window is selected
the toolbar under the main bar changes to the FBD Editor

33

Internal
e. Open the Ladder Diagram Start_process:

Observa que la barra de herramientas cambia alEditor de LD

f. Open and observe the rest of the example Sections to see written examples using
other languages
g. Close this instance of EcoStruxure Control Expert

34

Internal
Creation of new projects
Overview of the project for the workshop
In this course, a project will be created for a PAC. This will be a pasteurization project.
They will program various sections of the project using a variety of programming languages.
IEC 61131 controllers. This will assist students in becoming familiar with the languages.
EcoStruxure Control Expert supports 5 different languages and all can be used within the same one.
project if desired.

A section may be easier to program in one language than another due to the actions.
involved in that section.

This course will develop elements that are part of a pasteurization plant - a diagram of
this plant is observed below.

Upon completing this course, the graphical version of this project will be imported from Citect SCADA to do
a monitoring and control application.

35

Internal
First step in the setup
The first step to setting up EcoStruxure Control Expert is to create a new project. The project is
where all the information is stored

A project must be based on a PLC/PAC and cannot be saved until it has been defined or selected.
a controller. In any case, it is possible to switch to a different controller at a later stage.
advanced.

How to create a new project


Click on the button New project

or else

Select File >> New... from the main menu

Then select a PLC from the New Project list.

36

Internal
Exercise - Create a new project
Expected results
After completing this exercise you will be able to:

• Create a new project


• Specify the correct hardware platform
• Save the new project
Create a new project
a. Open EcoStruxure Control Expert
b. Click on New Project
c. In the New Project window, expand the list of available PLCs by clicking on
the (+) sign next to Modicon M580:

d. Select elBME P58 4040


It is mandatory to select a backplane/rack in which the selected CPU will be located.
select BME XBP 0800, then click OK:

37

Internal
2. Create a new project (cont.)
a. When the new project opens, it is displayed in the Explorer panel.
Projects

[Link] the project


a. Select File>>Save As... from the menu
b. The Save As dialog usually opens in the local Documents directory.
Create the folder called EcoStruxure Control Expert Projects and save the project
as [Link]

Click on Save

38

Internal
Language editors
Common tools
The editors for each of the five languages provide a number of common tools used
to write, read, and analyze programs in a user-friendly way

The graphic editors for Ladder Diagram (LD), Function Block Diagram (FBD), and the
Sequential Function Chart (SFC) has the following common elements:

• Palette
• Context menu
• Comentarios
• Data input functions
• Standard editing functions
• Bookmarks

Palette
A palette of graphic elements for direct access to various graphic symbols of the language through the
mouse or keyboard.

Context menu
A pop-up contextual menu that can be accessed with a right-click

39

Internal
Unlimited amount and extent of comments
EcoStruxure Control Expert provides an unlimited amount and length of comments. These comments
They can be positioned as text objects in any cell (graphic languages) or at any point
of the expressions (text languages).

Show/Hide
Add comments comments

In graphical language interfaces, comments are always positioned at the back behind everything.
the active objects of the page.

Data input functions


Assisted data entry to access all function libraries, the Variables editor or the
text object used to enter comments.

Standard editing functions


EcoStruxure Control Expert supports standard Microsoft editing functions, such as Cut,
Copy, Paste and Move.

Bookmarks
Placing bookmarks on lines of text or in the margin allows users to easily locate these lines.
in important sections of the program

40

Internal
Tasks
Types of tasks
The first operation that needs to be carried out to create an application program is to define the Tasks.
There are four types of tasks:

• Master
• Fast
• Auxiliary
• I/O and Timer Events

Master
The Master task, usually abbreviated as MAST, is the main controller code for example of the
Training [Link]. This type of task is defined in the project by default under the section
Program.

The sections of the Master task can be programmed in Sequential Function Charts (SFC).
Each of the sections and subroutines that compose it can be programmed in LD, FBD, ST, or IL.

41

Internal
Fast
The Fast task has a higher priority than the Master task. The Fast task interrupts the Master task.
and is used for situations of criticism in time or events, for example, alarms that require
very quick responses.

While the Fast task is running, the execution of the Master task (of lower priority) is suspended.
Once the Fast task is completed, the MAST task continues at the exact point where it was.
interrupted.

Each of the sections and subroutines of the Fast task can be programmed in IL, ST, LD, or FBD.

Auxiliary
Auxiliary tasks are of low priority, such as measurements, process control, diagnostics and
HMI operations. For example, checking the values of a variable that typically changes slowly.
perhaps the water level in a tank.

Auxiliary tasks are only available with the highest Premium and Quantum drivers.
specification. Periodic auxiliary tasks have the lowest priority level and are executed when
The high-priority periodic tasks (Master and Fast) have completed their cycle. Each of the sections and
Subroutines that make up an AUX task can be programmed in IL, ST, LD, or FBD.

I/O Events and Timers


Event processing is used to reduce the application's response time to
eventos:

• Coming from input/output modules and


• The event timers

These processing tasks are executed with priority over all other tasks. They are therefore
prepared for processing tasks that require a very brief response time in relation
with the event

The number of event processing tasks that can be scheduled depends on the time of
processor.

Events can be programmed either in LD, FBD, IL, or ST language. There are two types of events:

• I/O Events
• Timer Events

42

Internal
Sections
Program Organization
IEC 61131-3 defines programs, function blocks, and functions as Organizational Units
Program (PUs). The functions of a PU enable a wide modularization of user programs.
and reuse of already implemented and tested software modules. At least the declaration of the
an interface is required to allow program modules to access a PU. After its
declaration, a PU is available for all other PUs.

Task > Program > Function Block > Function

A PAC/PLC project contains PUs that can be sent by the PAC/PLC manufacturer or created.
by the user. User programs can be used to generate tested PU libraries that
They can be used later in new projects. IEC 61131-1 supports this aspect of reuse.
the software stipulating that functions and function blocks must remain 'universal' i.e.
Hardware independent, as much as possible

Autonomous Entities
Tasks are subdivided into Program Units (PU), and each PU contains multiple Sections. The Sections
they are autonomous programming entities, for example, the code block to control a pump
puede ser escrito en una sola sección.

Similarly, all the plant objects (such as valves, the clarifier, and the homogenizer)
they can have written sections to control their functionality. Alternatively, a section
it can contain the control programming for more than one object.

Each section can only have one type of IEC 61131-3 language. However, within the same
it is possible to use more than one language

43

Internal
Subroutines
Subroutines are created as separate units in sections. Subroutines are called from
the sections or from other subroutines

• It is possible to program a maximum of 64 subroutines.


• It is possible to nest subroutines to a maximum of 8 levels.
• A subroutine can call itself (be recursive)

The following programming languages are supported

• Function block diagram


• Ladder diagram
• List of instructions
• Structured text

Subroutine calls are made in sections or from another subroutine. Each subroutine is
linked to a task. It cannot be called from sections or subroutines of another task.

44

Internal
Exercise - Create a section
Expected results
After completing this exercise you will be able to

• Create a new program section using a selected language.


1. Create a section to add the program to calculate the average of four levels.
tanks
a. View the [Link] project in the Project Explorer in the structural view
b. Open the section Program > Tasks > MAST > Logic

c. Right-click on Logic and select New Section... from the menu.

d. This will open the New dialog. Write FBD_Average in the Name field

45

Internal
e. Click on the language selector: select FBD from the list of available languages
Click OK
g. An editing window will open in the right panel. The left panel
it will deploy a new object called FBD_Average
h. To safeguard the project

Note:
The programming language icon is displayed both in the object tree and in the box.
from the programming window menu.

Elementary functions
Included functions
EcoStruxure Control Expert comes with over 900 included functions. These are:

• Elementary functions
• Elementary function blocks

Functions are organized within different libraries depending on the type of use. The
Elementary Functions (EF) are the simplest functions. They are defined as those that do not have
internal states. Internal states are the values within the function that will affect the outcome.
its output. If the input values are the same, the output value must be equal for all the
executions of the function.

See also:

Internal states will be discussed in the topic Elemental Function Blocks

An EF is graphically represented as a box with multiple input pins and one output pin.
the name of an EF (that is, the type of EF) is displayed in the center of the box.

The execution order for the EF is shown to the right of the EF type. The function counter is
shows at the top of the box. This is the sequential number of the EF within the current section
(based on the order in which it was added to the section). Function counters cannot be
modified or influence the current execution order

46

Internal
AND function
The output of the function AND is True when all inputs are True. That is, if
any of the inputs False, the output will be False. The simplest AND function has only two
tickets

OR function
The output of a function is True when any of its inputs is True. The function
OR more simple has only two inputs.

More elementary functions


EcoStruxure Control Expert has hundreds of Basic Functions, for example, ABS(absolute value),
ADD-TIME(sumar dos o más tiempos),EQ(igual a),TAN(tangente en radianes).

See also:

For more information about Elementary Functions, see EcoStruxure Control Expert help topic
EF/EFB/EFB Libraries.

47

Internal
Exercise - Use a function block
Expected results
After completing this exercise you will be able to:

• Use elementary functions within a program.


1. Create a function block diagram to calculate the average tank level.
a. Right-click inside the editing window and select FFB Input Assistant from the menu
contextual:

Another alternative is to select the FFBInput Assistant button. of the Bar


FBD edition:

48

Internal
The Function Entry Assistant is displayed:

[Link] writes the FFB type field


EcoStruxure Control Expert will search for the ADD function and display the
results in the Prototype panel. This shows the functions of the Function Block
selected.

Click on OK
e. Observe that the course has changed and is preparing to place the new function block
dentro de la ventana de edición
Click once and the new Function Block will be placed inside the window.
The new function block has only two input pins (IN1 and IN2).
There are four tanks, the function block must be modified.

49

Internal
Click once to select the function block. Marks will appear around it.
Slide the cursor over the bottom mark to expand the function block when the
the cursor changes to a double-headed arrow.
h. Slide the marker and show two new entries

i. Use the FFB Input Assistant to add a DIV function block

Tip:

Use the FFB Input Assistant button to open this tool

Place the blockDIV in the editing window.

[Link] the project.

50

Internal
Variables
Variables exist in most, if not all, programming languages. A variable is a
name used to reference a value.

In EcoStruxure Control Expert, as in most programming software, aVariableis


a symbolic name that points to a unique memory location in the controller, which contains
information, typically a value.

Within EcoStruxure Control Expert, there are two main types of variables:

• Localized Variables
• Unlocalized variables

Localized variables
A localized variable is defined by a 'symbolic name' (32 characters), mapped to an address.

This address can be a bit of memory or a word in the PAC's RAM or a topological address.
that has been assigned to an I/O module

Address Type Description


%M17 Memory Bit Flat address for a discreet exit
%Q1.3.5 Topological direction Discrete output in Rack 1, Slot 3, Point 5
%MW5.1 Word of memory Discrete output in Rack 1, Slot 3, Point 5
%QW1.5.2 Topological direction Analog output in Rack 1, Slot 3, Point 5

A data type must also be assigned to the variable. The data type will determine what type of data
can be stored in each memory location and the amount of RAM required to store
the data.

Common data types


BOOL Digital value not connected to the RAM. It can be modified, but not forced.
EBOOL I/O Digital or internal RAM that can be forced
INT Numeric data from -32,768 to +32,768. Data type of analog modules
UINT Numeric from 0 to +65,535
REAL IEEE 32 Bit floating point from 8.43e-37 to 3.36e+38
WORD 16# Binary value of 16 bits represented in EcoStruxure Control Expert in format
hexadecimal
TIME T# 32-bit format, maximum 49 days, 17 hours, 2 minutes, 47 seconds, 200 ms

A comment is optional, but it is recommended to add it for more detail to the project.

51

Internal
Localized variables (cont.)
Some variables are named after the action they initiate. Other variables represent the state of a
device. For example:

Action Variables State Variables


Start_Pump Running_Bomb
Bomb_Run BypassValve_Open
ValveBypass_Open TempTube_OK
Bomb_ParoE Stirrer_Available
Unlocalized variables
An unlocalized variable shares the same characteristics as localized variables, with a
major exception, this is NOT associated with a physical memory location, instead the PAC is
responsible for managing the location of the variable internally

If the data is required externally by a PAC application (i.e. from a SCADA system),
can be read using the symbolic name to refer together with the Data Dictionary and
OFS (OPC Factory Server)

Variable Naming Conventions


It is a good programming practice to have a naming convention for variables. These
exercises use a simplified system during this course. The names will contain only the
device and the action or the device and the state.

See also:

For more information on Naming conventions see Structured Variable Names

52

Internal
Data I/O Types
The I/O data type is the term used for the addressing scheme within EcoStruxure.
Control Expert. There are two types of I/O data types.

• Topological Addressing and IODDT structures


• Device Structures DDT

The I/O data types supported in EcoStruxure Control Expert depend on the controller family.
and from the location of the team, here are some examples:

I/O equipment location Family Topological addressing Device Structures


and IODDT Structures DDT

Local Rack Modicon M580 X X

Modicon M340 X -

Quantum - X

Remote team (RIO Modicon M580 - X


Scanner
Quantum X -

Distributed Team (DIO Schneider Electric or - X


Scanner third parties

Device Data Types (DDT)


When using a CPU M580, a Device DDT (derived data type) is added to the application, which
it can be used to obtain information about the CPU easily, including the services
in execution, diagnostics, and the status of the Embedded Ethernet ports.

The default name is BMEP58_ECPU and the type is T_BMEP58_ECPU:

53

Internal
Exercise–Variables
Expected results
By the end of this exercise, you will be able to

• Declare and assign variables within a project


1. Create Variables and assign them to the FFBs
a. Hover the cursor over the input pin IN1 in the ADD block and double click.
A data input field will appear next to IN1. Write the name of the variable.
FBD_Level1 in the field and click the Tic button .

Since the variable FBD-level1 is not defined, EcoStruxure Control Expert marks it with
a red line
In addition, the dialog 'Create variable?' appears automatically. The Type is selected by
default as DINT(Double Integer) which is one of the possible allowed data types
for this function block. Change the data type to REAL
i.e. Click on the Tic button.

Now the variable FBD_Level1 has been created and defined, so that the instructions of
Warning disappears. The design window should look similar to this:

54

Internal
f. Repeat the following steps for the next three entries, using FBD_Nivel1.
FBD_Level2, FBD_Level3, FBD_Level4.

[Link] a variable called FBD_Average in the ponOUT(Output) of the block of


DIVfunction

The section FBD_Average should look similar to the above.


Save the project.

55

Internal
Exercise - linking functions
Expected results
After completing this exercise you will be able to

• Complete the logical design of a program


1. Connect the function blocks ADD and DIV
In the logical design, the Output pin OUT of the function AD is one of the Inputs IN1 of the
[Link]. It is necessary to add a link between these two elements

a. Click on the link tool in the toolbar and then in the


pinOUT of the ADD function

b. Drag the mouse and click on the pinIN1 of the DIV function

2. Complete the function block diagram


To complete the function block diagram, a constant is required at the pin IN2 of the
[Link] is to reflect the number of storage tanks in the plant that is
the required number to divide the sum of levels to obtain an average.
a. Double click on pinIN2 and assign a 4

b. Click on the Tic buttonto confirm the allocation


c. The complete section should look similar to the following:

[Link] the project

56

Internal
Summary
This chapter covered the following topics:

• Standardized Driver Programming


• Creation of New Projects
• Language Editors
• Tasks
• Sections
• Elementary functions
• Variables

Questions
Las siguientes preguntas te ayudarán a verificar la comprensión de los temas cubiertos en este capítulo:

• What is IEC 61131-3?


• What programming languages are text-based and which ones are graphical?
• What are the common tools used in all graphic editors?
• What are bookmarks?
• What are the types of Tasks?
• What are Sections?
• What are elementary functions?

57

Internal
Test a project
EcoStruxure Control Expert provides tools to check the project for errors and for
{"text":"test the project in simulation. The first step to testing a project is to analyze for"}
syntax errors. Any detected error will be displayed in the information window below the
screen. The second step is to simulate the project using the simulator included in the installation

Objectives
Upon completing this chapter you will be able to

• Complete the process of Analyzing and Generating


• Use the PLC simulator
• Show the use of animation tables

Analyze and Generate a project


Analysis
The analysis is the first step in the process of generating. The analysis allows for the detection of errors generated in
the application. During the analysis phase, the following errors are detected

• Syntactic errors
• Semantic errors
• Missing program parts

If a section is selected, (the section is the active window), there is the option to analyze exclusively.
that section (Analyze Ctrl+Shift+B). This can save a lot of time on large projects that
They can have hundreds of sections.

If no section is selected, only the Analyze Project item will be available in the menu.

How to analyze a project


Select Build > Analyze Project from the main menu

Exit window
All errors and warnings are displayed in the output window located at the bottom of the
EcoStruxure Control Expert window

Errors that require manual correction are displayed in red text. This message shows the
ubicación del error entre llaves, y el contexto del error después de los dos puntos. Los usuarios pueden
double-click the error to gain direct access to the part of the program that needs to be corrected.

58

Internal
Generate a project
After the analysis has been completed, the next step is to generate the project. When using the
regenerate the entire project, EcoStruxure Control Expert checks the related limitations
with the project. If the limitations related to the data of the configured devices and the
bus parameters are not met, the scanning table is not completed.

In this case, a message is displayed in the output window

The complete setup remains invalid until the issue is corrected by the user. A
Invalid configuration cannot be transferred to a PAC.

How to generate a project


Select Build > Rebuild All Project from the main menu

Exercise - Analyze and generate a project


Expected results
Upon completing this exercise you will be able to:

• Analyze and generate a project


1. Analyze the project [Link]
a. Select Build > Analyze Project from the main menu

The Exit Window confirms that there are no analysis errors


2. Generate the project [Link]
[Link] Build > Rebuild All Project from the main menu

The Exit Window confirms that there are no errors in the construction
b. The indicator in the status bar changes from NOT BUILT to BUILT

->
c. Save the project

59

Internal
Software Simulator
EcoStruxure Control Expert Simulator
The PLC simulator included in EcoStruxure Control Expert enables the use of a PC terminal for
test the application program for Modicon M340, M580, Momentum, Premium and Quantum without
connect to the real processor

Bug correction functions are available for Master, Fast, and Auxiliary tasks.

As the simulator does not manage the controller's I/Os, it is possible to use Animation Tables for
simulate the state of the inputs by forcing them to 1 or 0. The simulator can connect to applications
from third parties through an OPC server with OFS (OPC Factory Server) or with EcoStruxure Control Expert

How to start simulation mode


To start simulation mode

Select PLC > Simulation Mode from the main menu

Or click on the simulation mode button in the toolbar.

How to connect to the simulator


Select PLC > Connect from the main menu

Or click on the Connect button in the toolbar

The PLC simulator will start and will be visible through the icon. in the notifications area of the Bar
from Windows tools. The next step is to download the application to the Simulator.

60

Internal
Exercise - PLC Simulator
Expected results
After completing this exercise you will be able to:

• Connect to the EcoStruxure Control Expert simulator


1. Connect to the PLC simulator
a. Click on Simulation Mode in the main toolbar
[Link] the application. This is necessary since the connection mode has changed-

c. Click on the Connect button


in the main toolbar. The toolbar of
state deployS DIFFERENT
This means that the program is different from the one present in the simulated driver and
This is because (at this stage) there is no program in the controller.
simulated.
2. Transfer and execute the project
[Link] PLC > Transfer project to the PLC from the main menu.

b. Check the PLC Run after Transfer option

[Link] on Transfer

61

Internal
When we select the option to run the project, a dialog will be displayed.
confirmation. Click OK

The status bar will show the status of EQUAL indicating that the programs in the
the computer and the controller are the same. The status bar will also show that the
the program is running.

e. Return to the function block diagram. By default, the animation is active.


Note that the variables are shown in yellow and their values are displayed.
current

62

Internal
Animation
Run mode (execution)
When the controller is in RUN mode, the following items can be seen at the same time.

• The animation of a section of the program, regardless of the language in which it is written

• The Animation Table that contains the application variables can be created directly.
from the view section.

Tip:

Pressing CTRL + T will initialize an animation table based on the selected variables within.
of a viewed section.

63

Internal
Animation Tables
Online tool
An animation table is an online tool used to determine the value of a variable.
They also have the ability to force and modify changes in variables and are therefore a
very useful tool for testing and eliminating errors in projects

Test the logic of a program


In a simulation environment, the only way to test a program's logic is by testing its inputs.
whether through an animation table or through an operator screen. When the simulator
all its variables start with zero by default.

Cuando unaSalidaes cambiada conModificación,el cambio es temporal. Durante el siguiente ciclo del
PLC, the controller will modify the variable.

When an entry is changed with modification, the change remains [?] until it is changed.
by the user.

The current value of an entry can be forced to a specific value. This will be studied in depth.
in chapter 13

Working with animation tables


Rows can be dragged up or down or rearranged as desired. In addition to the
data animation is possible:

• Modify and force bits of variables from 0 to 1


• Change the display format
• Copy or move variables
• Search for cross-references
• Deploy a list of forced bits
• Add extra variables to an animation table

64

Internal
Exercise - Create an Animation Table
Expected results
After completing this exercise, you will be able to:

• Crear una tabla de animación dentro de una aplicación.


Create an animation table
a. Select both functions in the task by clicking on the ADD function, keep
press the CTRL key, click on the DIV function

[Link] clic derecho en una de las funciones seleccionadas y elegirInicializar nueva


context menu animation table

c. Examine the Project Explorer. The Animation Table has been added to the tree.

Note:
The animation tables can be saved as part of the application.

65

Internal
Exercise - Working with animation tables
Resultados esperados
By completing this exercise you will be able to:

• Modify values through Animation Tables


1. Modify the value of a variable using an Animation Table
[Link] all open windows except the section FBD_Average and the table of
Animation that was created recently.
[Link] the horizontal alignment button to fix these two windows
as shown below

Select the Modification button in the table to allow the variables to be


modified through it. The variables will appear in bold as in the image
anterior
Select the variable FBD_Nivel1. Change the value by writing the new value in the
corresponding column and pressing the Enter key

66

Internal
[Link] with the other variables to verify that the section works
correctly. Observe the effect on theSalidadeDIV

Click the Disconnect button to disconnect from the simulator


[Link] the project.

67

Internal
Summary
This chapter addressed the following topics

• Analyze and generate a project


• Software simulator
• Animation
• Animation tables

Questions
The following questions will help verify the understanding of the topics covered in this chapter.

• What kind of errors are detected when analyzing a project?


• What is displayed in the Output window?
• How do you start Simulation mode?
• What is the purpose of Animation Tables?

68

Internal
Project Management
EcoStruxure Control Expert allows the user to perform fundamental tasks such as creating, exporting, and
import projects. There are also other project management tools like archiving that creates
a highly compressed version of the project.

Objectives
At the end of this chapter you will be able to:

• Show how to export and import projects from EcoStruxure Control Expert
• Completar el proceso de Archivar Proyecto
• Investigate the Project Explorer interface

Project File Types


File types
EcoStruxure Control Expert uses multiple file types to store the applications and
user projects. Each type of file can be used according to specific requirements.

File types can be identified by their extension.

• EcoStruxure Control Expert Document


• STA: EcoStruxure Control Expert Application Document archived
• .XEF: EcoStruxure Control Expert Application Document for exchange.
• ZEF: Complete EcoStruxure Control Expert Application Document for exchange.

Documents .STU
The STU documents are the standard document types used for an application document.
the EcoStruxure Control Expert project. The project can be saved at any stage
(Built) through the Save command. The saving and opening of the project is
quick since the internal database is stored in the document.

The [Link] is compressed and can become very large and therefore not convenient for
transfer it from PC to PC, the recommendation for that is to use a [Link]. the [Link] NO
It is compatible when updating EcoStruxure Control Expert from one version to another.

Documents .STA
The document type .STA is used to archive projects and can only be created after
The project has been built. This type of document allows for later compatibility between different
versions of EcoStruxure Control Expert.

There are two ways to create a [Link]:

• Manually, access File > Save Archive in the main window of EcoStruxure Control.
Expert or
• Automatically every time the project is saved as .STU it is in state
built.

This type of document uses compression, allowing applications to be easily shared.


via email.

69

Internal
Documents .XEF
The .XEF document is used to export projects in XML format and can be created in any
project stage.

The XML source format ensures the project's compatibility with any version of EcoStruxure.
Control Expert.

The type of [Link] supported by the Modicon M340, Momentum, Premium platforms and
Quantum

Documents .ZEF
The [Link] is very similar to the document [Link], with the addition of supporting applications or
projects that contain DTM configuration and can be created at any stage of the project.

The document type. ZEF is the only available option to export an application when using
Modicon M580 is also supported by Modicon M340.

Exported Project Components


The export function allows the export of part or all of the project to a document. The
exported information is then available for use in different projects using the function of
import.

The export function generates a document that contains unprotected data and references to data.
protected. The user must define a name for this document and its location, the extension is
determined by the type of export (for example, XDB or DFB, etc.). The most common exports
son

• List of variables (for use in Excel)


• Sections
• Complete project

Exported project components - Extensions


All export documents are ASCII files in XML format (except for the variables that
they have multiple export formats

Exported Element Extension


Configuration .xhw
Task .xpg
LD section .xld
IL Section .xil
ST section .xst
FBD Section .xbd
SFC Section .xsf

70

Internal
Export of projects
Useful for escalation
When a project based on Modicon M580 is exported, the software generates a file in format
XML with a .ZEF extension. This contains all the unprotected information: input configuration
and outputs, sections, subroutine modules, etc. The complete list is shown below.

Exporting is essential when scaling a project to new versions of EcoStruxure Control Expert. The
Project file (STU) of one version cannot be opened in a new version of EcoStruxure Control
Expert

File content
The exported file contains

• All the DDTs


• All variables (used and unused)
• All types of unprotected DFB
• The complete program: sections, subroutine modules (with execution condition),
event processing
• All functional modules
• All operator screens
• All the animation tables
• All project properties

The file optionally contains

• The input/output configuration


• The configuration of communication networks.

How to export a project


Select File > Export Project from the main menu

71

Internal
Exercise - Export a project
Expected results
By completing this exercise, you will be able to:

• Export a project from EcoStruxure Control Expert


Export the EcoStruxure Control Expert Project
a. Select File > Export Project from the main menu

[Link] the file as [Link]

72

Internal
Import projects
Scale projects
EcoStruxure Control Expert allows a .ZEF file to be opened and thus a project.
complete. This is particularly useful when wanting to upgrade to a new version of EcoStruxure
Control Expert. Before opening the imported project, EcoStruxure Control Expert allows it to be saved.
the current project before closing it

Import protected elements


Protection is an option used to prevent the contents of a program element from being
read (protected against reading) or the writing or modification of the contents of an element of
program (protected against read/write)

If the imported application contains protected sections, these are imported and their content is
encoded.

If the imported application contains protected DFB types, these are referenced in the .ZEF file but not
they are imported

Import operator screens


Operator screens are imported with the same structure as in the source project. If the
screen families do not exist, they are created automatically

How to import a project


Select File > Open from the main menu and then open the Complete Application File
EcoStruxure Control Expert (.ZEF)

73

Internal
Exercise - Import projects
Expected results
After completing this exercise you will be able to:

• Import a project from EcoStruxure Control Expert


1. Import a project from EcoStruxure Control Expert
a. Select File > Open ... from the main menu
b. In the field File type: select the ZEF type from the dropdown list

[Link] the EcoStruxure Control Expert file that was created in the exercise
previous. Click on Open

74

Internal
Archive projects
Save the compiled project
A project file is a highly compressed version of the project. The compression ratio
it can result in a file that is one-fiftieth the size of an STU file. Archiving is
similar to exporting except that it saves the completed application. The consequences of this are that the
the user cannot archive a project until it is compiled. Until this is possible, it is
necessary to export.

Properties of a File
A project file is saved with the .STA extension. The STA file contains:

• The binary program of the controller


• The information for reading, e.g. comments and animation tables
• Operator screens

How to create a file


Select File > Save file from the main menu

Note:

To archive it, the application must be in a built state. It must also include the information.
from reading (upload), in the Project Settings, this allows the application to be transferred from
controller to the PC in the future. And at a minimum include the comments. The comments are associated
with Variables and types, and also includes comments within programming sections

75

Internal
Exercise - Archive projects with EcoStruxure Control Expert
Expected results
After completing this exercise you will be able to:

• Successfully archiving a project in EcoStruxure Control Expert


Change the project settings to include the reading information (upload)
[Link] Tools > Project Settings from the main menu. Select
General > Embedded PLC data in the navigation tree. Make sure that the
Options for Comments and Animation Tables must be checked. Click OK.

b. When the dialog is displayed, click Yes

76

Internal
c. Select Generate > Regenerate all project from the main menu.
d. Select File > Save file from the main menu

e. Save the file as [Link]


f. Open Windows Explorer and compare the sizes of the two documents.
Training student stays training student student

g. Which file is larger? Why?

77

Internal
The Project Explorer
Deploy the contents of a project
The Project Explorer allows the contents of an EcoStruxure Control Expert project to be
deployment and move around its various elements. The project can be deployed in two
ways

• Structural view
• Functional view

Structural view
By default, the Project Explorer displays a tree based on the structure of the controller.

Project directory
The directory shown at the top of the tree is the name of a driver and is called
Project by default. The Project directory in the Structural view allows access to the structure of
a Project and its associated services.

How to rename the project directory


Right-click on the Project directory and select Properties from the menu. Rename it.
of the project in the changeName

78

Internal
Exercise - The project tree
Expected results
After completing this exercise you will be able to

• Rename the Project directory within EcoStruxure Control Expert


Rename the projects directory
a. Open the Project Directory and click on the Projects directory. Select
Properties of the context menu

The Project Properties dialog opens in the General window.

c. Change the project name to Pasteurizer. Click OK


d. When the settings box appears, click YES
[Link] the project

79

Internal
Functional view
The functional view is a way to display the controlled code by emulating the layout of the plant.

Functional module
Each functional module includes:

• Program sections
• Animation tables associated with the functional module
• Operation screens associated with the functional module
• Hyperlinks to documentation

How to switch between views


Click on the functional view button Structural view in the toolbar.

80

Internal
Exercise - Change of views
Expected results
Upon completing this exercise, you will be able to:

• Switch between the functional view and the Structural view within EcoStruxure Control Expert
Change to the functional view in the Project Explorer
Click on the functional view button in the toolbar
[Link] the view function is deployed, observe that the tree view is empty.
since functional elements have not been created in the project. Once the
code sections are added to the project, it is possible to introduce them into the hierarchy and
customize the functional view.

81

Internal
Summary
This chapter addressed the topics

• EcoStruxure Control Expert file types


• Export projects
• Import projects
• Archive projects
• The Project Explorer

Questions
The following questions will help verify the understanding of the topics covered in this chapter:

• How do you create a new project?


• Why is it useful to export a project instead of creating a backup?
• What are the advantages of archiving a project?
• What is the extension associated with an archived project?
• What is the Project Explorer used for?
• What is the difference between the structural view and the functional view?

82

Internal
Ladder Language
The Ladder Diagram Language is a commonly used method of programming
controllers, is based on the use of ladder diagrams. Writing a program is equivalent to drawing
a switching circuit. The ladder diagram consists of two vertical lines that represent the
power rails. The circuits are connected like horizontal lines, representing the steps,
between these two vertical lines

Ladder Diagram is the first of the three graphical languages of the IEC 61131-3 standard for
driver programming.

Objectives
Upon completing this chapter you will be able to:

• Identify a section of code programmed with Ladder Diagram


• Describe the tools and functions related to the programming window
Ladder Diagrams
• Show the use of the components that make up a programming section of a Diagram.
Ladder. Generate a Ladder Diagram section

Lenguaje de Diagramas de Escalera


Introduction
In a ladder diagram, certain conventions are adopted:

• The vertical lines of the diagram represent the power rails to which they are connected.
the circuits. The flow of energy is understood from left to right along each step
• Each step defines an operation in a control process
• A ladder diagram is read from left to right and top to bottom, the first step is read
from left to right, the second from left to right and so on
• Each step must begin with an entry or entries (contacts) and end with at least one.
output (coils)
• The structure of a Ladder Diagram section is similar to the schematic logic of
relays with the power rail on the left side of the LD editor and the neutral on the side
law. Only the LD objects linked to the power supply, or connected to the power rail,
They are "processed." In any case, all the coils and outputs of FFBs are connected to the power rail.
directly or indirectly, and this creates a flow of energy
• The energy flows from the power rail to the last object of the step, usually a coil.
• LD complies with the IEC 61131-3 standard
• A network (or line) is a group of objects linked to each other one after the other, and not
They have connections with other objects, except for the power rail.

83

Internal
Links of the Stair Diagram
There are two distinct types of links.

• Horizontal links consist of one or more segments that link boolean objects
(contacts, coils) with each other
• Vertical links - Enable switching with contacts and coils in parallel

Note:
Links should not cross each other as any line that joins will be treated as
connection, modifying the desired operation

Priorities when defining the flow of the ladder diagram


The priorities when defining the flow within a Ladder Diagram section are:

• Links: links have the highest priority in defining the flow of the signal within
a section of LD
• Step by step – the processing of a network is fully concluded before it is
start processing another network
• Output sequences - The outputs from the same function block or vertical link outputs are
they process from top to bottom
• Line by line - The execution sequence of networks, which are linked only to the rail.
left, is determined by the graphic sequence from top to bottom in which they are connected to the
power rail (only applies if none of the other rules apply)

84

Internal
Programming Window
Properties of the LD window
An LD section consists of a window that contains a single page. This page has a mesh that
divide the section into rows and columns. You can define from 11 to 64 columns and from 17 to 2000 lines in the
LD sections. The LD programming language is cell-oriented, e.g. only one object can be
placed in each cell.

LD Tool Palette
Next, you will see the main tools of the toolbox. The toolbox will appear in
the toolbar automatically when an LD programming window is open
selected.

85

Internal
Contacts of the Ladder Diagram
A contact is an LD element that transfers a state in the horizontal link to its right.
This state is the result of a boolean AND operation of the state of its horizontal link to the
left with the state of the relevant Boolean parameter of the contact. A contact does not change the value
of the parameter that it represents. Contacts occupy a cell. The following data are allowed.
as parameters:

- Boolean variables
- Boolean constants
- Boolean directions (topological or symbolic)

The expressions the Ladder Diagram that deliver a Boolean result (e.g., VarA OR VarB) like
Contact parameters are a supplement to IEC 61131-3 and must be enabled explicitly.

In the case of normally open contacts, the status of the left link is transferred to the
link on the right if the relevant boolean parameter state is ON. Otherwise, the state of the
right link is OFF

Designation Representation
Usually open
Note: the value is passed when the contact is TRUE

Normally closed
Note: the value passes when the contact is FALSE

Contact to detect positive transition

Contact to detect negative transition

86

Internal
Coils of the Ladder Diagram
A coil is an element of a Ladder Diagram that transfers the state of a horizontal link.
to its left, unchanged, to the horizontal link on its right. The state is stored in the parameter
Boolean represented.

Normally, the coils follow the contacts or FFBs, but they can also be followed by
contacts. The coils occupy one cell.

Only boolean variables or addresses (topological or symbolic addresses) are allowed.

Designation Representation
Bobbin

Denied coil

Coil for detecting positive transitions

Coil for detecting negative transitions

Set coil

Reset coil

Stop coil

Call reel for subroutine sections

87

Internal
Functions of the Ladder Editor
Adaptive column width
Users can choose from three adaptable sizes for the LD columns.

• Small
• Medium
• Big

The adaptable column width is available in the editor's toolbar menu.

Adjustable font sizes


Users can choose in the editor toolbar menu to view the full extension.
from the comments or the names of the variables. There are two buttons, shown below, for
select to increase or decrease the size of the fonts.

Copy, insert and delete columns and rows


Engineering productivity can be increased with simple functions such as

• Insert and delete columns


Select the columns and right-click on the selection in the context menu.
• Copy that insert rows
Select rows and right-click to select from the context menu

Copy and paste variables


Métodos sencillos de usar copiar y pegar variables en la ventana de edición.

• Context menu
Copy Ctrl + c and
Copy Ctrl + Shift + V

The functions described above can also be easily performed using the mouse:

• ALT + Drag & drop

88

Internal
Mnemonic LD
Programmers can use quick input functions for ladder symbols by typing a
short name. These short names are editable labels from the main menu by selecting
Tools > Options

Insert functions
Using the button inside the menu toolbar, inserting ladder symbols becomes
very simple writing your Mnemonics

89

Internal
Quick access to standard features
It is possible to access many more functions from the toolbar

• Counters and timers

• Add favorite functions to the toolbar

• Comments
o Double-clicking on a line number creates a comment on the entire line

• Show or hide comments (Available only in LD, FBD, SFC)

Customization of LD color
The user can customize their own colors for the different elements of Ladder (in
animation) from the color editing menu. Select from the main menu

• Tools > Color settings

90

Internal
Exercise - Create a new Stair section
Expected results
By the end of this exercise, you will be able to:

• Create a new section using Ladder Diagram Language


1. Create a process startup section in Ladder Logic
a. Create a new section under the MAST task using languageLD, name the section
Start Process

Click OK
A new section has been created and it should look similar to this:

91

Internal
2. Configure the contacts
a. Locate the LD Editor toolbar

Using the toolbar to insert a normally open contact in the


section

b. Insert a second normally open contact below the existing one

c. Insert a normally open thirdContact in the section

92

Internal
d. Select the Boolean connections tool and connect the contacts as
it is shown

e. Insert a second boolean connection in the third row

f. Locate and select the vertical connection tool. Add a connection.


vertical as shown

93

Internal
3. Configure the coils
a. Locate and select the winding tool from the toolbar
LD editor, and insert two coils as shown. The new coils are
they will automatically link with existing contacts

[Link] the auto link in the third row and delete it by pressing Delete on the keyboard.

Another option is to right-click on the autolink and select Cut from the menu.
context.

94

Internal
c. Complete the basic design with a vertical connection

4. Assign variables to the design


a. Double click on the first contact and assign a variable called Start_process
[Link] assignments for all objects based on the following information
Variable name Data type
Stop_process BOOL
Process_started EBOOL
Plant_operating EBOOL

Slide to the right of the editing window and observe that the coils have
automatically linked to the right rail

95

Internal
d. Generate and transfer the program to the Simulator, Execute the controller.

Test the program by changing the value of Stop_Process and Start_Process to 1,


this can be achieved either by creating an Animation Table or by right-clicking
in the variables and selectingModify value

96

Internal
The following dialog will appear granting direct access to the variable.

f. Change the value of start_process back to 0. What happens to the program? Why?
What?
g. Test the functionality of Stop_process by changing its value to 0
h. Save the project

97

Internal
Summary
This chapter addressed the following topics:

• Ladder Diagram Language


• Programming Window
• LD Contacts
• LD coils

Questions
The following questions will help verify the understanding of the topics covered in this chapter.

• What are the two vertical lines called in a Ladder Diagram?


• What is the direction of flow in a Ladder Diagram?
• What should each line of a Ladder Diagram start with?

98

Internal
Function Block Language
A Function Block Diagram is a graphical language that was designed to represent a
circuit board with several "wired" objects connected to each other. This was done with the idea that users,
generally with backgrounds related to electricity and electronics, they will feel familiar
with the symbols and expressions

Objective
Upon completing this chapter, you will be able to:

• Identify a programming section with Function Block Diagrams


• Describe the tools and functions related to a diagram programming window.
of function blocks
• Show the use of components that form a section of a functional block diagram
• Generate a function block diagram section

99

Internal
Function Block Diagram Language
Introduction
A function block diagram is a block diagram that describes a function between variables.
Input and output variables. A function is described as a game of elemental blocks. The
input and output variables are connected to the blocks through connection lines. An output
a block can also be connected to an input of another block:

The inputs and outputs of the blocks are linked together with connection lines, or links.
Simple lines can be used to connect two logical points of the diagram:

- An input variable and an input of a block


- An output from one block and an input from another block
- An output from a block and an output variable

FBD is described as a graphical language for describing data flows and signals through blocks.
(which are reusable software elements). A function block is a unit of instructions for
program that when executed returns one or more output values

100

Internal
Programming window
Properties of the FBD window
The FBD sections have a mesh behind them. Each section consists of ten units of mesh.
A mesh unit is the minimum possible space between two objects in a FBD section. A section
FBD contains 360 units of horizontal mesh (36 mesh sections) and 240 units of mesh
vertical (=24 mesh sections). The FBD programming language is not cell-oriented, but the
objects are still aligned with the mesh units.

FBD tool palette


When the FBD window is focused, the FBD tool palette is displayed under the bar.
main tools

101

Internal
Exercise
Expected results
After completing this exercise, you will be able to:

• Create a new section using the function block diagram language.


1. Create the Feed Pump Control section
a. Return to EcoStruxure Control Expert and open the project Pasteurizer. Create a
new section under task MAST, name it Control_Bombay use the FBD diagram
b. Adjust the size of the window by dragging the bottom right corner

2. Add an OR function to the diagram


a. Select the Data Selection tool in the tool palette
b. The first time the FFB Selection dialog is opened, it is displayed by default
the Function Block tab. Click on the Functions and Types tab
function. In the left panel select the option <Libset V14.1>

102

Internal
c. The right panel will display all functions and function blocks in the library
from EcoStruxure Control Expert. Write OR in the Name field. This will filter the list.
to display the functions that start with the letters OR

d. Select the OR function in the right panel and click OK


e. When the FBD selection editor closes, the cursor will change to the cursor of
add block
f. Click inside the window Control_bomba:[Mast] to locate the block of
function on the page

Note:
One of the functions of the EcoStruxure Control Expert graphical interface is that it is easy.
add many functions at the same time. The Add block cursor remains
active and clicking again will add more OR functions.
g. Return the cursor to its normal mode by pressing ESC while clicking the button of

selection mode
[Link] a variable called: Pump_Start in the pin IN1 of the OR function block.
Create and define this variable as a BOOL data type
i. Save the project

Comments
Why use comments
It is a good programming practice to include comments throughout the programming. The comments
They allow users to quickly understand how a function works the next time they or

103

Internal
another designer needs to modify it. The comments also make the diagrams more
easy to identify and make them more readable and understandable.

In EcoStruxure Control Expert, comments are light-colored rectangles with text in the corner.
top left. It is possible to change its color through the main menu: Tools > Settings of
color... comments can be placed anywhere in the section.

How to add a comment


Right-click on the background of the window and select Comments from the context menu or press F8.
on the keyboard or click on the comment button in the toolbox.

How to show/hide comments


From the EcoStruxure Control Expert toolbar, click on the button para cambiar
between showing and hiding all comments in the current editing window

104

Internal
Exercise - Comments
Expected results
After completing this exercise you will be able to

• Use comments within a section


Add a comment to the diagram
[Link] to the section Control-pump.
b. Click on the Comments button in the toolbox
c. The arrow will change to the select comments cursor. Click anywhere on
the FBD window to place the comment box
d. Write in the comment text Mumbai control press Enter

Expand and move the new comment box so that it surrounds the function.
OR. Leave additional space for the AND function that will be added later.

Edit the comment


a. Right-click on the comment box and select Properties... from the menu

[Link] the text to Bombay Control Program press Enter

[Link] the project

105

Internal
Execution sequence
The execution sequence is determined by the position of the Functions and the Function Blocks.
(FFB) within the section (executed from left to right and top to bottom). If the FFBs are linked
Graphically, the execution sequence is determined by the flow of the signal.

Note:
FFB is a collective term for EF (elementary function), EFB (elementary function block), and DFB.
(derived function block).

The execution sequence is indicated by the execution number, this is the number in the corner.
top left corner of the FFB frame

Adjustable font sizes


Los usuarios pueden seleccionar e la barra de herramientas del editor ver la extensión completa de los
comments or variable names. There are two buttons, as shown below, to
increase or decrease the font size

Add favorite functions


The user can add their favorite functions to the toolbar for quicker access.
easy for logic programming

106

Internal
Show and hide comments
The user can show and hide the comments in the current edit window by clicking on the

button to change the state of show and hide.

Color customization of FBDs


The user can select their own colors for the different elements of FBD from the menu of
color editor. Select it from the main menu

Tools > Color Selection

107

Internal
Exercise – Execution sequence
Expected results
After completing this exercise, you will be able to

• Examine the execution sequence of a Function Block Diagram


Add an AND function to the diagram
[Link] on the data deselection button. The function block deselection dialog
It will open. It will display the functions that have been previously used in the project.

[Link] <Libset V14.1> to display the available functions of the library.


Select the AND function and click OK

108

Internal
c. Click inside the FBD window to place the AND function in the diagram. The
the order of execution is from top to bottom. If the AND function is placed or moved very high up,
It will be the first to be executed, indicated by execution number 1.

Adjust the AND function so that it is to the right of the OR function or in the
same level or a little lower in the diagram

109

Internal
2. Add another variable to the project
Add the variable Bomba_Arranque to the output connection in the AND function.
Remember to create and define the variable as BOOL.

The same variable, Bomba_Arranque, is used for the output of the AND function and the
second input of the function [Link] click on IN2o in the function Or.
The variable has already been created, it can be selected from a dropdown list.

Select Pump_start from the list and click on the tic button

110

Internal
Exercise - Link the functions
Expected results
After completing this exercise, you will be able to

• Linking functions within a Function Block Diagram


In the logical design, the output of the OR function is one of the inputs of the AND function.
It is necessary to create a link between these two elements.
[Link] the functions

a. Click on the link tool in the tool palette and then do


click on the pinOUT of the functionOR.

b. Click on the pinIN1 of the AND function.

[Link] the project.

111

Internal
Exercise - Complete the FBD
Expected results
After completing this exercise you will be able to

• Deny pines within a function block diagram


Add an UNEMPLOYMENT variable
a. Add a variable of type BOOL, Bomba_Paro, to the pin IN2 of AND.

2. Fix the logic


In this case, the logic is incorrect. The pump should not run if the signal is sent to it.
stop. Therefore, the entry of Stop should be denied or reversed.

Note:

This is only true if the signal comes from an HMI or SCADA. If it comes from a physical input of a push.
button will not be reversed as the electrical code requires that the "Stop" controls are
normally closed.

a. Right-click on the entryBomba_paro


b. Select Deny from the menu

c. The small circle indicates that the input is inverted

112

Internal
d. Increase the number of block entries to 4
e. Right-click on the pinIN3 and invert it, then assign a variable called
Bomba_EParo.Create the variable as BOOL
f. Add the variable Bomba_Disponible to pin IN4. Create the variable as BOOL.
g. The complete FBD should look something like this:

Generate, Transfer, Execute and Test the application


Save the project

113

Internal
Resumen
This chapter covered the topics

• Function Block Diagram Language


• Programming window
• Comments
• Execution sequence
• Functions of the FBD Editor

Questions
The following questions will help verify the understanding of the topics covered in this chapter:

• What is the function of the function block diagram language?


• Why should comments be used?
• How do executions flow in the FBD language?

114

Internal
Function Blocks
In addition to the Basic Functions, the EcoStruxure Function Block Diagram language
Control Expert uses Elementary Function Blocks and Derived Function Blocks. In EcoStruxure
Control Expert, the abbreviation FFB (Functions and function blocks) is a generic term for
represent

• Elementary Functions (EF)


• Elementary Function Blocks (EFB)
• Derived function blocks (DFB)

Objectives
By completing this chapter you will be able to

• Explain the elementary functions


• Show the use of the Elementary Function Blocks
• Implement Fault Processing in a programming section
• Create a derived function block

Elementary Function Blocks


Internal States
The Elemental Function Blocks are similar to the Elemental Functions except that they have states.
internally, that is, even if the input pins have the same values, the value at the output pin
It can be different for each execution.

For example, a timer block has an internal counter and the output can therefore change without
need for the tickets to change.

Imagine a situation where the processor executes this timer instruction where the internal value
The timer is 7 at that moment.

5 + = 12
The next time the processor executes this instruction, the internal value of the timer may be 15.

5 + = 20
This results in a different output value for each pass even when the input value
remained identical.

115

Internal
Representation of a EFB
An EFB is graphically represented as a box with input pins and output pins. The pins of
inputs are always represented on the left and the output pins are always on the right of the frame.
EFBs can have more than one output. The name of the EFB (e.g., the type of EFB) is displayed at the center of
frame

The execution number of the EFB is shown to the right of the type of EFB within the box.

The instance name serves as a unique identifier for the block (EFB) in the project.
The instance name is created automatically and has the following structure: FBI_n

• FBI = Function Block Instance


• N = sequential number assigned when the block is added to the project.

Tip:

The numbers are not reused. For example, if FBI_1 is deleted and reintegrated, the new block will not be

116

Internal
Fault Processing and Counters
Why use fault processing?
The simple pump (previously scheduled) does not account for failure conditions. The verification
Errors can be added using the Elementary Function Block.
If the pump does not start within 15 seconds, the fault verification will prevent the program from continuing.
intentando encender la bomba

Current status of the program


This is the status of the Pump Control Program so far.

Below are the new conditions that will be added to the program.

Exception Handling
The condition will be identified as follows:

State of Exception The pump received the start command and has not started.
Failure Condition This will happen if the exception condition continues for too long.
time. It is necessary to take action if the exception condition
continues beyond the pump startup time.
This exercise will use 15 seconds as a time limit.
A manual intervention is required to restart the system.
other words, if the bomb starts running after 15
seconds, we do not want the system to simply switch to mode
We want a manual intervention (for someone to press)
Stop and then Start

Logical design
The following functions will be used to determine the failure states

Logical function Description


AND The pump must run and it doesn't run.
TON (to assess the delay) The state of exception continues for too long
RS (reset) Manual intervention

117

Internal
Exercise - Fault Processing
Resultado esperado
Upon completing this exercise, you will be able to

• Use elementary functions and elementary function blocks to add processing of


failures in the pump control program
1. Add elementary functions and blocks of elementary function to the Control program.
bomb
[Link] to the diagramControl_pump
[Link] an AND function, a TON (timer ON) function block and a block of
RSfunction(reset)

c. Expand the comment box to surround the new features


Add an extra input pin, IN5, to the original AND function

2. Add input variables, links, and negate pin


[Link] the diagram shown below as a guide to rearrange the objects
on the page.

118

Internal
b.AddBomba_running to the pin IN2 of the second block AND. This is a new
variable so it will need to be defined. Deny the pin
c.AddBomb_stop to pinR1 of blockRS.
d. Add the links between the functions as shown in the diagram
[Link] the pinIN5 of the original block since Q1 of the RS block is a
failure condition.

Note:
The execution order of the blocks has changed. The original AND is now number 5 in
the sequence. The order of execution is determined by the logical flow. Only the blocks not
linked take their number from the position in the diagram.
Add a 15-second delay to the timer
Double click on the input pin daPT (Preset Time) of the TON block.
[Link] t#15s in the field

Click on the Tic button

d. Save the project


Generate, transfer and execute the project.
f. Test the changes. As a guide, make sure that the available pump is
True. ActivaBomba_inicio, Bomba_arranque should turn to True and the
Timer (TON block) should start after 15 seconds Pump_start
I should return to False because the Bomba_Corriendo signal is False.
DeactivatePump_Start and Reset the RS block by setting FeedPump_Stop
True again as False. Repeat the testing procedure, this time
activate the signal Pump_running within 15 seconds to simulate the signal
really arriving from the plant

See also:

For more information about the time data type, see EcoStruxure Control Expert Help – the type
time

119

Internal
Derived Function Blocks (DFB)
Function blocks used as templates
In a broader view of the dairy plant, there are three identical pumps. Instead of duplicating the
program for each pump, it is possible to create a function block for the type of pump and then use it
in the programs. This is called derived function block.

Structure
The derived function blocks have an identical structure to the EFBs but are created by the
user with one or more programming languages FBD, ST, LD or IL

The Derived Function Blocks have the following functions:

• Derivatives per user and reusable


• The DFBs support nesting of multiple layers.
• The encapsulation of frequently used functionalities
• The contained code existsONLY ONCE in the controller

A type of DFB can have one or more instances. Each instance is referenced by a name.
(symbol) and has data types of DFB

The only difference in the representation of the Derived Function Block is that the framework has
double vertical lines

120

Internal
Advantages of DFBs
The advantage of DFBs is that they allow users to standardize specific functions of
Procedure to automate or standardize application devices (Pump, Valve, etc.)
offering

• Generic Processing due to the possibility of exchanging data through parameters. The
parameters can be passed by reference (pointer) or directly by value
• Activation of parameters and internal variables used during processing

More generally, the DFBs allow users

• Simplify the program design and the data inputs


• Increase the readability of the program
• Facilitate the correction of program errors
• Reduce the overall volume of the generated code

121

Internal
Exercise - Create a derived function block
Expected results
After completing this exercise you will be able to

• Create a derived function block


Plan the inputs and outputs
Examine the Control_Pump diagram and make a list of the inputs and outputs
external

Entries Start_bomb
Pump_stop
Loud explosion
Running_bomb
Pump_available

Since Bomba_Arranque is not an input from any field device, it can remain as the
only exit

Note:

For future expansion, it is a good idea to add an output for failures from pin Q1 of the block.
Reset

122

Internal
2. Create a derived function block
a. Right-click on FB derived types in the Project Explorer and
select open from the menu

b. Name the new DFB as Bomba_liquid after pressing Enter

Note that the incomplete function icon appears next to the name
c. Expand the tree to display the space for inputs, outputs, and code.

123

Internal
d. Fill in the inputs and outputs. Note that all of them are Boolean (BOOL).

Note:
As the name Bomba_liquido has already been assigned to the DFB, the inputs and outputs can be
simplified Start, Stop, etc. Instead of Liquid_pump_stop,
Liquid_start_pump,etc.
[Link] a new section in the FUNCTION BLOCK DIAGRAM
a. Right click on the sections folder in the new DFB

124

Internal
b. Name the sectionControl_pump.SelectFBDas language. Click OK

Note:
The DFBs can have multiple sections. These sections do not need to use the same
languages between each other

c. Copy and paste the logic from the original Section of Control_bomba. The names of
variables will appear underlined because they are not defined in this section

d. Rename the variables that were created in part 2 of the exercise. The
names of the Variables can be added to the links, for example, Failure

[Link] the project


[Link] the project
g. Open the Data Editor, Notice that the incomplete Function icon next to the name has
missing.

125

Internal
Exercise - Use the DFB block Liquid_Pump
Expected results
After completing this exercise you will be able to:

• Add a DFB to the program


a. Return to the MAST task section, Control_bomba
b. Clear the objects on the screen and add an instance of DFBBomba_liquido

c. Assign the same input and output variables that were used previously. It will be necessary
a new boolean called Bomba_Falla

[Link] project
Connect the simulator, transfer and execute the project.

126

Internal
Exercise - Test and detail the DFB
Expected results
After completing this exercise you will be able to:

• Test and detail a DFB


Try the new Derived Function Block
a. Right-click on the new DFB and select Initialize new animation table of
menu
b. Right-click on the FBD Editor table: control_pump: [MAST](1) in the Explorer of
Project and click on Properties. Deselect Temporary table.
c. Use an Animation table to change variable values
d. Right-click on the DFBBomba_liquido in the Control_bomba window and select
Detail. This gives you the opportunity to 'see inside' this instance of the DFB.
Liquid pump

Fix the windows in such a way that the viewing of the DFB and the animation table
can be deployed at the same time
Try the DFB Liquid Pump
Change the online program
a. Open the section Control_pump in the DFBB Pump_liquid
[Link] the timer value to 10 seconds:t#10s
A message will appear. Click OK to accept the modification.
Click on PLC > Generate > Generate changes to automatically generate.
Transfer these changes online (still connected to the PAC)
e. Test the changes
[Link] the project

127

Internal
Exercise – Renumber the Pins
Expected results
After completing this exercise you will be able to

• Renumber the pins within a DFB

When the inputs and outputs of a DFB are created, the pin numbers are positioned in a way
automatic. Sometimes it is convenient to have pins in a different order or to leave
spaces in the sequence.

Renumber the pins of the FBD


[Link] the DFBBomba_Liquido in the Data Editor
[Link] the pins to remove Pin 4

[Link] sure not to use duplicate numbers, as this would generate errors in the analysis.
d. Analyze the project
Open the task Masty section and observe the new spacing between the pins. This makes
that the diagram is easier to understand.

128

Internal
Tipos de Dato Derivados de Usuario y Bloques de función
Derived Data Types (DDT)
The program user can create their own data items to define a data structure. A
data item can contain a group of data:

• Del mismo tipo llamadoArreglo


For example, ARRAY [1..10] of WORD (a group of WORDS)
• With different data called Structure
For example
▪ IDENT
• Apellido: STRING[12]
• Nombre: STRING[16]
• Age: UINT

The IDENT data type is a structure that contains a data type.


UINT and two types of data STRING

EcoStruxure Control Expert EFB Toolkit


The EFs and EFBs defined by the user can be created using the EcoStruxure Control EFB Toolkit.
The EcoStruxure Control Expert Toolkit integrates a Microsoft C compiler.

The defined EFB function blocks are written by the user in C language. They consist of

• Internal variables
• Input variables
• Output variables
• A processing algorithm in C

If the application requires very complicated algorithmic processing, using the C language allows you to
the user to take advantage of the complete set of instructions that this language offers.

The advantages of using an EFB instead of a DFB are:

• Greater security - the internal code cannot be refined to deploy the code within the
function block
• Higher speed - the PLC can process an EFB faster than an equivalent DFB.

129

Internal
Resumen
In this chapter, the topics were addressed:

• Elementary function blocks


• Failure processing and counters
• Derived Function Blocks (DFB)
• User-defined function blocks

Questions
The following questions will help verify the understanding of the topics covered in this chapter.

• What are the differences between elemental function blocks and elemental functions?
• What is failure control?
• What are the advantages of derived function blocks?

130

Internal
Structured Text Language
With lines that end in semicolons, Structured Text language resembles a language of
high-level computer programming such as PASCAL or C. A survey of Engineers
Control indicated that of all the programming languages defined by IEC 61131-3, the text
Structured is the one that has grown the most in its adoption.

This language may embrace the increasing complexity of driver programming, just as
process control functions. This is the most widely used language now in automation,
especially for the new engineers

Objectives
After finishing this chapter you will be able to:

• Identify a section of Structured Text programming


• Describe the tools and functions related to the Text programming window
Structured
• Show the use of components that form a section of structured Text
• Generate a Structured Text Section

131

Internal
Structured Text Language
Introduction to Structured Text
Structured Text (ST) is a programming language that closely resembles Pascal.

A ST program consists of a list of statements separated by semicolons, which are executed in


sequence by the controller. Using these statements, it is possible to call function blocks,
conditional and unconditional functions and procedures, make assignments, execute statements
explicitly, repeat statements and execute conditional or unconditional jumps within
a section.

The ST statements use predefined texts or subroutines to change variables, these being values.
defined, internally stored values, or inputs or outputs.

Assignment statements are used to indicate how the value of a variable should be changed, for
example:

Luz := SwitchA;
It is used to indicate that a light, the variable, should have its value changed to the same as that of the switch.
A. the general format of an assignment is:

X := Y;
Where Y represents an expression that produces a new value for the variable X and := is the symbol of
assignment. The variable retains the assigned value until another assignment changes the value. Others
examples are:

Light := SwitchA OR SwitchB;


To indicate that the light is turned on either by Switch A or by Switch B. It can also be used the
AND function:

Start:= Steam AND Pump;


This would indicate that the start occurs when the Steam and the pump are ON.

132

Internal
Structured text

Structured text programming, defined by the IEC 61131-3 standard, is a high-level language
level similar to Pascal. Students with exposure to other languages like C or BASIC will recognize the
syntax and structure of the structured text language. ST programming has the added benefit
to use 'de facto' standards (enter, select, delete, copy, paste, move, search, replace, etc.)
to edit the statements.

The Structured Text can be used to invoke function blocks, execute or repeat statements of
conditional manner. Although it is possible to execute mathematical expressions with other IEC languages
(using operation or computation blocks of the same type), these types of expressions are more intuitive.
in the domain of ST. The use of an expression is one of two functions that make programming ST
unique sea among IEC languages. The other function is the ability to create iterative loops (FOR–NEXT).
The statements that make up an ST program are separated by the delimiter ';' (semicolon). The
delimiters are used throughout this environment to separate one object from the next. In the case of
Semicolons separate statements. In some function calls, the elements of the list are
separated by commas.

For example, a debounce timer instantiated in an ST program will have its


formal parameters in a list separated by commas. The commas that appear at the end of the first
three lines separate the enabling input (IN), preset time (PT), complete bit (Q), and time
elapsed (ET) between them.

Delimiters of
Debounce (IN:=Float_Switch (*BOOL*), parameters
PT:=t#250ms (*TIME*),
Q=>Float_Done (*BOOL*),
Delimiter of
ET=>Current_Time(*TIME*));
statements

133

Internal
Blank spaces
In the previous example, the statement became so long (a statement can contain up to 300
characters) that line breaks were added in certain spaces, but they could have been added
in any place where a space could be used. Line breaks, tabs, and spaces are
ignored at compile time and have no effect on the execution of the program.

For example, the Timer shown above could also be written as:

Debounce (IN:=Float_Switch (*BOOL*), PT:=t#250ms (*TIME*), Q=>Float_Done)


(BOOL), ET=>Current_Time(TIME));
ó

Debounce (IN:=Float_Switch (*BOOL*), PT:=t#250ms (*TIME*), Q


=>Float_Done (*BOOL*),
ET=>Current_Time(*TIME*));
or well

Debounce (IN
= Float_Switch (*BOOL*),
PT
:=t#250ms (*TIME*),
Q
=>Float_Done (*BOOL*),
ET
Current Time
);
And any of those statements would execute exactly the same way.

134

Internal
Equal signs

In the previously used time example, there are some things that happen with the 'Equal' signs.
Note that there is another character associated with the equal sign. This association is used to indicate to the
compiler that the equal sign IS NOT a comparison operator for equality.

An equality comparator would be written as 'X=Y' for example. An equality test will result
always in a boolean value (True or false). Either X equals Y or it does not. When the symbol of
equal appears only between two operands, it implies a test of equality.

Consider the statement

IN := Float_switch
In this statement, the IN parameter 'is assigned' the value stored in the variable Float_Switch. It is of
help think about the two points associated with the equal sign as the symbol of 'assignment'.

Consider the statement

Q => Float_Done
En este caso el valor del parámetro Q se redirige a la variable Float_Done. Se debe tener cuidado al usar
the symbol for 'greater than' together with the symbol for equals. In this example, the greater than symbol
that is preceded by the equals sign. If the greater than sign is placed before the sign of
equal (>=) this is a test of equality. 'X>=Y' is a test to see if the value of X is greater than or equal
to the value of Y.

Note:

The letter Q is universally recognized as representing the Boolean output of something. A Q is


similar to an O (Output, or exit in English) but will not be confused with the number 0 (zero).

135

Internal
Expressions

The structured text language works with 'Expressions'. Expressions consist of operators and
operandos que regresan un valor al ejecutarse. Los operadores definen el tipo de acción que será
tax on the operand or operands. In a mathematical sense, things like“+” o“- “son
considered operators. The operands are the numbers or variables that are added or subtracted from each other.

For most editors, when entering keywords, separators, and comments, a runs
immediate spell check that identifies errors by changing color. Since ST allows
enter a complete mathematical expression in one line of code, the 'order of operations' will be
important. ST uses the same rules as any other mathematical discipline. Consider for example the
next expression:

Potential := 0.5 * (x**2 + Length * (Length + 1) / x**2);

In the previous expression, the operands Potential and Length are global variables of type REAL. It is very
It is important to note that the elevation of 'x' to the power of 2 occurs before it is used as a divisor in
the last term of the expression.

Below is a list of Operators available in the ST editor

136

Internal
Text operators

Operator Meaning Precedence


() Parenthesis 1 (más alto)
FUNCTION NAME Function call 2
** Power (exponent) 3
- Denial 4
NOT Supplement 4
* Multiplication 5
/ Division 5
MOD Module 5
+ Sum 6
- Stay 6
< Less than comparison 7
> Greater than comparison 7
<= Less than or equal comparison 7
>= Greater than or equal to comparison 7
= Equality 8
<> Inequality 8
&, AND And logical 9
XOR Exclusive or logical 10
OR Logical OR 11 (lower)

If two operators have the same level of precedence, execution proceeds from left to right.

137

Internal
Ventana de Programación
Properties of the window
A ST section consists of a window that contains a simple page. Each line is limited to 300.
characters. It is possible to have line breaks in statements (multi-line statements). It is possible to include
labels, symbols and comments at any point where whitespace is allowed. It is executed
a review of syntax and semantics immediately after the statement is created. The result of this
review is highlighted in colors in the text. The sections with syntactic or semantic errors still
can be saved.

Tool palette

Below are the tools available in the ST palette, the palette will appear in the
toolbar when the mouse hovers over a ST programming window.

138

Internal
ST Expressions
The ST programming language works with 'Expressions'.

Expressions are constructions that consist of "Operators" and "Operands" that return a
value when executed

Operators are symbols that represent the operations that will be executed.

Operators are used with Operands. Operands are variables, literals, inputs, or outputs of
FFBs, etc.

Instructions are used to assign the values that will be returned to the parameters and for
structure and control the expressions.

ST Operators
An ST operator is a symbol for

• An arithmetic operation that will be executed or


• A logical operation that will be executed or
• One edition per function (call)

Operators are generic, i.e. they automatically adapt to the data type of the operands.

Operators are executed sequentially according to the following priority list.

Operator ST Description
* Multiplication
/ Division
+ Suma
- Stay
AND AND logical
< Less than comparison
> Greater than comparison
<> Inequality
= Equality

139

Internal
Operands ST
Operators are used with operands. The operands can be

• An address
• A literal
• A variable
• An element of a multi-element variable
• A function call
• An output of a FFB

The data types in the processing of an operation must be identical. If operands are processed
of various types, before executing the operation, a conversion must be performed

ST Instructions
The instructions are 'Commands' of the ST programming language.

The instructions must end with a semicolon (;)

It is possible to include multiple instructions in one line (separated by semicolons)

Examples of ST Instructions are

• IF…THEN
• ELSE
• CASE
• FOR
• WHILE
• REPEAT

See also:

For more information regarding the Operators, Operands, and ST Instructions, see Help of
EcoStruxure Control Expert - General Information About Structured Text.

140

Internal
Exercise - Create a new Section ST
Expected result
By completing this exercise, you will be able to:

• Create a new section using Structured Text Language


Create a section
a. Go back to EcoStruxure Control Expert and open the Pasteurizer project
b. Create a new section under the MAST task as follows:

c. In the design editing window enter the following text:

The variables will be displayed as 'undefined symbols' in the project. Click


in each variable and press Shift + Enter on the keyboard. The box will appear.
dialogueCreate Variable:

Create the required variables with the following information:


Variable Name Data type
Refill BOOL
Tank_Level DINT
Empty BOOL

141

Internal
e. The system needs to be protected, add the following blocks to the program

f. The complete section should look like this:

Generate, Transfer, Execute and test the application.


h. To conclude, insert this new program to improve the project using a
ergonomic way to control the tank level.
You will need to declare the variable Tank_Level_Expected

i. Generate, Transfer, Execute and test the application.


[Link] the project.

142

Internal
Summary
In this chapter, the following topics were addressed:

• Structured Text Language


• Programming Window
• ST Expressions

Questions
The following questions will help verify the understanding of the topics addressed in the chapter:

• Which high-level programming language is Structured Text similar to?


• What is used to separate statements in a ST programming section?
• What is the maximum number of characters allowed in an ST statement?
• List three types of ST operands
__________________
__________________
__________________

143

Internal
Instruction List Language

Instruction List programming is defined as part of the IEC 61131 standard. It uses
very simple instructions similar to original programming languages with mnemonics
developed for controllers. It is the most fundamental level of programming languages and
It is not generally used every day, but it can normally be found within some.
function blocks or DDTs.

Objectives

By the end of this chapter, you will be able to:

• Identify a section of programming Instruction List


• Describe the tools and features related to programming windows in List
Instructions
• Show the use of the components that make up a programming section in List of
Instructions
• Generate a programming section in Instruction List

144

Internal
Instruction List Language

The instruction list language is the oldest source language among all languages.
programming. Many of the early controllers used either this language or Boolean, as
he was sometimes called, because his mnemonic nature brought brevity to the devices of
programming that mostly consisted of light sequences or switches. This still enjoys great
popularity in Europe

A List of Instructions comprises a sequence of instructions. Each instruction consists of a


operator, sometimes with a modifier, followed by at least one operand. If multiple operands are used,
they will be separated by commas. The instruction may be preceded by a label which is followed by two
points (:). The instruction may be followed by a comment.

It is a language called 'accumulator-oriented'; that is, each instruction uses or alters the
current content of the accumulator (a type of internal cache). IEC 61131 refers to the accumulator as the
result

List of Instructions
A list of instructions consists of a series of instructions.

Each instruction starts on a new line and consists of:

- An Operator (if necessary with a modifier) and


- One or more operands

If multiple operands are used, they are separated by commas. It is possible to place a label at the front.
an instruction. This label will be followed by ':'

After the instruction, it is possible to insert a comment.

It is called an accumulator-oriented language; that is, each instruction uses or alters the content.
current of the accumulator (a type of internal cache). The IEC 61131 refers to this accumulator as the
result

For this reason, an Instruction List will always start with the operand LD ("Load command
in the accumulator)

The length of a section IL is not limited within the programming environment.

The length of a section of IL is only limited by the size of the controller's memory.

145

Internal
The following is a list of the mnemonics used for the operators:

Instruction Description
LD Load the operand value into the accumulator
ST Save the value of the accumulator in the operand.

S Set the operand to 1 if the accumulator is 1


R Set the operand to 0 if the accumulator is 0
AND And logical
OR Logical OR
XOR Logical exclusive or
ADD Sum
SUB Stay
MUL Multiplication
DIV Division
GT Comparison >
GE Comparison >=
EQ Comparación =
NE Comparison <>
THE Comparison <=
LT Comparison <
JMP Jump to label
CAL Function Block Call or DFB
) Editing of deferred operations

146

Internal
Programming Window
Properties of the window
An IL section consists of a window that contains only one page. Each statement begins
with a new line. Each line is limited to 300 characters. Line breaks within statements
are possible (multi-line statements). Labels, symbols, and comments can be located at
any part of the section (Comments can be entered wherever it is possible to insert
blank spaces).

Immediately after a statement is entered, a review of its syntax is performed.


semantics. The result of this review is displayed in color-coded texts. The sections with errors
syntactic and semantic can be saved.

Palette of instructions
Below are the main tools available in the IL palette, the palette
It will automatically appear in the toolbar when the IL window is selected.

147

Internal
Instructions IL
IL Operators
An operator is a symbol for:

- An arithmetic operation to execute


- A logical operation to execute or
- Call an elemental function block - DFBs or subroutines

The operators are generic, i.e. they automatically adapt to the data types of the operands.

The operands are divided into seven groups, as shown in the following table.

Operators Group Examples


Load and Save LD (load) ST (store)
Set and Reset S (set) R (reset)
Logical AND, OR
Arithmetic ADD, SUB
Comparison GT, EQ
Call CALL, FUNCTIONNAME
Structure JMP, RET

Operands IL
Operators are used to manipulate operands.

An operand can be:

- An address
- A literal
- A variable
- A multi-element variable
- An element in a multi-element variable
- A function call
- The output of an FFB

The operand and the current content of the accumulator must be of the same type. If operands of
various types, before that a type conversion must be carried out.

148

Internal
IL Modifiers
Modifiers influence the execution of operators.

The available modifiers are:

Modifier Description
N It is used to invert the value of the operands bit by bit
C C is used to carry the associated instruction.
CN A combination of C and N
( It is used to delay the evaluation of an operand until the parenthesis.
law

A continuación, hay un ejemplo de una sección IL que muestra el uso de Operandos, Operadores y
Modifiers

See also:

For more information about Operands, Operators, and IL Modifiers, see Control Help
Expert - General Information about Instruction List (IL)

149

Internal
Exercise - Create a new section IL
Expected result
Upon completing this exercise you will be able to:

• Create a new Instruction List section


• Generate, Download and test the Instructions List section
• Use Instruction Lists within EcoStruxure Control Expert
Create an IL section
[Link] to EcoStruxure Control Expert and open the Pasteurizer project
[Link] a new section under the task MAST as follows

This new section will recreate the same function seen in the exerciseUse a block of
function, but using Instruction List
c. In the editor enter the following text:

The variables will be displayed as 'undefined symbols' in your project, click on


each variable and then press Shift + Enter on the keyboard to display the window of
Create variables. Create the new variables as required; the data type will be the same.
for all variables.
e. Generate, Transfer, Execute and Test the application
f. Save the project

150

Internal
Resumen
In this chapter, the topics discussed were:

• Instruction List Language


• Programming window
• IL Operators
• Operands IL
• IL Modifiers

Questions
The following questions will help verify the understanding of the topics covered in the chapter:

• What are the three parts that make up an instruction?


o___________________________________
o___________________________________
o___________________________________
• How many groups of operators exist?
• Give an example of a logical operator
o___________________________________

151

Internal
Operator screens
Objectives
Upon completing this chapter, you will be able to:

• Show how to monitor a process dynamically using Operator Panels


• Explain the components of an Operator Screen
• Generate an Operator Screen
• Complete an operator screen by testing the process.

Dynamically Monitor Processes


Provide a set of information
The operator screen provides a group of information (explanatory text, display of values
dynamic elements, buttons, and summaries) that allow users to take quick and simple actions to
modify and dynamically control controller variables.

The operator screen editor provides all the necessary HMI elements for visualization.
animated and design of the processes. When the PC running EcoStruxure Control Expert is
connects to the controller, the user can dynamically display screens depending on the state
of the process.

152

Internal
Online mode
In online mode, operator screens enable direct access to the application program of
EcoStruxure Control Expert from summaries to simply clicking on the selected object.
It is also possible to activate the animation table or cross-reference functions once one or
More variables have been selected on the screen. Summaries can be displayed on the screen.
complete to facilitate visualization.

Graphic Screen
Operator Screens

The operator screen tool enables the design of these screens using tools
orientadas a objetos.

• Screen: Creation of operator screens, which can be classified by family.


• Mensaje: creación de mensajes a desplegar
• Objects: creation of graphic object libraries using:
Geometric elements (line, rectangle, ellipse, image insertion, panels
controller fronts, etc)
Control elements (buttons, data input fields, search controls in
screen, etc.
Animation elements (colors, blinking, bar graphs, etc)

Toolbars
When the Operated Screens window opens, the toolbar changes to IOSEditor.

153

Internal
Design Operator Screens
Standard Graphic Techniques
EcoStruxure Control Expert uses graphical techniques to design the Operator Screen. Users
Those familiar with HMI graphics software will find the steps for designing screens.
easy to use.

How to Create an Operator Screen


To create an operator screen, right-click on the Operator Screens folder in the
Project Explorer and select 'New Screen'

Exercise - Create an Operator Screen


Expected result
By the end of this exercise, you will be able to:

• Create an operator screen.


1. Create and name an Operator Screen for Simulation
Right-click on the Operator Screens item in the Project Explorer
Select New screen from the menu.
b. The Screen Properties dialog is displayed. Enter the name 'Pump of
"nutrition" in the field: Name. Click on OK.

The new screen will be displayed in the Project Explorer

154

Internal
Exercise – Add Text as Tags
Expected result
By the end of this exercise, you will be able to:

• Add text labels to an operator screen.


Add texts as labels to the Feed Pump screen
a. Right-click on the blank area on the new screen.
Select new >> Menu text.

The cursor will change to a text cursor. Draw a text object near the corner.
upper left of the operator screen.
c. Select the text object, then right-click and select Properties of
menu.

155

Internal
d. Add these text properties
Property Value
Text Pump Simulator
Font Arial
Size 12
Style Bold, Italic
Color Coffee

Click OK. The text object unfolds as follows

Tip:

If no object is selected when 'Properties' is chosen, the properties will be modified.


default.

[Link]
otro texbox para la etiquetaEntradas. Usa estas propiedades
Property Value
Text Entries
Font Arial
Size 10
Style Bold
Color Coffee
2. Use the standard editing tools.
[Link] and paste the textboxEntries
[Link] the second textbox below the first, select both.
Click the left align button in the toolbar

156

Internal
i.e. Click on the properties of the text below and modify it to say 'Commands'
The operator's screen should look approximately as follows:

Exercise - Push Button Controls


Expected result
Upon completing this exercise, you will be able to:

• Add push button type controls to an Operator screen

The push buttons will be used to toggle the values of the variables they control during the
simulations and when the controller is running in the field.

Add a Push Button control.


a. Select the Push Button in the Toolbar. The cursor will change to
indicate the stroke of a push button
b. Draw a push button on the screen.

2. Define the properties of the button.


a. Double click on the button object to open the control Properties

b. Click on the ellipsis next to the variable field


c. Select the variableBomba_disponible and click OK

157

Internal
d. Write Available in the Text field
Select 'With retention' since this is a continuous or state variable

Note:
The retention means that once the button is pressed, it keeps the new state.
retention, the state changes only while the button is pressed.
3. Change the animation properties
a. Select the Animation tab. Change the properties shown below.
Click OK.

b. Select the new Available button, right-click and select Information from the
menu.

158

Internal
The dialogue unveils information about control.
4. Complete the control buttons
a. Copy the Available button.
b. Stick the button on the screen three times.
c. Arrange the screen by organizing the controls
d. Add rectangles to group the controls and their descriptions

e. Use the Image tool to add a graph to the page. The graph will be
provided by the instructor.

f. Adjust the properties for the start, stop, emergency stop buttons as follows
show below
Button Tab Campo Value
Start Control Variable FeedPump_Start
Text Start
Animation Variable FeedPump_Start
Stop Control Variable FeedPump_Stop
Text Stop
Animation Variable FeedPump_Stop
Stop Control Variable FeedPump_Estop
Texto Emergency Stop
Animation Variable FeedPump_Estop

Note:
Make sure that the start, stop, and emergency stop buttons do not have any retention.

159

Internal
Exercise - Add Failure Test
Expected result
By the end of this exercise, you will be able to:

• Add failure tests to Operator Screens


1. Set up the button for FeedPump_running on the operator screen.
a. Use the following properties
Button Tab Field Value
Running Control Variable Feed Pump Start
Text Start
Style of With retention
Element of
Control
Animation Variable FeedPump_Start
2. Agrega textos para verificar los estados
a. Add two text objects to indicate the states of Running and Not running.
Adjust the properties as shown below
Text object Tab Field Value
Running pump Text Text Running bomb
Animation Variable FeedPump_Running
Conditions of Bit = 1
visualization
Type of Visualization Select the radius
Animation standard button
No bomb Text Text Bomb not running
running Animation Variable Feed Pump Running
Conditions of Bit=0
visualization
Type of Visualization Select the radio
Animation standard button
Align the objects
[Link] the alignment tools and place one of the texts right above the other

b. Save the project

160

Internal
Exercise – Display Text at Runtime
Expected result
By the end of this exercise you will be able to:

• Display text at Runtime on an Operation screen

It is possible to display different messages on a graphical page, depending on the state of a


Boolean variable or a condition. For example, the word Running can be displayed next to
an engine when it is running, and the word 'Stopped' can be displayed next to it
element when it is off.

Display the status of the pump with text objects.


Insert a text object with the text 'Do not turn on command'
b. Set the color to red, 20 pt, Arial, bold, italic
c. Adjust the Animation properties to show the text when the off bit
the pump is at value 0
d. In the animation type tab, select Standard View
In the Schema tab, select the line type as None.

2. Create a text object that displays when the pump's power command is activated.
be in ON
Insert an object with the text 'Power command sent'. Adjust the color to
green, 20pt, Arial, bold, italic
b. Set the line type to None
c. Adjust the animation so that the text is displayed only when the bit of
on has a value of 1.
In the Animation Type, select standard view. Click OK.
e. Place both overlapping objects. This will make it seem during runtime that
It is about a single text object that changes.

161

Internal
3. Reduce the size of the Operator screen
Right-click on the screen from the Project Explorer.
[Link]
c. Locate the Display tab and reduce the Width and Height of the screen to
that all objects fit correctly on the Operator Screen.

The operator screen should look similar to this:

e. Save the project.

162

Internal
Exercise - Test the logic of the bomb
Expected result
By completing this exercise you will be able to:

• Commission an operator screen


Transfer the project and organize the screens.
a. Generate the program
b. Connect and Transfer the program to the PLC simulator
c. Open the feed pump screen
Open the pump control section
Double click on the FUNCTION BLOCK DIAGRAM of control and select
Detailed contextual menu
Reorganize the screens so that all of them are visible:

g. When the simulation and animation are running, the FBD diagram is
illumination to show the values of the variables. Red=0, Green=1.
h. Place the cursor and click on the Operator Screen
i. Select Services >> Enable Variable Modification from the menu

main, or click the Enable Variable Writing button This allows


that the user changes values using the operator screen.

Note:
Neither the menu nor the button will be available unless the Operator Screen is the
active window.

163

Internal
2. Test the operator screen logic using the operator
a. Click on the buttons and confirm that the behavior of the system is
agreement with what was designed during the previous chapters.
Disconnect the controller.
3. Save and Archive (backup) the project
a. Save the project
b. Archive the project as Graphics_finished.sta

Summary
In this chapter, the following topics were addressed:

• Dynamic process monitoring


• Graphic Screens
• Operator screen design

Questions
The following questions are to verify the understanding of the topics addressed in the chapter:

• Why are operator screens used?


• How is an operator screen created?
• Is it possible to control a system using operator screens?

164

Internal
Sequential function diagram
The Sequential Function Chart (SFC) language is a graphical method for organizing a program.
The Function Block Diagram was used to program a single object as a pump. The
Sequential Function Chart is used to program the entire process.

SFC has the following advantages

• Diagrammatic representation of process state


• Activity flow oriented
• Sequential control applications
• Simplify error detection

Objectives
By the end of this chapter, you will be able to:

• Identify a program section in SFC


• Describe the tools and features related to the programming window of
Sequential Function Diagrams
• Show the use of the components that make up a section in Sequential Function Diagram
• Generate a programming section in Sequential Function Diagram

SFC Sections
Size of the sections
A section of the Sequential Function Diagram consists of a single-page window. The window
it has a logical grid of 200 lines and 32 columns.

165

Internal
• A maximum of 1024 steps can be placed in each SFC section (including its sections.
macro
• A maximum of 100 pasps can be active in each SFC section (including its sections)
macro
• A maximum of 64 steps can be manually initiated at the same time in each section.
• A maximum of 20 actions can be assigned to each SFC step.
• It is possible to nest macro steps up to eight levels.

Exercise - SFC Sections


Expected result
Upon completing this exercise, you will be able to:

• Create an SFC section


1. Create an SFC section
a. Open the Project Explorer and go to Program >> Tasks >> MAST >> Logic
[Link] a new section called Initial_Sequence
Select SFC as the language and click OK

Prepare the SFC window


[Link] and hold the mouse cursor over the grip of the toolbar
[Link] the toolbar to the right of the SFC window

166

Internal
3. Export the elementary variables to a text document
a. Open the data editor in the Project Explorer >> Variables and FB instances >>
Elementary variables
[Link]-click on Elemental [Link] Export… from the menu

[Link] the file [Link]. Click the Export button.

Open the [Link] file in Excel. When the import wizard appears,
Excel text select Delimited and click next.

167

Internal
Select the Tab delimiter in the Descriptor field select {none} from the list
dropdown. Click on next and then on finish.

The instructor will give you an Excel sheet with these variables already listed. Copy and paste.
the variables in the [Link] and save it.

Name Type Name Type


Agitator Available BOOL CoolingValve_Close BOOL
Agitator_Running BOOL CoolingValve_Closed BOOL
Agitator_Start BOOL CoolingValve_Open BOOL
AllEquipment_Available BOOL CoolingValve_Opened BOOL
BalanceTank_Level INT HeatingValve_Available BOOL
BypassValve_Available BOOL HeatingValve_Close BOOL
BypassValve_Close BOOL HeatingValve_Closed BOOL
BypassValve_Closed BOOL HeatingValve_Open BOOL
BypassValve_Open BOOL HeatingValve_Opened BOOL
BypassValve_Opened BOOL Holding_Tube_Temp_OK BOOL
Clarifier_Available BOOL Holding_Tube_Temperature INT
Clarifier Running BOOL Homogeniser_Available BOOL
Clarifier_Start BOOL Homogenizer Running BOOL
CoolingValve_Available BOOL Homogenizer_Start BOOL

168

Internal
4. Import the necessary variables for the SFC
Return to Project Explorer
b. Right-click on Variables and FB instances
[Link]...from the menu

[Link] the file [Link] on Import

When EcoStruxure Control Expert tries to import variables with the same name to the
A report of problems in the import will be generated identifying the variables.
duplicates. If it is necessary to handle each tag separately, double click on the cell
specific to keep or replace.

In this case, click on Keep all.


f. Open the list of elementary variables and observe the imported records.

g. Save the project

169

Internal
Tip:

As an alternative, EcoStruxure Control Expert provides the Excel Import Export tool that allows the
user create, sort, edit or filter application variables of EcoStruxure Control Expert within
Microsoft Excel.

In the Variables Management section, an optional related exercise can be found.

SFC Editor
Components
Sequential function diagrams are similar to flowcharts. The three components
elders are:

• Steps (actions)
• Transitions (Tests)
• Jumps

Test Sequences
In a dairy plant, the following sequences would need to be programmed.

• Start
• Paro
• Cleaning before product change

Toolbars
When the SFC window is selected, the toolbar changes to the SFC one.

170

Internal
Structure of an SFC Section
An SFC section is a 'state machine', that is, the state is created by the active step and the
transitions execute the behavior of 'change'. The steps and transitions are linked to each other.
others with directional links. It is not possible for two steps to be directly connected, they must
always be separated by a transition.

The active status signal is sent along the links and is triggered when a transition changes.
The process chain direction follows the directional links and runs from the end of the step.
previous towards the beginning of the next step. The branches are processed from left to right. Each step
has zero or more actions

For each transition, a condition is necessary. The last transition in the chain must always be
connected to another step in the chain to create a closed loop. The steps in the chain are processed from
cyclical manner.

The transition acts as a 'guardian' denying access to the next section until the requirements are met.
all the conditions.

171

Internal
Exercise - Create the first step
Expected result
By the end of this exercise, you will be able to:

• Add a step to an SFC section


Add the initial step to the Initial_Sequence section
[Link] the toolStep from the SFC toolbar
Click on the upper left cell of the diagram.

Note that the step line is blue. This indicates that the step is incomplete.
c. Double click on the step to open its Properties. Name the step Start. Check the
casillaPaso inicial y haz clic enOK

Times of Steps
Tiempos de Pasos
At each step, a minimum supervision time, a maximum supervision time can be assigned, and
a delay time.

172

Internal
Minimum supervision time
The minimum supervision time sets the minimum time during which the step should be, under conditions
normal, being active. If the step is deactivated before this time has passed, a generation occurs.
Error message. In animation mode, the error is additionally identified by a yellow line.
around the step.
If a minimum supervision time is not defined, or a minimum time of 0 is defined, supervision is not carried out.
supervision of the step.

The error state remains until the step is reactivated.

Maximum Supervision Time


The maximum supervision time is the maximum time during which the step must remain active. If the
if the step remains active after this time has passed, an error message is generated. In mode of
animation, the error is additionally identified by a pink line around the step.

So no maximum supervision time is defined or if it is set to zero, supervision is not carried out
step.

The error state remains the same until the step is deactivated.

Delay Time
The delay time sets the minimum time for which the step will remain active. The step always
will remain active (meaning the cycle will not proceed to transition) until this time has passed
elapsed.

173

Internal
Exercise - Step Times
Expected result
By the end of this exercise, you will be able to:

• Add step times to an SFC section


1. Add times to the Start step
a. Right-click on the step and select Properties. Note that this step
It has a double line around it. This indicates that it is the initial step.

[Link] Maximum, Minimum and Delay times to the step.

[Link] OK

174

Internal
Actions
Game Instructions
When the sequence reaches a step, execute actions within that step. These actions can be
tan simples como encender un bit o pueden ser tan complejas que requieran una sección de código en
particular.

Una acción puede ser sobre una variable Booleana (variable de acción) o una sección (sección de acción)
in programming language FBD, LD, IL or ST.

function executions.

See also:

For more information on Actions, see EcoStruxure Control Expert Help – SFC - Actions

Descriptors
Each action linked to a step must have a descriptor that identifies the control for that action.

Descriptor Description
N/None Not stored
R Reset
S Set
L Limited time
D Delayed
P Pulsar
DS Delayed and stored
P1 Pulse (Rising edge)
P0 Pulse (Downward flank)

175

Internal
Exercise–Actions
Expected result
At the end of this exercise, you will be able to:

• Crear acciones dentro de una sección SFC


Create a new action
Double click on the stepStart
[Link] the Actions tab
c. Select the radio button Section in the Action field and then write the name
Available_teams in the field.

Click on New action. This will transfer the new section Available_team to the
list of actions and will leave it selected

Click on Edit action section.

176

Internal
This is a new section, so you must choose a language. Select FBD and click
in OK

The dialogue will be closed and a new section called Available_Equipment will be generated.
2. Add content to the section you created to define the initial state of the team for the
project of this training.
a. Create the section shown below.
The purpose of this section is to ensure that the team is closed and in the state
correct to start the process.

b. Save the project,


Return to the initial_sequence_diagram.

177

Internal
Exercise–Comments
Upon completing this exercise, you will be able to:

• Add comments to an SFC section

There are different ways to document a sequential function diagram.

• Comment blocks in the diagram


• Comments for each step or transition
• Comentarios dentro de cada sección de código
1. Add comments to the Sequence_diagram_initial.

[Link] on the Comment button and then in the upper cell of the third
column. Note that all the comments are the same size, that is,
they occupy a full cell.

Check equipment availability within the cell.


c. Add comments to every third cell in the third column and add the following
texts
Cell Comment
Line 3 column 3 Turn on heating and bypass valves
Line 5 column 3 Start feed pump
Row 7 column 3 Start clarifier, agitator and homogenizer
Line 9 column 3 Close bypass valve

178

Internal
The comments will look like this

179

Internal
Transitions
Verify the condition
In a sequential function diagram, the steps define the actions. Each step must have sections.
of significant code. These sections can be in any of the four languages FBD, ST, IL,
LD.

When the processing of these sections is concluded, the transition is reached.

A transition is essentially a check to determine if the sequence can proceed to


next step. The cycle does not proceed to the next step until the transition condition is
satisfied.

Transitions can only have one condition.

If the process requires that more than one condition be met, a section can be written within the
transition to combine all conditions into one.

A condition does not need to be Boolean. For example, an integer condition can be used to control.
the branches.

180

Internal
Exercise - Transitions
By completing this exercise, you will be able to:

• Add transitions to a SFC section


[Link] comments for the Initial_Sequence diagram.
a. Select the Transition button The cursor will change to indicate that you
will insert a transition.
b. Click on the start step cell.

c. Double click on the Transition


d. Write AllEquipment_Available. This variable is the output of the Action section.
Available_Equipment defined in the start step. When the actions defined in the
Step will conclude the sequence will advance towards this transition. Click OK

e. Note that the transition lines are in blue indicating that the
the transition is not complete.

Note:
The transition itself is complete, but the sequential function diagram is not.
All diagrams must form a closed loop. This can be done with a jump or with
a graphic link.

181

Internal
Exercise - Add steps to the transitions
At the end of this exercise, you will be able to:

• Agregar más pasos y transiciones


Add four steps and four transitions.

a. Select the Step-Transition Sequence button .


b. Select 4 Rows to insert in the Step-Transition Sequence window

c. The cursor will change to indicate that a sequence is being inserted. Click on the cell
next to the transition AllEquipment_Available.

182

Internal
[Link] properties to steps and transitions
a. Double click on the first of the new steps (Line 3). Name the step
Heating and add a maximum time of t#3s.

b. This action opens the heating valve. Select the tab


Actions. Enter these values in the fields.
Field Value
Descriptor P1 (pulse)
Action Variable
Variable HeatingValve_Open
c. Click on new action.
d. Delete the fieldVariable and select BypassValve_open
e. Click on new action and then on OK.

183

Internal
3. Add properties to the following transition.
a. Double click on the following transition (Line 4). The sequence will move to this
Transition after the heating valve and the bypass valve have been
open
[Link] the Transition section button
c. Assign a name to the section and click the Edit button

[Link] the FBD language and click OK


4. Edit the new transition section
a. The transition sections include a block AND with the name of the section of
transición como variable de [Link] bloque puede borrarse y reemplazarse con
any logic that the program requires, but the output must be a variable with
the same name as the section.
[Link] the variables HeatingValve_Openedy By-pass Valve_Opened. Leave the output
that appears by default.
[Link] to the diagram SFC

5. Add properties to the next step.


[Link] click on the next step (row 5). The sequence will start the pump.
using the variable FeedPump_Start (or any that you have defined as
boot command)
[Link] the bomb step and adjust the maximum time to t#10s
In the Actions tab, select the P descriptor and the startup variable of the
bomb. Click on New action and then on OK.
d.

184

Internal
6. Add properties to the following transition variable
a. Double click on the following transition. The previous steps, open the valves of
heating and bypass, and turning on the pump are to raise the temperature of the
spirals at more than 50°C. The transition requires that the variable
HoldingTube_Temp_OKsea is true before the sequence progresses to the step
next.
b. Click on the Variable button and add the variable HoldingTube_Temp_OK
7. Add properties to the next step that requires the Agitator, the Clarifier and the
Start homogenizer.
a. Double click on the following step.
[Link] the stepTeams
Add a maximum time value of t#60s
Open the Actions tab
Add these Actions
Descriptor Tiempo | Literal Acción | Variable
P Clarifier_Start
D t#5s Agitator_Start
D t#10s Homogeniser_Start

8. Add properties to the following transition


[Link] the TransitionTeam_running
[Link] on edit and select FBD as the programming language.
[Link] these entries to the block AND. When the homogenizer, the clarifier and
if the Agitator has started, the sequence will move on to the next step.

9. Add properties to the last step


a. Name the bypass step. This step closes the bypass valve.
b. Open the Actions tab and add a new action to close the valve. The
descriptor esPy the variable esByPassValve_Close
10. Add properties to the last transition
[Link] the variable BypassValve_Closed.

185

Internal
Exercise - Add a jump
By the end of this exercise, you will be able to:

• Add a jump to a SFC section

To complete the SFC, a jump is needed that returns to the initial step.

Add a jump
a. Select the jump step
b. Click with the Jump cursor in the cell immediately below the last transition.
c. Open the properties of the jump and add the name of stepStart. This indicates that the
sequence must return to the beginning.

186

Internal
d. The complete section should look as follows

187

Internal
Exercise - Animation in SFC language
By the end of this exercise, you will be able to:

• Commission a SFC section


1. Import an operation screen to test the SFC section
a. Return to the Project Explorer. Click on the operator screens and
selectImport
b. Look for the screen pantallapast_test.xcr that the instructor shared with you.
c. Click on Import. The test screen will appear in the Project Explorer.

188

Internal
2. Test the project
a. Analyze and regenerate the project
[Link] the project to the controller
Execute the project
d. Select the screen you imported so that it becomes the active window.
SelectServices >> enable modification of variables in the main menu.
e. Use the new screen to enable the controls and test the program. Open the
SFC diagram and arrange the windows so that they are side by side.

189

Internal
3. Go through the actions step by step, fulfilling the conditions for each step and transition.
a. Double click on the Start step and notice that the maximum time is 15 seconds.
b. After that time has passed, the step changes to purple.
c. Open the Actions tab and double click on the Available Teams section

d. Use the Operator screen to turn on the necessary signals and assign a
value of level higher than 50 to the balance tank.

4. Continue until the sequence is complete.


5. Support the project
[Link] and Save the project
[Link] the project as FIN_SFC.sta

190

Internal
Summary
In this chapter, the following topics were addressed:

• SFC Sections
• Sequential Function Diagram Editor
• Step times
• Actions
• Transitions

Questions

The following questions are to verify the understanding of the topics covered in the chapter:

• What is the difference between the use of Function Block Diagrams and Function Diagrams?
Sequential?
• What are the three main components of a sequential function diagram?
• What are step times?
• What are stocks?

191

Internal
Communication to the controller
La aplicación de comunicación hace posible intercambiar datos entre diferentes equipos conectados a
a network or a bus.

All Unity controllers have the ability to handle multiple communication systems,
Examples of the available options among EcoStruxure Control Expert controllers are:

• Processors with Ethernet, Modbus, Fipio or CANopen.


• Specific communication modules mounted in a rack
• The terminal port of a processor
• PCMCIA cards

With the adoption of Ethernet networks, cybersecurity threats arise, therefore it also
It will cover an introduction to cybersecurity services within EcoStruxure Control Expert.

Objectives
By the end of this chapter, you will be able to:

• Identify the different communication methods supported by EcoStruxure Control Expert


• Modify Ethernet settings within the application
• Understanding the Cybersecurity settings within EcoStruxure Control Expert
• Change the factory settings of Cybersecurity of M580

Communication drivers
Installation Page - Communication Drivers
EcoStruxure Control Expert automatically installs the most common communication drivers.
includes others that can be installed as needed.

• TCP/IP or Ethway Ethernet network


• Red Fipway
• Modbus Plus Network
• Red Fipio bus (manager and agent)
• Bus Uni-Telway
• Modbus/JBus
• Serial mode of characters
• USB fast standard

192

Internal
Connection Mode
EcoStruxure Control Expert allows two types of communication:

• Standard Mode
• Simulation mode

The selected mode will determine the communication pathway that the software takes when a user
try to connect the controller.

The Standard mode will try to connect to a physical controller (hardware) at a specific address.
using a pre-selected protocol.

The Simulation mode will attempt to connect to a PC-based simulator using Modbus TCP/IP.
This simulator can be located on the local PC or on a remote PC and accessed through the
IP address of the PC.

Note:

Since the simulator has characteristics different from the hardware, a mode change will always result in
in the Complete Regeneration of the program.

Switch to Standard Mode


Select PLC >> Standard mode of the main menu.

Or click on the icon in the toolbar. This will require a complete reconstruction of the
project.

Configure a USB port


All EcoStruxure Control Expert controllers have the ability to handle multiple
communications and protocols.

USB and serial ports do not require any specific configuration information, as
assume the default firmware parameters when the system starts. The default parameters can
change using CPU configuration tools.

193

Internal
For Ethernet communications, it is usually not possible to determine the parameters by
advanced, so we need to provide more information to the system.

➢ To configure USB for the physical connection

SelectPLC >> Set the main menu direction.

Note:

The USB port is the default of EcoStruxure Control Expert and is the most convenient for downloading the
initial program. The AddressField must always be set as SYScwhen the medium is USB

Exercise - Configure the USB port


By the end of this exercise, you will be able to:

• Configure the USB port in EcoStruxure Control Expert


• Test the USB connection between EcoStruxure Control Expert and a PAC controller

This laboratory can only be conducted if there is a physical PAC.

1. To configure the USB port:


a. Select PLC >> Set the main menu direction. The following will appear.
screen.

194

Internal
b. Set the address as SYS
c. El USB será el medio default
d. Connect the USB cable from the training computer to the USB port on the
processor.
e. Click on the Test connection button.

195

Internal
Ethernet networks
Ethernet configuration
A fundamental aspect of almost all automation projects is the inclusion of devices.
connected in an Ethernet network. Whether it is a simple connection between a PAC controller and a station of
Supervision or collecting data from field devices will require a level of configuration in
EcoStruxure Control Expert.

Both in the CPUs of the controllers and in the communication modules, it is possible to find
Ethernet ports.

Within EcoStruxure Control Expert, there are two different ways to create network configurations.
Ethernet, which one is used will depend on the family that is being used.

The M580 platform uses one method, while all other platforms use a method.
alternative.

Embedded Ethernet M580


All M580 controllers are equipped with 3 embedded Ethernet ports.

➢ 1 x service port
➢ 2 x ports for the device network

The SERVICE port can be used for two purposes

- Allows diagnosing Ethernet ports using port mirroring.


- Grants access to external tools and devices (EcoStruxure Control Expert, Connexium
Network Manager, HMI, SCADA) and Distributed IO equipment (port for DIO network).

The role of the port of DEVICE NETWORK varies depending on the selected CPU and can be used to
Distributed teams (DIO) or for Remote IO (RIO).

- DIO allows communication with modules and devices connected on an Ethernet bus.
distributed using a non-deterministic DIO scanner embedded in the CPU
- RIO (Remote I/O) uses an embedded scanner in the controller that enables exchanges of
Deterministic I/O with the modules in the X80 drops

When using an M580, all Ethernet network configurations are achieved by accessing the port.
Ethernet PLC relevant through the PLC Bus screen

196

Internal
You simply double-click on the Ethernet ports in any relevant module, this will allow
access the corresponding property pages. The IP address will be found in the tab.
IPConfig.

Ethernet Configuration M580–IP Addresses


Most of the components of an M580 will have several associated IP addresses, this is due to the
extensive use of Ethernet within the architecture, enabling advanced network architectures.
In the case of the CPU M580, there are two IP addresses that can be configured.

➢ Main IP address: This is the IP address of the module, similar to a traditional network port.
allows communications with EcoStruxure Control Expert, SCADA, etc.
➢ IP Address A: This is the IP address of the RIO or DIO header in the device network.

There are two additional IP addresses that can be configured, Primary IP Address +1 and IP Address B.
these are used in M580 Redundant (Standby mode).

In addition, a Subnet Mask and a Gateway Address can be configured.

197

Internal
Ethernet configuration of other controllers
For M340, Quantum, and Premium, the Ethernet configuration process consists of three or four
steps, depending on the location of the Ethernet port.

➢ Map the module in the local bus (if not included in the processor)
➢ Create a named network link
➢ Configure the link
➢ Add the link to an Ethernet port or module

Map the module


If the used port is not included within the CPU, then an in-rack module must be mapped.
rack Local.

➢ To map the module

Locate the physical slot that contains the communications module, right-click on the slot on the screen
PLC Bus and select New device

Select the correct network module from the Communication Library in the Hardware Catalog. Click on
OK. The module is added to the local rack.

Create a Link in a Named Network


The next step is to create a named network link, this is a logical link that can be used to
reference the networks within EcoStruxure Control Expert

➢ To create a named network link

From the Project Explorer open the branch Communication > Networks

198

Internal
Right-click on Networks and select New network

Select Ethernet as the network type, then name the network as required or leave it as default.
Ethernet_1 and click OK

The new Ethernet_1 network is deployed with a red cross. This indicates that the network is not connected to a
port.

Set up a Link
Then, the correct configuration must be added to the Network link. The necessary information can
to be

- Family of controllers
- Communication module model
- Cybersecurity
- I/O scanning
- IP Address
- Other properties related to networks

199

Internal
➢ To set up the link

Double click on Ethernet_1. Change the Model Family to the communications module
relevant

Accept the warning message.

The most common task is to set the IP address and the subnet mask needed for this
module on the network, this is done through the IPConfig tab.

Once the adjustments are correct, click on validate. and close the properties window.

200

Internal
Add the link
The final task is to attach the Logical link to the physical module or port.

➢ To add the link

Double click on the relevant module on the PLC Bus screen.

When the Ethernet properties window appears in the right sidebar, select Channel 0.

When the function field appears, select ETH TCP IP

When the network field appears, select Ethernet_1

Validate the configuration changes.

Note:
The project cannot be generated until the network link has been validated.

Exercise – Ethernet Port Configuration M580


By completing this exercise, you will be able to:

• Configure the IP address of the M580 CPU


1. Open the settings of the Embedded Ethernet port
a. In the Project Browser, double click on PLC Bus
b. Double click on the controller ports
c. Switch to the IPconfig tab
d. Configure the IP addresses
e. Validate the changes.

201

Internal
Cybersecurity with EcoStruxure Control Expert
Introduction to Cybersecurity - What is Cybersecurity?
Cybersecurity is a branch of network management that addresses attacks to or from
computational systems through computer networks that can result in disruptions
intentional or accidental.

The objective of cybersecurity is to provide increased levels of protection for information and the
assets against theft, corruption, misuse or accidents while maintaining access for users
desired. Cybersecurity is an ongoing process that includes policies, procedures, software and
hardware.

Cybersecurity and EcoStruxure Control Expert


Cybersecurity services were first introduced in EcoStruxure Control Expert v 8.1 with
the Modicon M580.

In EcoStruxure Control Expert V11.1, the cybersecurity service offering was expanded to cover
todas las familias de controladores Unity excepto una (Modicon Momentum)

EcoStruxure Control Expert allows configuring cybersecurity services for M340, M580.
Premium and Quantum.

A list of typical Cybersecurity services that are configured:

• Disable unused services


• Access control
• Secure communications
• Event storage
• Authentication
• Authorizations
• Integrity checks

Note:

For each platform, a minimum firmware version is required to use the services of
Cybersecurity, this can be consulted in the online help of EcoStruxure Control Expert.

Cybersecurity with M580


La principal función de ciberseguridad implementada en M580 es la inclusión de funcionalidad que
reach the level of Resilience Achilles Level 4.

The system is extensively tested for attacks against Ethernet services and ARP protocols,
ICMP, TCP, UDP, IP...

No Ethernet packet sent with garbage should cause problems since the level of resilience
It is designed to prevent the performance of the processor from being affected.

202

Internal
If too many packets are sent, known as a data storm, M580 will recover and
will continue to work when the storm has passed.

Security services
Throughout the implementation of Achilles level 2, a main function of M580 is its ability to
prevent certain Ethernet-based services from executing.

Most of these settings are located in the Security tab.

203

Internal
The following table explains the functions of the security tab

Reinforce the Disable all services, manually enable only the


security necessary

Unlock Enable all services, manually disable only the ones that are not
Security used

FTP Firmware upgrade, remote access to SD storage,


FDR

TFTP Reading RIO configurations, managing devices with FDR

HTTP Web Access

DHCP/BOOTP Automatic assignment of IP, subnet mask, Gateway and


DNS servers

SNMP It is used for device monitoring.

EIP Ethernet/IP

Access Control Access for specific devices

Address Authorized addresses with or without subnet mask


authorized

Cybersecurity Audits (Event Storage)


Storing events and analyzing the stored data is essential in a security system. The analysis tracks
User actions for maintenance and abnormal events may indicate an attack. The system
complete needs to have a robust storage system on all devices. The events
related to Cybersecurity are stored on a remote server using the syslog protocol. In the
system architecture this includes two parts

• A storage server
• Storage clients

Event Storage Functionality


The function of storage is:

• Detect and timestamp events based on a single NTP server


• Send the detected events to the server
• Exchange events with the server using Syslog protocol
• The events conform to the format described in specification RFC 5424
• On the devices, events are not lost in case of a network failure, but they are lost upon rebooting.
device

204

Internal
Syslog con EcoStruxure Control Expert
Some examples of events stored using a syslog server are:

• Successful or failed connections from a tool or device


• Major changes in the system
Parameter change
Reading of an application
Download an application
Firmware load
Hardware change
Error in integrity check

Syslog Originators
There are several M580 devices that can generate Syslog events:

• Control Expert

• Modicon M580 CPUs

• BME NOC 03x1

• BME CXM 0100

Enable the Syslog client


Right-click on the project name and select Project Settings >> PLC Diagnostics

Select the Event Registration checkbox and enter a valid IP address of a syslog server.

205

Internal
Resumen
In this chapter, the following topics were addressed:

• Communication drivers
• Ethernet Networks
• Cybersecurity with EcoStruxure Control Expert

Questions

The following questions are to verify the understanding of the topics covered in the chapter:

• What is the default port for downloading programs to the PAC in EcoStruxure Control Expert?
• Where in the menu is the connection to the controller configured?
• Where do you start setting up a new Ethernet network?
• How do you connect that network to the controller?
• How do you access the network settings of M580?
• What is the hardware catalog?
• Name three examples of families within the Hardware catalog

206

Internal

Common questions

Powered by AI

EcoStruxure Control Expert plays a pivotal role in managing the entire lifecycle of automation systems by providing integrated tools for design, development, commissioning, operation, and maintenance. The platform consolidates functionalities necessary for device configuration, logic programming, simulation, cybersecurity, and diagnostics into a cohesive environment. These capabilities enable seamless transitions between stages of system implementation, improving efficiency and reducing potential for errors throughout the system's operational life .

In EcoStruxure Control Expert, communication drivers are integral for establishing network connections between industrial controllers and other devices. These drivers manage data exchange across various protocols such as Ethernet, Modbus, and Fipio, supporting systems that require flexible and robust networking capabilities. Automatically installing common drivers minimizes initial setup, while allowing additions as needed ensures scalability. They enable seamless integration and management of different communication methods, essential for complex and distributed control systems .

The execution sequence in a Function Block Diagram (FBD) critically impacts the control program's functionality because it determines the order in which operations are processed. In an FBD, functions are executed top-to-bottom and left-to-right, based on their position in the diagram. Incorrect sequencing can lead to logical errors, especially in operations dependent on-specific order, such as timers or conditional logic checks. Proper sequencing ensures reliable operation and correct response to input signals .

The Function Block Diagram (FBD) in EcoStruxure Control Expert facilitates logical programming by allowing the visualization of program logic through graphical representation. It enables users to connect different logical operations such as AND, OR, and NOT using simple drag-and-drop interface, promoting ease of understanding and debugging. Users can simulate and test logic before implementation which improves reliability. FBD also supports both complex and simple operations through customization of function blocks, enhancing its utility in diverse automation tasks .

Derived Function Blocks (DFB) in EcoStruxure Control Expert are significant because they enable the modular design of control logic by encapsulating frequently used functionalities into reusable blocks. DFBs reduce redundancy and increase efficiency as they allow programmers to create custom blocks for specific tasks that can be reused across multiple projects or instances. This modularity supports a structured programming approach and simplifies maintenance and updates as changes in DFB behavior are automatically propagated to all instances .

Simulation within EcoStruxure Control Expert offers control system developers significant advantages by allowing them to test and validate program logic in a controlled environment before deploying it on physical hardware. It helps in identifying and rectifying errors early, simulating failure conditions to see their impact without risking actual equipment, and optimizing code for performance. This mode supports both standalone simulations and simulating interactions with remote systems using Modbus TCP/IP, enhancing flexibility in testing procedures .

EcoStruxure Control Expert supports cybersecurity through functionalities such as enabling Syslog clients for event logging, implementing cybersecurity audits, and establishing comprehensive security services like encryption and authentication measures. These allow for monitoring network activities and protecting data integrity within automation systems. Furthermore, M580 controllers include settings to adjust and ensure enhanced security against unauthorized access and potential threats from connected networks .

EcoStruxure Control Expert enables a user-friendly interface by incorporating a graphical user interface similar to other Windows-based applications, which facilitates easy navigation and use. It includes toolbars for rapid access to frequent actions, an application browser for organized project management, and tool windows that keep essential tools accessible. Moreover, EcoStruxure allows adjusting font sizes and adding favorite functions for customization according to user preference, all of which makes programming industrial controllers intuitive and reduces the learning curve .

EcoStruxure Control Expert supports different hardware configurations by offering a flexible programming environment that abstracts the hardware-specific details through the use of generic modules and data structures. This allows users to develop control applications independently of the hardware, assuring compatibility across various hardware types like Modicon M340 and M580. This uniformity in software application leads to simplified management of diverse control systems, enables scalability, and facilitates maintenance across installations from small-scale to complex systems .

To configure an Ethernet port for the M580 in EcoStruxure Control Expert, follow these steps: First, ensure the correct drivers are installed and set the configuration to the M580 system from the communication drivers available in the EcoStruxure Control Expert. Then, configure the IP addresses and network parameters including gateway and subnet masks. Add the M580 Ethernet module to the project, define its IP address, and ensure appropriate settings for cybersecurity are in place. Lastly, test the configuration to verify successful communication .

You might also like