Show Core Dump, Check Memory
When the CODESYS Memory Tools package is installed, CODESYS can display a core dump from the PLC in online mode. In the Memory view, you configure the application and memory area to be displayed.
You can also perform CODESYS-defined consistency checks of the memory and print the result to the message view.
The following core dump (a sample from a CODESYS Control Win) shows the hexadecimal addresses of the memory on the left. The data is shown in hexadecimal notation in the middle and as text on the right. Any data that cannot be represented by a displayable character is shown as a dot (.
).
0x04D7789C: 0000 301E 1C2C DE04 0000 0000 0000 0000 0000 0000 ..0..,Þ............. 0x04D778B0: 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 .................... 0x04D778C4: 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 ....................
Caution
The displayed bytes in the memory dump can be overwritten and the changes written to the PLC. CODESYS does not check that the changes are permitted. You can crash the application if you make careless changes.
You can define the absolute start address of the core dump, for example by specifying the address value from a pointer variable. You also have the option of specifying the start address relative to the memory area of the PLC by defining the range and an offset. In the memory display, you can browse the adjacent memory segments or save the core dump to a file. You can overwrite the data in hexadecimal notation and transfer the changes to the PLC. The commands for this are provided in the toolbar.
For example, when you step into the application when error checking, CODESYS continuously refreshes the view of the core dump.
Tip
When you set the cursor in the hexadecimal data, you can right-click to copy the address of this data to the clipboard (Copy Address command).
Selecting the application
Requirement: One or more applications is loaded to the PLC. You are logged in to the application for the core dump. You can log in with an inactive application is by right-clicking the application in the device tree.
Click
.The Memory view opens for the application.
Call the desired memory view as described in the following sections. Define the absolute start address, for example with the value from a pointer variable, or by specifying the memory area (area/offset).
In the Application field, select another logged-in application to retrieve a core dump for that application as well.
Defining the start address of the core dump by means of a variable
Requirement: An application is loaded on the PLC and you are logged in. You want to specify the address of a specific variable as the start address of the core dump.
Click
.The Memory view opens.
Specify the address of the variable in Area. Click the address directly (for example read from the value of a pointer variable) or select the variable by means of the Input Assistant
.
The Absolute option is set automatically. CODESYS displays the core dump as an absolute range around the variable address.
Setting the start address of the core dump by specifying the memory area
Requirement: An application is loaded on the PLC and you are logged in. You want to specify the start address of a specific memory area plus an offset as the start address of the core dump.
Click
.The Memory view opens.
In Area, select the Area 0 option. The list of selectable areas depends on the device.
In Offset, specify the desired offset for the start address. Example: "
512
".Note: The field must not be blank. If you do not want an offset, then set the value 0.
CODESYS displays the core dump start at memory
Area 0
+ 512.
Editing data
Caution
The displayed bytes in the memory dump can be overwritten and the changes written to the PLC. CODESYS does not check that the changes are permitted. You can crash the application if you make careless changes.
Requirement: An application is loaded on the PLC and you are logged in.
Perform steps 1–3 from the above instructions "Defining the start address by means of specifying the memory area".
In the hexadecimal data area of the core dump, click a byte and type in a new value.
New values, which overwrite any previous values, are marked in red.
Click
.
CODESYS transfers the data to the PLC.
Performing memory checks for the active application
Requirement: You are logged in to the active application on the PLC.
Click
.The memory is subjected to various tests. The results are issued to a message view in the Memory Tools category. Double-clicking a message opens the Memory view where the corresponding memory location is highlighted.