Configuring the memory reserve for online change

CODESYS provides the capability of configuring a memory reserve for the online change for function blocks. In this way, the instances of the function block do not have to be copied to the new memory in a subsequent online change after making changes to the declaration of a function block (in particular when a new variable is added). As a result, the online change runs faster and fewer problems occur. When the memory reserve is depleted, a message is displayed before the online change is performed.

Hint

The memory reserve for a function block should be configured on the controller, preferably before the first download of the application. If the memory reserve is configured when the application is located on the controller, then a more complicated online change is necessary.

Configuring a memory reserve for the online change for a function

Requirement: The open project is not located on the controller yet.

In the future, bigger changes should be made to a function block of a project, which would require the function block instance to be copied to other memory locations for an online change.

  1. Click View ‣ Settings of Memory Reserve for Online Change .

    ⇒ The view Memory reserve for online change opens.

  2. Select the application of the project from the drop-down list.

  3. Click Build ‣ Build .

  4. Click the button Scan application.

  5. Select the All entry in the Function blocks area.

    ⇒ All function blocks of the application are displayed in the view.

  6. Select the corresponding function block for which you want to configure a memory reserve.

    ⇒ If the application is not on the controller yet, then the input field Memory reserve (in bytes) is editable.

  7. If the application is already on the controller, then click the Edit button in the Allow editing area.

    Please note that if you modify the memory reserve of an application that is already on the controller, then the instances of all affected function blocks have to be copied to the memory.

  8. Specify the size of the memory reserve (in bytes) and click Apply to selection.

    ⇒ the given number of bytes is shown in the table field Memory reserve.

  9. Click Build ‣ Build and then click the button Scan application.

    ⇒ The following information is updated in the function block list for the configured function block: Size, Number of instances, Additional memory for all instances, and Remaining size of the memory reserve.

  10. Now when you download the application to the controller, currently required memory is reserved for the function block in addition to the memory reserve. Bigger changes to the function block in the future can be downloaded to the controller with the online change without having to copy all instances of the function block to the memory.

See also