LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Need a little help trying to convert an array into a cluster..

I'm having a difficulty converting the output of the AI Acquire Waveforms.vi from an array into a cluster. On my display panel I have a radial termperature gauge with two needles displaying the temperature of two different inputs. The input to this radial guage is of the cluster type, hence the need to convert.

Any help is appreciated. Heck even if there is a better way let me know.
0 Kudos
Message 1 of 5
(2,880 Views)
The output of "AI Acquire Waveforms.vi" is an array of waveforms (waveform data type). You must first isolate the two elements of that array that correspond with the channels to which your temperature sensing devices are wired. If those are the only channels in your scan list, then the array should only be two elements in size. You can apply a shortcut if that is the case, but first the general solution.

1) Index the array of waveforms with an Index Array function found in the Array pallette. Stretch the Index Array function so that it gives you two inputs and outputs. Wire the index of the first and second temperature channels to the bottom inputs of the Index Array function. Wire the output of "AI Acquire Waveforms.vi" to the top input of the Ind
ex Array function. The outputs of the Index Array function are each a waveform for the corresponding channel you selected.

2) Get the "Y" waveform component for each channel. Use the Get Waveform Components function in the Waveform pallette. It looks alot like an unbundle function. Get two of those guys and wire then to each of your outputs from the Index Array function. Select "Y" for each Waveform component.

3) Average (or otherwise reduce) the acquired signals. The output of the "Y" component is an array of floats. You can wire that array up to an Average function to give you a scalar value. Do that for each output and now you just have two numbers.

4) Bundle your numbers. Use the bundle function.

5) Wire the bundle to your indicator.

Enjoy,

Daniel L. Press
www.primetest.com
0 Kudos
Message 2 of 5
(2,880 Views)
ChristianRoth wrote in message news:<5065000000080000006E4E0000-1023576873000@exchange.ni.com>...
> I'm having a difficulty converting the output of the AI Acquire
> Waveforms.vi from an array into a cluster. On my display panel I have
> a radial termperature gauge with two needles displaying the
> temperature of two different inputs. The input to this radial guage
> is of the cluster type, hence the need to convert.
>
> Any help is appreciated. Heck even if there is a better way let me
> know.

LV have two vis for array to cluster and one for cluster to array in
function>>array.
0 Kudos
Message 3 of 5
(2,880 Views)
ChristianRoth wrote in message news:<5065000000080000006E4E0000-1023576873000@exchange.ni.com>...
> I'm having a difficulty converting the output of the AI Acquire
> Waveforms.vi from an array into a cluster. On my display panel I have
> a radial termperature gauge with two needles displaying the
> temperature of two different inputs. The input to this radial guage
> is of the cluster type, hence the need to convert.
>
> Any help is appreciated. Heck even if there is a better way let me
> know.

Hi,

I think you've tried it, but I want to mention it. Did you tried the
array to cluster vi????

Greetz,
JJ
0 Kudos
Message 4 of 5
(2,880 Views)
Unfortunatley yes, it still produces an error.
0 Kudos
Message 5 of 5
(2,880 Views)