From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Real-Time Measurement and Control

cancel
Showing results for 
Search instead for 
Did you mean: 

Fluctuations in voltage signal with cDAQ9188XT, NI 9229 input card

Hello everyone.

I am using NI cDAQ9188XT with NI 9229 as input card for data acquisition from a Kistler triaxial accelerometer. I am acquiring data using nidaqmx python library. The problem that I am facing is that I observe a lag in data acquisition after running the program for around 22 minutes(happened several times, around same point of time). Also, fluctuations in ethernet speed starts around the same time, which I observed using Task Manager. The DAQ is connected to my PC using ethernet cable.

I am using python code(in which nidaqmx library is used) for real-time data acquisition and plotting of raw data.If I keep acquiring the data for longer times(even after observing the lag), the buffer fills up and halts the program, showing error.

I have tried following things:

  1. Reserving and unreserving task object after 500 seconds, because there is 30 seconds idle time in the process for which I am acquiring data, after every 500 seconds and then did the same for further loops.
  2. Starting and stopping task object after 500 seconds and then doing the same in the further loops for the same reason as above.
  3. Reserving and unreserving device(DAQ) after 500 seconds and the doing the same in the further loops.

But none of the above solved the problem or affected in any other manner. The fluctuations and lag started around the same time, in each of the above cases.

 

Does anyone know anything that might work or fix this problem?

Also, is NI 9229 input card good for acquiring data continuously for long durations?

 

Feel free to ask for any other information needed.

 

Been trying to fix this since a week.

Please help!!!

 

Thank you.

0 Kudos
Message 1 of 3
(1,819 Views)

Hi Pythonista,

Most NI DAQ devices are designed to run continuously for long time, provided that you are using the correct setting.

Seems that you are encountering with some buffer overflown error, could you provide the following details to help further troubleshooting?

1. Number of modules and channels used

2. Sampling rate for each channel

3. The error code when the program halts.

 

Zhi Yang ONG

Applications Engineer

National Instruments

 

Senior Technical Support Engineer | CLD CTA | NI


DISCLAIMER: The attached Code is provided As Is. It has not been tested or validated as a product, for use in a deployed application or system, or for use in hazardous environments. You assume all risks for use of the Code and use of the Code is subject to the Sample Code License Terms which can be found at: http://ni.com/samplecodelicense

Message 2 of 3
(1,729 Views)

Thanks a lot for your response.

 

Number of channels used = 4

Sampling rate for each channel = 2.5kS/s

Error Code AND Error:

DaqError: The application is not able to keep up with the hardware acquisition.

 

Increasing the buffer size, reading the data more frequently, or specifying a fixed number of samples to read instead of reading all available samples might correct the problem.
Property: DAQmx_Read_RelativeTo
Corresponding Value: DAQmx_Val_CurrReadPos
Property: DAQmx_Read_Offset
Corresponding Value: 0

Task Name: _unnamedTask<0>

Status Code: -200279

 

Also, I am using CONTINUOUS acquisition mode. The problem doesn't seem to occur when I use FINITE acquisition mode. The disadvantage in the FINITE acquisition mode is that I have to keep "samples to read" less than the sampling rate to keep up with the timing of the process. The data that is read is only first "number of samples to read" out of "sampling rate" which is a huge disadvantage and logical error for my purpose because it results in data truncation. So, I prefer using CONTINUOUS acquisition mode in which I keep "samples to read" = "sampling rate".

 

Feel free to ask for any other information you need for troubleshooting.

 

Thanks

0 Kudos
Message 3 of 3
(1,701 Views)