LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

cluster to 1D array of clusters?

Solved!
Go to solution

I've inherited a LabView program that I'm trying to get to work on a newer version of LabView and I've run into an error that I'm unable to fix:

These cannot be wired together because their data types (numeric, string, array, cluster, etc.) do not match. Show the Context Help window to see what data type is required.
The type of the source is cluster of 2 elements.
The type of the sink is 1D array of cluster of 2 elements.

 

I've got two data points connected to a bundle that then need to go to an XY buffer.

I've attached a pic of the area with the problem.

Message 1 of 7
(6,640 Views)

Insert build array function. Resize it to have one element.

 

PS I replied before Bob asked to attach vi !!!

Message 2 of 7
(6,636 Views)

So... 

that works fine if I just connect to the XY buffer, but if I then add another wire to feed the values to the latest values then it breaks both sets of wires.

I've attached the ful vi

0 Kudos
Message 3 of 7
(6,626 Views)

I don't see any broken wires in your VI.  I don't understand your question or where you are planning on adding other wires.

 

I see you put in a Reshape Array after the Build Array.  Can you explain that?

 

Please get rid of the stacked sequence structures.  It hides code, makes it hard to read, and causes wires to run backwards.  Replace them with Flat Sequence Structures.  Once you do that, you may find that you don't need all the frames, or maybe don't need the sequence structure at all.

0 Kudos
Message 4 of 7
(6,594 Views)

Alexander,

 

     Having seen the VI, I'm happier with the picture!

 

Bob "Ignorance is Bliss" Schor

0 Kudos
Message 5 of 7
(6,585 Views)

I've flattened the VI and it makes it so much easier to follow! Thanks for that suggestion.

I've added back in the broken wire that is still broken.

I had only added the Reshape array because it wasn't working without it, but I think there is probably something else wrong with that. 

0 Kudos
Message 6 of 7
(6,568 Views)
Solution
Accepted by njf1003

I'm happy to hear that flattening the sequence structures helped you.

 

For your broken wire, the solution is really pretty simple.  Branch the wire off BEFORE you turn it into an Array, not AFTER the Build Aray.

 

(PS:  No need for the Stop function at the very end of your sequence structure.  Your VI will stop automatically once all the code before it has completed.)

Message 7 of 7
(6,561 Views)