I am a new LV user and am having difficulty with my vi. I'm attempting to use a PXIe-6361 to output hardware timed digital bytes for external multiplexer control for channel select, and then do an analog read of that selected channel. The clock used to control the digital output is synchronized to the analog in read and is running at speeds ranging from 20kHz to 100kHz (manually adjusted in between executions). When this system is running the scope shot looks good (See below...A2 is trigger for AI, and bit lines are the digital mux addresses). The issue I am having is related to filling an array with the samples collected from each channel and replacing them each time they're sampled. The read of the digital output value used for an array column pointer to replace older data does not appear to stay sync'd and causes the data to jump around among various array columns. The VI is attached, any ideas for a fix out there?
Thank you for the response. I was not aware of the In-place functions. I have changed my scanning paradigm some to avoid the error of new data being acquired faster the the buffer reads can go. I am now scanning all 16 sensors in each trigger event and then parsing the data array into 16 separate vectors. The sync issue now seems to be resolved by this method. In doing this the sample size per trigger is 16 times larger than it was and seems to help. Although, I still get the error once in a while ( after approx 10 minutes) when scanning at approx. 50kHz or faster. The error message always suggest to consider increasing the available buffer size to avoid; however, when I try to add the buffer control vi and run it I immediately get an error indicating that my system (PIXe-1078, 8135, 6361) does not support it. Is there anything I can do to fix this buffer situation? Ideally I would like to scan at rates as high as 100kHz.
Are you sampling "continuously" or using a fixed sample size (such as 500 points)? If the latter, are you acquiring your samples as a 1D or 2D array? If a 1D array, it presumably has 16*500 points, and if a 2D array, it has 500 rows of 16 columns (or the transpose, I always get confused ...).
In any case, you should be able to get your finite sample as a single 2D array (use Reshape Array if it is 1D). Now your display problem is simple -- to display Channel N, simply use Index Array to pull out Column N. [If timing is important here, you can "do an experiment" to check if it is faster to extract rows or columns -- use Transpose Array as necessary to get the Array in the appropriate shape).
I just added the Input Buffer vi, set it to 5000 and still see the error. Seems the error is related to the time to collect triggered samples. I am running at 2MHz sample clock rate and when the sample size get sets to approx 50 or smaller the error shows up. This would be when the total sample time is 25uS or faster.
I believe the sync issue has been corrected; however, I am having trouble with buffer errors when running too fast. I am running finite acquisition with analog read sample rate of 2MHz The latest VI is attached illustrating the array manipulation, etc....