Configuring a Memory Reserve for the Online Change of Function Blocks
You can configure a memory reserve for the online change of function blocks. After you have made modifications on the declaration of a function block (in particular after you have added a new variable), and you perform an online change, it is no longer necessary to copy the instances of the function block to a new memory area. Thus, the online change is performed faster and fewer errors are detected.
If the memory reserve you configured is depleted, a message is displayed before the online change is performed.
It is a good practice to configure the memory reserve for a function block before you download the application to the controller. If you configure the memory reserve when the application is already located on the controller, then you have to perform an online change that is even more time-consuming.
Procedure of Configuring a Memory Reserve for the Online Change of Function Blocks
If you intend to perform later modifications on a function block that would require the function block instance to be copied to other memory locations when executing an online change, then you can use the Online Change Memory Reserve Settings command.
By default, the command is not available in the menus. Add this command via the Tools > Customize menu.
Step |
Action |
Comment |
---|---|---|
1 |
Execute the command View > Online Change Memory Reserve Settings |
Result: The Online Change Memory Reserve view opens. |
2 |
From the list of applications, select the suitable application. |
– |
3 |
Execute the Build command from the Build menu. |
– |
4 |
Click the button Scan Application. |
– |
5 |
From the Function Blocks area, select the entry All. |
Result: The function blocks of the application are displayed in the middle of the Online Change Memory Reserve view. |
6 |
Select the function block for which you want to configure a memory reserve. |
If the application has not been downloaded to the controller yet, then the input field Memory reserve (in bytes) is editable. If the application is already available on the controller, then click the Edit button in the Enable editing area. NOTE: If you modify the memory reserve of an application that is already available on the controller, then the instances of all affected function blocks must be copied. |
7 |
Enter a value for the Memory reserve (in bytes), and click the Apply for selection button. |
Result: The value you entered is displayed in the Memory Reserve cell of the table. |
8 |
Execute the Build command from the Build menu. |
– |
9 |
Click the button Scan Application. |
Result: The values of the cells Size, Instance Count, Additional memory for all instances and Remaining size of memory reserve Memory Reserve are updated in the list for the configured function block. |
When you download the application to the controller, the memory size that is reserved for the function block is calculated by the present size of the function block plus the memory reserve you configured in the Online Change Memory Reserve view.
Future modifications to the function block can be downloaded to the controller with the online change without having to copy all instances of the function block to a new memory area.