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: 

Read from channels

okay

 

But, if you stack 6x25 components horizontally, transpose , append and again transpose as explained earlier, (to see results column wise), what is the size of the final array line?

0 Kudos
Message 21 of 28
(644 Views)

If directly taken (250 samples read per channel), then, is there a buffer overflow of errors?

Can you explain about the error buffers please?

0 Kudos
Message 22 of 28
(629 Views)

Here is my daq snippet.

 

Is it that the buffer overflows when I directly take 250 samples to read and taking ten 25 samples read will avoid this problem? (Sampling rate is 1000).

Anyone please explain this concept.  

0 Kudos
Message 23 of 28
(622 Views)
None of that code makes much sense. I kept asking about a loop and it turns out you have nothing like what I thought. Just take the samples with a single read. None of that array manipulation is necessary.
0 Kudos
Message 24 of 28
(615 Views)

Here is the loop.

 

 

The array manipulation is just to log data column wise (I think).

These ten daqmx reads are used probably to avoid overflow of buffer.

Can anyone explain what happens and how?

0 Kudos
Message 25 of 28
(609 Views)
You still don't make any sense to me, sorry. You've already been given a much more reasonable example and there are shipping examples to look at. Your code is way too complicated.

p.s. I was assuming a loop around a single read.
0 Kudos
Message 26 of 28
(598 Views)

I am actually documenting a VI.

 

This code is just for better comparison studies (25 samples of 6 channels are placed column wise for easy reading(for the user) of data in the file.) Eventually loop time should be 0.25 seconds.. Therefore 10 of these 6x25 components are stacked. 

 

My question is , does this code have any other purpose like .. it avoids buffer overflow error?

0 Kudos
Message 27 of 28
(592 Views)

I see absolutely no point in breaking it up like that.  You are dealing with a total of 1500 samples.  A DAQ buffer should be able to easily handle that.  Get all of the samples in 1 read and save yourself the headaches.

 

But then you have the saving to a text file to go into the last sequence frame (sequence structure isn't necessary, BTW).  For the saving to disk, I highly recommend you go with a Producer/Consumer architecture.  The idea is that you have one loop reading from the DAQ and then sending it to another loop that writes the data to a file.  The communication is done with a Queue.


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 28 of 28
(587 Views)