Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Counter Resetting when Monitoring Pulse Generation

Hello,
 
I've run into a problem with my pulse counter or pulse train resetting when I run the attached VI. The VI doesn't actually stop, rather it appears that the counters "data" (from Counter DBL 1Samp) resets to zero...maybe, not sure, maybe the problem is with the pulse train?!?!?
 
I have attached the VI as well as a JPG image of the VI if anyone wants to take a gander.
 
What I'm atttempting to do is generate a continuous pulse sequence and to count the number generated pulses. We are looking to have this running continuously for several days at a time.
 
So far the VI works fine for short durations (<1hr) or as long as the counted # of "Revolutions", derived from counter "data", is below 41941. Once you hit this value (takes ~50 mins with the current settings) I've found that either the counter resets or there is an interruption in the pulse train.
 
As of yet I haven't been able to figure out which one is the problem. I tried looking into buffer problems but when I tried to use DAQmx READ "AvailSamplPerChan" an error comes up saying that the output is non-buffered or something to that effect.
 
Anyway, we'd like to have the continuous pulse train and the # of pulses generated (pulse count) to run for several days so if there is an easier way to do this or you know how to fix the current VI I'd aprpeciate any help you can give.
 
 
We're using the USB-6259 and Labview 8.0.
 
 
best
SS
 
 
Download All
0 Kudos
Message 1 of 3
(2,813 Views)
Hi SS,

I looked into your code and ran it on my M-Series board and confirmed the operation that you are experiencing. At the current settings, specifically your scalar value, you will only be able to display up to 41941. This is because the counter is a 32 bit counter. In your program you are dividing the count by 102400 and thus, when the counter has counted up to 2^32, you will get 41941 from rounding.

What you should do is monitor the CtrInternalOutput pin and when it goes high your count register has reset and you will be counting from zero again. If you know this has happened, you can program accordingly. Read the DAQmx Help File under counters/counter parts in NI-DAQmx for more info. When it reaches then end of the count, this is called ‘terminal count.’

Hope this information is helpful.
PBear
NI RF
0 Kudos
Message 2 of 3
(2,787 Views)
Patrick,

thanks for the clarifaction about the counter limitation.

I think I know what needs to be programmed in to keep track of it now.

best,
SS
0 Kudos
Message 3 of 3
(2,781 Views)