0
我使用VBA从PI Server提取大量数据。我使用下面的代码:使用VBA从PI DataLink提取数据
**Dim myValues As PIValues
Set myValues = PIMath.GetInterpolatedValues_Point(inputPIPoint,
PIMath.StringToPITimeFormat(StartDate),
PIMath.StringToPITimeFormat(NextDate), "10s")**
什么是复制存储在MyValues到工作表中的列中的所有值最快的方法?我使用For循环:
For k = 1 To myValues.Count
Worksheets("Sheet6").Cells(k, 2).value = myValues(k)
但很明显放缓的过程中,我使用多个PI标签和更改时间间隔为5秒。
另外,如何在每个完整循环结束时将myValues
设置为空?这就是我要做的:
MyValues
包含日期从1日至2日- 所有PI点
MyValues
数据应该被清除 MyValues
包含日期从2日的数据,第三