LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

shift register not resetting

Solved!
Go to solution

Can someone have a look at this .vi and tell me why the shift register is not resetting. It is a program i am attempting to write to find the regions of peak information in a psd.

 

Thanks

Research Student

0 Kudos
Message 1 of 4
(2,702 Views)
Solution
Accepted by eword

nvm. found the problem. my while loop condition was incorrrect.

0 Kudos
Message 2 of 4
(2,695 Views)

There is more than one problem. You are doing the same array comparisons on the same data and producing the same result with every iteration of the loop. That code belongs before the loop. You should probably check if any of the two results is -1 (=not found) instead to terminate the loop. Also, the two comparisons are complementary, so one should be enough.

 

You have way too much code! Here's a quick simplification attempt. Modify as needed.

0 Kudos
Message 3 of 4
(2,689 Views)

Cheers. Thankyou for your help.

0 Kudos
Message 4 of 4
(2,682 Views)