Detailed information

The internal organization of a variable instance of function blocks (input / output parameters, public / private variables, code) cannot be changed from the instances, but must be performed from the type of the instance DFB Types ) tab.

The changes listed below do not effect the internal organization of the function block, but rather its instantiation.

Changing the name of an instance

Carry out the following steps:

Step

Action

1

In the Data Editor select the function blocks tab.

2

Double-click on the instance name, enter the new name, and confirm with Enter.

NOTE: the instance name can only be used once.

Changing the type of an instance

There are three options.

In the Data Editor Function blocks tab:

Double-click on the variable type and ...

then...

enter the desired type,

depending on the input, an automatic search is carried out.

-

use the type field

select the desired type.

click the button

select the type in the "FB type selection" window.

Reactions to type changes of an instance.

If the type of an FB instance is changed in the Data Editor, the access will be adjusted to the instance.

The access is adjusted as follows:

  • The connections are mapped with pin positions.

    Note: Compatibility of data types will not be checked, which means that errors may occur during the analysis following the adjustment.

  • Excess pins of the new type remain unused.

  • The connections of pins that no longer exist in the new type are lost.

IL and ST sections:

If necessary, formal parameters in IL and ST sections will be renamed according to the new block during formal access. The number of actual parameters will be adjusted during informal access.

NOTE: Instance access in IL or ST sections will only be adjusted if required by the type change. However, if an adjustment is made, the old access will be removed and replaced with a generated access. This means that all comments and formatting contained in the old access will be lost.

FBD and LD sections

The new type will be displayed in the FBD and LD sections following the adjustment.