08-19-2015 07:21 AM
Hello,
I am acquiring data from SCXI and PXI devices. (PXI 6221).
Acquiring analog data from PXI 6221 is just fine, however, digital channel stop displayin after a certain time and then stop writin to TDMS channel.
I attached the VI. Could you please advice what is wrong with it?
Thanks a lot!
08-19-2015 07:35 AM - edited 08-19-2015 07:35 AM
08-19-2015 10:44 PM
Hi GerdW,
Thanks a lot for your reply. I check the error. It is :
Error -200222 occurred at DAQmx Read (Digital Wfm 1Chan 1Samp).vi:3150001 Possible reason(s): Acquisition has been stopped to prevent an input buffer overwrite. Your application was unable to read samples from the buffer fast enough to prevent new samples from overwriting unread data. To avoid this error, you can do any of the following: 1. Increase the size of the buffer. 2. Increase the number of samples you read each time you invoke a read operation. 3. Read samples more often. 4. Reduce the sample rate. 5. If your data transfer method is interrupts, try using DMA or USB Bulk. 6. Reduce the number of applications your computer is running concurrently. In addition, if you do not need to read every sample that is acquired, you can configure the overwrite mode to overwrite unread data, and then use the Relative To and Offset properties to read the desired samples. Task Name: DigitalTASK
I set it to infinite loop because I need to acquire continuously. What I understand from your question is, this is not the best practice.
All I wanted to do is read analog and digital signals at 200Hz. That would be great if you could advice.
Thanks!
08-20-2015 03:04 PM
Hi Erden,
All I wanted to do is read analog and digital signals at 200Hz. That would be great if you could advice.
Then you should look at the example VIs coming with LabVIEW…
Set up your continuous DAQ tasks, set the sample rate and read in blocks of ~1/10 of the sample rate.
What I understand from your question is, this is not the best practice.
No. How do you stop your VI once the measurement is finished?
Right now you need to abort your VI and so the DAQmxStop calls are senseless…