Online Change
The Workbench Studio enables you to change your application "on the fly" while it is running in the target system. In order to enable most kinds of changes, you need to configure the programming environment and enable the Online changes.
Hint: If Online change is ACTIVE and a new variable is created in the variable editor, the Create Variable dialog will be opened automatically.
|
To definitely validate an online change, stop and re-start your application manually. Otherwise, if the device is powered off, at restart the Runtime Service will not start the latest version of the “online changed” application. |
To activate the Online change:
- Go to the menu entry Project, Settings... and Options.
- Activate the Online change entry to setup the application for accepting changes.
- Double-click on the Online change entry to open the Online change dialog.
The number of currently declared items over the maximum number of allowed items in the application is displayed.
Example: If for BOOL/SINT variables it is displayed 40/60, it means that currently 40 variables of the datatype BOOL or SINT are declared in the application and at the maximum there can be 60 of those. If the limit is reached, an error will be displayed at compilation time.
The limit can be set choosing the corresponding item(s) and putting a maximum value, or a margin in percent (e.g. a margin of 50% on 40 items means a maximum of 60 items).
When the property entry Online Change is disabled, online variable data exchange is not possible and there is no limitation in editing and programming features.
Online Change enabled
When Online change is enabled, you can perform on the fly:
- Create or rename a program.
- Deactivate a program.
- Change the code of a program.
- Change the condition of a SFC transition or the actions of a SFC step.
- Create, rename or delete global and local variables.
- Create, rename or delete global and local function block instances.
- Rename RETAIN variables
The following kinds of changes are not allowed:
- Delete a program.
- Change SFC charts.
- Change the local parameters and variables of a UDFB.
- Change the type or dimension (or string length) of a variable or function block instance.
- Change the set of I/O boards.
- Create or delete RETAIN variables.
In addition, the following programming features that are not safe during a change must not be used:
- Pulse (P or N) contacts and coils (edge detection).
Instead, you must use declared instances of R_TRIG and F_TRIG function blocks. - Loops in FBD with no declared variable linked.
You need to explicitely insert a variable in the loop.
Online Change will be denied by the Runtime Service if some system resources are currently open when the change is performed. A system resource can be either a file open by file management functions, or a socket open by TCP/UDP functions, or an dynamic array created by ARCREATE functions.
The Embedded HMI data (screens, bitmaps, fonts, strings) are not updated during an Online Change.
In order to allow the declaration of new variables and blocks, you have to define the amount of memory to be allocated in the target for each type of data.
This includes:
- The number of variable for each type (8, 16, 32 or 64 variables, character strings).
- The number of function block instances.
- The amount of memory for storing character strings.
- The amount of memory for private data of function block instances.
The number of variables of each type actually used in the application is given as a report at the end of each build. Changes are allowed until you exceed the sizing for at least one type of data. At this time, if you need to declare new variables, you have to change the configuration of memory sizing, rebuild the application and perform a full download stopping the target application.
When Online Change is enabled, all new created variables are marked in blue in the variable editor. Deleted variables are kept as ghosts, marked in red and renamed with a "_del_" prefix. You are allowed to manually rename a ghost variable if you want to make it alive again.
|
The Online Change feature can be experimented with the Simulator started in Hot Retart mode. A hot restart is possible when Online Change is enabled and when the application includes valid changes. |
Online Change |
IEC 61131-3 Automation platform > IEC 61131-3 Programming Environment > Online Change |
Created with the Personal Edition of HelpNDoc: Create Professional CHM Help Files with HelpNDoc's Easy-to-Use Tool