Online Change in EIEC*

NOTE: This feature requires Enhanced IEC License.

See also: Debugging Functions in IEC

See also: Enhanced IEC 61131 Guide

 

Topic Menu

 

Online Change Overview

Online change enables user to change the application "on the fly" while it is running in the target system. In order to enable most kinds of changes, user needs to configure the programming environment and enable the online changes. This is ideal for programs which require long periods of start up or shut down so that logic changes can be made without waiting for the machine to start or stop so that logic can be downloaded. The online change option can be enabled from Debug > Online Change.

Online Change Procedure

Note: Warning message "Online Change not possible: too many variables" will be displayed in the output window if user has not allocated sufficient variable memory.

Selecting Options displays the following items:

To allow the declaration of new variables and blocks, the user has to define the amount of memory to be allocated in the target for each type of data. This includes:

  1. The number of variables for each type (8, 16, 32 or 64 variables, character strings).

  2. The number of function block instances.

  3. The amount of memory for storing character strings.

  4. The amount of memory for private data of function block instances.

The number of variables of each type used in the application is given as a report at the end of each build. Changes are allowed until user exceed the sizing for at least one type of data. At this time, if user need to declare new variables, user have to change the configuration of memory sizing, rebuild the application and perform a full download stopping the target application.

Select the required variable and give a value or % Margin as to how much is required to create online change. In the below screen shot, for each variable 1000 nos. memory is allocated.

Return to the Top: Online Change in EIEC*

Options

Selecting Options displays the following items:

Online Change

Double clicking on the option displays the following window where user can Activate / Deactivate online change functionality.

Version - Reset the Version in EIEC. Doubling clicking on the Version option displays the following window so that user can reset the version.

Return to the Top: Online Change in EIEC*

Runtime

Selecting Runtime option displays the following items: 

  • Exchange I/O when stepping - User can change the value to Yes/No by double click. If this option is selected as Yes, I/O's are exchanged when the program is stopped on a breakpoint or step.

  • Variable locking - User can change the value to Yes/No by double click. Locked variables can be forced to a fixed value from the debugger. This option would be time consuming. This option is not available when online Change is in active mode.

Return to the Top: Online Change in EIEC*

Compiling

Selecting compiling option displays the following items.

  • Color FBD flow lines during debug - User can change the value to Yes/No by double click. FBD lines values can be monitored during debug if this option is set to yes.

  • Display "warning" messages - User can change the value to Yes/No by double click. Reports dangerous or unclear operations at compiling time if this option is set to yes.

  • Treat warnings as error - User can change the value to Yes/No by double click. Setting this option to yes produces an error if warnings are reported.

  • Check safety of SFC charts - User can change the value to Yes/No by double click. Setting this option to Yes checks possible unsafe or blocking structures in SFC charts at compiling time.

  • Check array bounds at runtime - User can change the value to Yes/No by double click. Setting this option to Yes checks indexes used for array read/write operations at runtime.

  • Forbid equality tests between reals - User can change the value to Yes/No by double click. Errors will be output if equality tests are performed between REALs or LREALs, if this option is set to yes.

Return to the Top: Online Change in EIEC*

Test

  • Precision for REAL variables - Using this option user can set number of decimal digits that needs to be displayed during debug for REAL variables. Use "0" for default format.

  • Precision for LREAL variables - Using this option user can set number of decimal digits that needs to be displayed during debug for LREAL variables. Use "0" for default format.

  • Prompt before stopping application - User can change the value to Yes/No by double click. Setting this option to Yes, displays a confirmation window before a stop operation.

  • Prompt before downloading - User can change the value to Yes/No by double click. Setting this option to Yes, displays a confirmation window before a download operation.

  • Prompt before Online Change - User can change the value to Yes/No by double click. Setting this option to Yes, displays a confirmation window before an online change operation.

  • Propose to load RETAIN variables - User can change the value to Yes/No by double click. Setting this option to Yes, starts the runtime with reloading RETAIN variables as a default choice.

  • Log user actions during debug - User can change the value to Yes/No by double click. Setting this option to Yes, logs the user operations performed during simulation or onlinetest.

  • Display log file - Double click on this option to open the log file.

Return to the Top: Online Change in EIEC*

Advanced

Selecting advanced option displays the following:

  • Maximum number of error message displayed - Using this option user can set maximum number of error messages that needs to be displayed after which the error messages will not be displayed in output window.

  • Check possible name conflicts - User can change the value to Yes/No by double click. Setting this option to Yes, reports warnings if the same symbol is used for many purposes.

  • Strict IEC conformity for ST language - User can change the value to Yes/No by double click. If this option is set to No, equality comparison of TIME variables will be forbidden.

  • R_TRIG: always false on first call - User can change the value to Yes/No by double click. Setting this option to Yes, makes R_TRIG output as always FALSE on the first call to an instance.

  • SHR : do not duplicate most significant bit - User can change the value to Yes/No by double click. Setting this option to Yes, the most significant bit of a word shift to the right is set to FALSE.

  • Deny unconnected inputs in FBD - User can change the value to Yes/No by double click. Setting this option to Yes, errors will be generated when some block inputs are not wired in FBD diagrams.

  • ST: optimize AND/OR left to right evaluation - User can change the value to Yes/No by double click. Setting this option to Yes, the evaluation of AND/OR expressions from left to right will be stopped as soon as the result is known.

All

Selecting this option will displays all the items that are available in Enhanced IEC project settings.

Reset the Version in EIEC

Doubling clicking on the Version option displays the following window so that user can reset the version.

Return to the Top: Online Change in EIEC*

Download the Program

Download the program (which has online change enabled) into the controller.

To download any modified program to the unit, go to Debug Mode. The following window appears:

  • Exit Debug - Comes out of debug.

  • Do Online Change - downloads the updated application and applies the change to the unit.

  • Debug without online change - Enters debugging but no change will be done in the unit.

If user selects "Do Online Change", Cscape will download the modified application to the unit and applies the change to the unit. A confirmation message of Online Change completed will be displayed after successfully modifying the changes as shown below:

Return to the Top: Online Change in EIEC*

Online Change Menu

The following options can be used to separately download modified program and to apply changes to the unit.

Download Changes

This option is used to download the changes to the unit.

Do Online Changes

This option is used to apply the changes to the unit. When Online Change is enabled, all newly 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. Users can manually rename a ghost variable if they want to make it alive again.

Note: When Online Change is enabled, user can perform following changes.

  1. Change the code of a program.

  2. Change the condition of a SFC transition or the actions of a SFC step.

  3. Create, rename or delete global and local variables.

  4. Create, rename or delete global and local function block instances.

Return to the Top: Online Change in EIEC*

Limitations of Online Change

  1. Create, delete or rename a variable.

  2. Changing SFC charts

  3. Changing the local parameters and variables of a UDFB.

  4. Changing the type or dimension (or string length) of a variable or function block instance.

  5. Changing the set of I/O boards

  6. Changing the definition of RETAIN variables

  7. The Embedded HMI data (screens, bitmapsClosed A non-compressed image file format which uses small dots in a grid pattern to create an image., fonts, strings) are not updated during an Online Change.

Unsafe during Online Change

  1. Pulse (P or N) contacts and coils (edge detection). Instead, user must use declared instances of R_TRIG and F_TRIG function blocks.

  2. Loops in FBD with no declared variable linked. User need to explicitly insert a variable in the loop.

Online Change will be denied by the runtime if some system resources are currently open when the change is performed.

Return to the Top: Online Change in EIEC*

Number of Allocated Variables

Give a value or % Marge as to how much is required to create online change. In the screen shot below, for each variable, 1000 nos. memory is allocated.

Note:  

The value of allocated variables will depend on following calculations when "Margin" option is selected. If "Value" option is selected, the set value will be directly applied or allocated

  • if (size + margin% of size) > value, then the total got from (size + margin% of size) will be directly allocated.

  • if (size + margin% of size) < value, then the value will be added to size and then allocated.

For example:

If value is 1234 and Margin is 300 with margin option selected (refer to the screen shots below) then,

 

Consider INT variables allocation calculation

size + margin % of size

1283 + 300% of 1283

1283 + 3849

5132

So here 5132 > 1234, 5132 will be allocated / set.

 

Consider DINT variables allocation calculation

size + margin % of size

1 + 300% of 1

1 + 3

4.

So here 4 < 1234, value will be added to size i.e., 1234 + 1 = 1235 and 1235 will be allocated / set.

Return to the Top: Online Change in EIEC*