04-10-2007 06:37 AM
04-10-2007 04:00 PM - edited 04-10-2007 04:00 PM
Hi Jon-
O/S interfaces for NI-VISA (and many others) are provided with the MHDDK. You should be able to install NI-VISA for Mac OSX and then use the M Series MHDDK examples and the osinterface files ( ftp://ftp.ni.com/support/daq/mhddk/osinterface/nimhddk_visa.zip ) without additional modifications.
That aside, I would be interested to hear more about the issues you saw with NI-DAQmx Base. The preferred solution would be to find a workaround or some tips to help use NI-DAQmx Base rather than go to the trouble of developing your own driver. What issues specifically are you seeing?
Thanks-
Message Edited by Tom W [DE] on 04-10-2007 04:00 PM
04-11-2007 03:16 AM - edited 04-11-2007 03:16 AM
Message Edited by JGF on 04-11-2007 03:17 AM
04-28-2007 10:43 AM
Hello Jon-
Your colleague's impression of the inability to query a count of buffered samples with NI-DAQmx Base is correct. However, this should not affect your ability to accurately timestamp buffered values that are returned by NI-DAQmx Base.
First, let me say that this advice assumes that you are less concerned about being able to grab the most recent sample immediately when the DAQmxBaseRead is called but rather that accuracy in timestamping is more important. That said, the fact that the DAQ board is using a precise onboard timing signal to buffer the samples should be sufficient to timestamp buffers that are returned by the DAQmx Read. Assuming you're able to accurately timestamp the starting point or trigger time of the acquisition, you can simply timestamp the values based on the sample period you have chosen.
One important consideration with this approach- the M Series board uses a 20MHz timebase and a 32-bit counter to generate onboard timing signals. So, if you request an AI sampling rate of 10005Hz the board will actually sample at 20MHz/2000 = 10kHz. Aside from this, you should be able to accurately timestamp the values based on the sample period of interest.
Please let me know if I have misunderstood the requirements of your app. If you do indeed need the ability to grab all available samples "now," then unfortunately your earlier assessment of this issue with NI-DAQmx Base is correct. Otherwise it may be an attractive option to developing your own driver from scratch.
Hopefully this helps-
05-07-2007 05:17 AM
05-07-2007 05:46 AM
05-07-2007 09:44 AM
07-30-2007 06:53 AM
08-01-2007 10:34 AM
Hi Jon-
How much does the absolute timestamp seem to lead the relative timestamp by? How long does it take for the effect to become noticable?
I would suggest that the absolute timestamp would be more reliable than the relative timestamp, simply because the absolute timestamp is based on the DAQ device running independently of the software. The relative timestamp, on the other hand, could be affected by things like slowing in execution of your software loop or lagging/incorrectness in the system time itself as reported by gettimeofday().
Since 10kHz is an even factor of the 20MHz timebase, the board should be able to operate very reliably (50 ppm accuracy) at the 10kHz sampling rate. I would be interested to hear the severity of the offset as well as the amount of time it takes to appear.
Thanks-
08-01-2007 10:52 AM