LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Graphs not updating smoothly

I've looked at many solutions cause this seems to be a common problem but I found nothing that can help me. The attached code is for a data acq system that acquires data from 6 channels, 3 different channels  on 2 different cards. The maximum frequency of our system is 12khz, so i'm using 25500 with a buffer size of 10000. I'm not sure if that is correct. Are these numbers reasonable and if so why is my graph blinking?
0 Kudos
Message 1 of 6
(3,004 Views)

What seems to be a common problem? That your graph is blinking? or that it does not update as you wish?

Well a graph is simply a indicater which represents the data you write into it at a certain time.

So you decide what your graph is doing. If there is something wrong you might need to be a bit more specific.

 

Btw, your samplerate is enough if you just want to have the correct frequency of the signal. If you need to get the correct shape you will need to use a 10 times higher samplerate then the highest frequency your signal can have.

 

 

Christian

0 Kudos
Message 2 of 6
(2,976 Views)
Possibly both are the problem. It blinks when updating and when I look at the tdms file with the tdms viewer, there is no data (or zeros) between what looks like each sampling. If the graph is displaying the correct data is the blinking possibly the zeros? If so, why are there zeros? I don't understand why I need a samplerate that is 10 times higher than the highest frequency possible from my signal. Is Nyquist not enough?
0 Kudos
Message 3 of 6
(2,944 Views)

Nyquist says, that if you want to get the correct frequency of a signal, you need to acquire 2 times faster then the highest possible frequency in the signal. Christian says, that if you want to acquire the correct shape, you need to be at least 10 times higher.

 

And regarding your blinking graph, again it only represents the data you write to it. Maybe you should post the VI.

 

 

Christian

0 Kudos
Message 4 of 6
(2,929 Views)
haha. Gotcha. I uploaded a zip file with the .vi in it. There are 2 small subvi files. And I understand that the graph is only representing what is being written to it. Where are the zeros coming from?
0 Kudos
Message 5 of 6
(2,920 Views)

Well, I saw your VI, but I don't have the hardware installed and don't have the time to setup a system and test this right now, sorry for that.

And when disabling certain parts of your VI to run it on my system with just one DAQ card installed I don't see any data, though a sinewave generator is connected and I see data with other VIs.

 

So I don't see blinking, nor anything else when running your VI.

 

At first sight the structure seems to be ok. But you don't check for DAQmx erros in the procuder loop and it's not necessary to have shiftregisters for the task handles.

 

So back to the zeros. Do you see zeros in your tdms file?

 

 

Christian

0 Kudos
Message 6 of 6
(2,907 Views)