LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Visa Read - build a table

Solved!
Go to solution

Hi dpk,

 

LabVIEW basics: how often will a FOR loop run with several autoindexing inputs?

 

Why do you expect "33", which is the 5th element, when there are only 4 row/column headers?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 11 of 14
(783 Views)

Hi 

 

I got what you are saying. But I thought I should get something like the attached screenshot here. Suppose I have only 4 row/column headers, and I have 16 different values, I want to fill the table with those 16 different values. That's what my final goal is. 

 

Thanks 

0 Kudos
Message 12 of 14
(780 Views)
Solution
Accepted by topic author dpksmth

Example_VI_BD.png

 

Here's one possible solution.

The issue is that your autoindexed array at the top has 4 values, and the bottom has more, and so the loop runs 4 times.

 

If you do some index manipulation like shown here (and in the labelling of indices for randomization in my earlier VI), then you can index the correct element each time, and not just get repeated values.

 

Edit: the same VI with autocleanup and some minor rearrangement. Posting alongside rather than replacing because probably easier to see differences when not the whole thing changes shape at once!

Example_VI_BD.png


GCentral
Message 13 of 14
(776 Views)

Hi 

 

Thank you very much for you all the time and efforts to help me. I really appreciate it. 

 

All the best. and stay safe from COVID-19.

0 Kudos
Message 14 of 14
(752 Views)