LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Source and Sink are different type

Highlighted

I don´t understand, why the connection is wrong?

Source and sinkSource and sink

0 Kudos
Message 1 of 5
(215 Views)
Highlighted

Hi Tonu,

 


@TonuSa wrote:

I don´t understand, why the connection is wrong?


The elements of the cluster in the arrays might be different…

 

Read the help for that VI to the right to learn about its datatypes!

Best regards,
GerdW

using LV2011SP1 + LV2017 (+LV2020 sometimes) on Win10+cRIO
0 Kudos
Message 2 of 5
(206 Views)
Highlighted

@GerdW wrote:

Hi Tonu,

 


@TonuSa wrote:

I don´t understand, why the connection is wrong?


The elements of the cluster in the arrays might be different…

 

Read the help for that VI to the right to learn about its datatypes!


This is excellent advice. I also often right click on the input terminal for the vi and select Create Constant, especially when the input is a cluster. This will create a constant with the desired structure for which I can replace the data (I like to use Bundle by Name and Unbundle by Name with clusters). 

Message 3 of 5
(171 Views)
Highlighted

@TonuSa wrote:

I don´t understand, why the connection is wrong?

Source and sinkSource and sink


Remove the "built array" and replace the bundle node with "index and bundle cluster array".

 

altenbach_0-1603741794569.png

 

 

(alternatively, you can also just place a FOR loop around the bundle node. Same thing!)

 

altenbach_1-1603741854738.png

 


LabVIEW Champion. It all comes together in GCentral GCentral
What does "Engineering Redefined" mean??
Message 4 of 5
(129 Views)
Highlighted

@TonuSa wrote:

I don´t understand, why the connection is wrong?

Source and sinkSource and sink


I agree that the message is a bit confusing, because they use the same words for source and sink, which is only half the story.

 

Both are 1D array of clusters of two elements in their own, very different way!

 

In more words:

 

  • The source is a 1D array of cluster of two elements where the 1D array has only one element and the cluster contains two 1D arrays as element
  • The sink is a 1D array of cluster of two elements where the 1D array has N elements and the cluster has two scalars.

Big difference!


LabVIEW Champion. It all comes together in GCentral GCentral
What does "Engineering Redefined" mean??
Message 5 of 5
(117 Views)