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: 

Driver visa session looping issue

Solved!
Go to solution

Hi,

 

This is the first time I've ever setup a loop with a visa driver session in it. I am attempting to collect an array of flux data. The array indexes correspond to physical (x,y)  locations on the item i'm measureing the flux of. This is why i need the data to be read in as a 5x7 array of flux. The 5x 7 matrix is collected 3 times (at 3 different z heights). However, I can't figure out why I am getting three 6x7 matrices instead of a 5x7. I can't tell if it is my shift register setup, where my visa session is implemented, etc. I just can't figure it out.

 

Could someone look at my attached code ( it's pretty simple, just 3 nested for loops with the visa session inside, and that data is fed out to 3 matrices, which is then stripped down further which can be ignored) 

 

Thank you very much,

 

chelsea

0 Kudos
Message 1 of 3
(2,223 Views)
Solution
Accepted by topic author CRivett

First of all, I don't see a point in any of those sequence structures.  All they are doing is creating clutter.

 

Secondly, why are you appending the second to last results to the whole results?  That is where your extra index is coming from.  Get rid of that shift register and the Build Array.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 3
(2,221 Views)

The sequences are there because I cut out all the code I know works so that whomever was going to reply didn't need to look that hard at my code unnecessarily. The sequence structures were just leftovers from cutting out the other stuff, since they were obviously not impacting the rest of the code I simply just left them in to save me time. But thanks for the solution to the array issue, I figured I was just over thinking it. 

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