LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Generate graph from output of the formula of time varying input

Solved!
Go to solution

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

 

Clean Energy data photo.jpg

0 Kudos
Message 1 of 14
(4,780 Views)

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?

0 Kudos
Message 2 of 14
(4,770 Views)

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 

0 Kudos
Message 3 of 14
(4,757 Views)

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.

0 Kudos
Message 4 of 14
(4,753 Views)

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

 

 

Download All
0 Kudos
Message 5 of 14
(4,742 Views)

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.

 

0 Kudos
Message 6 of 14
(4,736 Views)

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

0 Kudos
Message 7 of 14
(4,732 Views)
Solution
Accepted by pyae
0 Kudos
Message 8 of 14
(4,725 Views)

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.

0 Kudos
Message 9 of 14
(4,721 Views)

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

0 Kudos
Message 10 of 14
(4,716 Views)