Hello everybody,
any insight on the following problem would be extrememly helpful.
I am using the NI 6713 (PCI) with LabWindows/CVI 5.5 and NI-DAQ 6.9.2 and am developing my application in C.
I wish to use three of the eight analog output channels to generate three different waveforms and synchronously read the buffer of one of the general purpose counters.
I have created an interleaved buffer for the three waveforms and am feeding the output of general purpose counter 0 (running at 4.47 KHz, square wave) onto the external update pin (PFI 5) to cycle through the buffer. This works perfectly. I have checked the voltage waveforms on an oscilloscope.
I am synchronously feeding t
he output of counter 0 onto the gate of counter 1. The source of counter 1 is random TTL pulses. I wish to count these random pulses during the time that the voltage waveforms are output and subsequently to repeat this for a arbitrarily defined number of cycles through the voltage waveform buffer.
I am trying to use the BUFFERED_EVENT_CNT mode with a buufer configured in circular/continuous mode. One question I have is: In this mode does the counter sum up the counts over multiple cycles i.e. if I configure a buffer of length 100 and I feed coutns into it for 10 cycles of my waveform buffer will the counter accumulate the total counts in each of the 100 buffer positions over the 10 cycles?
I have tried this by arming the counter, after configuring the buffer etc, then running 10 cycles of the voltage waveforms (with corresponding random TTL counts onto counter 1 source) then reading the counter after the cycles are completed and the counter manually disarmed in my code and all I
get is zeros. I know it's not a simple programming issue as when I switch the buffer mode to SINGLE I get counts in the buffer but of course it is then for only one cycle of the voltage waveforms.
My code is attached below. Any help would be hugely appreciated.
Thanks,
BJS