Hello,
I had actually also set up my counters in a similar mode because I need to do the same thing. But I couldn't get it to work. 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, I have tested individual pieces of the program, by sending a known set of pulses to both counter 2 and counters 0 and 1. But for some reason, the buffers in counter 0 and 1 are always empty. Also, even though counter 2 will count if I send a known sequence of pulses, it never seems to count the pulse I send from the timing generator. And therefore it enters an infinite loop. I have used the timing generator with the NI counters before for other programs, so I know they can work together (in terms of voltages and currents etc). After reading this post, I have tried to enable pad synchronization and synchronous counting also, as seen in the program. Actually, I am not sure I have enabled pad synchronization, as the labview help is not very clear on this. But I still can't seem to get any counts.
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
@justin_j wrote:
Hi, I'm trying to convert a 2-channel gated photon counting module to NI-DAQmx. There seems to have been a paradigm shift in how the new VI's are defined as gates do not seem to be explicitly included anymore.
This module is intended to work with counters on a PCI-6602 card.
Counters 0 and 1 are run in buffered pulse width measurement mode. The signal source to be counted is attached to PFI39 and 35. The gate for each (to ensure synchronization)is set to RTSI0.
Counter 2 generates the gating pulse and the output is sent to RTSI0. It is triggered by a digital pulse on a DIO port.
The VI Two_channel_gated_photon_counter included in the attached library continuou
sly acquires 1 sample. In actual operation, a buffer it set up for each channel and one sample is acquired for a series of gate periods triggered by the a series of ditial pulses. At the end of the meaurement, the buffer is read out containing the full N samples
Since the 6602 is just supported in DAQmx as of last month, the documentation is sparse and intended for traditional DAQ. I would appreciate help in converting this VI. thanks