05-03-2021 12:22 PM
im pretty new to labview and im very confused by this error message. it says that my clusters contain different elements but they don't, ive tripled checked. Any advice would be helpful! im also using labview on a mac so maybe that the issue.
Thanks in advance!
05-03-2021 12:36 PM
It's actually pretty clear message in that your output is a 1-D array of clusters while you input is not. The image you attached shows you are bundling a cluster of a string and 2 doubles, then bundling that cluster with a boolean. No array there what so ever.
We can't tell exactly what is happening with your terminal because you only attached a picture as opposed to a real VI file.
05-03-2021 12:37 PM - edited 05-03-2021 12:48 PM
We cannot troubleshoot pictures. Please attach your VI!
For cluster to be the same, the datatypes and cluster order needs to match. Is your indicator a cluster of two elements, the first element a cluster of three elements (string, DBL, DBL) and a scalar boolean? Is it also the same in the other case? I don't see any arrays.
(You seem to be a beginner and there are quite a few other questionable parts in your code. We can help. Shouldn't you loop be a FOR loop since you know the number of iterations before the loop even starts? etc. I am sure that if you would tell us what you are trying to do, we will be able to do it with significantly simple code that probably fits on a postage stamp 😄 )
05-03-2021 12:39 PM
Hi silas,
@silas__ wrote:
it says that my clusters contain different elements but they don't, ive tripled checked. Any advice would be helpful!
When LabVIEW claims a datatype mismatch then there is a datatype mismatch!
Advice: when you have problems with your VI then you should attach your VI!
(We cannot debug images in LabVIEW…)
@silas__ wrote:
im also using labview on a mac so maybe that the issue.
No, surely not.
@silas__ wrote:
im pretty new to labview and im very confused by this error message.
Did you notice those "Training resources" offered in the header of the LabVIEW board?
And did you read the LabVIEW help on "Style guide" recommendations? Please cleanup your VI before attaching to you rnext message…
05-03-2021 12:43 PM
Forgot to attach the Vi, my bad. And as for the data types, Im taking 1 string input and 2 DBL numeric inputs and then in the case structure just adding a boolean indicator to the final output cluster, so I don think the data types are off, correct me if im wrong tho.
05-03-2021 12:53 PM
05-03-2021 12:58 PM
Thank you so much! This program is still confusing as hell to me, but il get though it.
05-03-2021 01:21 PM
Maybe try something like this?
It probably need more error handling. For example what should happen if part name and part number don't match?
(I would strongly recommend to leave the "final" part out of any file name until it is a polished up and debugged!)
05-04-2021 12:12 AM
Next time this happens, a tip is to right-click on the output tunnel of that loop and "create indicator". Then you can easily compare those two clusters. And if you want to replace the incorrect indicator with the indicator you just created, you can copy (CTRL+C, or cut, CTRL+X) the correct indicator (on the front panel), select the incorrect indicator, and paste.