Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

question on the example code 8253eventcount.c

Hi.
I saw the example code 8253eventcount.c before in the NI-DAQ6.9.x. That is very useful.But i still confuse that "Do i need to set up each clock pulse duration?". From the program, it seems that the counting process solely depends on the function NIDAQDelay(sec).....

By the way, if i am now using an old version of NI-DAQ6.8.5, How can i update some calculated voltages for each 1ms. Although i have read and followed the procedures in the user mannual of lab-pc+,but, i am still not sure how to program the counterA2 with appropriate update interval. Could anyone give me an example code? It seems that no examples are given in the version of NI-DAQ6.8.5.

I am now using lab-pc+ with Ni-daq6.8.5 by using c++ and win
dows95 as my working platform.Please help me in anyway! Thanks!
0 Kudos
Message 1 of 2
(3,066 Views)
The NIDAQDelay() is only in there to control how often the program checks the current count on the counter. If it is set to 1 seconds, it will read the counter every one second and return how many counts have been read since the start. If you take that function out, the program will check the counter as fast as it can which will tie up your CPU.

As to your question about calculated voltages, can you be more specific as to what your application is and what you are trying to do, I'm a little confused.

Brian
0 Kudos
Message 2 of 2
(3,066 Views)