LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Obtaining real time value from excel

Can anyone give me an idea on how I can obtain real time value from an excel file to labview? My case is shared in the following paragraphs

 

 

Labview has to acquire a fixed Irradiance and temperature value from an excel sheet at real time. 

 
For instance, if it's 0930 now, labview has to acquire the temperature and irradiance value at 0930 from the excel and calculate the total power output in the labview's block diagram  using the formula [ =((Irradiance value/1000)*2400*(1+(-0.0042)*(Temperature Value-25))) ] .
After calculating the total power output, It has to be displayed on the Labview's front panel, along with the current time, temperature and Irradiance value.
0 Kudos
Message 1 of 8
(3,717 Views)

didn't help much honestly. I'm clueless about integrating excel with labview ..... Would  you provide a similar example or perhaps write out the VI for me please?

0 Kudos
Message 3 of 8
(3,671 Views)

Hi Exi,

 

Can anyone give me an idea on how I can obtain real time value from an excel file to labview?

Convert this Excel file to a CSV file.

Read this CSV file (which is plain text in the end) using ReadFromSpreadsheetFile.

Parse the columns you need.

Search the time column, Search1DArray is fine here.

Index the values you need from other columns…

 

Using plain CSV files greatly simplifies your task!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 8
(3,639 Views)

You can read data from an Excel .xlsx file using the Report Generation Toolkit.  There are numerous examples in the Forum (some that I submitted) illustrating using the RGT, as well as the examples that ship with LabVIEW.

 

Give it a try.  If you get stuck or are having a particular problem, post your code (not a picture of your code, but something that we can download and execute, which will tell us, among other things, which version of LabVIEW you are using, and will let us duplicate your errors so we can try to correct them without wasting our time duplicating your code from an incomplete picture).  If you need to post multiple VIs, put them in a common folder, compress the folder, and attach the Zip file.

 

Bob Schor

0 Kudos
Message 5 of 8
(3,617 Views)

@Exi.D wrote:

didn't help much honestly. I'm clueless about integrating excel with labview ..... Would  you provide a similar example or perhaps write out the VI for me please?


This question has been asked literally hundreds to thousands of times.  Searching for it will help you find examples on how to do it.

 

Here is another think to a message thread that is a repository of links to other threads discussing interaction with Excel.  http://forums.ni.com/t5/BreakPoint/Excel-Board/m-p/379682/highlight/true#M2391

0 Kudos
Message 6 of 8
(3,598 Views)

Hi gerd, may I know where is this file you're mentioning? Can I have the link to it? Thanks!

0 Kudos
Message 7 of 8
(3,569 Views)

Hi Exi,

 

where is this file you're mentioning?

I wrote: "convert your Excel file to a CSV file". To do so you just use File->SaveAs in Excel…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 8 of 8
(3,545 Views)