LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Slow response time with results while running Labview 8.2

Hi,

 

I’m new at using Labview and have a quick question. I’m currently running a VI file with a sensor, and when the sensor is moved the reading on the front panel of the VI is slow to change value. Since the sensor will be moving rapidly, I need the reading on the front panel to change rapidly with the sensor.

 

What can I do to fix this? Is it something to do with the sample rate in the block diagram? It’s currently on 1.23, do I need to raise or lower it?

 

I’m at a loss here, so any help is appreciated.

 

Thanks.

0 Kudos
Message 1 of 12
(3,522 Views)

Hi RoryOBrien85,

how do you connect the sensor with your system? Which functions do you use in LabView? Can you explain it, or show us your vi?

Mike

0 Kudos
Message 2 of 12
(3,504 Views)
You need to provide some more information. What exactly are you using to acquire data? Is it DAQ, GPIB, serial, etc? What do you have this 'sa,ple rate' wired to? Post your code. If the block diagram is small, you could also attach an image of it.
0 Kudos
Message 3 of 12
(3,503 Views)

Hello RoryOBrien85,

In the block Diagram, the sample rate is the frequency that you are aquiring samples with. If you want to have datapoints faster, you must increase the Rate of Sample Clock.

Otherwise, it's important to have a quite high rate of sampling to be over the Nyquist Frequency. If you want, This link and the example may give more precisions about the Nyquist frequency and the advantage to have a quite high rate.

Regards,

http://en.wikipedia.org/wiki/Nyquist%E2%80%93Shannon_sampling_theorem



Message Edité par Jérémy Marliot le 03-05-2008 09:10 AM
Jérémy M. | LinkedIn - Contact
Don't forget to give Kudos to good answers.

0 Kudos
Message 4 of 12
(3,499 Views)

Hi,

The sensor is connected to a DAQCard 6024E and there is a 5 volt analog input going through it. Could it be the specs on my PC? It's running with a 1.7GHz processor with 512mb of RAM. Is there a way I can post the VI file so ye know what I'm talking about?

Thanks

0 Kudos
Message 5 of 12
(3,494 Views)
Look below the message box. See the 'Attachment' and 'Browse' button? Click the button and browse to your VI.
0 Kudos
Message 6 of 12
(3,491 Views)
Hi,
 
I've attached the VI and a snapshot of the Block Diagram. I've made the extension of the file .txt because it won't accept .vi for some reason... So if you open it, just change the extension to .vi...
 
Thanks
 
0 Kudos
Message 7 of 12
(3,476 Views)

In your original post, you mention a sample rate of 1.23. On the front panel of the VI you posted, you have a sample rate of 3000 and number of samples to be 3. That means that the DAQ card will scan at a rate of 3000 samples per second and if you request 3 samples, you should be getting data every msec. If you change the sample rate to (without changing the number of samples) a smaller number, then it will longer to acquire. For example, if you change the sample rate to 1, it would take three seconds to return 3 samples.

p.s. Your screen might need some work on the colors. I think the blue text on the black bacground is next to impossible to read.

0 Kudos
Message 8 of 12
(3,470 Views)

Hi guys,

 

I’ve messed around with the sample rate and sample time and still there is a lag in the change of pitch angle. Would it be the specs on the PC? As I mentioned, it’s running with a Pentium 1.70GHz and 512Mb of RAM. Would increasing the RAM help?

 

Thanks

0 Kudos
Message 9 of 12
(3,440 Views)
I just had another look at the VI you posted and noticed that you have multiple AI Acquire Waveforms functions. There are 4 of them, all sitting on top of each other.
0 Kudos
Message 10 of 12
(3,436 Views)