11-30-2011 06:10 PM - edited 11-30-2011 06:11 PM
Hi Joe,
Your point is well taken. But the problem is whatever the setting of the sampling rate, the start and end times are showing to be the same.
Now I'm suspecting this..... You could comment on it though.
The code runs for 10 seconds. And the sampling rate is 1000 smaples per second. So in 10 seconds run, I get a total of 10,000 samples.
What I want is actually the beginning or end time of each second of the ten seconds. What it given me is the beginning or end time of the
whole ten seconds run.
Regards,
Kichew
12-01-2011 11:21 AM
Hey Kichew,
Where are you setting the endTime in your program? I couldn't seem to find it. And what are the actual values you are getting for the startTime and endTime? Are you still just getting 0? Even if you are getting the time for the whole ten seconds, you should still be able to get the elapsed time and then divide by the total samples (10,000 samples) and get the increments that you need.
Let me know.
Joe S
Applications Engineer
National Instruments
12-01-2011 11:35 AM
Dear Joe,
What actually happens is that both the endTime and startTime are the same numbers. If I had got a different number for the endTime, right then I could divide it with the number of samples. But I get the same number so dif =0.
Regards,
Kichew
12-01-2011 11:39 AM
Hey Kichew,
I wasn't able to find where you set endTime in the code that you posted earlier. Are you still using that same code? Where are you setting the endTime at?
Joe S
Applications Engineer
National Instruments