LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

read from excel and plot xy graph

hoping to change this vi file from irradiance to temperature graph using 8-9am data. I have attached the files below

0 Kudos
Message 21 of 29
(848 Views)

Hi Jasper,

 


@jasper96 wrote:

hoping to change this vi file from irradiance to temperature graph using 8-9am data. I have attached the files below


What do you expect from us? Should we do your work (for free)?

 

All you need to do is to select the right column from your CSV file!

Btw. there is more than one temperature in your data file…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 22 of 29
(837 Views)

Hello, Jasper.

 

     This thread is about six weeks old.  You have been asking us to do your work for you for over six weeks, we've suggested that you learn LabVIEW, but you still keep coming back without apparently having spent much effort, yourself.  Here are some points for you to consider:

    1. LabVIEW code is much easier to read and understand if you spend a little bit of time to make it neat.  This means keeping wires as straight as possible, relatively short, no wasted "white space".  You should make sure that data in wires always flows left-to-right (unless you are programming in Hebrew or Arabic, perhaps).  Here is a re-working of your Block Diagram -- notice you can easily see the order "Read Spreadsheet, and process lines by taking first two entries, getting a TimeStamp from the first and a Float from the second, bundle resulting arrays, and plot:

Jasper BD.png

  1. Be sure you understand what you are doing in your code.  In particular, why are you using the Format Specifier "%;" in the second Scan from String?
  2. Since it is your data file, look at it and understand it.  This is the beginning of the first line:  "Timestamp,Wind Direction (deg),Wind Speed (m/s),".  What are those first three characters (hex 0xEF, 0xBB, 0xBF) doing there?
  3. You want to plot data.  So why does your For Loop process the header row?
  4. Have you looked at the values in the first (Time) column?  They are 1/11/2019 0:08, 1/11/2019 0:08, and 1/11/2019 0:09. 
  5. You appear to be making measurements every 15 to 20 seconds, yet your TimeStamp reports Data/Time in minutes.  Doesn't this bother you?  There is a well-known Programmers Adage, "Garbage In, Garbage Out" (even my wife, a Biochemist, has heard of this!) -- you need to go back to the routines that are generating the "garbage data" you are trying to plot and analyze and ensure that the data are clean!
  6. I recall you mentioning plotting Irradiance.  Which column of data did you wish to plot?  Is it really the data in the second column (as your code indicates, unless, of course, you have no idea what your code indicates ...)?
  7. You also mentioned that you wanted to plot the data for a particular range of time values.  Where is this code?

Here's some advice.  Advertise for a LabVIEW Programmer (put an ad on the Bulletin Board in the School of Engineering) and let them do this for you.  Or else spend some serious time learning LabVIEW yourself.

 

Bob Schor

0 Kudos
Message 23 of 29
(829 Views)

hi i know where y'all coming from and i really need to learn more in labview. The reason i posting this because i wanna make a even complicated program which i could use ambient temperature graph when i run and also irradiance graph in this single program. But theres alot of stuffs which i not sure yet hence just wanna have some ideas and help what to change from the previous vi file in order to do that.

I have attached the new excel.csv file and the previous vi file i did. Thank you for any inconvenience caused.

0 Kudos
Message 24 of 29
(802 Views)

Hi jasper,

 

your csv file consists of 3 columns.

You already know how to read the first (timestamp) and the 2nd (irradiance) column.

Now you ask us to explain how to read the 3rd column? Really? Which kind of programmer (or even engineer/student) are you?

 


@jasper96 wrote:

i wanna make a even complicated program which i could use ambient temperature graph when i run and also irradiance graph in this single program.


There is nothing "complicated" in reading one more data column.

There is nothing "complicated" to show more than one plot in a graph - it's explained in the context help of the graph and several example VIs coming with LabVIEW.

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 25 of 29
(789 Views)

Hello Guys

Any solution or ideas to create a program that read from excel and be able to select what data u would like to place on an xy graph such as irradiance vs time and temperature vs time or both. Thank You!

0 Kudos
Message 26 of 29
(789 Views)

@kien96 wrote:

Hello Guys

Any solution or ideas to create a program that read from excel and be able to select what data u would like to place on an xy graph such as irradiance vs time and temperature vs time or both. Thank You!


This has been done many many many times.

 

It is not an actual Excel spreadsheet that you have. You have CSV which is a text file.

 

Show us what you have tried. 

0 Kudos
Message 27 of 29
(776 Views)

Hi kien96,

 

I see two options:

  1. You are a teammate of Jasper96 as you work with the very same data on the very same problem.
  2. You are the very same person as Jasper96 because of the similar username.

 

Either way: why do you think it is a good idea to start a new thread for the same old problem?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 28 of 29
(763 Views)

Goodness.

 

Looks as if jasper96 aka kien96 really wants someone to do his/her work.

Now that he/she has been exposed who would want to help someone who resorts to subterfuge???

 

@jasper96 /  @kien96

If this is a school assignment, shame on you!

 

If this is for work, tell your manager that I can do the work if he pays me. 😁

 

.

0 Kudos
Message 29 of 29
(752 Views)