-

Importing/exporting Data Items from/to a .csv File

This topic contains the following sections:

Exporting data items to a csv file

To export the data items of the active Data List to a .csv file, click the button on the toolbar in the Data List. Alternatively, select 'Export CSV...' from the context menu.
All declarations are written to the export file independent of any selection in the grid.

Note
If you edit the exported csv file with an external tool, you must make sure that the editor used does not change the column separators (semicolons) or the file encoding. For example, MS Excel may be set to modify csv files so that they cannot be reimported.

Importing data items from a csv file

To import data items from a .csv file, proceed as follows:

  1. In the respective Data List, click the button on the toolbar. Alternatively, select 'Import CSV...' from the context menu.
  2. In the file open dialog, select the .csv file you want to import and click 'Open'. The progress of the import is displayed in the MESSAGES window.

    The log entries provide, amongst other, information on the number of imported process data items, variables, HMI tags etc.

    Observe the following when importing data items:

    • Only variables (standard and safety-related variables) and HMI tags are imported. Process data items assigned to variables are not imported.
    • The data items are imported into the pool of data items (contains the data items of all Data Lists). This means data items which do not belong to the active Data List are also imported and added to the respective Data List.

      Example: if the .csv file contains safety-related variables and you perform the import in the Data List of the 'IEC 61131-3' node (contains only variables of the standard controller), the safety-related variables are imported into the Data List of the Safety PLC node.

    • Exisiting data items are not overwritten or modified. Only those data items are imported which are not yet contained in the Data List.
    • Data items with invalid properties, for example, invalid data types are imported but marked as errors in the Data List (a corresponding entry is also shown in the MESSAGES window).
    • Data items with invalid variable names are not imported and the process is aborted.