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.
Refer to your controller programming manual to verify whether it supports the core dump functionality.
Consider the following, for creating a project archive:
If... |
Then... |
---|---|
If you created a core dump explicitly by choosing the command , |
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 . |
Prerequisites:
A project is open with an application that has produced an exception on the controller.
The runtime system is able to create core dumps.
The application in the project is in offline mode.
Step |
Action |
---|---|
1 |
Load the core dump from the controller by executing the command .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 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 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 .Result: The core dump view of the application closes and the project returns to its views in normal offline mode. |
Prerequisites:
An application is in online mode.
The runtime system supports core dump functionality.
Step |
Action |
---|---|
1 |
Execute the command .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. |
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.