LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

individual display of elements of excel files on numeric meter

Solved!
Go to solution

Hi

 

Im new to labview and i need my numeric display ( meter or gauge) to accept inputs from an excel file of 1 coulmn and 10000 rows.

 

Each element of the excel file i.e each row needs to be displayed to the meter one after the other with a one second delay.

 

Is this possible to do?

 

Thanks

 

Vijay

0 Kudos
Message 1 of 9
(3,772 Views)

Sure.

 

Search the forums for how to read data from Excel Files.  Get that data as an array.

 

Autoindex through that array in a For Loop with a 1000 msec wait function in it.

0 Kudos
Message 2 of 9
(3,769 Views)

@RavensFan wrote:

Sure.

 

Search the forums for how to read data from Excel Files.  Get that data as an array.

 

Autoindex through that array in a For Loop with a 1000 msec wait function in it.


I have used the read from spreadsheet and got that data as an array. ive also tried using the index array function

 

problem is when connecting it to a numeric meter as the meter will not accept the indexed aray as an input as the numeric meters or gauges only accept a double source.

0 Kudos
Message 3 of 9
(3,758 Views)

Attach your VI.

 

It sounds like you aren't feeding the data into your loop properly.

0 Kudos
Message 4 of 9
(3,742 Views)

Thanks

 

ive attached a samplevi  without connecting the meter as im unable to connect it.also attached a sample excel file with data

 

Thanks

 

Vijay

Download All
0 Kudos
Message 5 of 9
(3,733 Views)

You said you have an Excel file, but you don't.  You have a CSV file which is a text-based file.

 

The problem is in your setup.  You need to follow what I said earlier.

 

Read the file outside the loop, and auto-index the array where you display the values inside the loop.

 

 

 

I would recommend looking at the online LabVIEW tutorials
LabVIEW Introduction Course - Three Hours
LabVIEW Introduction Course - Six Hours

 

 

0 Kudos
Message 6 of 9
(3,705 Views)

Thanks for your help.

 

i have followed your instructions, even if i put the read file outside the loop i still cannot get any compatible display or preferably numeric meter or gauge to work with this setup. ive tried using 0,1,2 etc for the coloumn and still no luck.

Download All
0 Kudos
Message 7 of 9
(3,689 Views)

You didn't follow my instructions.  Your VI doesn't look like the snippet I posted.

 

And you'll get nothing on the meter if you don't bother to wire the data to it.

0 Kudos
Message 8 of 9
(3,681 Views)
Solution
Accepted by topic author vjbharadwaj

Hey there

 

I noticed that you said you are new to labview. Below is an example of your code that should work, as well as some links that will help you get started. The most different topic that labview has compared to other languages is the concept of data flow, which works very differently from traditional programming, so I linked an article on that below the screenshot. I also linked an article about auto indexing, as that pertains highly to your project at hand.

 

Another tip is 'highlight execution.' The lightbulb button on the block diagram toolbar will slow down and visualize the program so you can see how the program works in slow motion.

 

Hope that helps!

indexing.png

Data Flow Programming

Auto Index Tunnels

Message 9 of 9
(3,628 Views)