LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

slow data acquisition


Hi,

The rate at which my data is being plotted on the waveform graph is very slow.  I changed the DAQmx to Simulate Signal and it is still just as slow.  Could someone please look at my code to see if you spot anything suspicious.  I'm wondering if I'm just doing too much within the while loop.  If so, I'm not sure how to fix it.

Thank you!

Sherri


0 Kudos
Message 1 of 7
(3,535 Views)
What do you mean by slow?  I am able to run this loop about 20 times/second.  2.4 GHz Pentium, 512 Mbytes RAM, and WIndows2000.
0 Kudos
Message 2 of 7
(3,527 Views)

Before I added the whole section that takes the mean and feeds that into a Simulated DC signal, which then goes into "Extract portion of Signal.vi",  the time on the waveform graph would go to at least 80 (I believe those were msec, but I could be wrong).  But, now it shows 0.01 and so forth.  Maybe I'm confused with my units??  Are the units of the waveform graph in msec or seconds?  how could i find that out?

Thanks for your help!

Sherri

0 Kudos
Message 3 of 7
(3,522 Views)
Sherri,

Your Simulate Signal (DC) is set to sample at 1000 Samples per second and to generate 100 samples. That produces 0.1 second, which is what shows up on the graph. Your Sine Simulator also generates 0.1 second of data. I do not know where you got the 80 that you saw previously.

Lynn
0 Kudos
Message 4 of 7
(3,508 Views)

The "simulate signal" is set to "run as fast as possible", and not to "simulate acq. timing" so this cannot be the explanation.

A quick profiling shows tremendous amounts of CPU used in many of the express VIs, especially the file write, and in the statistics. This is a monster of a program, all these express VIs carry a lot of extra baggage.

Then there are very weird code constructs, for example you write the "arithmetic Mean (Dynamic data)" To the boolean "reset signal" input of the second "simulate signal" express VI. What is this possibly supposed to do??? It makes no sense!

If speed is important, you should probably replace the express VIs with a few efficient classic blocks and directly work with arrays instead of dynamic data types.

To monitor loop times, you should feed your tick count output into a shift register, then subtract the new from the old value at each iteration to get the ms timer value.

Message 5 of 7
(3,496 Views)
Hi Altenbach

Okay.  I have some things to check out now. 
As for the "wierd code constructs", I was trying to plot the mean onto the waveform graph.  I rec'd a suggestion to feed the scalar mean values into a DC Simulate Signal VI so that I could plot the mean.  Is this not correct?

Also, could you explain in more detail about how to monitor the loop times?

Thanks for your help!

Sherri

0 Kudos
Message 6 of 7
(3,486 Views)


@sheck wrote:
As for the "wierd code constructs", I was trying to plot the mean onto the waveform graph.  I rec'd a suggestion to feed the scalar mean values into a DC Simulate Signal VI so that I could plot the mean.  Is this not correct?

You probably want to wire it to the "offset" input, not the "reset signal".


@sheck wrote:
Also, could you explain in more detail about how to monitor the loop times?

Something like this:

Message Edited by altenbach on 07-18-2005 09:22 AM

Message 7 of 7
(3,481 Views)