Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Analog Output / Input - delay during acquisition

Hi All !,

 

I have problem with my application for generating and measuring signals. Program works properly only once per six-seven times and problem which occurring is very repeatable. When it works wrong there is a probem with DAQmx read function, it not read data in every iteration. But when finally read it, there is much more data than expected (settings – samples per channel). Due to that  data can't be continually displayed on the graph.

 

I do not have any idead how to solve it,  I will very appreciate if  you can help me.

 

Reguirements:

  • Hardware: NI 9172, 2 x NI 9234, 1 x 9236
  • Sine sweep signal generated through Ao 9263 and response from sensors stored through Ai 9234
  • Acquisitions rate for Ai up to 25.600 KS/s, Sinesweep read from TDMS (60 seconds 8.533 KS/s)
  • Graph need to be update 10 times per seconds. Program need to respond for Stop button thus I decided to take continuous acquisition.

Simple program was created to exclude another part of the final program. Currently in Hardware Ao/0 is connected to Ai/0 to see what is going on.

IO.jpg

Problem is visible especially when iteration will be plotted against: 1) available data to read, 2) data read during last iteration. Below are screen shots for situations: when programs works ok and when have delay ( works not ok)

 

Worinkg ok: no remaining data and every iteration 2560 data are read.

OK.jpg

 

Program not working properly: DAQmx  did not read data in every iteration, thus huge stack is growing.

NOK.jpg

 

Have you any idea what is the root cause of that?

In attachements please find MainVI.vi plus Source signal for generation

 

Regards,

finch18

 

0 Kudos
Message 1 of 3
(4,724 Views)

I noticed one thing more. If data are measured from more that 1 channel, problem is less severe.

 

If acquisition using all 8 channels from 2 x 9234 there is no problem at all.....

 

So what is happening during acquisition from one channel?...

0 Kudos
Message 2 of 3
(4,651 Views)

Hi Finch,

 

 

                   I have set up a similar system as in your case, however I have used a different cDAQ chassis ( cDAQ 9178 + NI 9234 + NI 9263 ) and run multiple times the code that you have provided - for me it works just fine ( see print screen attached ). Everytime I am receiving the correct amount of samples, so it's hard to tell what could be the issue.  I would suggest as a first step to run one of the shipping examples that are coming with LabVIEW, for Analog Input, for just one channel, and see if you get the same behavour. Even better, you could try running your VI on a different PC and check how it works, or with a different hardware ( if you have another chassis available ).  Otherwise, there might be multiple causes - DAQmx ( in which case you could try to reinstall the DAQmx driver), the OS or an antivirus which is slowing the execution. The code itself looks good, except that it is somewhat disorganised, so it would be a nice ideea to clean it a little. 

 

 

Regards, 

 

Denis

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