Electronics Engg Posted November 24, 2010 Report Share Posted November 24, 2010 Hii VI folks, I have to ask two Questions. 1. I am to fetch the values from csv file and want to calculate the average, max and min. 2. Lets say i have 100 readings in csv file and i want to calculate Max, min and average from 10-90readings. the reason behind this, i want to skip (0-10 and 90-100 readings) the constant values from beginning and at the end. Thanks -Hasan Karkra Quote Link to comment
hooovahh Posted November 24, 2010 Report Share Posted November 24, 2010 Read the values into an array (sounds like a 1D array) then use the array subset feature to get an array which has an offset of 10 but getting the rest. Then get a subset of that which has offset of 0 but length is array size minus 10. This will give you an array of 80 values. Perform operations on these 80. There is a maximum and minimum array function, and I think average as well. Quote Link to comment
crossrulz Posted November 24, 2010 Report Share Posted November 24, 2010 If you post what you have so far we could help a little better. If reading your CSV is the issue, post an example of the CSV as well. Quote Link to comment
Electronics Engg Posted November 24, 2010 Author Report Share Posted November 24, 2010 If you post what you have so far we could help a little better. If reading your CSV is the issue, post an example of the CSV as well. I want to create a VI which fetches the information from .csv file and at the end GUI comes up with Avg, Man and Min values. This is my short term goal or project. I am beginner in VI. So, by following this fact am tiring to do this task step by step. Fetch information from CSV file. By using array function, calculate the required parameters. Output pops up in GUI. My approach is this. Sorry to say, i don't have VI file to upload. Quote Link to comment
Tim_S Posted November 24, 2010 Report Share Posted November 24, 2010 Fetch information from CSV file. By using array function, calculate the required parameters. Output pops up in GUI. You seem to have broken down what you need well. Have you looked through the pallet at what primatives and VIs are present? Looking through the File and Array palletes should make what you need to do obvious. I expect you're going to get limited help until you've shown you've tried to do something especially as this sounds like a homework assignment. Tim Quote Link to comment
Mars Su Posted November 29, 2010 Report Share Posted November 29, 2010 especially as this sounds like a homework assignment. Tim Quote Link to comment
Electronics Engg Posted December 2, 2010 Author Report Share Posted December 2, 2010 (edited) Thanks for your group support. Here is the working VI. Edited December 2, 2010 by Hasan Karkra Quote Link to comment
crossrulz Posted December 2, 2010 Report Share Posted December 2, 2010 Thanks for your group support. Here is the working VI. This doesn't look like it should work since you have a race condition on your Max Index(es). You really should use wires instead of the value property node. On another side note: locals are better than property nodes for getting/setting a value from a control/indicator, but a wire is best. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.