LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Power spectrum not enough memory

I have a binary file that I want to plot the power spectrum of.  The thing is.. the .bin file is about 100MB.  When I run the attached .vi, it says out of memory.  However, I could open the .bin file and plot it with amplitude versus time.  Is there a problem with my setup or something I don't know about?  Thanks for your time~
 
Jud~
0 Kudos
Message 1 of 7
(3,456 Views)

Also another question, if anybody could help me:

Why does the output of the power spectrum have the units of Amplitude vs Time?  Why doesn't it compute it in Amplitude vs Frequency and plot it like that?

Thanks..

0 Kudos
Message 2 of 7
(3,425 Views)
Jud~,

Could you post a screenshot of the out of memory error?  Also, how much RAM does your system have?  Does this error occur if/when the only program you are running is LabVIEW?
Regards,

Jared Boothe
Staff Hardware Engineer
National Instruments
0 Kudos
Message 3 of 7
(3,418 Views)
Well with a 100MB file of doubles you're talking about over 13 million points. That's going to be quite taxing, and not too surprising that you would run into memory issues. Can you work with a smaller dataset? Or perhaps one of the point-by-point spectrum VI will work for you.

The output of the power spectrum doesn't have units. Your graphs says Amplitude vs Time because that's the default values for labels on the scales. Just change the scale names.

Also, you can simply wire a -1 to the "count" input of the Read Binary File function without needing to calculate it based on the filesize. That's assuming you're still going to read the whole file at once.
0 Kudos
Message 4 of 7
(3,409 Views)

Brilliant!  Renaming Time to Frequency on the Power Spectrum did the trick.  Attached is the error message.  It looks like it does ok with a short snippet, but I do need to try and keep the filesize as much as possible.  My computer is a 2.00GHz, with 2.00GB of RAM.  Smiley Surprised  Would I need a more powerful processing computer to accomplish this task? 

Thanks so much,

Jud~

 

0 Kudos
Message 5 of 7
(3,402 Views)
Hi Jud,

why do you attach a BMP renamed to JPG? Please attach real JPGs or (even better because of lossless compression) use PNG format! There's a reason why BMPs aren't allowed as attachment...

I attached your pic converted to PNG. Do you spot the difference?


Message Edited by GerdW on 08-02-2008 03:40 PM
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 6 of 7
(3,386 Views)

My computer is a 2.00GHz, with 2.00GB of RAM.  Smiley Surprised  Would I need a more powerful processing computer to accomplish this task? 


That's actually an "average" computer these days, and hardly a powerhouse. As I indicated, you're trying to deal with over 13 million points. Will more RAM help? I don't really know about the innards of the power spectrum VIs to say how much of an impact more RAM will have. Keep in mind that you need to deal with a contiguous chunk of memory. So, it's quite likely that you would simply be patching the problem rather than solving it.
0 Kudos
Message 7 of 7
(3,350 Views)