Quantcast
Channel: LabVIEW topics
Viewing all articles
Browse latest Browse all 66732

change value if array data is repeated

$
0
0

Hello,

 

I am trying to write a tuning algorithm that changes the calculated tune value after the program sees the same calculated value as before.  My tuning algorithm gets hung up on the extremes (5000 and 10000) and just goes back and forth and does not get out of that mode.  I wanted to adjust the calculated tune value up or down (depending which limit is hit), so that the program can continue working and converge to the correct tuned value.

 

In the attached VI, the Calc Tune Value array simulates the calculated tune value from my program that is derived within a while loop. In each iteration of the while loop, a tune value is generated (the index array in the attached VI simulates the tune value generated on each iteration of my actual program).  As shown in the array, entry 3 is the same as entry 1.  How can I modify the program such that when entry 3 shows up again, I modify the value.  How can I keep a running check of the same value appearing again?   

 

Thanks,

hiNI.


Viewing all articles
Browse latest Browse all 66732

Trending Articles



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