LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LabVIEW program freezing, PC or code problem?

Solved!
Go to solution

Hello, my LabVIEW program is freezing when running DAC output from a DT9834 device. The PC I am using is running with a Xeon E5-1620, 32gb of DDR3 1866 RAM, Quadro A2200.

 

When I execute this program with a sample rate of 20000 and a timing in the output loop of 100ms, it runs fine. If I push that sample rate to 25 or 30k+, or change the timing in the loop to increase the output rate, it freezes the program and the output also glitches. The device is capable of 500k samples a second, so it shouldn't have an issue at even 100k. I can provide any other information needed, below is my program:

 

tareyes_0-1695398341088.png

 

0 Kudos
Message 1 of 5
(1,007 Views)

You probably should attach your program (*.vi). All I see is a picture.

Make sure that all controls have reasonable defaults and make sure all terminals have labels. Also include a typical data file.

 

I don't understand what the loop timing has to do with the sample rate. What's the size of the 2D array?

Message 2 of 5
(990 Views)

Attached is the VI and a typical data file. The array has 8000 total points. Thank you for the help.

Download All
0 Kudos
Message 3 of 5
(952 Views)

Hi tareyes,

 


@tareyes wrote:

When I execute this program with a sample rate of 20000 and a timing in the output loop of 100ms, it runs fine.


Unfortunately you forgot to downconvert your VI so more people actually have the chance to open it.

(I guess you already have heard many of us still prefer LV2021 or even LV2019…)

 

On your image:

  • Why are there string indicators without labels?
  • Why are there still constants at the IndexArray nodes?
  • Placing a  format string of "%.6f" at the ReadDelimitedFile function is nonsense, the default "%f" will do the same…
  • Why is the "Channels" control set to DBL datatype when you need an I32 value all the time?
  • What does the Digilent support say about the sample rate issues of your DT9834?
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 4 of 5
(914 Views)
Solution
Accepted by topic author tareyes

DAQmx Read/Write loops should be written to "time themselves".  Get rid of the "Wait until next ms multiple" function inside the DAQmx Write loop -- when you do the Write, the function will finish (and let the loop finish, allowing the next loop to start) as soon as it is able to accept the next array of data to continue without interruption.  "Artificially slowing the loop down" by putting an unnecessary additional "Wait" function will only invite trouble.

 

Bob Schor

Message 5 of 5
(882 Views)