LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Does anyone have any experience of writing waveforms to an Excel spreadsheet?

Primaeily I want to create a two dimensional array from a wave form where
one contains the timestamps and the other contains the y value.

Yoz
0 Kudos
Message 1 of 8
(3,391 Views)
Try Export Waveforms to Spreadsheet File. Its on the Waveform>Waveform File I/O palette. It creates a text file and you can specify the delimiter. Both tab and comma delimited files are easily read by Excel. If you want to write directly to Excel, then you'll have to use ActiveX. Besides the shipping example Write Table to XL, there have been numerous Excel examples posted to the forum and available at the NI Developer Zone here. There's also the add-on Report Generation Toolkit
0 Kudos
Message 2 of 8
(3,391 Views)
Thanks I have got a long way with modifying Write Table to Excel. Most of my
problems have not been with Active X automation but with Array's in Labview
it seems thay have made a simple subject very complicated.

"Dennis Knutson" wrote in message
news:506500000005000000AFF70000-1042324653000@exchange.ni.com...
> Try Export Waveforms to Spreadsheet File. Its on the Waveform>Waveform
> File I/O palette. It creates a text file and you can specify the
> delimiter. Both tab and comma delimited files are easily read by
> Excel. If you want to write directly to Excel, then you'll have to use
> ActiveX. Besides the shipping example Write Table to XL, there have
> been numerous Excel examples posted to the forum and available at the
> NI Developer Zone

>
href="http://zone.ni.com/devzone/devzone.nsf/webcategories/C3E56C69D399361E8
6256AB7006A9149?opendoc...
.
> There's also the add-on Report Generation Toolkit
0 Kudos
Message 3 of 8
(3,391 Views)
What exactly are you having problems with? I don't think arrays in LabVIEW are any more difficult than arrays in any other language I've used and in some ways they're simpler. If you provide details on the issues you're having, I'm sure someone here can help.
0 Kudos
Message 4 of 8
(3,391 Views)
I agree that labview does make some complex array tasks simpler. I am not
outright dissing the language. Some fundamental things have confused me. Say
I want to decare a 12 by 2000 array of doubles. I know I can initialise an
array but how can I declare one. Also I can build an array by combining
arrays but I dont seem to be able to uncombine them like what can be
acheived say with a cluster (which seems like a struct).

I spent quite a lot of time confused dealing with arrays and for next loop
until I sussed it was auto indexing. Well its all good fun. Its like any
language that you try and learn as you go along. A certain amount of heart
ache and eurika.

"Dennis Knutson" wrote in message
news:506500000005000000C7F70000-104
2324653000@exchange.ni.com...
> What exactly are you having problems with? I don't think arrays in
> LabVIEW are any more difficult than arrays in any other language I've
> used and in some ways they're simpler. If you provide details on the
> issues you're having, I'm sure someone here can help.
0 Kudos
Message 5 of 8
(3,391 Views)
> I agree that labview does make some complex array tasks simpler. I am not
> outright dissing the language. Some fundamental things have confused me. Say
> I want to decare a 12 by 2000 array of doubles. I know I can initialise an
> array but how can I declare one. Also I can build an array by combining
> arrays but I dont seem to be able to uncombine them like what can be
> acheived say with a cluster (which seems like a struct).
>

One of the neat things, but confusing until you are comfortable with it,
is that you don't normally declare things. You should make sure that
you don't fall into the trap of using controls like variables and
reading/writing to them like you do in some textual languages. All LV
needs to kn
ow is the dimensionality to the array. All nodes can resize
it if needed. The wire carries the array from point to point and no
variables are needed.

It often helps to look at examples and to glance at the tutorial. And
of course ask questions here too.

Greg McKaskle
0 Kudos
Message 6 of 8
(3,391 Views)
There's a couple of ways to create an array. As you pointed out, the initialize array function creates an n-dimensioanl array in which every element has the initial value of the constant wired to the element input. You can also use the array constant on the diagram. You can specify the number of dimensions and then drop a numeric/string/boolean constant inside of it. If you don't type a value for the constant, the array is uninitialized. Or you can expand the array constant to show all elements and enter specific values for each element.I've attached a picture that I hope will explain what I mean. To start to understand the Index Array function used to retrieve elements, you might want to experiment with what I've sh
own on the right side of the picture. With the same array constant and controls wired to the row and column inputs, you can see how to extract entire rows, columns, or single elements.
0 Kudos
Message 7 of 8
(3,391 Views)
ok I take the point that LV does not require me to make declarations, so it
does not provide a control to achieve this. Is there a combine - uncombine
mechanism for array's?

"Greg McKaskle" wrote in message
news:3ED6005C.7030500@austin.rr.com...
> > I agree that labview does make some complex array tasks simpler. I am
not
> > outright dissing the language. Some fundamental things have confused me.
Say
> > I want to decare a 12 by 2000 array of doubles. I know I can initialise
an
> > array but how can I declare one. Also I can build an array by combining
> > arrays but I dont seem to be able to uncombine them like what can be
> > acheived say with a cluster (which seems like a struct).
> >
>
> O
ne of the neat things, but confusing until you are comfortable with it,
> is that you don't normally declare things. You should make sure that
> you don't fall into the trap of using controls like variables and
> reading/writing to them like you do in some textual languages. All LV
> needs to know is the dimensionality to the array. All nodes can resize
> it if needed. The wire carries the array from point to point and no
> variables are needed.
>
> It often helps to look at examples and to glance at the tutorial. And
> of course ask questions here too.
>
> Greg McKaskle
>
0 Kudos
Message 8 of 8
(3,391 Views)