Please enable JavaScript to view this site.

DAQFactory User's Guide

Navigation: 14 Other Features

14.8 User defined time reference

Scroll Prev Top Next More

DAQFactory internally uses the high precision clock to measure time in sub microsecond precision.  However, since computers often use lower quality crystals, this time can tend to drift over time.  Many users use IRIG, GPS, or stable time source cards to solve this problem.  You can write a simple C driver that provides the current time to DAQFactory.  This driver can then pull the time from the IRIG, GPS or other hardware for a much more accurate and stable time.  DAQFactory will then use this time for everything it does internally and externally.  The use of the fixed hardware then becomes completely transparent to the user.

To create a time DLL, create a DLL called UserTime.dll in any programming language that exposes the following function:

 

double GetTime()

This function will get called whenever DAQFactory needs time.  You should return the current time in seconds since 1970, in as high a precision as you can (ideally to the microsecond).  A double can only store time precise to the microsecond, so this is the best precision that can be achieved.