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: 

Updating an array in MyRio LabVIEW

Solved!
Go to solution

I have a program that is updating a array with the robot's current status. I'm using a for loop to scan through all of the robots. Currently, there is two robots, but more will be added in the near future. (See Capture.JPG or the full VI below). (Note: I drew in the parts of the VI that got cut off. The conditional statement is false after the first while loop iteration because I'm using it to define the matrix. So, the red line shows the proper connection when the conditional statement is false.)

 

I'm trying to update the array in the control panel picture after each iteration of the for loop. When I run this VI, it receives the values needed to update the array when I probe for values inside of the for loop, but it only updates the array of the second robot (Robot number one). Any suggestion on how to get the array to constantly update the values? Thank you!Control_Panel.JPG

Download All
0 Kudos
Message 1 of 3
(2,301 Views)
Solution
Accepted by topic author thedawg1993

It looks like you may need to change the tunnel mode of the array coming out of the while loop to "indexing." This will send a 2D array (instead of 1D) out of the while loop, which you can manipulate and display. I'd also recommend removing the case structure for simplicity's sake, because it doesn't appear to be serving any purpose right now. Let me know how that goes for you!

 

-PoteetB

0 Kudos
Message 2 of 3
(2,264 Views)

Thanks! That worked.

0 Kudos
Message 3 of 3
(2,253 Views)