10-19-2017 01:44 PM
Hello,
I verify External Calibration is supported by the device,
NISysCfgGetResourceProperty(resource, NISysCfgResourcePropertySupportsExternalCalibration, supportsECalBool);
and get a NISysCfgTimestampUTC timestamp (struct unsigned int u32Data[4]) with zero values.
NISysCfgGetResourceProperty(resource, NISysCfgResourcePropertyInternalCalibrationLastTime, lastExtCal);
My initial thought is I should just grab these values where each signifies year, month, day,
NISysCfgTimestampUTC typdef to the function below from what I understand converts to seconds from 1970.
NISysCfgValuesFromTimestamp(lastExtCal, secondsSinceEpoch1970, fractionalSeconds);
I get a large value secondsSinceEpoch1970 = 18446744071626706816 , fractionalSeconds = 0.0000
What am I doing wrong?
10-19-2017 03:19 PM
The original value I posted was because of the simulator.
The physical hardware now returns 1419034537 and 0.359672which seem to be correct. but in order to get the correct date, what process should you follow?
10-20-2017 03:47 PM
SunDontShine,
Let me see if I understand you correctly, you are just trying to acquire the values from the NISysCfgTimestamp function, right?
I believe this results you are getting are an expected behavior. Now, if what you want to do is "translate" this number that are getting, this website might do the trick for you: https://www.epochconverter.com/
Regards,
Tuco100s
01-12-2018 03:04 AM - edited 01-12-2018 03:07 AM
It's basically the unix epoch time. All the normal C runtime library functions that work with such time values such as ctime() should work.
The original value is most likely a LabVIEW timestamp which consists of an int64 that indicates the seconds since January 1, 1904 GMT and an uInt64 which contains the fractional seconds.