Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Sync of sample clock and PC clock

I am currently using two NI9237 CompactDAQ devices from C# .NET via the NI-DAQmx framework. Each device has 4 analog channels, and I use two in order to measure 7 strain gauge sensors.

I run the tasks in continuous mode and the samples I read are available as waveforms. But after some testing it seems that the timestamps (DateTime) of the samples are out of sync with the PC system clock (DateTime.Now). Aren't there any built-in synchronization mechanisms?

Initial tests indicates that the sample timestamps can be as much as 100ms off, but I am using a very simple test that introduces additional inaccuracies; namely a microphone that picks up the sounds of the physical events applied to the sensors.

What leads me to believe the NI9237 devices are out of sync with the PC clock is that the timestamps of the two devices are not in sync with each other. The are rigged to the same physical setup but timestamp the same physical events at different times, again as much as 100ms apart.

I know a PC clock is not very reliable in the first place, but as much as 100ms errors seem way off to me? Can I do anything to improve this?
There is a chassis that enables the devices to be measured in one task and which provides inter-device synchronization, but they will still be out of sync with the PC clock as far as I know. Either way, the chassis is still a no-go because of the form factor..

Because of other devices in the system we are not able to use any form for external clock or trigger, so we really need to use the PC clock as a main clock .

Any ideas are most welcome!

0 Kudos
Message 1 of 1
(3,022 Views)