From Saturday, Nov 23rd 7:00 PM CST - Sunday, Nov 24th 7:45 AM CST, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Saturday, Nov 23rd 7:00 PM CST - Sunday, Nov 24th 7:45 AM CST, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
05-21-2015 03:14 PM
My requirement,
1. Here, the user will provide the range like maximum and minimum values, based on this range, the VI should capture the data within the given range. ( from CSV file as attached )
2. Then VI should calcluate the average value for captured data and export it to excel.
This is my requirement can anyone help me on this.
Many thanks in advance
rc_cks
05-21-2015 03:23 PM
Where is your VI ?
We are not here to do your work for you. Make an attempt first then we can help with advice.
05-21-2015 09:35 PM
Hi,
Thanks for remnding me. I forgt to attach the VI,
Here I am attaching the VI, what I tried.
From attached CSV file, I have to find an average value for columns B,C,D,E,F,G,H,I and AJ, AK. ( data range will be defined by user ), focused only on these columns
Here, the scope is to calculate an average value for given data range by user as MAX and MIN data.
FYI: I tried manually for two instance i.e column H & I. As per H column one steady state values from 7500 to 10500 and similarly in I column 7875 to 10050. So, I gave these as a limit to capture and calculate the average value. But unfortunaltely, requirement has been modified as per below requirements.
More Info on requirement:
--> The user will define the range of data by giving some MAXIMUM and MINIMUM values(for above mentioned columns induvidually), then VI should capture that data range and it has to caculate the average value for that range of data. This is the task I have to complete.
--> I am stuck in creating a logic for data capturing for given range of MAX and MIN value from user,
Can anyone help me on this.
If my explanation is not clear, Please let me know.
Many thanks, help mw
rc
05-22-2015 12:17 AM
Takeout user defined column from 2D array (which you’re getting from csv) and pass it to For Loop.
And check every value with user defined limits (you can use “In Range and Coerce”).
Take out the resulted data & do the average.
05-22-2015 09:50 AM
Thanks for giving me an idea. I have never used Range and Coerce before. I will try this approach.
Thanks,
rc_cks
05-22-2015 10:34 AM
I also recently learned of the conditional for loop. So you can wire the "In Range" output to a conditional terminal and then the indexed array output will only have the values you want. No case structure needed!