From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

2 array mismatch

Solved!
Go to solution

Hello!

 

I got the error message "you have connected two arrays that mismatch." I deleted one element of the cluster and then got this message. I know what it means but I don't know how to fix it.

 

Can anyone please help me what should I do?

 

Thanks.

 

0 Kudos
Message 1 of 25
(5,712 Views)

Hi Susanne,

 

in your image there are no clusters to see. Please show the full picture!

 

In your case structures you create 2D arrays. And you have some wires going to functions outside of image which show an error. You need to fix that error - by using correct datatypes…

 

I deleted one element of the cluster and then got this message.

Simple solution: do an Undo operation of the delete. Or use a backup with the correct cluster. Or simply put that element back into the cluster…

 

Why didn't you continue to ask in the German LabVIEWForum?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 25
(5,705 Views)

Thanks for your response. A colleague is using this forum and he recommended it to me.

 

Attached please find the whole VI. I need to delete "Lufttemperatur" and "Luftperiode" because it isn't preferable anymore. There I deleted these items from the cluster. When I do this, I got the error. I see that the problem is that 2D arrays are connected to 1D. I tried to fix it with Index Array but it doesn't work.

 

You have mentioned I need to change the datatypes. I don't know which datatypes 😞

0 Kudos
Message 3 of 25
(5,695 Views)

Hi Susanne,

 

Attached please find the whole VI.

It's not the WHOLE VI - it's just a (rather bad because of paging) image of your VI BD…

 

I need to delete "Lufttemperatur" and "Luftperiode" because it isn't preferable anymore.

Just do it! Remove the wire, delete the UnbundleByName-element and delete the BuildArray-input inside the case structures…

 

I see that the problem is that 2D arrays are connected to 1D.

In your first image you create 2D array, in the second image/PDF you work with 1D arrays. So the conclusion is NOT to change the BuildArray node (or their behaviour)!

 

I tried to fix it with Index Array but it doesn't work.

Fixing a selfmade problem by throwing more code on it will seldomly work…

 

While fixing that VI you could replace all those ReplaceArraySubset functions by BuildArray nodes…

 

A colleague is using this forum and he recommend it to me.

The LabVIEWForum is (nearly 🙂 ) as good as the NI-Forum. And you could ask your questions in German…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 25
(5,680 Views)

I limited one problem as you have mentioned. How can I fix the datatypes that it's working? Combining 32-bit integer with 64-bit real?

0 Kudos
Message 5 of 25
(5,679 Views)

Hi Susanna,

 

right-click the BuildArray and choose "concatenate arrays" menu item…

 

As said before: DON'T change the BuildArray behaviour while editing your code!

 

In the LabVIEWForum you saw all those beginner course links in my signature. Did you take all those courses?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 6 of 25
(5,669 Views)

Thanks. Yes it's not the whole VI but I cannot post all VIs because of company secret. I cannot delete the Unbundle by name because the remaining "Auswahl Temp Sens" and "Auswahl W-Per1" is still necessary.

 

If I delete the Build Array I get the error: You have connected two arrays of differennt demensions.

 

I will look at your other solutions.

 

Yes, I read a lot about Labview but for me it's more difficult to change a huge complex Labview project than to start with a new one.... thanks"

0 Kudos
Message 7 of 25
(5,664 Views)

Hi Susanne,

 

I cannot delete the Unbundle by name because the remaining "Auswahl Temp Sens" and "Auswahl W-Per1" is still necessary.

I didn't say to delete the whole UnbundleByName. Delete just the one entry you don't need anymore!

 

If I delete the Build Array I get the error

I didn't say to delete the whole BuildArray nodes…

 

Please read what I wrote!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 8 of 25
(5,661 Views)

I cannot delete the Unbundle by name because the remaining "Auswahl Temp Sens" and "Auswahl W-Per1" is still necessary.

I didn't say to delete the whole UnbundleByName. Delete just the one entry you don't need anymore!

 

OK. I have already deleted the unwanted elements. I have fixed the first problem. But then I don't know how to fix that I get the error that I have connected 2 arrays of different dimensions. How can I solve this?

0 Kudos
Message 9 of 25
(5,654 Views)

See message #4 and #6…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 10 of 25
(5,651 Views)