Multifunction DAQ

annulla
Visualizzazione dei risultati per 
Cerca invece 
Intendevi dire: 

multiple channel data acquisition

Hello Pavan,

You might try increasing how often you read your number of samples.  You could do this by decreasing nSamples and the number of numSampsPerChan in your DAQmxRegisterEveryNSamplesEvent and DAQmxReadAnalogF64, this would cause the buffer to be emptied more often. 

Give that a try and let me know if it doesn't help,
Micaela N
National Instruments
0 Kudos
Messaggio 11 di 19
3.038Visualizzazioni
Hi Micaela,

Sorry for the delay. I tried with low values as you mentioned, but still it is giving me the same error (I have attached a screenshot of the error). I am attaching my program with this message, can you verify it by testing on your systems.

thanks,
-Pavan.
Scarica tutti
0 Kudos
Messaggio 12 di 19
3.019Visualizzazioni
That is a lot of throughput....3 channels @ 10 MS/s is 60M bytes per second.  Can you run your program at slower rates w/o getting that error?  If so, what rates can you achieve w/o error?
-Alan A.
0 Kudos
Messaggio 13 di 19
3.016Visualizzazioni
Hi,

I can go roughly upto 8MS/s and from then it gives out the error. Even at 8MS/s it sometimes reads in and sometimes it doesn't. Is there anyother solution for this other than capturing 1AI-2DI (since two of my signals are square waves)?? Even with 1AI-2DI, I can capture only for 12 sec at max, if I try to give more than 12sec the program doesn't even start and gives out application error (maybe this is something with allocation of buffer, even though I have 2GB of ram).

thanks,
-Pavan
0 Kudos
Messaggio 14 di 19
2.987Visualizzazioni
Hello Pavan,

I took a quick look at your code and I would recommend making your buffer larger and decreasing how often you read the data.  For you buffer, I would recommend making it large enough to hold at least 1 second of data, so at least 10 M samples.  Also, if you decrease how often you return the data you will decrease how often data is transferred, I would recommend transferring data approximately every 10ms, so set your number of samples for your RegisterEveryNSamplesEvent to be ~1M Samples. 

Hopefully that will help with the error,
Micaela N
National Instruments
0 Kudos
Messaggio 15 di 19
2.960Visualizzazioni
Hi Micaela,

We have decided to use 1AI-2DI approach to use our ram more efficiently for large amounts of data acquisition at one shot. I would like to know if there is any other way to read in the analog data other than 'DAQmxReadAnalogF64'. Using this, each sample is of 8bytes and this alone uses up ~916MB for 12 secs of continuous acquisition whereas digital data uses up ~229MB with 1byte/sample (which is reasonable) and our analog samples are always between 0 to+5V.

One more thing is the program is not consistent all the time. Till yesterday it ran fine and read in the data, today it suddenly stopped reading in the values (when I ran it in debug mode at different acquisition times, it seems that it doesn't even go into the callback function for EveryNSamples) and ends the program after it allocates the memory space for variables. I haven't changed the program since yesterday Smiley Triste

thanks,
-Pavan
0 Kudos
Messaggio 16 di 19
2.900Visualizzazioni
Hello Pavan,

Part of the reason each sample is 64bits is that each of the samples has been scaled, you could read in raw data, but this would be in the native format of the device, it is not scaled and you will need to refer to the 6115 document to determine the format it uses.  You will also want to look at the documentation in the NI-DAQmx C Reference Help >> NI-DAQmx Key Concepts >> Reading and Writing Data >> Data Format and Organization >> Raw Data before using this format.  You would need to scale and possibly reorder the data after reading it.

Does anyone else use your program or have access to your hardware?  It's hard to track down a random bug that just appears, so you might see if anyone else has changed anything in your system without telling you.

Regards,
Micaela N
National Instruments
0 Kudos
Messaggio 17 di 19
2.878Visualizzazioni
Hi Miceala,

No one has changed the program since I ran it successfully for the last time. It stopped working suddenly. I can see that the program never goes into the 'EveryNCallback' function even after I start the tasks and rather it ends the program without any errors and without recording in any data. It would be great if someone can run this program and check if they can reproduce the same.

thanks,
-Pavan
0 Kudos
Messaggio 18 di 19
2.842Visualizzazioni
Hi,
I figured out the problem. I just deleted all the devices from MAX and removed the board from the system and reinstalled. Now, its working as it is expected to work.

thanks for your help,
-Pavan
0 Kudos
Messaggio 19 di 19
2.840Visualizzazioni