How do you export and reimport WinCC Runtime data?
-
Entry
-
Associated product(s)
Detailed information about this is available in the manual at the following links:
Import and Export of Tags
Import and Export of Messages
Description
This entry shows how to proceed using C and VB scripts. In the example we only show the processing of "64-bit floating point numbers" (integer "Int" in the TIA portal). Simply change the programming for the data types, number of tags and tag names for your own project.
The following tags were configured in WinCC for the example:
- TagA, TagB, TagC, TagD, TagE - floating-point number 64-bit IEEE 754 (integer "Int" in the TIA Portal)
- Filename - text tag 8-bit font ("String" in the TIA Portal)
Please always assign the complete path to the WinCC tag "Filename", for example: "C:/Temp/FileA.csv"
You can download the sample scripts here to make things easier.
scripte_readwritefile.zip (2.2 KB)
No. | Description |
1 | Read data from WinCC and write it to a file (VB script)
Note the following when composing the string to be written to the file:
When reading ".csv" files, "Microsoft Excel" uses the semicolon for "New Column" and endline for "New Line". |
2 | Read file and write data to WinCC (VB script)
With this script you must remember to convert the character stream into the correct data format after splitting. Here, in the example: CStr() and CDbl() |
3 | Read data from WinCC and write it to a file (C script)
Note the following when composing the string to be written to the file:
|
4 | Read file and write data to WinCC (C script)
Pay attention here too to the correct type conversion. sscanf(strValue, "%lf", &dVal); |
5 | The result in this example is the following ".csv" file Opened with "Notepad":
Opened with "Excel":
WinCC Runtime:
|
Download for TIA portal users (V13 SP1)
You can download a library here with a sample picture for easy testing.
Import_Export_V13_SP1.zip (794.0 KB)
Fig. 08
Additional Keywords
Save WinCC Runtime, Runtime data
- German
- French
- Italian
- Spanish
- Chinese
Entry belongs to product tree folder(s):
- Automation Technology Industry software Automation software TIA Portal Visualization SIMATIC WinCC (TIA Portal) SIMATIC WinCC (TIA Portal) Engineering
- Automation Technology Operator control and monitoring systems HMI Software SCADA system SIMATIC WinCC SIMATIC WinCC
- Automation Technology Operator control and monitoring systems HMI Software SCADA system SIMATIC WinCC SIMATIC WinCC General
- Automation Technology Operator control and monitoring systems HMI Software SCADA system SIMATIC WinCC SIMATIC WinCC Tag Logging
- Automation Technology Industry software Automation software TIA Portal Visualization SIMATIC WinCC (TIA Portal) SIMATIC WinCC (TIA Portal) Runtime