Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

Urgent!!!

Hi.
I am a "freshmen" in this areas.
I am now using Lab-PC+ and visual C++ to conduct my experiment. To do so, a calculated voltage should be updated for each 1ms from DAC0.
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 you give me an example code?
By the way, after programming the counter, Do i need to use any other function to start the counting process? such as ICTR?
Finally , Do i need to do anything to control the status of "gate2" of the counterA2?
For the one who knows the solution. Please help me in any way as the deadline of the project is very closed!!
0 Kudos
Message 1 of 3
(3,306 Views)
Hello;

The best example that fits your application needs can be found at C:\Program Files\National Instruments\NI-DAQ\Examples\VisualC\Ctr; and it's called 8253EventCount.c. That one implements event counting on the Lab-PC+ baord you have there.

If you are doing event counting, you don't need anything hooked up to the gate pin. Anyway, there is a good description about the code and connections needed, on that example I mentioned above.

Hope this helps.
Filipe
0 Kudos
Message 2 of 3
(3,306 Views)
Thanks! Filipe.
I saw the program. 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).....
Looking forward to seeing you again.

as1
0 Kudos
Message 3 of 3
(3,306 Views)