LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

cluster reading error

Hi people,
I am trying to make an array of clusters , send them to a function ( i coded the subvi myself) and then have another array of clusters display the results.
The problem is that is giving me cable error saying that I have connected two terminals of different type. The source is a cluster of 4 elements and the sink is a cluster of 4 elements.

Should it just work?
I tried something simpler like an array of cluster of boolean switch and an array of cluster of led and it worked fine. Why this one is not woking and what can i do to fix the error?


A side question.
In order to make a subvi you select the code and from EDIT menu you choose Create VI. whats the shortcut to put the code back instead of subvi icon?

Thanks in advance.

0 Kudos
Message 1 of 9
(885 Views)

tau at wayne wrote:
Hi people,
I am trying to make an array of clusters , send them to a function ( i coded the subvi myself) and then have another array of clusters display the results.
The problem is that is giving me cable error saying that I have connected two terminals of different type. The source is a cluster of 4 elements and the sink is a cluster of 4 elements.

Should it just work?
I tried something simpler like an array of cluster of boolean switch and an array of cluster of led and it worked fine. Why this one is not woking and what can i do to fix the error?


A side question.
In order to make a subvi you select the code and from EDIT menu you choose Create VI. whats the shortcut to put the code back instead of subvi icon?

Thanks in advance.


Last part first... ctrl-z is un-do and will work until you save. After that you will have to cut-n-paste or resort to a backup.

 

If the cluster definitions are not compatible you'll get a broken wire.  Float over the wire with your wiring tools selected and use your help window to see what is in both wires.

 

Images of your code may help us help you.

 

Ben

0 Kudos
Message 2 of 9
(878 Views)
Thanks for the quick reply. I have attached the files. The front panel looks messed up.  Another thing that i noticed is that the array doesnt accept the cluster with the waveform chart in it. In the previous posting the chart wasnt included and yet I had those error. If you notics the broken wire between arraey test 1 and the subvi.
0 Kudos
Message 3 of 9
(866 Views)

Go back and read that error message again and pay attention to the part that sasy "1d array of clusters".

 

Ben

Message 4 of 9
(858 Views)

You are right. It skiped from my mind when I typed it in here. It couldnt be copy pasted.

 

And what exactly am i supposed to do with that?

How can I pass an array of clusters to a function and have it do what it is supposed to do?

0 Kudos
Message 5 of 9
(848 Views)

Pull the cluster out of the array using a Index Array fucntion found on the array palette.

 

Ben

0 Kudos
Message 6 of 9
(842 Views)

I tried that function, and almost all others in array palete. The subvi seems to not like the array stuff. I still would get the same error, :"trying to connect 1D array to a cluster of 4 elements".

Could you show how you did it?

0 Kudos
Message 7 of 9
(830 Views)

Please give credit to Ben for this answer.

 

array2 cluster.png

--------------------------------------------------------------------------------------------------------------------------
Help the forum when you get help. Click the "Solution?" icon on the reply that answers your
question. Give "Kudos" to replies that help.
--------------------------------------------------------------------------------------------------------------------------
Message 8 of 9
(804 Views)

For some reason it didnt work, however I made it work with index array and a loop. I like more the version that you guys said though. Thanks.

Could someone tell me why the cluster that has the graph isnt accepted in the array? Thanks again.

 

0 Kudos
Message 9 of 9
(776 Views)