I'm developing some code for frequency measurement in Visual C++ using the NI 6601 counter/timer board. I am able to successfully read the counter for a single counter; however, my application requires reading multiple counters.
Your program is hanging because you are setup for a continuos read, which means your counter will never unarm. If the first counter never unarms, then your program will hang until the first counter is stopped. You need to either use one Do statement for all for of the GPCTR_Watches or use the Buffer Functions. If you want a continuos buffered operation then you need to use GPCTR_Config_Buffer and GPCTR_Read_Buffer functions. However, if you are just doing a finite number of counts then you use the GPCTR_Watch function, without any buffer functions.