ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Labview performance suffering with analog input

Hello,

I am using a PCI-6036E and a cDAQ-9172 with LabView 8.0. I have created a VI that systematically writes four different digital outputs, three to the PCI-6036E and one to the cDAQ-9172.

Just recently I added a thermocouple to the mix, using an analog input on the PCI-6036E to monitor temperature. Since doing so, I have noticed that the entire VI runs extremely slowly.

Before installing the thermocouple, the VI slowed down a bit if left to run continuously (for days at a time). Now, however, the VI slows down a great deal if left to run for more than a few minutes. It is so bad that the "Elapsed Time" display will not properly display the elapsed time.

Because this application will be run for days, even weeks at a time without being stopped, this gradual decrease in performance is a huge problem. The application needs to run very accurately and precisely. I have attached my VI below. Is there any way to fix this issue? Any help is greatly appreciated, as I am new to LabView.

Thanks,
Nick
0 Kudos
Message 1 of 17
(4,186 Views)
Sorry, forgot to attach my VI. Here it is.
0 Kudos
Message 2 of 17
(4,184 Views)
I didn't look at the code (yet), but do you have a slow analog samplerate?

Look here
And here (a KB aticle)

Ton
Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
0 Kudos
Message 3 of 17
(4,181 Views)
Your thermocouple read takes 100ms (1kHz/100 samples).  Because a calculation based in the result is wired into your case structure, none of the other code can execute until the thermocouple reading is taken.
0 Kudos
Message 4 of 17
(4,177 Views)
How would I go about changing the code such that the thermocouple reading and the remainder of the case structure function independently?
0 Kudos
Message 5 of 17
(4,167 Views)
I am not sure if I have a slow analog sample rate. I took a look at the resources you posted, and will try setting the Data Transfer Request Condition to fix my problem.
0 Kudos
Message 6 of 17
(4,164 Views)

Hi nick525,

you can create another while loop parallel to your existing one and read the temperature value there.

Mike

0 Kudos
Message 7 of 17
(4,155 Views)
I was a bit curious, so I removed the temperature component of my VI completely. After running for a few minutes, my VI still becomes rather lethargic. The elapsed time display seems to be behind a bit, and the start/stop/pause features all take about 15 seconds after being clicked to respond. Is there a way that I can fix this? Obviously the analog input had some effect on performance, but even without it there is also an issue I cannot solve.
0 Kudos
Message 8 of 17
(4,149 Views)

Hi nick525,

every time you write one of your values you create a new task. Why? I think a much better way is to create the task ones at the beginning and use everytime the same.

Mike

0 Kudos
Message 9 of 17
(4,138 Views)
How would I go about doing this, by creating a shift register and storing the values?
0 Kudos
Message 10 of 17
(4,135 Views)