I am trying to time align data recorded on two T7-pros and a separate NI system for recording data from an actuator. The labjacks do external sensors and the NI system sends commands and records internal feedback. The easiest part to see is that an external position measurement is as much as a second delayed behind when the NI system records position feedback. To help with this delay I have been logging data with a modified LJStreamM where that the initial timestamp is recorded to ms level and used to try to align to the start time with the NI data output. To help with the likely delay recording vs time stamp assignment in data I have implemented the low-latency suggestions found elsewhere to hopefully decrease the time between stream start and the first data point which is assigned a "time" value of 0. We are able to record the position feedback in the NI system as a waveform which has a time associated with when the data is recorded which gives a high confidence in the lack of logging delay.
One method I have been trying to implement is to record a start core timer time and to compare that to a logged core timer for each scan. What I am running into is that when looking at the "voltage" field in LJStream the value can get up to 4 billlion+ which seems to match with the start core timer value which is read with an eReadName.vi. However, when the stream is started and the data is written to the file the Core timer values have that saw wave shape as expected due to it being a 32bit value but its magnitude is significantly lower, on the order of 65,000 or less. This is backed up by logging the STREAM_DATA_CAPTURE_16 property which steadily climbs to about 65,000 then loops. Is this an expected behavior and if so is there a way to get from one "scale" to the other? Is there a better way to have a high confidence way to correlate timestamps recorded by the labjack to system/host time?
Edit:
Another check I have done is seeing what the core timer reads in the LJLogM beta. LJLog seems to handle the read just fine with the values being the larger magnitude.
Stream data is transferred as 16-bit values, so to read a 32-bit register you must read the register, then STREAM_DATA_CAPTURE_16. STREAM_DATA_CAPTURE_16 returns the MSW of data, the register returns the LSW. The 32-bit value would be calculated using the formula:
32bitValue = LSW + 65536*MSW.
The following documentation contains our recommendations for synchronizing stream timestamps:
http://labjack.com/support/datasheets/t-series/communication/stream-mode...