11-28-2012 11:23 PM
Hello,
I want to create a YT graph using a counter which counts pulses (falling edges) and puts the number of pulses in a time bin. In other words, the first for loop counts pulses for 1second (example) and then puts this number into the first bin. I tried to create a XY graph where the Y input is the array of counts and the X input are the time bins, but the resulting graph plots only the first bin.
I have attached the code.
Thanks in advance.
11-29-2012 03:54 AM
If you want to plot "pulse counts" versus time, I would recommend a waveform into a waveform graph. Make dt your bin size when building the waveform.
And why do you have 5 for loops each with one iteration? You could do everyting in one for loop running 5 iterations. And put DAQ Clear Task outside the loop so it runs after the loop is finished.
11-29-2012 11:51 PM
I tried your suggestion, but the waveform graph does not respond when placed outside the loop. On the other hand when I placed the graph inside, it showed a single point.
11-30-2012 12:11 AM
My suggestion was to use a For loop for the DAQ and the For loop wrapped by a While loop. After the For loop is finished you would see the updated graph, then the While loop would iterate again.