LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Extracting Waveforms from array's of waveforms

If you build an array by combining two waveform clusters, how can you later
seperate/extract the clusters? I have used Index Array but it returns me a
cluster that I want to cast as a waveform but I dont see a generic cast
mechanism in Labview.

For instance in C++ if I had an Object that I wanted to cast as a
SpecialObject and assine it to a variable MySpecialObject I would simply
write

SpecialObject MySpecialObject = (SpecialObject) Object;

Is there a way of doing this in LabView?
0 Kudos
Message 1 of 3
(2,978 Views)
I'm not sure what caused your problem. If you use the build array function on two waveform data types and then index that array, the output of the array is a waveform data type. See the attached picture. Could you post an example of your code so we could see what you're doing?
Message 2 of 3
(2,978 Views)
....
> cluster that I want to cast as a waveform but I dont see a generic cast
> mechanism in Labview.
>
> For instance in C++ if I had an Object that I wanted to cast as a
> SpecialObject and assine it to a variable MySpecialObject I would simply
> write
>
> SpecialObject MySpecialObject = (SpecialObject) Object;
>
> Is there a way of doing this in LabView?
>

If the cluster contains a waveform, then unbundle the element which is
the waveform. If the cluster contains the info to make a waveform, then
use an unbundle to get the cluster elements and wire them to a Waveform
builder.

As for the C++ code, the syntax looks like a cast, but depending on the
implementation of SpecialObject class, it is better to think of this as
making a totally new object
using Object as an input. C did datatype
casts, which often got you into trouble, but C++ objects don't normally
do this.

Greg McKaskle
0 Kudos
Message 3 of 3
(2,978 Views)