Show Memory View command

Symbol: Show Memory View command 1:

Function: The command opens the Memory View. Here you can display a memory dump from the controller in online mode. In the view, you configure for which application and for which area the memory should be displayed.

Call: Menu PLC > Window

Requirement: As a rule, the controller supports the functionality. At least one application is loaded and in online mode.

Show Memory View command 2:

Application crash due to careless changes

You can overwrite the displayed bytes in the Memory View and transfer the changes to the controller. TwinCAT does not check whether the changes are permissible.

Careless changes can cause the application to crash!

You can specify the start address of the memory dump in absolute terms, for example by entering the address value from a pointer variable. Alternatively, you can specify the start address relative to a memory area of the controller by specifying the area and an offset. In the memory view, you can navigate to the adjacent memory segments and save the memory dump in a file. You can overwrite the data in hexadecimal format and transfer the changes to the controller. The commands on the toolbar are available for this purpose.

If you execute the application step by step, for example when troubleshooting, TwinCAT continuously updates the view of the memory dump.

General structure of the window:

Hint: If you place the cursor in the hexadecimal data, you can copy the address of this data to the clipboard with a right-click ( Copy address command).

The Memory View is explained below. The following use cases are then described:

Memory View

Show Memory View command 3:

Application

Select the PLC project for which the Memory View is to be displayed. You must be logged on to the controller with this project. It does not have to be the "active PLC project".

Area

  • Absolute: Memory is addressed directly and completely. The address is in the input field next to it.
  • Area <i>: Memory areas of the controller, starting with Area 0. Memory areas reserved exclusively for code are not displayed.

Address

Absolute start address of the core dump

Requirement: Absolute is selected in Area.

Offset

Address offset to the selected memory area in bytes, for example 0x0200, 16#0200 or as decimal number 512

Requirement: A memory area is selected in Area, e.g. Area 0. TwinCAT offers all currently used memory areas for selection. Memory areas reserved exclusively for code are not displayed.

Show Memory View command 4:

Find out the address for a variable: Input Assistant for selecting an IEC variable appears. If you have selected a variable, TwinCAT presets the start address with the variable address.

Show Memory View command 5:

Load/update Memory View

Show Memory View command 6:

Show previous memory segment: Navigate to the previous memory segment

Show Memory View command 7:

Show next memory segment: Navigate to the next memory segment

Show Memory View command 8:

Notice TwinCAT does not check whether the changes are permissible. You can crash the application by making careless changes

Load changes to PLC: TwinCAT transfers the new data to the controller.

Requirement: You have overwritten one or more bytes in the Memory View.

Show Memory View command 9:

Save memory contents to file: Memory contents as binary file dialog appears. Select a location.

Columns

Number of columns of the hexadecimal format of the memory dump, which can be found in the center of the window. With Auto, the number of columns adjusts to the window size.

Set start address of the memory dump via variable

You have loaded an application onto the controller and are logged in to it. You want to specify the address of a specific variable as the start address of the memory dump.
1. Select the command View → Show Memory View.
The Memory View opens.
2. Enter the address of the variable in Area. Either enter the address directly, for example from the value of a pointer variable, or select the variable using the Input Assistant Show Memory View command 10:.
The Absolute option is set automatically.
TwinCAT displays the memory dump as an absolute area around the address of the variable.

Set the start address of the memory dump by specifying the Memory Area

You have loaded an application onto the controller and are logged in to it. You want to specify the start address of a specific memory area plus an offset as the start address of the memory dump.
1. Select the command View → Show Memory View.
The Memory View opens.
2. In Area, for example, select the Area 0 option. The list of selectable areas depends on the device.
3. Enter the desired offset for the start address in Offset. Example: "512".
Information: The field must be filled in. If no offset is required, enter 0.
TwinCAT displays the memory dump from the Memory Area 0 + 512.

Edit data

Show Memory View command 11:

You can overwrite the displayed bytes in the Memory View and transfer the changes to the controller. TwinCAT does not check whether the changes are permissible. You can crash the application by making careless changes!

You have loaded an application onto the controller and are logged in.
1. Carry out steps 1-3 from the instructions described above "Specifying the start address by specifying the Memory Area".
2. In the Memory View, click on a byte in the hexadecimal format of the data and enter a new value.
New values that overwrite a previous value are displayed in red.
3. Click the Show Memory View command 12: button.
TwinCAT transfers the data to the controller.

Perform memory checks for the active application

See: Check memory for active application command