LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Source and Sink are different type

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

Source and sinkSource and sink

0 Kudos
Message 1 of 5
(1,348 Views)

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 LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 5
(1,339 Views)

@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
(1,304 Views)

@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

 

Message 4 of 5
(1,262 Views)

@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!

Message 5 of 5
(1,250 Views)