NI LabVIEW,CVI,数据采集等产品讨论区

取消
显示结果 
搜索替代 
您的意思是: 

NI的索引数组控件工作不正常

       我使用重排数组对一个数组进行了分组,然后使用索引数组控件,将不同的组分开,发现数据在进入索引数组之前是正常的,经过索引数组之后可能会出现索引错误,有什么解决方法吗?还是说我的操作有问题?希望有大神可以解答一下,万分感谢!

 

   分组之前的数据是方波[11331133......................]

 

程序程序异常显示异常显示显示正常显示正常

0 项奖励
1 条消息(共 5 条)
1,043 次查看

Not sure what you mean by index error, but separating an 4x interlaced array can be done with much less code.

 

altenbach_0-1650214221521.png

 

 

If you get an error, please explain what kind of error (wrong result, broken VI, computer crash, etc.). What result do you get, and what do you expect to get instead. Maybe even attach some simplified code?

0 项奖励
2 条消息(共 5 条)
1,010 次查看

是的,可以用更简单的方法实现这个功能,但是不确定为什么我现在这个方法可能会出现问题。数据进数组之前是[113311331133......],然后我对它进行了数组重排,变成了二维数据(4列),进入索引数组。进入索引数组之前,查看了数组,可以看到此时数据是没有问题的。但是经过索引数组后,输出的四个一维数组可能会出现轮序。即不是按照[1.......]、[1.......]、[3.....]、[3........]正常输出,有可能出现[1.......]、[3........]、[1.......]、[3.....]的错误情况

0 项奖励
3 条消息(共 5 条)
980 次查看

Yes, there is an easier way to implement this functionality, but not sure why I might be having issues with this approach now. Before the data goes into the array, it is [113311331133...], and then I rearrange the array into two-dimensional data (4 columns), which goes into the index array. Before entering the index array, look at the array, and you can see that there is no problem with the data at this time. But after indexing the array, the output of four one-dimensional arrays may appear in round order. That is not to output normally according to [1.......], [1.......], [3.....], [3........], it is possible An error condition of [1.......], [3........], [1.......], [3.....] occurred

0 项奖励
4 条消息(共 5 条)
977 次查看

It is not useful to show an example where most number are the same (113311331133) because we have no idea which 1 or which 3 went where in the desired output.

 

If the input is [12345678], what four 1D arrays do you expect to get from it? Please be very specific!

0 项奖励
5 条消息(共 5 条)
970 次查看