08-28-2008 10:56 AM
I am using a system in which I am acquiring a number of analogue input channels and I wish to get accurate time information for the data samples. I will be sampling at a fixed rate using the on board clock so I just really need to find out what time the first sample was taken.
First of all, I do not want to use the waveform method as I prefer to acquire data in integer format to create a smaller file. Also, having scoured the discussion forums it would appear that the t0 value for a waveform is not as straightforward as it would seem.
One method mentioned on the forums sounds like it might be what I need – use the counter on the same card (it will probably be an M series PCI-6254) to get the information I need to calculate the time of my first sample. The method involves setting up the counter for buffered event counting with the “ai/StartTrigger” as the counter gate signal and an internal clock source for the counter source. I believe that the first counter value stored will then be the number of clock pulses between the counter being armed and the “ai/StartTrigger” switching levels.
Now, I understand that method and could probably have written the code to do it using the Traditional NI-DAQ functions but I am really struggling to do this in Measurement Studio using C#. Could someone please help me with the following:
Or perhaps there’s a simpler/better method of getting the time information?
Thanks for any help.
CAS09-02-2008 08:59 AM
Hi Cas,
I believe this forum post should be of some assistance to you - it documents how to configure the clock source and has some useful links.
This Knowledgebase gives links to solutions of known questions in Measurement Studio, including a section on Data Acquisition.
I hope these two resources help in your application.
Best wishes,