LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Create A/O reading from excel spreadsheet

I need to read an excel spreadsheet which contains five columns (the first column is time in seconds, the other four are voltage values), then send these values to an analog output device at the specified timing. The ouput device is a third party device which I have setup to use with Labview. What would be the easiest method, I'm new to Labview. 
0 Kudos
Message 1 of 13
(4,049 Views)
That depends on this third-party device's capability. Can you download a waveform to the device for it to generate? In this case all you need to do is to create the waveform in LabVIEW by creating an array of values. How you get it to the device depends on how you program the device in LabVIEW.
0 Kudos
Message 2 of 13
(4,046 Views)

I believe the device will output the waveform. How do I get the timing and voltages from excel to the waveform, do you have any examples. Thank you.

0 Kudos
Message 3 of 13
(4,039 Views)
Well, the first part is to read the data into LabVIEW. You mentioned you have an Excel spreadsheet. Does it have to be an Excel spreadsheet? Can it be a text file with the columns separated by tabs? This would be far easier to read since the Read From SpreadSheet File VI will do this for you. If you have to deal with Excel then you need to use ActiveX. The attached example (LabVIEW 8.2) shows how to do this. The data is read as a 2D array, which you can then index out as needed.

As for the other part of creating the waveform, that completely depends on the drivers for the card.
0 Kudos
Message 4 of 13
(4,027 Views)
I can use the Read From SpreadSheet File VI. I just need to input the time and voltage values from the spreadsheet file into a waveform.
0 Kudos
Message 5 of 13
(4,022 Views)
Does the driver accept a LabVIEW waveform datatype, or do you have to specify a different structure? The LabVIEW waveform datatype consists of a t0 (starting time), dt (time between samples), and an array of values. You can create a LabVIEW waveform from the Programming->Waveform palette. There is a Build Waveform primitive. You can select which component to set by clicking on the component name. When you first place the primitive, the "Y" component (the array of values) is the only one showing. Click on it to get a popup to select which component to set. You can expand the primitive using the rectangular controls that appear when you are over it.

0 Kudos
Message 6 of 13
(4,020 Views)
Can I use an arbitrary waveform signal that will read from a spreadsheet or file and will output four signals at the time specified in the file. If this will work is there any examples. Thanks.
0 Kudos
Message 7 of 13
(3,998 Views)
You're still missing my point. Any examples will be based on NI hardware. You don't have NI hardware. Thus, how to create the structures to feed to the drivers will probably not apply. All that I've shown is a possible way to read the data from a file. What you do with it is completely dependent on how the drivers expect to receive this data. Check the documentation that you received with these non-NI boards. They will tell you how to program the devices.
0 Kudos
Message 8 of 13
(3,978 Views)
I do get your point. I'm considering using a NI device but I want to make sure what I need to do is possible with Labview 8.5 that we just purchased before I purchase something additional. Is an example available using an NI USB-6229 device?
0 Kudos
Message 9 of 13
(3,972 Views)
There are a large number of examples that ship with LabVIEW. There is one called  Gen Mult Volt Updates-Text File Source. This isn't exactly what you are trying to do but it might give you an idea. LabVIEW isn't going to be the limiting factor. It will probably be limited (if at all) by your timing reuirements. If the resolution of the timing is in seconds - no problem. If you need microsecond or less resolution, then the answer is going to be maybe. We are all trying to provide the best answers but some important information is missing or ill-defined at this time.
0 Kudos
Message 10 of 13
(3,957 Views)