0

I am using TIA portal V13, with WinCC RT Advanced. I have been given a running project and need to export some values to excel for the client daily, monthly and yearly using a script. I have a screen with a table control that displays values of tags. The values are logged periodically. How can I access the values from the screen or data logs using vbs? There is this command in the manual for accessing the dataLogs

HMIRuntime.Logging.DataLogs 

But I cannot find how to access the data and save it to a file.

There is already a vbs script in the project(begin and end times are defined earlier in the script)but it just exports an empty csv with the column names but no values.

Set obj1 = obj.ScreenItems("Table view_1")
obj1.TimeColumnRangeType = 1
obj1.TimeColumnBeginTime = sBeginTime 
obj1.TimeColumnEndTime = sEndTime

FolderName =     "C:\Folder_name"
FileDate = sDay &"_" &sMonth &"_" &sYear

obj1.ExportDirectoryChangeable = True
obj1.ExportDirectoryname = FolderName
obj1.ExportFilenameChangeable = True
obj1.ExportFilename = "Filename " &FileDate
obj1.Export()
faysvas
  • 1
  • 1
  • 5

0 Answers0