Quantcast
Channel: Counter/Timer topics
Viewing all articles
Browse latest Browse all 1271

Synchronization issues on USB 6341

$
0
0

Hello,

 

Before I get into the problem that I'm seeing, I'll start off by describing what I want to do.

 

I have the USB-6341 X Series DAQ and two photon counting head PMTs.

 

I want to bin and read the number of counts at each PMT with user-defined sampling rates between 500 and 10,000 Hz, resetting the tick count to zero after each reading.

I want the data from each PMT read/sample to be a single number - this is because I need to compare the two PMT outputs in real-time (i.e. calculate a ratio between PMT 1 and PMT 2 that I use to determine downstream operations).

Lastly, I need the reads from the PMTs to be "perfectly" synchronized. The (PMT 1/PMT 2) ratio means nothing if the data is misaligned by an arbitrary number of samples.

 

I've attached a copy of my code below. I'm using ctr0 to create a frequency pulse train with the same frequency at which I want to sample. The output of ctr0 is used as the source for the sample clocks of my input counters (ctr1 and ctr2) and also as the source for their Arm Start triggers. 

 

Unfortunately, the inputs from each PMT (counters 1 & 2) are unsynchronized, even with the Arm Start triggers (which I read were the only way of synchronizing counter tasks). I know this not only from the reviewing data that I've saved but also because when I stop the program, the number of samples recorded along the x-axis of each strip chart is different. I don't understand how that is possible. This discrepancy is arbitrary for each run. I should mention - I don't see the discrepancy on the strip charts at all if the PMTs are removed from their respective screw terminals.

 

Does anyone have any insight that can help me?

 

As a side note, I also see this behavior when I have two analog inputs that share the same task! That program is also attached below.

 


Viewing all articles
Browse latest Browse all 1271

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>