08-28-2018 05:13 PM
Hello,
I am new to Labview and I need some help with my existing vi code. The current vi is taking 18 samples for voltage and current from UUT. Then it take a subarry of 6 highest value then averaging out. The results is in power consumption between 5.1 w - 6.3w. Instead of average, I need to record last current and voltage reading and print out the pwr consumption result. I have attached my code. Thanks
Solved! Go to Solution.
08-28-2018 11:52 PM
After Looking into your code, Find my suggestions.
1.Use Proper Architecture(Probably state machine will do good for you) instead of Multiple Loops and Sequence Structure.
2.If you want last value of acquired sample (18th Sample)then don't collect data in shift register array just take the last acquired value from the loop.
3.If you want last value of the sub array of 6 highest Value without averaging then ignore step2 and remove the for loop where addition logic Takes place.
4.Reverse the sub-array and take the first index value which is basically your last element/value.
08-29-2018 07:23 AM
Hi Palanivel,
Thanks for your suggestion. I would like to do as you mentioned in step # 2. Take 18th sample reading and display. Do I need to rewrite the vi or can I turn off the shift register array?
Thanks,
Milan
08-29-2018 09:00 AM
Hope Indexing of Acquired Values in the Loop will give you an array of Vaues, Once all your 18 Samples is read just Reverse the 1D array and Index the First Element.
Ignore the For loop where averaging is done
Just see how this helps you
\
Attched only the necessary Snippet use this in youe code
08-29-2018 01:19 PM
Added reverse 1D array and index the first element. I am still receiving errors on terminals. See attached. Thanks for your help.
08-29-2018 11:17 PM
You are using array subset Instead of index array, so try to use Index array so that error can be eliminated.
08-31-2018 10:00 AM
Hello,
Project is working great. Thank you so much for your help and suggestion.