06-16-2015 05:26 AM
Hi All,
I need to fetch BMP file by confirm.vi(pic2), but when I run the program, the BMP file won't come out correctly. the last picture always come out. (for example, the first time picture A come out, but when picture B should come out, it still show Picture A.)
the correct picture will come out correctly when i put time delay 100ms in the loop. but it will cost lost of time,two arraies have 300 elements and 20 elements separately. how can I make it faster to fetch the correct picture? thanks!
Solved! Go to Solution.
06-16-2015 06:17 AM
So you are using a file in order to pass data between loops? That a major race condition. Try using a User Event, Queue, or Notifier to send the picture to your other loop.
06-16-2015 07:15 PM
Hi crossrulz ,
I'm not using a file to pass data, we have two array A and B, i need to compare the elements in these two array. when the elements are the same,
the program will run the subvi(confirm.vi) this will show picture of the elements. when i click OK, it will go back to compare.
06-16-2015 10:00 PM
hi yeah,
It seems you have used too many loops to realize your comparison function. Try to use the Search 1D Array.vi to eliminate the insider while loop.
06-17-2015 07:40 PM
Hi AmandaYi ,
Thanks for your advice, it works.
I put the array with less elements in the loop and use search 1D array for the one with more elements. the time is acceptable now.
Thank you for all your help!