01-15-2013 11:45 AM
Hello,
I am new to labview but i have some basic understanding and I have one month to do a project with labview. So, please guide me how to do the following.
Currently what i want to do is to generate graph from output of one formula which has varying input on time.
Please find the attached photo for my excel sheet.
the value of X and Y which are input and Z is output. eg. Z = X + Y ( X and Y are varying over time)
i would like to show the output value of Z in graph over time in column A. RELLY APPRECIATE YOUR HELP .. 😄 tthanks
Solved! Go to Solution.
01-15-2013 01:22 PM
The time is in column B (not A) and the time increment seems to be 1 minute. Is Y always a constant?
What have you tried so far and where did you get stuck?
You could do that in 1 minute using excel so why do you want to use LabVIEW for this?
01-15-2013 11:27 PM
HI altenbach,
i am currently looking for how to import these data to labview.
i found getting data from excel VI but in that vi , i get data in array and i still don't know how to put data from array to my formula one by one to generate graph from that output .
Yep , the time is in coulumn B and Y is also variable. Actually my actual formula is confusing and i think if i can do it with simple formula, i can do with complex one too .
why i have to use labview is my project is not alone and i have to combine with others who using labview as well .
Please help me and advise .
thanks
01-16-2013 12:03 AM
OK, first take your excel file and save it as text. Then read it in LabVIEW using "read from spreadsheet file". Use "index array" to get the two columss as 1D arrays and multiply the two 1D arrays. Send the result to a waveform graph.
01-16-2013 06:01 AM
Hi,
I have done getting data as u mentioned and i have attached my project file and reference data sheet.
However, my waveform is not based on the timing in excel sheet column B but what i actually want to do is i want to generate waveform base on every one min data according to column B of my excel sheet.
Please advise me which graph and labview funtion shall i use for my requirement .
thanks alot
01-16-2013 09:06 AM - edited 01-16-2013 09:06 AM
Sorry, I don't have access to excep at the momen, could you attach the converted text file instead?
If you want to read the absolute time and date, you need to read the file as a 2D array of strings and parse the first two colums accordingly. Since the time increment is always 1 minute, all you need is the start time to get all other time points. How do you want to display the axis?
Looking at your code, you don't need the FOR loop. There is a primitive for Pi/2.
Here's a picture to get you started.
01-16-2013 10:08 AM
Hello altenbach,
Really appreciate your help to correct my code and i would like to display "X axis as time" and Y axis as "Output power" according to one mins interval input
Please find the converted text file that I have attached.
thanks
regards
sweyiwin
01-16-2013 11:12 AM
01-16-2013 01:12 PM
Note that your date stamp changes format from 4 digit year to 2 digit year on Jan 13. 2012, which would mess with the parsing. If you want to read the entire array of timestamps correctly (e.g. for an xy graph), you would need some extra code.
01-16-2013 01:23 PM
Hello Altenbach,
Thanks so much for your guide and now i am studying your code .
Actually I need to generate only one day data on graph . Sry that i didn't mentioned it to you early.
I think current output is already quite ok for me but i am wondering generating with waveform chart would be clearer to see and compare with others .
I tried to connect with waveform chart from the output but it's giving error. could you please advise me which one is better to compare and see ?
I am going to sleep now and cu tmw .
Really appreciate your help 🙂
thanks
regards
sweyiwin