03-31-2016 10:29 AM - last edited on 10-24-2024 01:02 PM by Content Cleaner
I am trying to add the start time for each step in a sequence to the report using an overrided version of the callback sequence SequenceFilePostResultListEntry. According to
https://www.ni.com/docs/en-US/bundle/teststand/page/standard-result-properties.html
I should be able to access the step start time using Step.Result.TS.StartTime. However I keep getting the error "Unknown variable or property name 'Step.Result.TS'". I am using TestStand 2014 32 bit on Windows 7 64 bit Professional.
Thanks
03-31-2016 10:44 AM
That only gets put in the resultlist. It is never part of the step object. So you will have to look at Locals.ResultList[<index>].TS.StartTime.
03-31-2016 03:16 PM
Thanks for the answer. From what you said I was able to piece together that using the expression
Locals.nStepStartTime=Parameters.Result.TS.StartTime
inside the callback "SequenceFilePostResultListEntry" gave me access to the step start time in the ResultList and I am able to write the value to the report. However I am still not sure what the most efficient way is to convert it from a relative time in seconds to the local Windows PC absolute time.
Thanks again
03-31-2016 04:06 PM
Adding Engine.SecondsAtStartIn1970UniversalCoordinatedTime will convert to an absolute time in the time-base commonly used in C programming.
If the functions you want to use require a different time base, you can add the appropriate offset from midnight (00:00:00), January 1, 1970 to the desired time-base.
04-05-2016 08:53 AM - edited 04-05-2016 08:55 AM
Thanks for the response. I was able to get the result I needed by adding
Parameters.Result.TS.StartTime+RunState.Engine.SecondsAtStartIn1970UniversalCoordinatedTime
giving me the number of seconds since 1970. I wasn't quite able to figure out how to convert this into a standard MM/DD/YY HH:MM: SS date/time format only using TestStand, so I passed it to a LabVIEW VI, added 2082844800 seconds to account for the difference in LV's 1904 reference vs TS's 1970 reference, and using the "To Time Stamp" function to get my final result. Doing all this in the SequenceFilePostResultListEntry callback.