Hello,
I have set up my counters for buffered pulsewidth measurement, so that I can count the number of unknown counts within a gate pulse period. The way my system works is that I have an external timing generator, which sends the hardware trigger on SRC of counter 2. It also generates gate pulses for counters 0 and 1, which are sent to the PFI lines 38 and 34 respectively. I set up both counters 0 and 1 in buffered pulse width mode, and counter 2 in simple event (so that I can determine how many triggers I received). The unknown signal comes in on the SRC of counter 0 and 1, and I want to measure how many counts I get during the gate pulses. Now, to test individual pieces of the program, I wrote the following program, which does the following: set up counter 0 in buffered pulse width measurement, and counter 1 as the gate for it. Ctr 2 just looks for the hardware trigger from the pulse generator, and I also send in a known sequence of pulses to ctr 0. The program works fine and reads everything, BUT only when I am in highlight mode during execution. When I run the VI without highlighting, it hangs in the process of reading the buffer. Putting in loop delays everywhere doesn't seem to help.
I am attaching the program I wrote. If somebody could take a look and figure out what I mgiht be doing wrong, I would be really grateful.
Thanks,
Gurudev