Products & Services Solutions Academia Support User Community Company

Learn more about Data Acquisition Toolbox   

daqmem - Allocate or display analog input and output memory resources

Syntax

out = daqmem
out = daqmem(obj)
daqmem(obj,maxmem)

Arguments

obj

A device object or array of device objects.

maxmem

The amount of memory to allocate.

out

A structure containing information about memory resources.

Description

out = daqmem returns the object out, which contains several properties describing the memory resources associated with your platform and the Data Acquisition Toolbox. The fields are described below.

Field

Description

MemoryLoad

Specifies a number between 0 and 100 that gives a general idea of current memory utilization. 0 indicates no memory use and 100 indicates full memory use.

TotalPhys

Indicates the total number of bytes of physical memory.

AvailPhys

Indicates the number of bytes of physical memory available.

TotalPageFile

Indicates the total number of bytes that can be stored in the paging file. Note that this number does not represent the actual physical size of the paging file on disk.

AvailPageFile

Indicates the number of bytes available in the paging file.

TotalVirtual

Indicates the total number of bytes that can be described in the user mode portion of the virtual address space of the calling process.

AvailVirtual

Indicates the number of bytes of unreserved and uncommitted memory in the user mode portion of the virtual address space of the calling process.

UsedDaq

The total memory used by all device objects.

Note that all the above fields, except for UsedDaq, are identical to the fields returned by Windows' MemoryStatus function.

out = daqmem(obj) returns a 1-by-N structure out containing two fields: UsedBytes and MaxBytes for the device object obj. N is the number of device objects specified by obj. UsedBytes returns the number of bytes used by obj. MaxBytes returns the maximum number of bytes that can be used by obj.

daqmem(obj,maxmem) sets the maximum memory that can be allocated for obj to the value specified by maxmem.

Remarks

More About Allocating and Displaying Memory Resources

Examples

Create the analog input object aiwin for a sound card and the analog input object aini for a National Instruments board, and add two channels to each device object.

aiwin = analoginput('winsound');
addchannel(aiwin,1:2);
aini = analoginput('nidaq','Dev1');
addchannel(aini,0:1);

To display the total memory used by all existing device objects:

out = daqmem;
out.UsedDaq
ans =
       69120

To configure the maximum memory used by aiwin to 640 KB:

daqmem(aiwin,640000)

To configure the maximum memory used by each device object with one call to daqmem:

daqmem([aiwin aini],[640000 480000])

See Also

Properties

BufferingConfig, MaxSamplesQueued

  


Recommended Products

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.

 © 1984-2009- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS