Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

Is there a way to increase the time resolution to 0.1 ms.?

Hello. I am using "Download - Using_Counters_to_Time_Program_Execution.zip " that I downloaded from NI Developer Zone. I think this gives me a time resolution of 1 ms. Is there a way to increase the resolution to 0.1 ms? Thank you
0 Kudos
Message 1 of 5
(5,146 Views)
ilter,

I just downloaded that example and looked at it.  If you run the example as is, you will see that the precision of the "Time (ms)" indicator is already more than 1 ms since it displays a decimal value.  If you want to see more digits of precision, you can right-click on that indicator and go to Format & Precision.  From this dialog, you can increase the number of significant digits. 

Since this example uses the 20 MHz timebase of the counter as the reference for timing the code, it makes sense that the time resolution is much more than 1 ms.  In order to have the "Time (ms)" indicator display a value in 100's of microseconds rather than milliseconds, you can simply add a Multiply VI right before the indicator on the block diagram and multiply the value by 10. 

I hope this information is helpful.

Best regards,
0 Kudos
Message 2 of 5
(5,132 Views)
Dear Mr.JArrod,
 
Thank you for the information provided. I am sorry I made a mistake, I was trying to say "how to decrease the time resolution to 1 ms" actually.
 
My problem is not with displaying. I am trying to start another event using time information provided throuhg the counters. When the time resolution is 20 MHz it is very fast that the other events cannot catch up (I am sorry for my poor description). For my case I believe 100 kHz is fine that's why later I tried to use the vi (Count Time- Easy (DAQ-STC).vi) that I found in LabView (Hardware \ Traditional Daq \ Counters ) and modified it. For some reason it does not work properly. It does not give me the right elapsed time. I am attaching the picture of the simple vi that I made to test the program.
 
If you have time could you please explain me why this vi does not work, and also how to reduce the timebase to 10 kHz or 100 kHz in the "Download - Using_Counters_to_Time_Program_Execution.zip ".
 
Thank you very much.
 
Respectfully ,
 
ilter
 
 
 
0 Kudos
Message 3 of 5
(5,125 Views)
ilter,

As for your test VI using "Count Events or Time.vi", that is not working because you are only calling the VI once.  In order to get a proper elapsed time, you need to call the VI a second time as shown in the attached picture "Using Count Events or Time VI.jpg". 

In order to modify the original example to use a 100 kHz timebase instead of the 20 MHz timebase, see the attached picture "Time With Counters (DAQ) - Modified to 100 kHz.jpg".  The changes you need to make are circled in red. 

I also meant to point out in my previous post that there is another example on the DevZone that does the same thing (time code with counters) using the newer DAQmx driver.  I would encourage you to use this example as it will make your application more supportable and maintainable in the future.  By default, this example also uses the 20 MHz timebase.  In order to modify it to use the 100 kHz timebase, see the attached picture "Time_With_Counters (DAQmx) - Modified to 100 kHz.jpg"  To select the 100 kHz timebase in the DAQmx terminal constant, you will have to right click on that constant, go to "I/O Name Filtering" and select "Include Advanced Terminals".  You will have to select "/Dev1/100kHzTimebase", and then you can delete the "/Dev1/" part. 

Hope this helps!

Best regards,

Message Edited by Jarrod B. on 04-05-2006 10:10 AM

0 Kudos
Message 4 of 5
(5,112 Views)
Dear Mr.Jarrod,
 
Thank you very much for your help. It all works now. I will strat learning about the newer DAQmx drivers soon.
 
Respectfully,
 
ilter
0 Kudos
Message 5 of 5
(5,098 Views)