02-12-2011 05:42 PM
This is my 3rd program for labview, so I'm still green, go easy on me.
After about 2 hours of browsing and searching the forums, I think I am more confused about Excel / Labview communication... Please help...
Is there an example of having excel / tab delimited txt drive gauges on the front panel?
Lets say I create a spreadsheet:
TIME RPM SPEED
.0 1000 0
.1 1200 1
.2 1400 3
.3 1700 5
.4 2000 8
etc..
Can that be used to drive the gauges on the front panel... Like a data review/playback? My guess is to use the read from measurement file, it outputs a signal wire.. How do I break that up to each channel to spit out a number for the gauge?
Thanks,
Ben
02-13-2011 12:31 PM
Unless you absolutely have to use Excel you're far better off saving your source profile as a delimited text file. That way you can easily use Read From Spreadsheet File to read the file into a 2D array which you can easily manipulate in LabVIEW. To read Excel you need to use ActiveX. You can either buy the Office Toolkit, or you can search the forum(s) as numerous examples have been posted on reading an Excel spreadsheet. There are also numerous examples in the Excel thread. (Note: do not post questions in that thread, as it is a repository of links only)
02-14-2011 02:46 PM
I would recommend using a delimited text file. You can use the File I/O functions to read these in at the beginning of your program and load them into your front panel items. You will find that the use of a delimited text file is much simpler than excel. You can essentially use a string tokenizer to extract your data. I would also recommend using "Read From Text File" VI as opposed to read from measurement file, since Measurement File is a different, more complicated format.
04-13-2020 01:08 AM
how would you exactly load the data from the 2D array to make the gauges turn?
Any tips would be greatly appreciated!
In-experienced LabView User here.
04-13-2020 02:18 AM
@Toshyyz wrote:In-experienced LabView User here.
You added to a 9 year old thread. Start with the training resources listed on the top of the forum. Can you read your data file? What does the data represent and how does it relate to "turning" of a gauge? Do you just want to set various gauges to the value in the file? Do you want to play back values over time?
04-13-2020 02:33 AM
I want to simulate a wind speed sensor through a VI and I have an excel data sheet full of wind speeds. I want to read the excel data sheet so it will be be the simulated input of a wind sensor. Im not sure how to continuously read the data entries as simulated sensor data. I'm currently using a control to manually control the gauges and slides and I want it to be automatically reading the excel data so I don't have to manually do anything. Literally, just use the excel data as input to show the wind speed on a gage or meter or slide.
Thanks for the help!
04-13-2020 03:27 AM
We cannot run or debug images. Attach the VI and datafile instead.
04-13-2020 03:46 AM
I have attached the VI and the datafile in excel and txt format. I am trying to replace the Wind Speed Control in my VI with the data from the excel/txt file and have it run continuously from start to finish while showing up in real time on the gauge and the ring function (the wind speed sensor image that is turning).
Really appreciate the help!
Thanks!