Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Process waveform data (results accumulated)

Solved!
Go to solution

Hi, all,

 

Currently I am trying to process a waveform data which I read from DAQ board. The data is digital waveform, so I first convert it into DBL array and then put the array to a prcessing block (see attachement). From that I expect to get a ratio, and I indeed got what I want at the first time. However, when I re-run the program, the results got accumulated. e.g. the first time I got 0.5, then when I re-run the program, I expect to get another 0.5, however what I have is 1. If I keep re-running, it continue accumulating.

 

Can anyone tell me what is wrong with my program? I have attached a screen shot of the code and also the vi which I used to do the processing.

 

Thank you in advance for your help.

 

Main program:

Untitled.png

0 Kudos
Message 1 of 3
(3,210 Views)

One of your shift registers is not initialized. You did not provide any data so it is difficult to test.

 

Your use of the Array Size and wiring that to the count terminal and also using auto-indexing is silly. Use one or the other.

0 Kudos
Message 2 of 3
(3,207 Views)
Solution
Accepted by topic author rui0632

You have an uninitialized shift register going into your final FOR loop.  Initialize it to 0 and you should be good to go.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 3 of 3
(3,205 Views)