LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Determining a programs efficiency

hi y'll,

I'm in the middle of building a software spectrum analyser, I've built it up for a single channel, but I'm now in the process of expanding the program to sample 16 channels. The spectrum analyser in for power systems monitoring harmonics from 50 to 5KHz, sampling at 12800 using at least a 4096pt FFT (currently using the spectral analysis express VI). I then need to compare the values of the harmonics to the fundamental and check against given limits which require an hour long rolling buffer so I need to do this on 16 channels "realtime".

I've gotten the single channel version working correctly but now that I've increased the number of channels, essentially by trowing a FOR LOOP around much of the single channel code. Now that i've done this the program falls over after a certain time which i beleive is due to the program not being able to service all the data in the input buffers in REAL TIME.

How do i fault find this? determine where there is fat in the program that can be cut out? or find which procecsses are taking the most resources and work arround that?


Cheers

The PHat controller
90% of all experts aggree that 1 out of 10 experts are wrong
0 Kudos
Message 1 of 2
(2,459 Views)
Firstly, make sure you're acquiring all the data in one go without processing if the channels need to be processed "simultaneously".

Then, when processing the acquired data, try to do as much as possible in parallel, which allows the compiler to optimise the execution of the code. Also, if performing operations such as multiplication or division and so on, try to do it on an array instead of point-by-point.

And if you're displaying data, remember that it's useless sending data with 10,000 data points to a monitor 1024 pixels wide..... The points you won't be able to see will just hog the CPU.

Otherwise, it would be a big help if you could post a picture of your code so that we have a better idea of what's actually going on in your program.

Hope this helps

Shane.
Using LV 6.1 and 8.2.1 on W2k (SP4) and WXP (SP2)
0 Kudos
Message 2 of 2
(2,453 Views)