LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

size of RAM

Hello. I'd like to find a VI that returns size of RAM in the PC. Does anyone know?
0 Kudos
Message 1 of 11
(4,876 Views)
Hi,
you don't say what version of LabVIEW you're using, however, this is going to be a little dependent on OS - have a look at the following
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/memory/base/globalmemorystatus.asp

It returns information - you have to set up the appropriate cluster for the MemoryStatus, and use a call library function to the kernel32.dll to run the function, but you should be able to get out the information you need.

Hope that helps
If I can get it to work, I'll post it back here shortly

S.
// it takes almost no time to rate an answer Smiley Wink
0 Kudos
Message 2 of 11
(4,875 Views)
Here you go...

S.
// it takes almost no time to rate an answer Smiley Wink
Message 3 of 11
(4,875 Views)
If you are using Windows, there is a utility called System Info. It is part of the LVWUTIL libraries that are downloadable from NI. If you want it, do a search for it at the NI web site.
0 Kudos
Message 4 of 11
(4,875 Views)

Hi,

I am trying to find the RAM size of a IBM Blade server with 16GB RAM in it.  We have dual Opteron Processors on the Blade which are 64bit processors. The getMemoryInfo.vi works fine for 32 bit windows processors. When I use the same program in an IBM Blade server with Windows NT on it, it cannot show values above I32 range. Do you have any suggestions ?

Thanks in Advance.

~sambit~

0 Kudos
Message 5 of 11
(4,702 Views)

To the best of my knowledge...

The amount of memory available to an application is limited by;

1) The amount of physical memory in the machine and

2) The operating system

32 bit OS can only handle 4 Gig where 2 Gig is available to LV.

I believe you will have to go with a 64 bit OS and use LV8 (which is the first version of LV that supports 64 bit machines).

If someone knows otherwise please feel free to correct me!

Trying to help,

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 6 of 11
(4,698 Views)
Hi Ben,

we are using Windows NT 32 bit version and we are able to access 16GB of RAM. We use the Physical Address Extension feature available in Windows NT. the challenge is to read the RAM size ( upto 16GB ) programatically using LV 8.0 and a 32 bit OS

~sambit~
0 Kudos
Message 7 of 11
(4,681 Views)

Try using vbs script.

http://www.microsoft.com/technet/scriptcenter/scripts/default.mspx?mfr=true

Then go to hardware section, then memory.

Download scriptomatic 2.0 and you can run some sample scripts to see what you will get before writing labview code.

http://www.microsoft.com/technet/scriptcenter/tools/scripto2.mspx

Message 8 of 11
(4,672 Views)
Hi,

  I tried the scriptomatic - it looked a little complicated. I was able to solve the issue as follows:
the getmemoryinfo.vi file calls the GetMemoryStatus function linked to the kernel32.dll through a CIN - this GetMemoryStatus is a 32bit function call
luckily there is a function call GetMemoryStatusEx function in the kernel32.dll which is a 64bit function - specifically meant for 64bit processors. So all i had to do is change the datatype
of the function input n output in Getmemoryinfo.vi and change the function being called to GetMemoryStatusEx
It works fine to detect RAMs upto 16G

Thanks for the help Smiley Happy

~Sambit~
Message 9 of 11
(4,647 Views)

Thanks fo rthe update Sambit!

If you find that LV can make use of more than 2Gig, I'd really love to hear about that.

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 10 of 11
(4,636 Views)