Description: In WinCC flexible 2008 you can import and export connections, tags and analog and discrete alarm messages from/to a CSV file. You can changed exported CSV files individually by adding tags, for example. You can then import these CSV files again into an existing project.
Contents:
1. Export messages, connections and tags
2.Open and edit CSV file
2.1 Edit CSV file with Excel
2.2 Edit CSV file with Notepad
3. Import messages, connections and tags
4.Information on errors and error messages
4.1 Information on error messages in the output window during importing
4.2 Information on errors after importing
Note:
In older versions of WinCC flexible, you can only import/export messages via mass data that is already in WinCC flexible. More information is available in Entry ID: 21976672.
1. Export messages, connections and tags The table below explains how to export in a CSV file.
2. Open and edit CSV file Since the CSV file might contain multilingual analog and discrete alarm messages in Unicode format, you need a Unicode-compatible editor to edit the CSV file. You can use "Excel" or "Notepad", for example, for editing.
Note: The editor used must not replace the tab character with a space, because the tab character is used as a separator. You can use other separators for import (tab, comma, period, semicolon and user-defined separators).
2.1 Edit CSV file with Excel Excel is convenient for editing the CSV file.
2.2 Edit CSV file with Notepad If Excel is not available, then you can use the Windows Notepad editor as an alternative.
| No. |
Procedure |
| 1 |
Open CSV file with Notepad
- For example, open the CSV file "Tag.csv" with Notepad.
- Add a new tag - see Table 02 - including all the necessary attributes.
Note:
Use the tab character set by the tab key as separator between the individual attributes.
| Column |
Attributes |
Example |
| A |
Name |
Folder\New/Tag |
| B |
Connection |
Connection_1 |
| C |
Address |
DB 10 DBW 0 |
| D |
Data type |
Int |
| E |
Length |
-- |
| F |
Array element |
1 |
| G |
Acquisition type |
3 |
| H |
Acquisition cycle |
1s |
| I |
Upper limit |
-- |
| J |
Additional upper limit |
-- |
| K |
Additional lower limit |
-- |
| L |
Lower limit |
-- |
| M |
Linear scaling |
0 |
| N |
Controller end value scaling |
10 |
| O |
Controller initial value scaling |
0 |
| P |
Operator panel end value scaling |
100 |
| Q |
Operator panel initial value scaling |
0 |
| R |
Starting value |
0 |
| S |
Update identifier |
-- |
| T |
Comment (max. 500 characters) |
-- |
Table 02 - Tag attributes
Note: The slashes "\" and "/" are usually used as folder separators for fully qualified names. However, the slashes "\" and "/" can also be valid characters within a name. If folder or slashes are used in tags, then the separator must be specified explicitly upon import.
Example:
|
Separator |
Folder |
Tag |
| "/" |
Folder\New |
Day |
| "\" |
Folder |
New/Tag |
| "." |
-- |
Folder\New/Tag |
Table 03 - Examples of separators
  Fig. 08
Remark:
Each line that starts with a double slash "//" or hash mark "#" is a comment line and is not taken into account upon import. |
| 2 |
Save CSV file
- Save the CSV file.
Note:
If you use "Save As...", then you must select "Unicode" as the coding. The extension ".csv" must be contained in the file name.
- Then close Notepad.
  Fig. 09
|
3. Import messages, connections and tags The table below explains how to import from a CSV file.
4. Information on errors and error messages Below we briefly describe the information provided on possible errors after importing CSV files and error messages displayed in the output window of WinCC flexible.
4.1 Information on error messages in the output window during importing The error messages in the output window provide information on error location (coordinates) in the CSV file.
<Prefix>: error in line 9 starting at character 12: <error text>
Proceed as follows to locate the error.
- Open the defective CSV file with Notepad.
- Ensure that automatic line break has been disabled in the menu item "Format > Line break".
- Ensure that the status bar has been enabled in the menu item "View > Status bar".
- Navigate the cursor to the designated location. You have reached the location when the status bar of Notepad displays exactly the coordinates from the error message. Therefore, in the example described above, line 8, column 12 must be displayed in the right corner of the status bar of Notepad.
Note: If you want to use a different editor to locate errors, then you must ensure that the tab character is interpreted as a single character (and not as a number of spaces) - if no other separator is used.
4.2 Information on errors after importing Possible errors after importing:
Error: After importing CSV files, invalid cells (marked "red") are present - for example, in the trigger tag in the editor for discrete alarm messages.
Cause:
In WinCC flexible, names are used as references to other objects. If a name is not found when importing into WinCC flexible, an open reference is generated and the place where it is used is marked "red". This object is unknown in the WinCC flexible project.
Remedy: You have two options:
- Always import tags and alarm messages together. Here, you must must ensure that the trigger tags used for the discrete and analog alarm messages are contained in the CSV file for tags.
- The objects used must be created manually before or after importing (e.g. the trigger tag must be in the tag editor).
Keywords:
CSV export, CSV import, Import text file, Export
|