LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

representation(DBL) in waveform data type

How to change the representation of the data array in a waveform cluster
(data type: waveform)?

The default representation is DBL.
I want to change it to SGL and I16.
(LabVIEW 6.0.2)

Robert
0 Kudos
Message 1 of 5
(3,777 Views)
I found a document on NI's website which confirms what you may be suspecting: You can't change the data types of elements in the waveform data type. However, it does suggest a workaround. I had never played with this feature and so I created a quick example which shows the principle mentioned.

Hopefully it will help you out. Here is a link to the document mentioned.

Can I Change the Data Types Stored in the Waveform Data Type?

Good luck!
-scraggs99
Message 2 of 5
(3,777 Views)
Robert,

In LabVIEW arrays are a collection of data elements all of the same data type. For multiple data types/representations you would have to use multiple arrays or an array of a cluster.

Jonathan Hildyard
Applications Engineer
National Instruments
0 Kudos
Message 3 of 5
(3,777 Views)
Hi Jonathan!

Thanks for your response!

I know that I can't have different datatypes in an array.
I want to change the datatype of all data in a waveform from DBL to SGL or
to i16.
Normally you can change the datatype of controls and constants by the option
"representation" or by the "conversion" function. I haven't found a way to
do this with the "waveform" datatype in LabVIEW6.0.2
My aim is to economize memory usage, to speed up my data eveluation and to
protect my computer from a "not enough memory" error when analyzing huge
datasize.

Robert

"Jonathan H" schrieb im Newsbeitrag
news:5065000000050000003D7B0000-1021771306000@exchange.ni.com...
> Robert,
>
> In LabVIEW arrays are a collection of data elements all of the same
> data type. Fo
r multiple data types/representations you would have to
> use multiple arrays or an array of a cluster.
>
> Jonathan Hildyard
> Applications Engineer
> National Instruments
>
0 Kudos
Message 4 of 5
(3,777 Views)
Hello Robert,

Unfortunately, there is no way to change the default datatype of a waveform array. Due to how the data is passed through the NI-DAQ driver it will always be a DBL. Once in LabVIEW however, if you wish to save space for file I/O you can convert the number to another representation using the conversion VIs under the Functions/Numeric/Conversion palette. Be aware however, that converting the representation may use up just as much memory as the savings made from the new representation datatype. This is because there will be new memory buffers for the data after the conversion is made.

Jonathan Hildyard
Applications Engineer
National Instruments
0 Kudos
Message 5 of 5
(3,777 Views)