LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Limit for displaying data on graph

I am reading 5 ch AI data from a DAQ continuously and display it on a graph. Data is fed into a loop to separate five channels then saved into global variables using shift registers. The global registers are connected to graphs. Problem is the graph stops displaying data after 21000 points. I wonder there is a limit on array or shift register to hold data?
0 Kudos
Message 1 of 6
(3,203 Views)
The maximum number of elements in an array is 2147483647 (max value for an I32), about 100000 times above your experimental limit. Means that the problem is somewhere else. Try to reproduce it on a small example. For instance, replace the acquisition step with random number generation and try to build the graph that way. See what happens. If the problem persists, post your example here.

CC
Chilly Charly    (aka CC)
0 Kudos
Message 2 of 6
(3,200 Views)


@chilly charly wrote:
The maximum number of elements in an array is 2147483647 (max value for an I32), about 100000 times above your experimental limit. Means that the problem is somewhere else. Try to reproduce it on a small example. For instance, replace the acquisition step with random number generation and try to build the graph that way. See what happens. If the problem persists, post your example here.

CC


Yes. The problem was the buffer size in the DAQ. Now I would like to know if there is a way to clear old data in the buffer such that continuous data acquisition will never fill the buffer.
It would be nice to read then clear what I read so next iteration read the new portion of data..
0 Kudos
Message 3 of 6
(3,186 Views)
mchips,

The continuous data acquisition you are describing is also known as double-buffered acquisition--a very common use case in LabVIEW for which there are excellent shipping examples that demonstrate the technique. For the fastest, most comprehensive DAQ answers, you might consider using the Multifunction DAQ forum, though I realize it was initially unclear where the problem lay here.

You didn't mention what driver you are using (Traditional DAQ or DAQmx, or conceivably something non-NI). That's important information when it comes to pointing you toward the appropriate shipping example. So, I would simply advise that you open the Example Finder (Help >> Find Examples) and search for the word "continuous". Then you can pick out an example that uses your driver and demonstrates something close to what you are trying to do. This should help clarify how to structure your program.

Regards,
John
0 Kudos
Message 4 of 6
(3,176 Views)
Thanks John,
I am trying to read data in a continuos acquisition and display the entire data on a graph. My problem is the DAQ stops acquiring data when it reaches the end of buffer. I am familiar with continuous data acquisition but would like to know how I can delete old data from the buffer (the old data is on my global variable) during the continuous acquisition.
It is important to me to read a specific amount of data per loop and keep tract where my read is.
0 Kudos
Message 5 of 6
(3,158 Views)
mchips,

Again, an important factor is what driver you are using. Regardless which one, the board will likely support a circular buffering situation where new data overwrites previously-read data, and you shouldn't have to explicitly clear the old data out in a separate step from the read step.

I suggested starting from an example because it's guaranteed to be programmed correctly to accomplish something very close to what you're trying to do. Alternatively, you could post your VI and solicit feedback. You'll have to choose one of these approaches, because your description of your current state ("DAQ stops acquiring data when it reaches the end of buffer") is not really enough information to suggest a solution. For example, you might have inadvertently programmed it that way, or you could be running into an unhandled error. Are you passing the error cluster through all of your code?

--John
0 Kudos
Message 6 of 6
(3,151 Views)