At a Glance

The data transfer function allows you to store the value of the following data in a file:

  • boolean-type located data: %Mi

  • word-type located data: %MWi

  • unlocated variables

  • function block instances

There are 2 types of data files:

  • DAT:

    • Saving PLC data to a *.DAT file is allowed for all previous data types. *.DAT contains only data blocks.

    • Restoring all data blocks from a *.DAT file to the PLC is allowed if the project has not been built since the Save was done.If a build was done, only BOOL and WORD located data (%Mi and %MWi) are restored.

  • DTX:

    • Saving PLC data to a *.DTX file is allowed for all previous data types. In addition, application references (at the time of the Save) are saved.

      NOTE: I/O and device DDT objects cannot be saved in DTX data files.
    • Restoring data from a *.DTX file is allowed even if the application has been built and/or data has been modified since the Save was done. Compatibility Rules for Restore Using a *.DTX File explains the restoration process and the types of data that cannot be restored.

    NOTE: It is recommended to convert any *.DAT files to *.DTX file by restoring the *.DAT file and then saving using the *.DTX format.
NOTE: The data transfer function can be used for migrating from different PLC range. You can save M340 or Premium data to a *.DTX file and restore to M580 PLC the *.DTX file.

Procedure for Saving PLC Data

If the PLC is in RUN mode, the saving of data from the PLC to a file may need several application cycles and the data, in the file, may be de-synchronized, which may affect application execution during restoration.

NOTE: On forced bits, value is saved but the forcing status (F) is not saved.

You must perform the following actions to save the data from the PLC to a file:

Step

Action

1

To enable the menu item Save Data from PLC to File, the following must be true:

  • The PLC is loaded with an application.

  • The PLC is in RUN or STOP mode.

  • Control Expert is running and is connected to the PLC.

  • The Application built in Control Expert is equal to those in the PLC.

  • The Application in Control Expert is in the built state.

2

Activate the PLC > Save Data from PLC to File command.

Result: The Save Data from PLC to File dialog (CPU in STOP mode) opens.

For more information, refer to the corresponding screen.

3

Using the check boxes, select the data type(s) to be transferred. For located data you must also define the range of data to be transferred by entering the start and end address of the range.

4

Define the path and the name of the file to which the data is to be saved.

5

Confirm with OK.

Data Transfer Dialog for Transfers to a File

The Save Data from PLC to File dialog (CPU in RUN mode) is shown below:

The following table shows the parameters of the Save Data from PLC to File dialog.

Parameter

Description

Content

This field is used to define the type and range of the data to be transferred.

The checkboxes are used to define the type of located data. From: and To: fields are used to define the range for located data.

Default values:

  • %M and %MW checkboxes are checked

  • %M and %MW range is set to the PLC values

  • Unlocated variables instances and Function block instances (DFB and EFB) are not checked

To file

This field is used to define the path and name of the file.

Browse

This button can be used to browse the disk to define the file name and path.

Procedure for Restoring Data to PLC

If forced bits are detected in the PLC, forcing status (F) and value will not be updated in the PLC.

If the PLC is in RUN mode, the restoring of data to the PLC from a file may need several application cycles and the data may be de-synchronized, which may affect application execution.

You must perform the following actions to restore the data from a file to the PLC:

Step

Action

1

To enable the menu item Restore Data from File to PLC, the following must be true:

  • The PLC is loaded with an application.

  • The PLC is in RUN or STOP status.

    NOTE: It is strongly recommended to do the transfer with the PLC in STOP mode.
  • Control Expert is running and is connected to the PLC.

  • The Application built in Control Expert may be different than those in the PLC.

  • The Application in Control Expert is built state.

2

Activate the PLC > Restore Data from File to PLC command.

If the PLC is in RUN status, a message is displayed allowing to perform the transfer while the PLC is still operating (Ok) or to cancel the transfer.

If forced bits are detected in the PLC, a message is displayed allowing to perform the transfer (Ok) or to cancel the transfer.

Result: The Restore Data from File to PLC dialog opens.

3

Select the file to be restored to the PLC.

4

Confirm with Open.

5

A confirmation message is asking you if you want to proceed with the transfer.