Measurement Studio for VC++

cancel
Showing results for 
Search instead for 
Did you mean: 

Reading calibration time

Hello everybody

 

I try to read the latest calibration time from a instrument in my PXI chassi using C++

functions in nisyscfg.h. Below is a code snippet

NISysCfgTimestampUTC lastTimeCalibrated;

 NISysCfgUInt64 secondsSinceEpoch1970;
double fractionalSeconds;

NISysCfgGetResourceProperty(resource, NISysCfgResourcePropertyExternalCalibrationLastTime, &lastTimeCalibrated);
NISysCfgValuesFromTimestamp(&lastTimeCalibrated, &secondsSinceEpoch1970, &fractionalSeconds);

After the call a get (Copied from my debugger)

secondsSinceEpoch1970    2212122498    NISysCfgUInt64
        lastTimeCalibrated    @0x28fb38    NISysCfgTimestampUTC
            u32Data    @0x28fb38    unsigned int [4]
                [0]    2685816    unsigned int
                [1]    829144320    unsigned int
                [2]    2    unsigned int
                [3]    1    unsigned int
        fractionalSeconds    0.19305020570769565    double

I have read in the  usergoups that NI starts time calculation from 1904 and not 1970

but anyway i can't get the value of

secondsSinceEpoch1970    2212122498

to be correct. NI MAX says some date in 2016....

 

Anyone that knows what i am doing wrong ??

2212122498 Seems to be in the 2040-mm-dd

 

best regards

  Håkan

 

 

0 Kudos
Message 1 of 2
(2,524 Views)

I get a ridiculously large number for the eSecondsSinceEpoch1970 and zeros for the last internal calibration UTC. On a simulated and live system. Seems a bit unreliable.

0 Kudos
Message 2 of 2
(2,454 Views)