At a Glance

The DTX file allows a restore even if there have been changes in the application since the save was done.

When a restore is performed, if the build number of the application is greater than the version of the DTX file, Control Expert analyses the content of the file to verify the compatibility with variables of the PLC application.

The following tables present the rules followed for restoring variables when there is a difference between the *.DTX file and the PLC application. This condition results from building the application after the data was saved in the *.DTX file.

PLC versions compatibility (Premium, Quantum , M340, M580)

As memory block allocation is different on PLCs version <= 2.0 or > 2.0:

  • If the DTX file has been created from a PLC version 2.0 or < 2.0, data cannot be restored on PLC version 2.1 or later.

  • If the DTX file has been created from a PLC version 2.1 or later, data cannot be restored on PLC version 2.0 or < 2.0.

Simple Variable Compatibilities

The following table presents the rules followed for restoring simple variables:

Case

Data File Contents

PLC Application Contents

Restore Behavior

Control Expert Message

1

Var1

Deleted

Var1 is not restored

Var1: this variable no longer exists.

2

-

New Var2

Var2 is kept in memory

-

3

Var3

Var3 was renamed into Var3-3 (name changed)

The restore CANNOT BE PERFORMED due to technical limitations.

Var3 is deleted and Var3-3 is a new variable.

Var3: this variable no longer exists.

4

Var4 is a simple compatible type.

Var4 was changed to a different simple type. Source value is compatible with target type.

The Var4 is converted into the new type, which has the same value as source.

Var4: type of the variable is changed (from TYPE1 to TYPE2). Types are compatible.

5

Var5 is a simple compatible type.

Var5 was changed to a different simple type. Source value is not compatible with target type.

The restore CANNOT BE PERFORMED.

Var5 is converted into a different type (the target) and its value is either:

  • longer than target type

  • not compatible with target type

Var5: type of the variable is changed (from TYPE1 to TYPE2) but value may not be compatible.

+

Var5: value not compatible for conversion between TYPE1 and TYPE2.

6

Var6 is a simple incompatible type.

Var6 was changed into another type.

Restore of original value CANNOT BE PERFORMED. Var6 retains its application value.

Var6: type of the variable is changed (from TYPE1 to TYPE2). But types are not compatible.

Structured Variable Compatibilities

The following table presents the rules followed for restoring structured variables:

Case

Data File Contents

PLC Application Contents

Restore Behavior

Control Expert Message

DDT Types

7

Var7 is a DDT type.

Var7 was changed to a simple type.

The restore CANNOT BE PERFORMED because type is not compatible.

Var7: type of the variable is changed (from TYPE1 to TYPE2). But types are not compatible.

8

Var8 is a simple type.

Var8 was changed to a DDT type.

The restore CANNOT BE PERFORMED because type is not compatible.

Var8: type of the variable is changed (from TYPE1 to TYPE2). But types are not compatible.

9

Var9 is a DDT type.

Var9 is changed to another DDT type.

The restore CANNOT BE PERFORMED because type is not compatible.

Var9: type of the variable is changed (from TYPE1 to TYPE2). But types are not compatible.

10

Var10 is a DDT type.

The DDT type has changed.

Make the mapping of the field (see the cases from 1 to 9 and cases from 11 to 16 for array type sub-fields).

Var10.SubField1: … (see cases 1 to 9 and 11 to 16).

ARRAY Types

11

Var11 is an array.

Var11 is an array of the same type, same starting index but longer.

Transfer the data file values. The rest of the longer application array is kept.

-

12

Var12 is an array.

Var12 is an array of the same type, same starting index but shorter.

Transfer the data file values until target array is full. The rest of the source array is lost.

Var12: length of ARRAY… array (range # 2) is shorter. Last indexes will be lost.

13

Var13 is an array.

Var13 is an array of the same type, but starting index is lower or a different type. Ending index is the same

The restore CANNOT BE PERFORMED because starting indexes must be identical.

Var13: low bound of ARRAY… array (range #2) has changed. Cannot restore.

14

Var14 is an array.

Var14 is an array of the same type, but starting index is higher or a different type. Ending index is the same

The restore CANNOT BE PERFORMED because starting indexes must be identical.

Var14: high bound of ARRAY… array (range #2) has changed. Cannot restore.

15

Var15 is an array.

Var15 is an array of the same type, but the lower and upper indexes are shifted. The length is the same.

The restore CANNOT BE PERFORMED because starting indexes must be identical.

Var15: bounds of ARRAY… array (range #2) have changed. Cannot restore.

16

Var16 is an array.

The type of the array has changed

See cases 1 to 10 and 7 to 10.

See cases 4 to 10 and 11 to 16.

Elementary Type Compatibilities

BOOL, BYTE, INT, UINT, DINT, UDINT, WORD, and DWORD are compatible types if no lost of value are detected.

Examples are:

  • a DINT variable can be changed into an INT variable if only the 2 first bytes of the DINT are used

  • an UINT or UDINT variable can be changed into an INT variable if the value is compatible.

REAL, STRING, TOD, TIME, DATE, and DT are not compatible types.

The following table presents the compatibility between the elementary types:

 

BOOL

EBOOL

BYTE

INT

UINT

WORD

DINT

UDINT

DWORD

REAL

STRING

TOD

TIME

DATE

DT

BOOL

YES

NO

NO

NO

NO

NO

NO

NO

NO

NO

NO

NO

NO

NO

EBOOL

YES

NO

PDL

PDL

NO

PDL

PDL

NO

NO

NO

NO

NO

NO

NO

BYTE

NO

NO

YES

YES

YES

YES

YES

YES

NO

NO

NO

NO

NO

NO

INT

NO

NO

PDL

PDL

YES

YES

YES

YES

NO

NO

NO

NO

NO

NO

UINT

NO

NO

PDL

PDL

YES

YES

YES

YES

NO

NO

NO

NO

NO

NO

WORD

NO

NO

PDL

YES

YES

YES

YES

YES

NO

NO

NO

NO

NO

NO

DINT

NO

NO

PDL

PDL

PDL

PDL

PDL

YES

NO

NO

NO

NO

NO

NO

UDINT

NO

NO

PDL

PDL

PDL

PDL

PDL

YES

NO

NO

NO

NO

NO

NO

DWORD

NO

NO

PDL

PDL

PDL

PDL

YES

YES

NO

NO

NO

NO

NO

NO

REAL

NO

NO

NO

NO

NO

NO

NO

NO

NO

NO

NO

NO

NO

NO

STRING

NO

NO

NO

NO

NO

NO

NO

NO

NO

NO

NO

NO

NO

NO

TOD

NO

NO

NO

NO

NO

NO

NO

NO

NO

NO

NO

NO

NO

NO

TIME

NO

NO

NO

NO

NO

NO

NO

NO

NO

NO

NO

NO

NO

NO

DATE

NO

NO

NO

NO

NO

NO

NO

NO

NO

NO

NO

NO

NO

NO

DT

NO

NO

NO

NO

NO

NO

NO

NO

NO

NO

NO

NO

NO

NO

NOTE: PDL means Possible Data Loss.

Compatibility of Aliases

The following table presents the rules followed for restoring aliases:

Case

Data File Contents

PLC Application Contents

Restore Behavior

Control Expert Message

1

Map1 is unlocated.

%MW100 is used.

Map1 is located on %MW100.

Value of the data file for Map1 is set to %MW100.

Map1: restored at %MW100

2

Map2 is located on %MW100.

Map2 is no longer located on %MW100, %MW100 is used.

Value of data file for Map2 is set at the new address of Map2 (unlocated data area).

%MW100 of the application keeps its current value.

Map2: restored into unlocated data area.

%MW100: keeps current value.

3

Map3 is located on %MW100.

%MW200 is used

Map3 is located on %MW200.

%MW100 is used.

Restores the value of %MW100 at address %MW 200.

%MW100 of the application keeps its value.

Map2: restored from %MW100 to %MW200.

%MW100: keeps current value.

4

Map4 is located on %MW100, but %MW area not exported.

Map4 is no longer located on %MW100, %MW100 is used.

Restore CANNOT BE PERFORMED because the source value is not in data file.

Map4: value at address %MW100 is not available.

5

Map5 is unlocated but in an area not exported.

Map5 is located on %MW100.

Restore CANNOT BE PERFORMED because the source value is not in data file.

Map5: value at address %MW100 is not available.

6

Map6 is located at %MW100 and %MW200 is used, but %MW area is not exported.

Map6 is now located on %MW200 and %MW100 is used.

Restore CANNOT BE PERFORMED because the source value is not in data file.

Map6: value at address %MW100 is not available.

7

Map7 does not exist or is an alias.

Map7 is located at %MW100.

Restore CANNOT BE PERFORMED to avoid the lost of the current variable.

Map7: mapped variable that didn't exist at the file generation or was an alias %MW100 value not restored.

8

Topological addresses, %CH, %SW, etc.

-

-

MapVar: variable mapped on an unauthorized address (%CH0.2.0).

Restoration of FB Instances and Other Variables

The following table presents the rules followed for restoring certain special variables:

Type of Entity

Control Expert Message

FB Instances: for all fields (input, output, I/O, private, public) that is not a pointer, the fields are restored or not by using the rules above. If any field cannot be restored, the FB Instance is not restored

-

SFC variables cannot be restored.

Step1: SFC types (SFCSTEP_STATE) are not allowed for restore

Step1: SFC types (SFCCHART_STATE) are not allowed for restore

Hidden variables cannot be restored.

-

IODDT variables cannot be restored.

IOVar: IODDT types (T_ANA...) are unknown so not allowed for restore.

Device DDTs cannot be restored.

DevDDT: Device DDT types (T_...) are not allowed for restore.

Restoration of Forced Variables

NOTE: If forced bits are detected in the PLC before performing the restore data, forcing status (F) and value are not updated in the PLC after the restore data is performed.

The following table presents the rules followed for restoring forced variables:

Variable

Value when the save data from PLC to file is performed

Value before performing the restore data from file to PLC

Value in the application after the restore data is performed

Located

0

1

0

Located

0

forced to 1

forced to 1

Unlocated

0

1

0

Unlocated

0

forced to 1

forced to 1

 

Located

1

0

1

Located

forced to 1

0

1(1)

Unlocated

1

0

1

Unlocated

forced to 1

0

1(1)

 

Located

1

forced to 0

forced to 0

Located

forced to 1

0

1(1)

Unlocated

1

forced to 0

forced to 0

Unlocated

forced to 1

0

1(1)

 

Located

forced to 0

1

0(1)

Located

forced to 1

forced to 0

forced to 0

Unlocated

forced to 0

1

0(1)

Unlocated

forced to 1

forced to 0

forced to 0

(1) The restored value is not forced.