PLC Simulator
PLC Simulator
PLC Simulator
Original instructions
EIO0000001714.09
01/2023
www.se.com
Legal Information
The Schneider Electric brand and any trademarks of Schneider Electric SE and its
subsidiaries referred to in this guide are the property of Schneider Electric SE or its
subsidiaries. All other brands may be trademarks of their respective owners.
This guide and its content are protected under applicable copyright laws and furnished for
informational use only. No part of this guide may be reproduced or transmitted in any form or
by any means (electronic, mechanical, photocopying, recording, or otherwise), for any
purpose, without the prior written permission of Schneider Electric.
Schneider Electric does not grant any right or license for commercial use of the guide or its
content, except for a non-exclusive and personal license to consult it on an "as is" basis.
Schneider Electric products and equipment should be installed, operated, serviced, and
maintained only by qualified personnel.
As standards, specifications, and designs change from time to time, information contained in
this guide may be subject to change without notice.
To the extent permitted by applicable law, no responsibility or liability is assumed by
Schneider Electric and its subsidiaries for any errors or omissions in the informational
content of this material or consequences arising out of or resulting from the use of the
information contained herein.
EIO0000001714.09 3
Processor Load......................................................................................................66
Priority of the Simulator...........................................................................................68
Data in the User Task .............................................................................................69
Minimum Sleep Time ..............................................................................................71
Info .......................................................................................................................72
Help ......................................................................................................................72
Ending the Simulation.............................................................................................72
Index .........................................................................................................................73
4 EIO0000001714.09
Safety Information
Safety Information
Important Information
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.
The addition of this symbol to a “Danger” or “Warning” safety label indicates that an
electrical hazard exists which will result in personal injury if the instructions are not
followed.
This is the safety alert symbol. It is used to alert you to potential personal injury
hazards. Obey all safety messages that follow this symbol to avoid possible injury or
death.
! DANGER
DANGER indicates a hazardous situation which, if not avoided, will result in death or serious
injury.
! WARNING
WARNING indicates a hazardous situation which, if not avoided, could result in death or
serious injury.
! CAUTION
CAUTION indicates a hazardous situation which, if not avoided, could result in minor or
moderate injury.
NOTICE
NOTICE is used to address practices not related to physical injury.
EIO0000001714.09 5
Safety Information
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.
WARNING
UNGUARDED EQUIPMENT
• Do not use this software and related automation equipment on equipment which does
not have point-of-operation protection.
• Do not reach into machinery during operation.
Failure to follow these instructions can result in death, serious injury, or equipment
damage.
This automation equipment and related software is used to control a variety of industrial
processes. The type or model of automation equipment suitable for each application will
vary depending on factors such as the control function required, degree of protection
required, production methods, unusual conditions, government regulations, etc. In some
applications, more than one processor may be required, as when backup redundancy is
needed.
Only you, the user, machine builder or system integrator can be aware of all the conditions
and factors present during setup, operation, and maintenance of the machine and,
therefore, can determine the automation equipment and the related safeties and interlocks
which can be properly used. When selecting automation and control equipment and related
software for a particular application, you should refer to the applicable local and national
standards and regulations. The National Safety Council's Accident Prevention Manual
(nationally recognized in the United States of America) also provides much useful
information.
In some applications, such as packaging machinery, additional operator protection such as
point-of-operation guarding must be provided. This is necessary if the operator's hands and
6 EIO0000001714.09
Safety Information
other parts of the body are free to enter the pinch points or other hazardous areas and
serious injury can occur. Software products alone cannot protect an operator from injury. For
this reason the software cannot be substituted for or take the place of point-of-operation
protection.
Ensure that appropriate safeties and mechanical/electrical interlocks related to point-of-
operation protection have been installed and are operational before placing the equipment
into service. All interlocks and safeties related to point-of-operation protection must be
coordinated with the related automation equipment and software programming.
NOTE: Coordination of safeties and mechanical/electrical interlocks for point-of-
operation protection is outside the scope of the Function Block Library, System User
Guide, or other implementation referenced in this documentation.
WARNING
EQUIPMENT OPERATION HAZARD
• Verify that all installation and set up procedures have been completed.
• Before operational tests are performed, remove all blocks or other temporary holding
means used for shipment from all component devices.
• Remove tools, meters, and debris from equipment.
Failure to follow these instructions can result in death, serious injury, or equipment
damage.
Follow all start-up tests recommended in the equipment documentation. Store all equipment
documentation for future references.
Software testing must be done in both simulated and real environments.
Verify that the completed system is free from all short circuits and temporary grounds that
are not installed according to local regulations (according to the National Electrical Code in
the U.S.A, for instance). If high-potential voltage testing is necessary, follow
recommendations in equipment documentation to prevent accidental equipment damage.
Before energizing equipment:
• Remove tools, meters, and debris from equipment.
EIO0000001714.09 7
Safety Information
8 EIO0000001714.09
About the Book
Validity Note
This document has been updated for the release of EcoStruxure™ Control Expert 15.3.
The technical characteristics of the devices described in the present document also appear
online. To access the information online, go to the Schneider Electric home page www.se.
com/ww/en/download/.
The characteristics that are described in the present document should be the same as those
characteristics that appear online. In line with our policy of constant improvement, we may
revise content over time to improve clarity and accuracy. If you see a difference between the
document and online information, use the online information as your reference.
Related Documents
Title of documentation Reference number
EcoStruxure™ Control Expert, System Bits and Words, EIO0000002135 (ENG)
Reference Manual EIO0000002136 (FRE)
EIO0000002137 (GER)
EIO0000002139 (SPA)
EIO0000002138 (ITA)
EIO0000002140 (CHS)
EIO0000001714.09 9
About the Book
WARNING
LOSS OF CONTROL
• Perform a Failure Mode and Effects Analysis (FMEA), or equivalent risk analysis, of
your application, and apply preventive and detective controls before implementation.
• Provide a fallback state for undesired control events or sequences.
• Provide separate or redundant control paths wherever required.
• Supply appropriate parameters, particularly for limits.
• Review the implications of transmission delays and take actions to mitigate them.
• Review the implications of communication link interruptions and take actions to
mitigate them.
• Provide independent paths for control functions (for example, emergency stop, over-
limit conditions, and error conditions) according to your risk assessment, and
applicable codes and regulations.
• Apply local accident prevention and safety regulations and guidelines.1
• Test each implementation of a system for proper operation before placing it into
service.
Failure to follow these instructions can result in death, serious injury, or equipment
damage.
1 For additional information, refer to NEMA ICS 1.1 (latest edition), Safety Guidelines for the
Application, Installation, and Maintenance of Solid State Control and to NEMA ICS 7.1
(latest edition), Safety Standards for Construction and Guide for Selection, Installation and
Operation of Adjustable-Speed Drive Systems or their equivalent governing your particular
location.
10 EIO0000001714.09
About the Book
WARNING
UNINTENDED EQUIPMENT OPERATION
• Only use software approved by Schneider Electric for use with this equipment.
• Update your application program every time you change the physical hardware
configuration.
Failure to follow these instructions can result in death, serious injury, or equipment
damage.
EIO0000001714.09 11
About the Book
Standard Description
ISO 12100:2010 Safety of machinery - General principles for design - Risk assessment and risk
reduction
EN 60204-1:2006 Safety of machinery - Electrical equipment of machines - Part 1: General requirements
ISO 14119:2013 Safety of machinery - Interlocking devices associated with guards - Principles for
design and selection
IEC 62061:2015 Safety of machinery - Functional safety of safety-related electrical, electronic, and
electronic programmable control systems
IEC 61784-3:2016 Industrial communication networks - Profiles - Part 3: Functional safety fieldbuses -
General rules and profile definitions.
12 EIO0000001714.09
About the Book
In addition, terms used in the present document may tangentially be used as they are
derived from other standards such as:
Standard Description
IEC 61158 series Digital data communications for measurement and control – Fieldbus for use in
industrial control systems
Finally, the term zone of operation may be used in conjunction with the description of
specific hazards, and is defined as it is for a hazard zone or danger zone in the Machinery
Directive (2006/42/EC) and ISO 12100:2010.
NOTE: The aforementioned standards may or may not apply to the specific products
cited in the present documentation. For more information concerning the individual
standards applicable to the products described herein, see the characteristics tables for
those product references.
EIO0000001714.09 13
Simulating a Controller
Simulating a Controller
Overview
This chapter describes simulating a controller.
Introduction
General Description
PLC Simulator is supplied prior to a physical controller deployment for test purposes only. It
does not replace the physical controller and the application based only on simulation cannot
be used in a production environment without physically testing and commissioning that
application, nor can you use the PLC Simulator as a virtual controller.
Installation
PLC Simulator is automatically installed with Control Expert (PLC Simulation functionality).
It is located in the Control Expert repository.
Refer to Differences Between the PLC Simulator and a Physical Controller, page 23 of this
guide for further information.
Area of Use
PLC Simulator allows you to simulate a controller.
The use of Breakpoints, Stepping and the GoTo function enable you to test your program in
the simulated controller.
14 EIO0000001714.09
Simulating a Controller
EIO0000001714.09 15
Simulating a Controller
• If the Use default application to start simulator (enforce security) box is cleared, a
message is displayed to inform that the PLC Simulator use is not secured on its 502
Port.
At first start of PLC Simulator, the box is selected but the path is empty. A popup message
informs that:
• A valid Control Expert application is mandatory to start PLC Simulator.
• To help enforce security, it is necessary to use an Application Password.
NOTE: A password-protected application is necessary to help enforce security on
Ethernet port of your computer which is by default port 502.
When PLC Simulator is started from Control Expert (the menu PLC > Connect) or from
Windows menus with Use default application to start simulator (enforce security) box
selected:
• If there is no application with a password in the PLC Simulator or the application path is
not valid, the Simulator Panel Options window appear and PLC Simulator does not
start unless a valid path is set or the option is cleared.
• If the application path is valid, the PLC Simulator starts.
Loading a Project
Loading a project in PLC Simulator
16 EIO0000001714.09
Simulating a Controller
Step Action
1 In Control Expert, enable the simulator mode using the menu command PLC > Simulation mode
Result:
• The PLC Simulator icon, page 20 appears in the toolbar:
Result: The project is loaded on PLC Simulator and the PLC Simulator icon looks as follows in the
toolbar:
EIO0000001714.09 17
Simulating a Controller
Creating a Connection
Usually, PLC Simulator is installed on the same PC as Control Expert (Local Host). When
the menu command PLC > Connect is selected, a connection to the Local Host PC on the
default port 502 (Schneider Port) is automatically created. The project can also be loaded on
PLC Simulator on another PC via a TCP/IP connection or on PLC Simulator running on a
different port.
In this case you must specify the TCP/IP address and port number of the target PC when
following the Loading a project procedure before carrying out Step 3 in the step-action table
above (creating a connection). See Loading a Project, page 16.
Then select the Control Expert menu command PLC > Set Address, and in the Address
text box of the Simulator options, enter the TCP/IP address and the optional port number of
the target PC (for example: 139.158.106.127:123 where 123 is the port number). After
that, continue with Step 3 in the step-action table above.
If you want to load the project in the Local Host PC PLC Simulator running on the default
port 502 (Control Expert and simulator on the same PC), you do not have to carry out this
step as the Local Host PC address and the port number are automatically entered.
18 EIO0000001714.09
Simulating a Controller
Multiple Instances
As of Control Expert version 15.0, multiple instances of PLC Simulator on the same Local
Host PC are supported. However, each PLC Simulator instance on the same Local Host PC
connects to a unique port number. If one instance is already running with the default port
502, start a new instance with a different port number. For example, enter 127.0.0.1:503
as a port number for the port 503 in the Address text box of the Simulator options.
EIO0000001714.09 19
Simulating a Controller
Can't register Simulator. One active PLC Simulator Acknowledge the error message with
Already running! instance use the same port than OK and set another port than the PLC
the PLC Simulator instance you Simulator instances already active.
are trying to activate.
Version information from xxx invalid file in the PLC Simulator Reinstall Control Expert after
cannot be read (err=0)! directory uninstalling it.
The DLL xxx is incompatible invalid file in the PLC Simulator Reinstall Control Expert after
(...)! directory uninstalling it.
At least one Simulator DLL is invalid file in the PLC Simulator Reinstall Control Expert after
incompatible. Simulation not directory uninstalling it.
possible!
Step Action
1 Call the menu command Exit Simulation from the shortcut menu for the PLC Simulator icon in the
toolbar or the PLC Simulator dialog box.
General Structure
The PLC Simulator icon is composed according to the following rules.
The background color represents the operational state.
20 EIO0000001714.09
Simulating a Controller
The inner symbol shows the controller state, such as NOCONF, IDLE, STOPPED, RUN.
IDLE The project loaded on the controller has not been started or
reset with the Reset command button.
EIO0000001714.09 21
Simulating a Controller
Error States
Meaning of the symbols
Internal States
The following symbols represent internal exception states. It is not possible to recover from
these states, so the PLC Simulator must be closed and restarted again.
22 EIO0000001714.09
Differences Between the PLC Simulator and a
Physical Controller
EIO0000001714.09 23
Differences Between the PLC Simulator and a
Physical Controller
This mainly affects functions and function blocks that accessed special platforms, such as I/
O blocks, communication and hardware specific functions.
The following PLC OS system services are supported:
• diagnostics functions
• functions to read the date and time
• propagation delay time
• object access (except network variables)
• Premium DFBs
• SFC
The following PLC OS system services are not supported:
• closed loop control (CLC)
• Fip IO
• BusX IO
• Quantum IO
• configuration
• communication
• functions to set the date and time
Memory Structure
The different PLC families vary in memory structure.
NOTE: It is possible that the alignment of data are not the same when the projects is
transferred from the PLC simulator to a Modicon M340, M580, or Momentum PLC. So
check the structure of the data of the project.
For detailed information about memory alignment refer to chapter DDT: Mapping rules (see
EcoStruxure™ Control Expert, Program Languages and Structure, Reference Manual).
For detailed information about storage principles and memory structure refer to chapter
Application Memory Structure (see EcoStruxure™ Control Expert, Program Languages and
Structure, Reference Manual).
Communication
Communication limitations
24 EIO0000001714.09
Differences Between the PLC Simulator and a
Physical Controller
• The PLC simulator only supports TCP/IP based communication (Schneider Port 502).
In other cases a Modbus exception code is returned.
• Modbus, Modbus Plus or Uni-TE are not supported by the PLC simulator.
• For Control Expert V14.1 and earlier the PLC simulator does not support
communication to other PCs or PLC simulators, neither remote nor local.
• For Control Expert V14.1 and earlier, the PLC simulator has no communication timeout.
• Communication network, such as Uni-Telway, Ethway, Fipway, Modbus, Modbus Plus,
etc., are not supported by the PLC simulator.
NOTE: Communication function blocks that require PLC client and PLC server are
supported with multiple instances of PLC simulator, for details, refer to IP Address and
Communication Port Simulation, page 26.
The PLC simulator supports the following native Modbus commands:
EIO0000001714.09 25
Differences Between the PLC Simulator and a
Physical Controller
Debugging Limitations
The PLC simulator could enter HALT state when executing the Step Info or Step Over
debugging command in textual languages.
If the current element is a complex instruction (i.e. copying a huge array from one variable to
another), the execution of this instruction takes a very long time, because it will be executed
in single step mode on the PLC simulator.
Setting a breakpoint on the next instruction and executing the Go command avoids this
problem.
Principle
In PLC application (client), the targeted PLC (server) is addressed using its IP address as
input parameter IN of ADDM function block. In these function blocks, the communication
port is not defined as in the PLC, only the port 502 is always used.
After loading PLC application (client) in a first PLC simulator instance of the Local Host PC,
to simulate the targeted PLC (server) in a second PLC simulator instance, it could only be
addressed through another TCP/IP communication port. See Staring PLC Simulator with
Command Line, page 19.
26 EIO0000001714.09
Differences Between the PLC Simulator and a
Physical Controller
Instead of rewriting the IP address of the targeted PLC (server) in the PLC application
(client) the PLC simulator instance can substitute IP address of the targeted PLC (server)
with a TCP/IP communication port provided in a port simulation file. This file contains a
correspondence between the IP address and the Local Host TCP/IP communication port.
As illustrated below, when the PLC application (client) calls a targeted PLC (server) using
the {IPB} IP address, the PLC simulator instance A substitutes the {IPB} address with
{localHostIP:PortB} address corresponding to the PLC simulator instance B connection.
EIO0000001714.09 27
Differences Between the PLC Simulator and a
Physical Controller
Limitation
The use of READ_VAR, WRITE_VAR, or DATA_EXCH by the PLC simulator requires Libset
version 15.0 or any subsequent supporting version.
28 EIO0000001714.09
Menu Commands and Dialog Boxes in the PLC
Simulator
Simulator Control
Description
You can open and close the simulator dialog using:
• The menu command Simulator Control in the context menu of the simulator symbol in
the task bar or the simulator symbol.
• A double-click with the left mouse button on the simulator symbol in the task bar.
One of the following dialog boxes is open or closed depending on the project loaded:
• Unknown CPU, page 29
• Modicon M580 CPU, page 32
• Modicon Quantum CPU, page 42
• Modicon Quantum Safety CPU, page 45
• Modicon Premium CPU, page 49
• Modicon M340 CPU, page 51
• Modicon Momentum CPU, page 58
EIO0000001714.09 29
Menu Commands and Dialog Boxes in the PLC
Simulator
IDLE IDLE The project loaded on the CPU has not been started or reset
with the Reset button.
STOP STOPPED No project is running. However, the loaded project was in RUN
state at least once.
RUN RUN A project with at least one task is running.
30 EIO0000001714.09
Menu Commands and Dialog Boxes in the PLC
Simulator
The second line shows the current state of the project and can contain the following texts:
CHECKED The project was checked formally and found to be valid. However, the CPU has not
been configured using this project.
CONF The project was checked formally and found to be valid. The CPU has been configured
using this project.
Events
With this button, you can open and close the event dialog box, page 60.
The button is shown if I/O events are defined in the project currently loaded (if the project
uses event tasks).
Reset
With this button, you can reset the simulated CPU. This corresponds to a cold start of the
CPU (the connection between Control Expert and the simulator is broken, project variables
are reset).
This button corresponds to the reset button on a real CPU.
Power Cycle
With this button, you simulate a warm start of the CPU. It means that the connection
between Control Expert and the simulator is broken, the current project variables remain
and the simulator goes into the state RUN (autostart active) or STOP (autostart
deactivated).
EIO0000001714.09 31
Menu Commands and Dialog Boxes in the PLC
Simulator
A power cycle corresponds to a power off and power on of a real power supply.
Simulation
Dialog box fields:
Host PC name: DNS name of the host PC for the simulator. If the PC has multiple network cards,
only the first is shown.
Host IP address: TCP/IP address of the host PC for the simulator. If the PC has multiple network
cards, only the first is shown.
Clients Connected
The list shows current clients connected with the PC (PCs which are connected via TCP/IP
with the host PC of the simulator, page 18). The DNS name and TCP/IP address are shown
for each client.
32 EIO0000001714.09
Menu Commands and Dialog Boxes in the PLC
Simulator
flashing off STOP The project loaded on the PLC has not been started or has been
reset with the Reset button.
on off RUN A project with at least one task is running.
flashing flashing HALT A detected error has occurred in the project. The simulated CPU
must be reinitialized or reset using the Reset button.
The BACKUP LED is on if a problem occurs during simulated card access or if the
simulated memory card is removed.
The I/O, DL, ETH MS, ETH NS, and FORCED I/O LEDs are not supported by the simulator.
EIO0000001714.09 33
Menu Commands and Dialog Boxes in the PLC
Simulator
Card Acc
The Card Acc LED is on when the card is accessible.
Memory Card
Simulated features of a memory card for the Modicon M580 CPU, page 38:
• Files on the memory card generated by the data storage function blocks.
• Remove/insert memory card.
• Memory card full.
• Write protection.
Reset
With this button, you can reset the simulated CPU. This corresponds to a cold start of the
CPU where the connection between Control Expert and the simulator is broken, project
variables are reset and the simulator goes in RUN (if auto start is activated) or in STOP (if
auto start is deactivated)).
Power Cycle
With this button, you execute a power cycle (power off/ power on) for the simulated CPU.
This corresponds to a warm start of the CPU (the connection between Control Expert and
the simulator is broken and the current project variables remain).
A power cycle corresponds to a power off and power on of a real power supply.
Simulation
Dialog box fields:
Host PC name: DNS name of the host PC for the simulator. If the PC has multiple network cards,
only the first is shown.
Host IP address: TCP/IP address of the host PC for the simulator. If the PC has multiple network
cards, only the first is shown.
34 EIO0000001714.09
Menu Commands and Dialog Boxes in the PLC
Simulator
Clients Connected
The list shows current clients connected with the PC (PCs which are connected via TCP/IP
with the host PC of the simulator, page 18). The DNS name and TCP/IP address are shown
for each client.
EIO0000001714.09 35
Menu Commands and Dialog Boxes in the PLC
Simulator
No user project
loaded or the loaded
project is invalid.
flashing off on: SAFE on: off STOP The project loaded
task running Safety on the PLC has not
mode been started or has
off: SAFE been reset with the
task stopped. off flashing: Reset button.
Mainte-
nance mode
on off on: SAFE on: off RUN A project with at least
task running Safety one task is running.
mode
off: SAFE
task stopped. off flashing:
Mainte-
nance mode
flashing flashing on: SAFE on: off HALT A detected error has
task running Safety occurred in the
mode project.
off: SAFE
task stopped. off flashing: Reinitialize the
Mainte- simulated CPU or
nance mode reset it using the
Reset button.
off on off off off SAFE An unrecoverable
detected error has
occurred in the
project. This means
communication is no
longer possible.
The BACKUP LED is on if a problem occurs during simulated card access or if the
simulated memory card is removed.
The I/O, DL, ETH MS, ETH NS, and FORCED I/O LEDs are not supported by the simulator.
36 EIO0000001714.09
Menu Commands and Dialog Boxes in the PLC
Simulator
Card Acc
The Card Acc LED is on when the card is accessible.
Memory Card
Simulated features of a memory card for the Modicon M580 CPU, page 38:
• Files on the memory card generated by the data storage function blocks.
• Remove/insert memory card.
• Memory card full.
• Write protection.
Reset
With this button, you can reset the simulated CPU. This corresponds to a cold start of the
CPU where the connection between Control Expert and the simulator is broken, project
variables are reset and the simulator goes in RUN (if auto start is activated) or in STOP (if
auto start is deactivated)).
Power Cycle
With this button, you execute a power cycle (power off/ power on) for the simulated CPU.
This corresponds to a warm start of the CPU (the connection between Control Expert and
the simulator is broken and the current project variables remain).
A power cycle corresponds to a power off and power on of a real power supply.
Simulation
Dialog box fields:
Host PC name: DNS name of the host PC for the simulator. If the PC has multiple network cards,
only the first is shown.
Host IP address: TCP/IP address of the host PC for the simulator. If the PC has multiple network
cards, only the first is shown.
EIO0000001714.09 37
Menu Commands and Dialog Boxes in the PLC
Simulator
Connected Clients
The list shows current clients connected with the PC (PCs which are connected via TCP/IP
with the host PC of the simulator, page 18). The DNS name and TCP/IP address are shown
for each client.
No Backup/Restore
On a real Modicon M580 CPU, the memory card is separated in 2 parts:
• A part for the OS, where the application is stored persistent (backup/restore
mechanism).
• A part for the application, where the application can store data by using data storage
function blocks.
NOTE: The simulator does not simulate the backup/restore part of the memory card.
38 EIO0000001714.09
Menu Commands and Dialog Boxes in the PLC
Simulator
EIO0000001714.09 39
Menu Commands and Dialog Boxes in the PLC
Simulator
For detailed information about the file management functions/function blocks please refer to
the System Block Library documentation.
Step Action
Result: After a potential card access has finished the Card Acc LED goes out.
2 Open the context menu by clicking the memory card with the right mouse button.
Result: The virtual front plate shows an empty memory card slot and the CARDERR LED is on.
NOTE: Removing the memory card has no influence on the used directory and the files,
but the access to the files is disabled inside the simulator.
Step Action
1 Open the context menu by clicking the memory card with the right mouse button.
Result: A Windows standard file selection dialog opens. The selection is pre-initialized with the last
used memory card directory.
Note: The file selection box also has a Write protected check box to insert a write protected virtual
memory card.
40 EIO0000001714.09
Menu Commands and Dialog Boxes in the PLC
Simulator
Step Action
Result: The virtual front plate shows a memory card and the Card Acc LED goes on.
Since a directory and its content represent the memory card, exchanging the content of the
directory can simulate the exchange of a memory card. This can be done by normal
Windows means (cut/copy/paste of files or renaming/moving folders).
Write Protection
By default the memory card is not write protected at simulator start.
At any time, it is possible to simulate that the memory card is write protected.
This is done by opening the context menu (right-click the memory card) and selecting the
menu command Write Protection.
After this menu command is selected:
EIO0000001714.09 41
Menu Commands and Dialog Boxes in the PLC
Simulator
42 EIO0000001714.09
Menu Commands and Dialog Boxes in the PLC
Simulator
UnCfg NOCONF (no No user project loaded or the loaded project is invalid.
configuration)
Idle IDLE The project loaded on the CPU has not been started or reset
with the Reset button.
Stop STOPPED No project is running. However, the loaded project was in RUN
state at least once.
Run RUN A project with at least one task is running.
Halt HALT An error has occurred in the project. The simulated CPU must
be reinitialized or reset using the Reset button.
EIO0000001714.09 43
Menu Commands and Dialog Boxes in the PLC
Simulator
Key Switch
By clicking the switch symbol, various switch positions can be simulated:
Events
With this button, you can open and close the event dialog box, page 60.
The button is shown if I/O events are defined in the project currently loaded (if the project
uses event tasks).
Reset
With this button, you can reset the simulated CPU. This corresponds to a cold start of the
CPU (the connection between Control Expert and the simulator is broken, project variables
are reset and the simulator goes in RUN (if auto start is activated) or in STOP (if auto start is
deactivated)).
Reset corresponds to the reset button on a real CPU.
Power Cycle
With this button, you execute a power cycle (power off / power on) for the simulated CPU.
This corresponds to a warm start of the CPU (the connection between Control Expert and
the simulator is broken and the current project variables remain).
A power cycle corresponds to a power off and power on of a real power supply.
44 EIO0000001714.09
Menu Commands and Dialog Boxes in the PLC
Simulator
Simulation
Dialog box fields:
Host PC name: DNS name of the host PC for the simulator. If the PC has multiple network cards,
only the first is shown.
Host IP address: TCP/IP address of the host PC for the simulator. If the PC has multiple network
cards, only the first is shown.
Clients Connected
The list shows current clients connected with the PC (PCs which are connected via TCP/IP
with the host PC of the simulator, page 18). The DNS name and TCP/IP address are shown
for each client.
EIO0000001714.09 45
Menu Commands and Dialog Boxes in the PLC
Simulator
Init INIT This display is shown for a very short time while the simulator is
(Initialization) starting. It is quickly replaced by one of the following displays.
UnCfg NOCONF (no No user project loaded or the loaded project is invalid.
configuration)
Idle IDLE The project loaded on the CPU has not been started or reset with the
Reset command button.
Stop STOPPED No project is running. However, the loaded project was in RUN state
at least once.
Run RUN A project with at least one task is running.
Halt HALT An error has occurred in the project. The simulated CPU must be
reinitialized or reset using the Reset command button.
Err ERROR An unrecoverable detected error has occurred in the project. This
means communication is no longer possible. The simulated CPU must
be reset using the Reset command button.
46 EIO0000001714.09
Menu Commands and Dialog Boxes in the PLC
Simulator
For further information on the different modes please refer to the Unity
Pro XLS Software Specifics manual.
Key Switch
By clicking the switch symbol, various switch positions can be simulated:
EIO0000001714.09 47
Menu Commands and Dialog Boxes in the PLC
Simulator
- Stop This switch position of a real CPU is not supported by the simulator.
Reset
With this button, you can reset the simulated CPU. This corresponds to a cold start of the
CPU (the connection between the Control Expert and the simulator is broken, project
variables are reset).
This command button corresponds to the reset button on a real CPU.
Power Cycle
With this button, you simulate a cold start of the CPU as a safety CPU does not support
warm start. The connection between Control Expert and the simulator is broken, the
simulator goes into the state RUN (autostart active) or STOP (autostart deactivated).
This command button corresponds to the power off and power on of a real power supply.
Simulation
Dialog box fields:
Host PC name: DNS name of the host PC for the simulator. If the PC has multiple network cards,
only the first is shown.
Host IP address: TCP/IP address of the host PC for the simulator. If the PC has multiple network
cards, only the first is shown.
48 EIO0000001714.09
Menu Commands and Dialog Boxes in the PLC
Simulator
Clients Connected
The list shows current clients connected with the PC (PCs which are connected via TCP/IP
with the host PC of the simulator, page 18). The DNS name and TCP/IP address are shown
for each client.
EIO0000001714.09 49
Menu Commands and Dialog Boxes in the PLC
Simulator
flashing off IDLE The project loaded on the CPU has not been started or reset
with the Reset button.
flashing off STOPPED No project is running. However, the loaded project was in RUN
state at least once.
on off RUN A project with at least one task is running.
off flashing HALT An error has occurred in the project. The simulated CPU must
be reinitialized or reset using the Reset button.
When data is being exchanged between Control Expert and the simulator, the TER LED is
flashing.
The CH0, CH1, CH2, CH3, I/O, and FIP LEDs are no supported by the simulator.
Events
With this button, you can open and close the event dialog box, page 60.
The button is shown if I/O events are defined in the project currently loaded (if the project
uses event tasks).
Reset
With this button, you can reset the simulated CPU. This corresponds to a cold start of the
CPU where the connection between Control Expert and the simulator is broken, project
variables are reset and the simulator goes in RUN (if auto start is activated) or in STOP (if
auto start is deactivated)).
Reset corresponds to the reset button on a real CPU.
50 EIO0000001714.09
Menu Commands and Dialog Boxes in the PLC
Simulator
Power Cycle
With this button, you execute a power cycle (power off/ power on) for the simulated CPU.
This corresponds to a warm start of the CPU (the connection between Control Expert and
the simulator is broken and the current project variables remain).
A power cycle corresponds to a power off and power on (or pressing the reset button) of a
real power supply.
Simulation
Dialog box fields:
Host PC name: DNS name of the host PC for the simulator. If the PC has multiple network cards,
only the first is shown.
Host IP address: TCP/IP address of the host PC for the simulator. If the PC has multiple network
cards, only the first is shown.
Clients Connected
The list shows current clients connected with the PC (PCs which are connected via TCP/IP
with the host PC of the simulator, page 18). The DNS name and TCP/IP address are shown
for each client.
EIO0000001714.09 51
Menu Commands and Dialog Boxes in the PLC
Simulator
flashing off IDLE The project loaded on the CPU has not been started or reset with
the Reset button.
flashing off STOPPED No project is running. However, the loaded project was in RUN
state at least once.
on off RUN A project with at least one task is running.
off flashing HALT An error has occurred in the project. The simulated CPU must be
reinitialized or reset using the Reset button.
off on ERROR An unrecoverable detected error has occurred in the project. This
means communication is no longer possible. The simulated CPU
must be reset using the Reset button.
When data is being exchanged between Control Expert (or other clients) and the simulator,
the SER COM LED is flashing.
52 EIO0000001714.09
Menu Commands and Dialog Boxes in the PLC
Simulator
The CARDERR LED is ON if a problem occurs during card access or if the memory card is
removed.
The I/O, CAN RUN, CAN ERR, ETH ACT, ETH STS, and 10/100 LEDs are not supported
by the simulator.
Card Acc
The Card Acc LED is on when the card is accessible.
Memory Card
The following features of a memory card can be simulated for the Modicon M340 CPU, page
54:
• Files on the memory card generated by the data storage function blocks.
• Remove/insert memory card.
• Memory card full.
• Write protection.
Reset
With this button, you can reset the simulated CPU. This corresponds to a cold start of the
CPU where the connection between Control Expert and the simulator is broken, project
variables are reset and the simulator goes in RUN (if auto start is activated) or in STOP (if
auto start is deactivated)).
Power Cycle
With this button, you execute a power cycle (power off/ power on) for the simulated CPU.
This corresponds to a warm start of the CPU (the connection between Control Expert and
the simulator is broken and the current project variables remain).
A power cycle corresponds to a power off and power on of a real power supply.
EIO0000001714.09 53
Menu Commands and Dialog Boxes in the PLC
Simulator
Simulation
Dialog box fields:
Host PC name: DNS name of the host PC for the simulator. If the PC has multiple network cards,
only the first is shown.
Host IP address: TCP/IP address of the host PC for the simulator. If the PC has multiple network
cards, only the first is shown.
Clients Connected
The list shows current clients connected with the PC (PCs which are connected via TCP/IP
with the host PC of the simulator, page 18). The DNS name and TCP/IP address are shown
for each client.
No Backup/Restore
On a real Modicon M340 CPU, the memory card is separated in 2 parts:
• A part for the OS, where the application is stored persistent (backup/restore
mechanism).
• A part for the application, where the application can store data by using data storage
function blocks.
NOTE: The simulator does not simulate the backup/restore part of the memory card.
54 EIO0000001714.09
Menu Commands and Dialog Boxes in the PLC
Simulator
EIO0000001714.09 55
Menu Commands and Dialog Boxes in the PLC
Simulator
Step Action
Result: After a potential card access has finished the Card Acc LED goes out.
2 Open the context menu by clicking the memory card with the right mouse button.
Result: The virtual front plate shows an empty memory card slot and the CARDERR LED is on.
NOTE: Removing the memory card has no influence on the used directory and the files,
but the access to the files is disabled inside the simulator.
Step Action
1 Open the context menu by clicking the memory card with the right mouse button.
56 EIO0000001714.09
Menu Commands and Dialog Boxes in the PLC
Simulator
Step Action
Result: A Windows standard file selection dialog opens. The selection is pre-initialized with the last
used memory card directory.
Note: The file selection box also has a Write protected check box to insert a write protected virtual
memory card.
Result: The virtual front plate shows a memory card and the Card Acc LED goes on.
Since a directory and its content represent the memory card, exchanging the content of the
directory can simulate the exchange of a memory card. This can be done by normal
Windows means (cut/copy/paste of files or renaming/moving folders).
Write Protection
By default the memory card is not write protected at simulator start.
EIO0000001714.09 57
Menu Commands and Dialog Boxes in the PLC
Simulator
At any time, it is possible to simulate that the memory card is write protected.
This is done by opening the context menu (right-click the memory card) and selecting the
menu command Write Protection.
After this menu command is selected:
• Data writing is not possible.
• Read accesses are possible.
This state is indicated by the check mark in the context menu command.
Control Expert adds some restrictions linked with the memory card (for example program
modification is forbidden if the card is write protected). The simulator supports these
restrictions too.
To simulate the write protection feature the following system bits and words are supported
by the simulator:
• %S65 (CARDIS)
• %S96 (BACKUPPROGOK)
• %SW97 (CARDSTS)
NOTE: It is not possible to access the files via an FTP client through the simulator since
the files are directly accessible by Windows features.
58 EIO0000001714.09
Menu Commands and Dialog Boxes in the PLC
Simulator
Reset
The Reset button is represented but it does not concern Modicon Momentum CPUs.
EIO0000001714.09 59
Menu Commands and Dialog Boxes in the PLC
Simulator
Power Cycle
With this button, you simulate a warm start of the CPU. It means that the connection
between Control Expert and the simulator is broken, the current project variables remain
and the simulator goes into the state RUN (autostart active) or STOP (autostart
deactivated).
A power cycle corresponds to a power off and power on of a real power supply.
Simulation
Dialog box fields:
Host PC name: DNS name of the host PC for the simulator. If the PC has multiple network cards,
only the first is shown.
Host IP address: TCP/IP address of the host PC for the simulator. If the PC has multiple network
cards, only the first is shown.
Clients Connected
The list shows current clients connected with the PC (PCs which are connected via TCP/IP
with the host PC of the simulator, page 18). The DNS name and TCP/IP address are shown
for each client.
Event Dialog
Introduction
You can open and close the event dialog with
• the menu command Event dialog in the context menu of the simulator symbol in the
task bar or the simulator symbol
• the command button Events in the simulator dialog (only open)
This dialog is not available for safety PLCs.
60 EIO0000001714.09
Menu Commands and Dialog Boxes in the PLC
Simulator
Selection Condition
The menu command and the command button are enabled if IO events are defined in the
project currently loaded, i.e. if the project uses event tasks.
Representation
Event dialog:
EVT0 Event
Possible events for the EVT0 task are shown here. This user task has the highest priority in
the system and can only contain one IO event.
If this task is part of the project, the event command button is enabled.
EVTi IO Event
Possible events for the EVTi IO task are shown here. The maximum number of tasks
depends on the PLC simulated.
The event command buttons are enabled according to the number of events defined in the
project.
EIO0000001714.09 61
Menu Commands and Dialog Boxes in the PLC
Simulator
Clear
Introduction
With Clear, you can remove the currently loaded project from the simulator memory and put
the simulated PLC (and the simulator) into NOCONF status.
This corresponds to a cold start of the PLC without valid project loaded (the connection
between Control Expert and the simulator is broken).
You can execute Clear with the menu command Clear in the context menu of the simulator
symbol in the task bar.
Reset
Introduction
With Reset, you can reset the simulated PLC (and the simulator). This corresponds to a cold
start of the PLC (the connection between Control Expert, the simulator is broken, project
variables are reset and the simulator goes in RUN (if auto start is activated) or in STOP (if
auto start is deactivated)).
Reset corresponds to the reset button on a real CPU.
You can execute reset with
• the menu command Reset in the context menu of the simulator symbol in the task bar
or the simulator symbol
• the command button Reset in the simulator dialog.
NOTE: %S0 is not set to 1 using Reset with the PLC simulator (in contrast to a real
PLC).
Power Cycle
Introduction
With Power Cycle, you execute a power cycle (power off/ power on) for the simulated PLC
(and the simulator). This corresponds to a warm start of the PLC (the connection between
Control Expert and simulator is broken and the current project variables remain).
62 EIO0000001714.09
Menu Commands and Dialog Boxes in the PLC
Simulator
A power cycle corresponds to the reset button of a Premium power supply or the unplugging
and plugging in of a power supply.
You can execute a power cycle with
• the menu command Power Cycle in the context menu of the simulator symbol in the
task bar or the simulator symbol
• the command button Power Cycle in the simulator dialog
NOTE: In case of a safety PLC, power cycle simulates a cold start. Project variables are
reset.
Description
In this dialog box, you can define special settings for PLC Simulator.
You can open the dialog box with the menu command Options in the context menu of the
PLC Simulator symbol in the task bar or the PLC Simulator icon.
EIO0000001714.09 63
Menu Commands and Dialog Boxes in the PLC
Simulator
Representation
Always on top
If you activate this check box, the PLC Simulator control window is always on top of other
dialog boxes and windows.
Sound
If you activate this check box, PLC Simulator plays a sound in the following situations:
• Starting and exiting PLC Simulator.
• Error in project.
64 EIO0000001714.09
Menu Commands and Dialog Boxes in the PLC
Simulator
Listening IP Address
When PLC Simulator runs on the same PC as the Control Expert instance, you should limit,
for security reasons, to the following IP address: 127.0.0.1.
Use a Listening IP address of 0.0.0.0 to set PLC Simulator to listen to another Control
Expert instance or controller on the network.
Timing (simulator)
Description
With this menu command, you can open and close the timing dialog box. This dialog box
shows simulator statistics for CPU use, process priority and user scan time. Additionally, you
can change the priority and the sleep time in this dialog box, to optimize simulator timing and
adjust the PC load.
EIO0000001714.09 65
Menu Commands and Dialog Boxes in the PLC
Simulator
Processor Load
Introduction
The processor load (on the PC) caused by the entire simulation and the individual user tasks
is shown here.
66 EIO0000001714.09
Menu Commands and Dialog Boxes in the PLC
Simulator
Process
This bar graph shows the actual processor load caused by the simulator process in percent.
Unlike the display in the Windows task manager which only indicates the current value, this
bar graph indicates the average value over the time shown at the end of the bar graph.
The time entry at the end of the bar graph is the time that has passed since the simulator
was started or since the last time reset was pressed.
Overhead
This bar graph shows the average processor load caused by the simulator process
overhead in percent.
The overhead is calculated as follows:
load caused by the entire process - load caused by the user tasks
This can be an absolute or relative value for the processor load caused by the simulator.
This setting can be made in the Display area.
The time entry at the end of the bar graph is the time that has passed since the simulator
was started or since the last time Reset was pressed.
EIO0000001714.09 67
Menu Commands and Dialog Boxes in the PLC
Simulator
Display: Absolute
If you activate this option button, the actual value is shown in the bar graph. This is shown
as a percentage of the entire processor load for the PC.
Display: Relative
If you activate this option button, the relative processor load is shown in the bar graph. This
is shown as a percentage of the processor load caused by the simulator.
Reset
If you press this command button, time measurements in this area are reset.
This is required to achieve a consistent representation of the times which have passed
because the individual times are not started simultaneously when opening the simulator.
Real-time
In this priority, user task cycle times only deviate by a few milliseconds.
NOTE: This priority should be used with care because the simulator has the highest
possible priority in this case and interrupts the Windows system. If you use this priority
with a very small sleep time and a cyclic user task, the PC may cease proper operation.
68 EIO0000001714.09
Menu Commands and Dialog Boxes in the PLC
Simulator
High
In this priority, user task cycle times normally do not deviate by more than 10 ms.
Normal
In this priority, user task cycle times can deviate up to several 100 ms.
Low
This priority quickly causes the watchdog to be triggered and should only be used on a PC
with nearly no load.
Apply
If you press this command button, settings in this area are applied and used immediately.
EIO0000001714.09 69
Menu Commands and Dialog Boxes in the PLC
Simulator
If a value occurs so seldom that it does not create a peak in the histogram, then a one pixel
peak is created so that the value can be seen.
Cycle time
This histogram shows the relative frequency of cycle time values in the user task currently
selected. See also Minimum Sleep Time, page 71
The counter to the left under the histogram counts the number of cycles in RUN mode
represented in this histogram.
Sleep time
This histogram shows the relative frequency of sleep time values in the user task currently
selected. See also Minimum Sleep Time, page 71
For cycle tasks, normally a single value is shown with 100 %. This is the minimum sleep
time for user tasks. If you change the value for the minimum sample time, a second peak is
created for the new value.
User tasks cycles are included in this histogram (regardless of the PLC mode).
Cycle Counter
The counter to the left under the histogram counts the number of cycles in RUN mode
represented in the cycle time histogram.
This counter has no meaning for the sleep time histogram because cycles are included
there (regardless of the PLC mode).
Reset
If you press this command button, the histograms for the user task currently selected is reset
and a new statistic is started.
70 EIO0000001714.09
Menu Commands and Dialog Boxes in the PLC
Simulator
Legend
Time Meaning
Sample time Time which is made available for running the user task.
Cycle time Time which is actually required for running the user task.
Sleep time Time in which the other programs on the PC can be executed.
Apply
If you press this command button, the minimum sleep time is applied to the selected user
task and used immediately.
EIO0000001714.09 71
Menu Commands and Dialog Boxes in the PLC
Simulator
Info
Description
With this menu command, you can open and close the info dialog box. This dialog box
shows the current version of the simulator and its components.
Help
Description
With this menu command, you can open the online help for the simulator.
72 EIO0000001714.09
Index
D
dialog boxes ..............................................29
M
menu commands .......................................29
S
simulating a controller.................................14
simulation ..................................................14
EIO0000001714.09 73
Schneider Electric
35 rue Joseph Monier
92500 Rueil Malmaison
France
+ 33 (0) 1 41 29 70 00
www.se.com