LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Converting Digital Array to Cluster

Solved!
Go to solution

Hello Everyone!

 

I am simulating a NI9189 Chassis with a NI9425 module. I am trying to read all the digital inputs and display their states to the user by converting the array of digital data to a cluster and then unbundling it by name.

For some reason it is only showing me the first 8 digital channels and not the remaining 8 channels that I specified in the task. It happens when I convert the digital array to a cluster. If you look in the Block Diagram you will see that "data[8]" continuously repeats itself and does not show the next digital data point in the array. Does anyone have any idea why this is and how to fix it?

 

Attached are images and my code. 

Thank you so much!

 

 

 

Picture 1.PNG

Picture 2.PNG

0 Kudos
Message 1 of 5
(2,507 Views)
Solution
Accepted by topic author KurtzC1

You need to change the cluster size. Right click on the array to cluster VI and set the cluster size to 16:

ClusterSize.png

Message 2 of 5
(2,488 Views)

You are actually seeing the first 9 channels.

 

Better yet.  Don't use Array to Cluster at all.

 

You should be using Index Array when you want to show the elements of an array.

Message 3 of 5
(2,481 Views)

Thank you this worked wonders

0 Kudos
Message 4 of 5
(2,453 Views)

You are right about the 9 channels. I was typing this quickly and forgot about zero indexing. 

0 Kudos
Message 5 of 5
(2,450 Views)