EXCEL访问WINCC归档变量的问题[工控老鬼]

我看过论坛那个关于EXCEL访问WINCC归档变量的PDF文档,用它提供的DEMO表格,把计算机名更改了一下,创建DEMO里的相应的内部变量,给这些变量做了变量记录。但是运行WINCC,整点没有读取到归档的数据。这是为什么,还需要设置的其他的东西么
本地采集。
提供的脚本:
Sub get_wincc_data()
'--Get Database DSN name-----------------------------------
Set DSNName = CreateObject("CCHMIRuntime.HMIRuntime")
sDsn = DSNName.Tags("@DatasourceNameRT").Read
'--build connection string-----------------------------------
sPro = "Provider=WinCCOLEDBProvider.1;"
sDsn = "Catalog=" & sDsn & ";"
sSer = "Data Source=ZHANG\WinCC"
sCon = sPro & sDsn & sSer
Set conn = CreateObject("ADODB.Connection")
conn.ConnectionString = sCon
conn.CursorLocation = 3
conn.Open
Set oRs = CreateObject("ADODB.Recordset")
Set oCom = CreateObject("ADODB.Command")
oCom.CommandType = 1
Set oCom.ActiveConnection = conn
'查询启止时间
sStart = Year(DTPicker1.Value) & "-" & Month(DTPicker1.Value) & "-" & Day(DTPicker1.Value) & " 00:00:00"
sStop = Year(DTPicker1.Value) & "-" & Month(DTPicker1.Value) & "-" & Day(DTPicker1.Value) & " 23:00:00"
'转为UTC时间
sStart = DateAdd("h", -8, CDate(sStart))
sStop = DateAdd("h", -8, CDate(sStop))
'读取Fan1_T1
sSql = "Tag:R,('ProcessValueArchive\Fan1_T1'),'" & sStart & "','" & sStop & "' order by datetime"