Currently, our data tables are being timestamped with the time that the record is generated. We would like a timestamp (can be a second 'dummy' timestamp column) that would reflect the time that the averaging interval started. Any ideas? We are trying to avoid doing this post-processing and would prefer it to show in the data tables.
Newer OSes have a DataTime instruction. I am not sure if this will help, as what you report above seems to be different than what should be happening. However, take a look and see if it helps.
I suspect you could also use the RealTime instruction to store into a variable at the time of the measurement and then store that variable to the data table.
Dana
Or perhaps rather than Real-Time, you may be able to use Status.timestamp, but now that I think about it, this and the RealTime instruction may report time at the beginning of the scan... you'll just need to check it as I am answering off the top of my head!
Refer to the data table access topic in the CRBasic help for additional information on using Status.Timestamp.
Dana
Dana,
Thank you for the follow up. We did end up creating a second timestamp column in each data table using TableName.TimeStamp which does timestamp at the beginning of the data record. I don't have access to a logger for testing to try the DataTime instruction.
Public PTemp, batt_volt, StartTime As String *32
DataTable (Test,1,-1)
DataInterval (0,60,Sec,10)
Sample (1,StartTime,String)
EndTable
BeginProg
Scan (1,Sec,0,0)
StartTime=Test.TimeStamp(1,1)
PanelTemp (PTemp,250)
Battery (batt_volt)
CallTable test
NextScan
EndProg
Kevin