Function: The command is used to trigger an online change on the current application. When this is done, CODESYS re-downloads only the changed parts of an application which is already running on the controller.
Call: “Online” menu; context menu of an “Application” object
Requirement: The application is in online mode.
The command is available in the context menu when an application is selected in the device tree. As a result, you can perform an online change just for one application, even if that application is not currently "active".




CAUTION

An online change modifies the running application program and does not cause a restart.
Make sure that the new application code still has the required effect on the controlled system.
Depending on the controlled plant, this could result in damage to the plant or the workpieces, or injury or death of personnel.




NOTICE





NOTICE

No initialization code during a fast online change
Since compiler version >= 3.5.0.0, a "fast online change" is performed for minor changes. During a fast online change, only the modified POUs are compiled and downloaded. In particular, no initialization code is generated.
For variables with the init_on_onlchange
attribute, this also results in no initialization code being generated. In the usual scenarios, that has no impact because
the attribute is usually used to initialize variables with addresses. However, during
a fast online change, it cannot happen that a variable changes its address.
However, to make sure of the impact of the init_on_onlchange
attribute is applied in the entire application code, in general for the application
you can use the no_fast_online_change
compiler define to disable the fast online change. To do this, select your application
object in the device tree and click “Properties” in the context menu. Below the “Build” tab, add the no_fast_online_change
compiler define.
For more information, see: ⮫ “Dialog: Properties: Build ”
At the time of download, CODESYS also lists the changed interfaces, affected variables, and all POUs with new generated code in the “Build” category of the message view. If memory locations change, a dialog will notify you of possible problems relating to pointers.
In the “Online Change Memory Reserve” view, memory reserves can be configured for the online change so that instance variables do not have to be moved in the memory when changing a function block in an online change.
For more information, see: ⮫ “Command: Online Change Memory Reserve Settings ”
-
What prevents an online change?