EcoStruxure Machine Expert version 1.1 does not support the M258, LMC058 and LMC078 controllers.

Core Dump

Core Dump for Exceptions

A core dump is a memory snapshot of the application data. When supported by the runtime system, a core dump is automatically saved to a file <application_name>.core in the application directory on the controller when an exception is detected.

In online mode, you can also generate a core dump explicitly if the application is currently stopped at breakpoint or if an exception has been detected. In this case, the core dump file is saved only in the project directory and not on the controller.

In offline mode, you can load the core dump of the application from the controller to the EcoStruxure Machine Expert project. Then the application is displayed in its online view with the data and values at the time when the exception was detected and the core dump was created.

In addition, the log file of the controller can be displayed from the time the core dump was created in the project.

NOTE: The firmware must support the functionality in order to display the variable values in the core dump view correctly. In the online view of the application that is created by loading the core dump into the project, menu commands are displayed as available but do not have any effect in this status. When choosing one of these commands, a message is displayed.

Refer to your controller programming manual to verify whether it supports the core dump functionality.

NOTE: Exception handling in the runtime system may overwrite parts of the variable values in the call stack. As a result, original values may be lost and important information may no longer be displayed when monitoring for variables in functions and methods.

Consider the following, for creating a project archive:

If...

Then...

If you created a core dump explicitly by choosing the command Create Core Dump,

then an option is automatically available in the archive configuration.

If you copied the core dump from the controller,

then you can add it to a project archive only by choosing the function Additional files.

NOTE: A project archive with a core dump must include the download information; otherwise the dump is unusable.

Using the Core Dump to Analyze Exceptions

Prerequisites:

oA project is open with an application that has produced an exception on the controller.

oThe runtime system is able to create core dumps.

oThe application in the project is in offline mode.

Step

Action

1

Load the core dump from the controller by executing the command Debug > Load Core Dump.

Result: An online view of the application is displayed. You see the variable values and call stack from the time when the error has been detected. This also includes the values of the I/O variables in the mapping dialog of the device configurator and the task configuration. The message Core dump loaded is displayed in the status line. The core dump file is copied as <project_name>.<device_name>.<application_name>.<application-Guid>.core to the local project directory.

2

Execute the command Debug > Load device log from Core Dump to load the device log from the time the error has been detected into the project.

Result: The log view opens (as in online mode of the device configurator) displaying the events at the time the core dump was created.

3

After you have completed the core dump analysis, execute the command Debug > Close Core Dump.

Result: The core dump view of the application closes and the project returns to its views in normal offline mode.

Manually Creating a Core Dump of the Running Application

Prerequisites:

oAn application is in online mode.

oThe runtime system supports core dump functionality.

Step

Action

1

Execute the command Debug > Create Core Dump.

Result: The creation of a new core dump starts. A progress bar appears in the status line together with a cancel button.

A core dump file is saved to the local project directory as <project_name>.<device_name>.<application_name>.<application-Guid>.core.

Programmed Error Handling for Exceptions

As an IEC 61131-3 extension, EcoStruxure Machine Expert supports specific operators (__TRY, __CATCH, __FINALLY, __ENDTRY) to catch exceptions. You can program statements that will be executed in case an error is detected instead of stopping the program. For further information, refer to the description of these operators.

This function is not available for all supported controllers. Consult the Programming Guide specific to your controller for further information.