Hi altenbach. It works great just as I had expected. But some how actually the random numbers are not supposed to be in the 'for loop' with build array.
Becos I am using DAS card to access the signals from 4 channels at a time. That's why the random number act as a channels input of DAS card for build array to build up tha array. And I also use I/O of DAS card to control so that each channel will capture voltage value at a time. I am using Advantech's DAS card.
So how do we do that? I am using while loop too. I am not sure If u have drivers for advantech card, I will attach for you anyway, maybe it will help. Alternatively u can use the other file which you have used. Thanks for your help again.