Ecostruxure Control Expert Installation and Application Start Up Guide
Ecostruxure Control Expert Installation and Application Start Up Guide
35008402 12/2018
EcoStruxure™
Control Expert
Installing an Application
Start Up Guide
(Translation of French Original Document)
12/2018
35008402.03
www.schneider-electric.com
The information provided in this documentation contains general descriptions and/or technical
characteristics of the performance of the products contained herein. This documentation is not
intended as a substitute for and is not to be used for determining suitability or reliability of these
products for specific user applications. It is the duty of any such user or integrator to perform the
appropriate and complete risk analysis, evaluation and testing of the products with respect to the
relevant specific application or use thereof. Neither Schneider Electric nor any of its affiliates or
subsidiaries shall be responsible or liable for misuse of the information contained herein. If you
have any suggestions for improvements or amendments or have found errors in this publication,
please notify us.
You agree not to reproduce, other than for your own personal, noncommercial use, all or part of
this document on any medium whatsoever without permission of Schneider Electric, given in
writing. You also agree not to establish any hypertext links to this document or its content.
Schneider Electric does not grant any right or license for the personal and noncommercial use of
the document or its content, except for a non-exclusive license to consult it on an "as is" basis, at
your own risk. All other rights are reserved.
All pertinent state, regional, and local safety regulations must be observed when installing and
using this product. For reasons of safety and to help ensure compliance with documented system
data, only the manufacturer should perform repairs to components.
When devices are used for applications with technical safety requirements, the relevant
instructions must be followed.
Failure to use Schneider Electric software or approved software with our hardware products may
result in injury, harm, or improper operating results.
Failure to observe this information can result in injury or equipment damage.
© 2018 Schneider Electric. All rights reserved.
2 35008402 12/2018
Table of Contents
Safety Information. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
About the Book . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Chapter 1 Description of the application . . . . . . . . . . . . . . . . . . . . . 9
Presentation of the Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Chapter 2 Presentation of Control Expert software . . . . . . . . . . . . . 11
Presentation of Control Expert Software . . . . . . . . . . . . . . . . . . . . . . . 11
Chapter 3 Installing the Application using Control Expert . . . . . . . . 17
3.1 Presentation of the Solution Used . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Technological Choices Used . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
The Different Steps in the Process using Control Expert . . . . . . . . . . 20
3.2 Developing the Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
Creating the Project. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
Declaration of variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
Creation and Use of DFBs. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
Creating the Program in SFC for Managing the Tank . . . . . . . . . . . . . 32
Creating a Program in LD for Application Execution . . . . . . . . . . . . . . 36
Creating a Program in LD for Application Simulation . . . . . . . . . . . . . 38
Creating a Program in FBD for Application Diagnostics . . . . . . . . . . . 41
Creating an Animation Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
Creating the Operator Screen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
Chapter 4 Starting the Application. . . . . . . . . . . . . . . . . . . . . . . . . . 49
Execution of Application in Simulation Mode. . . . . . . . . . . . . . . . . . . . 50
Execution of Application in Standard Mode . . . . . . . . . . . . . . . . . . . . . 51
Diagnostics Viewer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
Glossary ......................................... 55
Index ......................................... 61
35008402 12/2018 3
4 35008402 12/2018
Safety Information
Important Information
NOTICE
Read these instructions carefully, and look at the equipment to become familiar with the device
before trying to install, operate, service, or maintain it. The following special messages may appear
throughout this documentation or on the equipment to warn of potential hazards or to call attention
to information that clarifies or simplifies a procedure.
35008402 12/2018 5
PLEASE NOTE
Electrical equipment should be installed, operated, serviced, and maintained only by qualified
personnel. No responsibility is assumed by Schneider Electric for any consequences arising out of
the use of this material.
A qualified person is one who has skills and knowledge related to the construction and operation
of electrical equipment and its installation, and has received safety training to recognize and avoid
the hazards involved.
6 35008402 12/2018
About the Book
At a Glance
Document Scope
This manual describes how to install an application using different types of variables, programming
languages and an operator screen describing the operation of the application.
Validity Note
The application presented in this manual was developed using version V2.0 of Unity Pro software.
Unity Pro is the former name of Control Expert for version 13.1 or earlier.
Related Documents
You can download these technical publications and other technical information from our website
at https://www.schneider-electric.com/en/download
35008402 12/2018 7
8 35008402 12/2018
EcoStruxure™ Control Expert
Description of the Application
35008402 12/2018
Chapter 1
Description of the application
At a Glance
The application described in this document is used to manage the level of a liquid in a tank. The
tank is filled by a pump, and drained using a valve.
The different levels of the tank are measured with sensors placed on the tank.
The volume of the tank is shown by a digital display.
The application’s operation control resources are based on an operator screen, which shows the
status of the various sensors and actuators, as well as the volume of the tank.
Depending on the status of the tank level and the application, the user must be alerted by way of
alarms, with all necessary information backed up each time these are triggered.
Illustration
This is the application’s final operator screen:
35008402 12/2018 9
Description of the Application
Operating mode
The operating mode is as follows:
A Start Cycle button is used to run filling cycles,
When the high level of the tank is reached, the pump stops and the valve opens. When the low
level of the tank is reached, the valve closes and the pump is activated until the high level is
reached.
A Stop Cycle button is used to interrupt the fill cycles. Pressing this button allows you to set the
system to a safe level. The pump stops and the valve opens until the "Low safety" level is
reached (tank empty). The valve closes and the cycle stops.
The pump has a variable flow rate, the value of which can be accessed by the operator screen.
The flow rate of the valve is equal to that of the pump.
Safety measures must be installed:
Loss of tank’s high level: another level, called "High safety" is activated, and the system is
set to failsafe. The pump then stops and the valve opens until the "Low safety" level is
reached (tank empty). The valve closes and the cycle stops.
Loss of tank’s low level: another level, called "Low safety" is activated, and the system is set
to failsafe. The valve then closes and the cycle stops.
For both failsafe modes, a fault message must be displayed.
The time that the valve is open and closed is monitored, with a fault message being displayed
if either of these is exceeded.
10 35008402 12/2018
EcoStruxure™ Control Expert
Presentation of Control Expert Software
35008402 12/2018
Chapter 2
Presentation of Control Expert software
At a Glance
Control Expert is a software workshop for programming Modicon M580,Modicon M340,Modicon
Premium, Modicon Quantum and Modicon Atrium PLCs.
Below we provide a brief description of each of the blocks of Control Expert required for application
development.
NOTE: For more information, see Control Expert Online help.
35008402 12/2018 11
Presentation of Control Expert Software
User Interface
The screen below shows the Control Expert user interface:
12 35008402 12/2018
Presentation of Control Expert Software
Area Description
1 Control Expert toolbar.
2 Editor window (language editors, data editors, etc.).
3 Project browser.
4 Information window (provides information on errors, signal monitoring, import functions, etc.).
Project Browser
The project browser provides easy access to various editors (see page 20) used in the application.
Configuration (see page 13),
Derived FB Types (see page 14),
Variables & FB instances (see page 14),
Programs (see page 14),
Diagnostics (see page 15),
Operator screens (see page 15).
Configuration
The configuration tool is used to:
create\modify\save the elements used to configure the PLC station,
set up the application-specific modules comprising the station,
diagnose the modules configured in the station,
assess the current consumed on the basis of the voltages supplied by the power supply module
declared in the configuration,
control the number of application-specific channels configured in relation to the capacities of the
processor declared in the configuration,
assess processor memory usage.
NOTE: The configuration may be performed before or after the programming of the project; this
has the advantage of being able to create generic projects without having to be concerned with the
configuration in the initial stage.
NOTE: For more information, see Control Expert Online help (click on , Control Expert
Software → Operating Modes → Project Configuration).
35008402 12/2018 13
Presentation of Control Expert Software
Data Editor
The data editor offers the following functions:
declaration of variable instances,
definition of Derived Data Types (DDT), directly accessible via Derived Data Types,
declaration of instances of Elementary and Derived Function Blocks (EFB/DFB),
definition of parameters of Derived Function Blocks (DFB), directly accessible via Derived FB
Types (see page 14).
To access the Data editor, simply double-click on Variables & FB instances in the project
browser.
NOTE: For more information, see Control Expert Online help (click on , Control Expert
Software → Operating Modes → Data Editor).
Program Editor
The program editor is used to develop the different PLC tasks using different types of language, in
particular:
FBD (Function Block Diagram),
LD (Ladder Diagram),
SFC (Sequential Function Chart), only available for the MAST task,
IL (Instruction List),
ST (Structured Text).
To access the Program editor, simply double-click on Program in the project browser and
select a Task or an Event.
NOTE: For more information, see Control Expert Online help (click on , Control Expert
Software → Operating Modes → Programming).
DFB Editor
Control Expert software enables you to create DFB user function blocks, using automation
languages. A DFB is a program block that you develop to meet the specific requirements of your
application. It includes:
input/output parameters,
public or private internal variables,
one or more sections written in Ladder Diagram (LD), Instruction List (IL), Structured Text (ST)
or Functional Block Diagram (FBD) language.
To access the DFB editor, simply double-click on Derived FB Types in the project browser.
NOTE: For more information, see Control Expert Online help (click on , Control Expert
Software → Languages Reference → User Function Blocks (DFB)).
14 35008402 12/2018
Presentation of Control Expert Software
Diagnostics Viewer
Control Expert features a diagnostics tool for systems and projects.
If errors occur, they are displayed in a diagnostics window.
To access the DFB editor, simply double-click on Derived FB Types in the project browser.
NOTE: For more information, see Control Expert Online help (click on , Control Expert
Software → Operating Modes → Diagnostics).
Operator Screens
The operator screens are built into the software to aid operation of an automated process. In the
Control Expert software, they use:
the project browser for browsing through the screens and launching different tools (the graphics
editor, variables editor, messages editor, etc.),
the graphics editor for creating or changing screens. In online mode, it also allows the viewing
of animated screens and process driving,
the library of objects which presents design objects and enables their insertion in the screens.
It also allows users to create their own objects and insert them in a library family.
To access Operator screens, simply right-click on Operator screens in the project browser
and select a new screen.
NOTE: For more information, see Control Expert Online help (click on , Control Expert
Software → Operating Modes → Operator Screen).
Simulator
The PLC simulator enables you to simulate a project without having to connect to a real PLC.
All the project tasks (Mast, Fast, AUX and Event) are also available in the simulator. The difference
in relation to a real API is that there are no I/O and communications modules.
To access the Simulator, simply select Simulation mode in the PLC menu and connect to the
API.
NOTE: For more information, see Control Expert Online help (click on , Control Expert
Software → Operating Modes → Debugging and adjustment and Control Expert Software → PLC
Simulator).
35008402 12/2018 15
Presentation of Control Expert Software
16 35008402 12/2018
EcoStruxure™ Control Expert
Application using Control Expert
35008402 12/2018
Chapter 3
Installing the Application using Control Expert
35008402 12/2018 17
Application using Control Expert
Section 3.1
Presentation of the Solution Used
18 35008402 12/2018
Application using Control Expert
At a Glance
There are several ways of writing an application using Control Expert. The one proposed allows
you to structure the application so as to facilitate its creation and debugging.
Technological Choices
The following table shows the technological choices used for the application:
35008402 12/2018 19
Application using Control Expert
At a Glance
The following logic diagram shows the different steps to follow to create the application. A
chronological order must be respected in order to correctly define all of the application elements.
Description
Description of the different types:
20 35008402 12/2018
Application using Control Expert
Section 3.2
Developing the Application
35008402 12/2018 21
Application using Control Expert
At a Glance
Developing an application using Control Expert involves creating a project associated with a PLC.
NOTE: For more information, see Control Expert Online help (click on , Control Expert
Software → Operating Modes → Project Configuration).
Step Action
1 Launch the Control Expert software,
2 Click on File then New then select a PLC,
22 35008402 12/2018
Application using Control Expert
Declaration of variables
At a Glance
All of the variables used in the different sections of the program must be declared.
Undeclared variables cannot be used in the program.
NOTE: For more information, see Control Expert Online help (click on , Control Expert
Software → Operating Modes → Data Editor).
Step Action
1 In Project browser / Variables & FB instances, double-click on Elementary
variables.
2 In the Data editor window, select the box in the Name column and enter a name for your first
variable.
3 Now select a Type for this variable.
4 When all your variables are declared, you can close the window.
35008402 12/2018 23
Application using Control Expert
NOTE: EBOOL types can be used for I/O modules, unlike BOOL types.
24 35008402 12/2018
Application using Control Expert
The following screen shows the application variables created using the data editor:
35008402 12/2018 25
Application using Control Expert
At a Glance
DFB types are function blocks that can be programmed by the user ST, IL, LD or FBD. Our
application uses a motor DFB and a valve DFB.
We will also be using existing DFB from the library for monitoring variables. Particularly "safety"
variables for tank levels, and "error" variables returned by the valve. The status of these variables
will be visible in Diagnostics display.
NOTE: Function blocks can be used to structure and optimize your application. They can be used
whenever a program sequence is repeated several times in your application, or to set a standard
programming operation (for example, an algorithm that controls a motor).
Once the DFB type is created, you can define an instance of this DFB via the variable editor or
when the function is called in the program editor.
NOTE: For more information, see Control Expert Online help (click on , Control Expert
Software → Languages Reference → User Function Blocks (DFB)).
Step Action
1 In the Project browser, right click on Derived FB types and select Open.
2 In the Data editor window, select the box in the Name column and enter a name for your DFB
and confirm with Enter. The name of your DFB appears with the sign "Works" (unanalyzed DFB).
3 Open the structure of your DFB (see figure below) and add the inputs, outputs and other variables
specific to your DFB.
4 When the variables of the DFB are declared, analyze your DFB (the sign "Works" must disappear).
To analyze your DFB, select the DFB and, in the menu, click Build then Analyze. You have
created the variables for your DFB, and must now create the associated section.
5 In the Project browser, double-click on Derived FB types then on your DFB. Under the
name of your DFB, the Sections field will appear.
6 Right click on Sections then select New section.
7 Give your section a name, then select the language type and confirm with OK. Edit your section
using the variables declared in step 3. Your DFB can now be used by the program (DFB Instance).
26 35008402 12/2018
Application using Control Expert
35008402 12/2018 27
Application using Control Expert
When Run = 1 and Stop = 0, the motor can be controlled (Motor_run_cmd = 1). The other part
monitors the Contactor_return variable. If Contactor_return is not set to "1" after the Discrete
counter counts two seconds, the Motor_error output switches to "1".
NOTE: For more information on creating a section, consult the Control Expert Online help (click
, Control Expert Software → Operating Modes → Programming and select the required
language).
28 35008402 12/2018
Application using Control Expert
35008402 12/2018 29
Application using Control Expert
This DFB authorizes the command to open the valve (Valve_opening_cmd) when the inputs
Valve_closure and Lim_valve_opening are set to "0". The principle is the same for closure, with an
additional safety feature if the user requests the opening and closing of the valve at the same time
(opening takes priority).
In order to monitor opening and closing times, we use the TON timer to delay the triggering of a
fault. Once the valve opening is enabled (Valve_opening_cmd = 1), the timer is triggered. If
Lim_valve_opening does not switch to "1" within two seconds, the output variable Valve_open-
ing_error switches to "1". In this case a message is displayed (see page 53).
NOTE: The PT time must be adjusted according to your equipment.
NOTE: For more information on creating a section, consult the Control Expert Online help (click
, Control Expert Software → Operating Modes → Programming and select the required
language).
30 35008402 12/2018
Application using Control Expert
Step Action
1 In the Project browser, double-click on Elementary variables, then select the
Function Blocks tab.
2 In the Data editor window, select the cell in the Name column and enter a name for your
Function block and confirm with Enter.
3 The FB type selection window appears, in Libraries/Families select Libraries then
Diagnostics and click on ALRM_DIA then confirm with Enter.
4 In the Data editor window, add comments in the Comment field in order to display them in
Diagnostics viewer. Your Function block can now be used by the program (DFB Instance).
35008402 12/2018 31
Application using Control Expert
At a Glance
The main program is written in SFC (Grafcet). The different sections of the grafcet steps and
transitions are written in LD. This program is declared in a MAST task, and will depend on the
status of a Boolean variable.
The main advantage of SFC language is that its graphic animation allows us to monitor in real time
the execution of an application.
Several sections are declared in the MAST task:
The Tank_management (see page 33) section, written in SFC and describing the operate
mode,
The Application (see page 36) section, written in LD, which executes the pump start-up using
the motor DFB, as well as the opening and closure of the valve.
The Simulation (see page 38) section, written in LD, which simulates the application. This
section must be deleted in the case of connection to a PLC.
The Diagnostics (see page 41) section, written in FBD, for returning application errors to the
diagnostics display.
NOTE: The LD, SFC and FBD-type sections used in the application must be animated in online
mode (see page 49), with the PLC in RUN.
32 35008402 12/2018
Application using Control Expert
NOTE: For more information on creating an SFC section, see Control Expert Online help (click on
35008402 12/2018 33
Application using Control Expert
Pump This is the step that starts the pump and filling of the tank until the high level is reached. This
step activates the motor DFB in the Application section, which controls the activation of the
pump.
No_fault This transition is active when the tank’s high level is reached and the safety high level is set
to 0.
Open_valve1 This step opens the valve to drain the tank. This step activates the valve DFB in the
Application section, which controls the opening of the valve.
Drainage This transition is active when the tank’s low level or safety low level is set to 1.
Close_valve1 This is the valve closure step. This step activates the valve DFB in the Application section,
which controls the closure of the valve.
Normal This transition is valid when the low level of the tank and Lim_valve_closure are set to 1. In
this case we skip to step S_1_2.
Safety This transition is valid when the low safety level of the tank and Lim_valve_closure are set
to 1. Where this is the case, we return to the start of the cycle and wait for the safety variable
to be reset, and the cycle to be restarted.
With_fault This transition is active when the High safety level of the tank has been reached, or the
Stop_cycle button has been activated (Stop_cycle = 1).
Open_valve2 This step is identical to Open_valve1.
Tank_low_safety This transition is active when the low safety level of the tank is set to 1 (after the tank is
drained following a stop cycle command, or following activation of the high safety level).
Close_valve2 This step is identical to Close_valve1.
Lim_valve_closure This transition is valid when Lim_valve_closure is set to 1. Where this is the case, we return
to the start of the cycle and wait for the safety variable to be reset, and the cycle to be
restarted.
NOTE: You can see all the steps and actions of your SFC by clicking on in front of the name
of your SFC section.
34 35008402 12/2018
Application using Control Expert
Step Action
1 In Project Browser\Program\Tasks, double-click on MAST.
2 Right click on Section then select New section. Give your section a name
(Tank_management for the SFC section) then select SFC language.
3 The name of your section appears, and can now be edited by double clicking on it.
4 The SFC edit tools appear in the window, which you can use to create your Grafcet.
For example, to create a step with a transition:
To create the transition, click on then place it in the editor (generally under the preceding
step).
35008402 12/2018 35
Application using Control Expert
At a Glance
This section controls the pump and the valve using the DFBs created (see page 26) earlier.
36 35008402 12/2018
Application using Control Expert
Step Action
1 In Project Browser\Program\Tasks, double-click on MAST.
2 Right click on Section then select New section. Name this section Application, then select
the language type LD.
The edit window opens.
3
To create the contact Open_valve1.x, click on then place it in the editor. Double-click on
this contact then enter the name of the step with the suffix ".x" at the end (signifying a step of an
SFC section) and confirm with OK.
4 To use the motor DFB you must instantiate it. Right click in the editor then click on Select data
and on . Click on the Function and Function Block Types tab and select your DFB
then confirm with OK and position your DFB. To link the Open_valve1.x contact to the stop input
of the DFB, align the contact and the input horizontally, click on and position the link
between the contact and the input.
NOTE: For more information on creating an LD section, see Control Expert Online help (click on
35008402 12/2018 37
Application using Control Expert
At a Glance
This section is only used for application simulation. It should therefore not be used if a PLC is
connected.
38 35008402 12/2018
Application using Control Expert
NOTE: For more information on creating an LD section, see Control Expert Online help (click on
40 35008402 12/2018
Application using Control Expert
At a Glance
This section is used to declare variables which will be sent to the diagnostics viewer in the event
of an error.
35008402 12/2018 41
Application using Control Expert
Step Action
1 In Project Browser\Program\Tasks, double-click on MAST.
2 Right click on Section then select New section. Name this section Diagnostics, then select
the language type FBD.
The edit window opens.
3 To use the ALRM_DIA function block you created, you must instantiate it. Right click in the editor
then click on Select data and on . Click on the Function Blocks tab and select your
function block then confirm with OK and position it in the FBD editor.
To assign a variable to an input or an output, double-click on it, click on and select your
variable from the Variable tab.
NOTE: For more information on creating an LD section, see Control Expert Online help (click on
42 35008402 12/2018
Application using Control Expert
At a Glance
An animation table is used to monitor the values of variables, and modify and/or force these values.
Only those variables declared in Variables & FB instances can be added to the animation
table.
NOTE: For more information, consult the Control Expert Online help (click , Control Expert
Software → Operating Modes → Debugging and adjustment → Viewing and adjusting variables
→ Animation tables).
Step Action
1 In the Project browser, right click on Animation tables.
The edit window opens.
2 Click on first cell in the Name column, then on the button, and add the variables you require.
35008402 12/2018 43
Application using Control Expert
NOTE: The animation table is dynamic only in online mode (display of variable values).
44 35008402 12/2018
Application using Control Expert
At a Glance
The operator screen is used to animate graphic objects that symbolize the application. These
objects can belong to the Control Expert library, or can be created using the graphic editor.
NOTE: For more information, see Control Expert Online help (click on , Control Expert
Software → Operating Modes → Operator screen).
NOTE: To animate objects in online mode, you must click on . By clicking on this button, you
can validate what is written.
35008402 12/2018 45
Application using Control Expert
Step Action
1 In the Project browser, right click on Operator screens and click on New screen.
The operator screen editor appears.
2
Click on and place it in the operator screen editor. Double-click on the button and, in the
Control tab, select the Run variable by clicking on , and confirm with OK, then enter the name
of the button in the Text area. The button is presently assigned to the Run variable.
The table below shows the procedure for inserting and animating the tank.
Step Action
1 In the Project browser, right click on Operator screens and click on New screen.
The operator screen editor appears.
2 In the Tools menu, select Operator Screen Library. The window opens. Double click on
Fluids then Tank. Select the dynamic tank from the runtime screen, and Copy (Ctrl + C) then Paste
(Ctrl + V) it into the drawing in the operator screen editor (to return to your screen, click on Window
then Screen).
The tank is now in your operator screen. You now need a variable to animate the level. In the Tools
menu, click on Variables Window. The window appears to the left, and in the Name column we see
the word %MW0. To obtain the animated part of the graphic object (in this case the tank), double click
on %MW0. A part of the tank is selected. Right click on this part, then click on Characteristics.
Select the Animation tab and enter the variable concerned by clicking the button (in the place
of %MW0). In our application, this will be Tank_vol.
You must define the tank’s minimum and maximum values. In the Type of animation tab, click
Bar chart then the button, and fill in the entry fields according to the tank.
Confirm with Apply and OK.
46 35008402 12/2018
Application using Control Expert
The table below shows the procedure for inserting and animating the valve.
Step Action
1 In the Project browser, right click on Operator screens and click on New screen.
The operator screen editor appears.
2 In the Tools menu, select Operator Screen Library. The window opens. Double click on
Actuators then Valve. Select a dynamic valve (from the runtime screen), and Copy (Ctrl + C) then
Paste (Ctrl + V) it into the drawing in the operator screen editor (to return to your screen, click on
Window then Screen).
Select the valve, right click on it then click on Detach. Select the red rectangle and move it so you can
see the green rectangle underneath it. Double click on the green rectangle, then click on the Animation
tab and add the Valve_opening_cmd variable. Still in the Object properties window, in the
Display condition area, select Bit = 1. This setting makes the green rectangle visible when
%M2 = 1, otherwise this rectangle is invisible.
Same procedure for the red rectangle, only with the display condition Bit = 0. If the animation does
not work, put the foreground rectangle into the background.
35008402 12/2018 47
Application using Control Expert
48 35008402 12/2018
EcoStruxure™ Control Expert
Starting the Application
35008402 12/2018
Chapter 4
Starting the Application
35008402 12/2018 49
Starting the Application
At a Glance
You can connect to the API simulator which enables you to test an application without a physical
connection to the PLC and other devices.
NOTE: For more information, see Control Expert Online help (click on , Control Expert
Software → Operating Modes → Debugging and adjustment and Control Expert Software → PLC
Simulator).
Application Execution
The table below shows the procedure for launching the application in simulation mode:
Step Action
1 In the PLC menu, click on Simulation Mode,
2 In the Build menu, click on Rebuild All Project. Your project is generated and is ready
to be transferred to the simulator. When you generate the project, you will see a results window.
If there is an error in the program, Control Expert indicates its location if you double-click on the
highlighted sequence.
3 In the PLC menu, click on Connection. You are now connected to the simulator.
4 In the PLC menu, click on Transfer project to PLC. The Transfer project to PLC
window opens. Click on Transfer. The application is transferred to the PLC simulator.
5 In the PLC, click on Execute. The Execute window opens. Click on OK. The application is now
being executed (in RUN mode) on the PLC simulator.
50 35008402 12/2018
Starting the Application
At a Glance
To work in standard mode you need to use a PLC and Discrete and Analog I/O modules to assign
outputs to different sensors and actuators.
The variables used in simulation mode must be modified. In standard mode, variables must be
located to be associated to physical I/Os.
NOTE: For more information on addressing, see Control Expert Online help (click on ,
Control Expert Software → Languages Reference → Data description → Data instances).
Step Action
1 In the Project browser double-click on Configuration then on 0:Bus X and on 0:TSX RKY •••
(where 0 is the rack number).
2 In the Bus X window, select a slot, for example 3 and double-click on it.
3 Insert a discrete input module, for example TSX DEY 16A5.
4 Confirm with OK. This input module is used to connect the application’s EBOOL inputs.
Step Action
1 In the Project browser and in Variables & FB instances, double-click on Elementary
variables.
2 In the Address column, enter the address associated with the variable in the form
Rack\Module\Channel\Data.
Example:
On the TSX DEY 16A5 module, there are 2 channels, channel 0 and channel 8. Channel 0
handles inputs 0 to 7 and channel 8 handles inputs 8 to 15.
If the valve closure limit switch output is connected to input 0 of the module, the address
%I0.3.0.0 is displayed in the address column of the editor for the Lim_valve_closure variable
Illustration:
3 Repeat the same procedure for all located variables.
35008402 12/2018 51
Starting the Application
Application Execution
The table below shows the procedure for launching the application in standard mode:
Step Action
1 In the PLC menu, click on Standard Mode,
2 In the Build menu, click on Rebuild All Project. Your project is generated and is ready
to be transferred to the PLC. When you generate the project, you will see a results window. If
there is an error in the program, Control Expert indicates its location if you click on the highlighted
sequence.
3 In the PLC menu, click on Connection. You are now connected to the PLC.
4 In the PLC menu, click on Transfer project to PLC. The Transfer project to PLC
window opens. Click on Transfer. The application is transferred to the PLC.
5 In the PLC, click on Execute. The Execute window opens. Click on OK. The application is now
being executed (in RUN mode) on the PLC.
52 35008402 12/2018
Starting the Application
Diagnostics Viewer
At a Glance
The diagnostics viewer enables you to monitor variables when they are associated to diagnostics
function blocks (ALMR_DIA for example).
NOTE: For more information on the declaration of these variables for diagnostics purposes, go to
the DFB section (see page 31).
Creation of Diagnostics
The table below shows the procedure for displaying the diagnostics window:
Step Action
1 In the Tools menu, click on Diagnostics Viewer. The window is displayed on-screen.
2 As soon as the Tank_low_safety or Tank_high_safety or Valve_opening_error or
Valve_closure_error variables switch from 0 to 1, a message is displayed in the diagnostics
viewer.
NOTE: For more information, see Control Expert Online help (click on , Control Expert
Software → Operating Modes → Diagnostics).
35008402 12/2018 53
Starting the Application
54 35008402 12/2018
EcoStruxure™ Control Expert
Glossary
35008402 12/2018
Glossary
!
%I
According to the IEC standard, %I indicates a discrete input-type language object.
%M
According to the IEC standard, %M indicates a memory bit-type language object.
%MW
According to the IEC standard, %MW indicates a memory word-type language object.
%Q
According to the IEC standard, %Q indicates a discrete output-type language object.
B
BIT
This is a binary unit for a quantity of information which can represent two distinct values (or
statuses): 0 or 1.
BOOL
BOOL is the abbreviation of Boolean type. This is the elementary data item in computing. A BOOL
type variable has a value of either: 0 (FALSE) or 1 (TRUE).
A BOOL type word extract bit, for example: %MW10.4.
BYTE
When 8 bits are put together, this is called a BYTE. A BYTE is either entered in binary, or in base 8.
The BYTE type is coded in an 8 bit format, which, in hexadecimal, ranges from 16#00 to 16#FF
D
DFB
DFB is the abbreviation of Derived Function Block.
DFB types are function blocks that can be programmed by the user ST, IL, LD or FBD.
By using DFB types in an application, it is possible to:
simplify the design and input of the program,
increase the legibility of the program,
facilitate the debugging of the program,
reduce the volume of the generated code.
35008402 12/2018 55
Glossary
DFB instance
A DFB type instance occurs when an instance is called from a language editor.
The instance possesses a name, input/output interfaces, the public and private variables are
duplicated (one duplication per instance, the code is not duplicated).
A DFB type can have several instances.
E
EBOOL
EBOOL is the abbreviation of Extended Boolean type. It can be used to manage rising or falling
edges, as well as forcing.
An EBOOL type variable takes up one byte of memory.
EFB
Is the abbreviation for Elementary Function Block.
This is a block which is used in a program, and which performs a predefined software function.
EFBs have internal statuses and parameters. Even where the inputs are identical, the output
values may be different. For example, a counter has an output which indicates that the preselection
value has been reached. This output is set to 1 when the current value is equal to the preselection
value.
F
FBD
FBD is the abbreviation of Function Block Diagram.
FBD is a graphic programming language that operates as a logic diagram. In addition to the simple
logic blocks (AND, OR, etc.), each function or function block of the program is represented using this
graphic form. For each block, the inputs are located to the left and the outputs to the right. The
outputs of the blocks can be linked to the inputs of other blocks to form complex expressions.
Function view
View making it possible to see the program part of the application through the functional modules
created by the user (see Functional module definition).
I
IEC 61131-3
International standard: Programmable Logic Controls
Part 3: Programming languages.
56 35008402 12/2018
Glossary
IL
IL is the abbreviation of Instruction List.
This language is a series of basic instructions.
This language is very close to the assembly language used to program processors.
Each instruction is composed of an instruction code and an operand.
Instantiate
To instantiate an object is to allocate a memory space whose size depends on the type of object
to be instantiated. When an object is instantiated, it exists and can be manipulated by the program.
INT
INT is the abbreviation of single integer format (coded on 16 bits).
The lower and upper limits are as follows: -(2 to the power of 31) to (2 to the power of 31) - 1.
Example:
-32768, 32767, 2#1111110001001001, 16#9FA4.
L
LD
LD is the abbreviation of Ladder Diagram.
LD is a programming language, representing the instructions to be carried out in the form of graphic
diagrams very close to a schematic electrical diagram (contacts, coils, etc.).
Located variable
A located variable is a variable for which it is possible to know its position in the PLC memory. For
example, the variable Water_pressure, is associated with %MW102. Water_pressure is said
to be located.
M
Master task
Main program task.
It is obligatory and is used to carry out sequential processing of the PLC.
O
Operator screen
This is an editor that is integrated into Control Expert, which is used to facilitate the operation of an
automated process. The user regulates and monitors the operation of the installation, and, in the
event of any problems, can act quickly and simply.
35008402 12/2018 57
Glossary
R
REAL
Real type is a coded type in 32 bits.
The ranges of possible values are illustrated in gray in the following diagram:
S
Section
Program module belonging to a task which can be written in the language chosen by the
programmer (FBD, LD, ST, IL, or SFC).
A task can be composed of several sections, the order of execution of the sections corresponding
to the order in which they are created. This order is modifiable.
SFC
SFC is the abbreviation of Sequential Function Chart.
SFC enables the operation of a sequential automation device to be represented graphically and in
a structured manner. This graphic description of the sequential behavior of an automation device,
and the various situations which result from it, is provided using simple graphic symbols.
SFC objects
An SFC object is a data structure representing the status properties of an action or transition of a
sequential chart.
ST
ST is the abbreviation of Structured Text language.
Structured Text language is an elaborated language close to computer programming languages.
It enables you to structure series of instructions.
Structure
View in the project navigator with represents the project structure.
58 35008402 12/2018
Glossary
Subroutine
Program module belonging to a task (Mast, Fast) which can be written in the language chosen by
the programmer (FBD, LD, ST, or IL).
A subroutine may only be called by a section or by another subroutine belonging to the task in
which it is declared.
T
Task
A group of sections and subroutines, executed cyclically or periodically for the MAST task, or
periodically for the FAST task.
A task possesses a level of priority and is linked to inputs and outputs of the PLC. These I/O are
refreshed in consequence.
TIME
The type TIME expresses a duration in milliseconds. Coded in 32 bits, this type makes it possible
to obtain periods from 0 to (2 to the power of 32)-1 milliseconds.
U
Unlocated variable
An unlocated variable is a variable for which it is impossible to know its position in the PLC memory.
A variable which have no address assigned is said to be unlocated.
V
Variable
Memory entity of the type BOOL, WORD, DWORD, etc., whose contents can be modified by the
program during execution.
35008402 12/2018 59
Glossary
W
WORD
The WORD type is coded in 16 bit format and is used to carry out processing on bit strings.
This table shows the lower/upper limits of the bases which can be used:
Representation examples
60 35008402 12/2018
EcoStruxure™ Control Expert
Index
35008402 12/2018
Index
A
Application section (LD), 36
C
Connection
Simulator mode, 50
Standard Mode, 51
Control Expert
Configuration, 13
Data editor, 14
DFB editor, 14
Diagnostics, 15
Operator screens, 15
Presentation, 11
Program editor, 14
Project browser, 13
Simulator, 15
User interface, 12
D
Diagnostics section (FBD), 41
M
Motor DFB, 27
S
Simulation section (LD), 39
T
Tank_management section (SFC), 33
V
Valve DFB, 29
35008402 12/2018 61
Index
62 35008402 12/2018