10-31-2007 04:18 AM
11-01-2007 12:45 PM
11-02-2007 04:38 AM
11-05-2007 12:56 PM - edited 11-05-2007 12:57 PM
Hi Emir
Since the reading of a digital measurement from the PCI-6510 is software time base we have to get the stamps inside the while loop using one of two functions, the first one can be the “Get Date/Time in Seconds”, this function will give you the current time every time the loops runs in a date/time format. The other function is the “tick” function (see code attach) that will give you the time in milliseconds.
Both cases you will have to save the timer value in an array with the digital value read from the card, for simplicity you can bundle the data with the timestamp into a cluster, from here a little bit of array manipulation and calculation will give you the time between pulses; this calculation has to be program by you. Always remember that since you have software timed application all these measurements are depended on how good your code is written and your computers speed. What I will suggest is to use Producer/Consumer design pattern were you read the data with the producer and make all the calculation with the Consumer.
I will also suggest taking a look at this DevZone article since you are using a simulated device: NI-DAQmx Simulated Devices.