Ignition: 8.1.25
Reporting Module: 6.1.25
Historian: IgnitionDB01 (MSSQL)
Setup:
- Tag Historian Query data key named ITLoad_Start
- Tag paths added by dragging from IgnitionDB01 historian browser
- Script datasource named ITLoad_Calculated tries to read from ITLoad_Start
Current code:
startDs = data['ITLoad_Start'].getCoreResults()
rowCount = startDs.getRowCount() # returns 0
value = startDs.getValueAt(0, 'kul12_reporting/dpm/l1/pdu_l1_n1/energy/kwh') #
returns nothing
Problem:
- No script errors
- getCoreResults() returns a dataset object
- getRowCount() returns 0 even though historian has data
- Preview shows empty table
- Parameters StartDate and EndDate have default values set
- Tag paths confirmed correct format from dragging
Questions:
- Is getCoreResults() the correct method to access Tag Historian Query results?
- Why does getRowCount() return 0?
- What is the correct column name format to use in getValueAt()?
- Is there a working example of Script datasource reading from Tag Historian Query?
Your help is much appreciated.
Thanks!