09-27-2016 09:50 AM - edited 09-27-2016 09:54 AM
I have trying to read three signal at the same time with NI 9234. But I have problem with the buffer, I have read about this error and tried all the possible solution that they gave (increasing sample per channel or increasing number of sample per channel or decreasing the rate) but still nothing. I also try a Producer/Consumer Design Pattern architecture but nothing, it still get that error. Can somebody know how to fix it?
Solved! Go to Solution.
09-27-2016 10:20 AM
Just a thought, try removing the wait until next ms counter in your producer loop
09-27-2016 10:30 AM
Nothing, it still appear the same error.
09-27-2016 10:39 AM
This code works on my 9234. I would suggest going into NI MAX and checking your hardware. Have you used this device before?
09-27-2016 10:40 AM
I can't see why you are getting that error.
How long does it take before the error comes up?
But I do have 2 tips for you.
1. Index Array doesn't need all of those constants. You get indices 0 1 and 2 by default if they are unwired.
2. Wire an array of waveforms constant into your Obtain Queue function. That gets rid of the coercion dots when you transfer the waveform array over.
09-27-2016 10:59 AM
Well, I have realised that the error only happened when I was in "highlight execution", that's wear
09-27-2016 11:45 AM
I'll take a stab at it.
First, get rid if that coercion dot! Select the "Analog 2D DBL NChan NSamp" instance of DAQmx Read.vi (Or use a 1D array of Waveform for the Queue data type and a waveform graph.) Then, lets look into that index array. The indexes do not need any inputs the default would be row 0 followed by row 1 and row 2 that auto indexing is ecaxtly what you want and get without those int constants. AND, find some way to stop that while loop without an error or the abort button.
Neither of the first two is likely to be the cause of the slowness of the code! Yet, your code is not keeping up with the hardware acquisition. The BD shown is not the reason! (Unless you are hitting the abort button and the stop task vi doesn't run until the error occurs) Again, if you ARE hitting that abort button - STOP that you are only causing yourself guaranteed early hair loss
Things to try:
09-27-2016 12:08 PM
@lincoln1991 wrote:Well, I have realized that the error only happened when I was in "highlight execution", that's wear
So problem solved. Now you you know why.
09-27-2016 12:14 PM
@RavensFan wrote:
@lincoln1991 wrote:Well, I have realized that the error only happened when I was in "highlight execution", that's wear
So problem solved. Now you you know why.
Well, That little bit of information makes it a bit easier to figure out And here I was racking my brain for a GOOD reason the code bogged down.