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: 

Problem with bundling and unbundling arrays in clusters.

Hi, I have a problem and I would greatly appreciate it if somebody could offer me some assistance.
 
At a point in my VI which I know is working I have 6 1D arrays of length 3, each point in the array concisting of a floating point value, i.e.:
 
4.747, 3.264, 1.458
4.388, 0.402, 2.602
4.864, 4.919, 2.602
4.864, 4.919, 1.458
2.308, 1.69, 0.455
4.388, 0.402, 1.147
 
These values are then bundled together to form a cluster, using the bundle icon which is linked to an output cluster. This forms a subVI.
 
The work I am doing is the creation of a genetic algorithm. These arrays are the output of one loop (one generation) of the genetic algorithm. I then use a feedback node to return these values to the beginning of my VI. At the start of the array again, the cluster is unbundled and the arrays are passed into the system for manipulation. Just after the arrays are unbundled I added a write to spreadsheet VI to check the input arrays and the return I got was:
 
5, 3, 1
4,0, 3
5, 5, 3
5, 5, 1
2, 2, 0
4, 0, 1
 
The original values of floating point representation have been rounded to the nearest integer after the arrays have been bundled and unbundled. Can anyone tell me why this is the case?
 
Thanks
 
Alan Homer
0 Kudos
Message 1 of 4
(2,255 Views)
The obvious question is: Are you sure that your front panel indicator/controls aren't set to be of integer datatype? Do you see a coercion dot along the wireflow?
Message 2 of 4
(2,247 Views)
Hi Alan,

Smercurio's shot has a good propability of solving you problem, but if you had posted your code he could have told you without any doubt 😉

Your description of your problem is very clear, and one knows that a well explained problem is half solved... but keep in mind that, along with a good explanation, the VI with un-understood behaviour always helps to solve the problem 😉


We have two ears and one mouth so that we can listen twice as much as we speak.

Epictetus

Antoine Chalons

Message 3 of 4
(2,241 Views)
Thanks, I will bear that in mind. the problem is now solved. Thanks for the help.
0 Kudos
Message 4 of 4
(2,215 Views)