LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Task with digital channels stop displaying and writing

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!

Download All
0 Kudos
Message 1 of 4
(3,128 Views)

Hi Erden,

 

when a DAQmx tasks stop working you should check it's error output!

 

Btw. it's the only task in your VI where the error handler is set to "no dialog"…

And why is the loop set to "run forever"?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 4
(3,116 Views)

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!

0 Kudos
Message 3 of 4
(3,056 Views)

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…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 4 of 4
(2,967 Views)