Data Acquisition Toolbox | ![]() ![]() |
Configure or display device object properties
Syntax
set(obj)
props = set(obj)
set(obj,'
PropertyName
')
props = set(obj,'
PropertyName
')
set(obj,'
PropertyName
',PropertyValue,...)
set(obj,PN,PV)
set(obj,S)
Arguments
Description
displays all configurable properties for set(obj)
obj
. If a property has a finite list of possible string values, then these values are also displayed.
returns all configurable properties to props = set(obj)
props
. props
is a structure array with fields given by the property names, and possible property values contained in cell arrays. if the property does not have a finite set of possible values, then the cell array is empty.
displays the valid values for the property specified by set(obj,'
PropertyName
')
PropertyName
. PropertyName
must have a finite set of possible values.
returns the valid values for props = set(obj,'
PropertyName
')
PropertyName
to props
. props
is a cell array of possible values or an empty cell array if the property does not have a finite set of possible values.
sets multiple property values with a single statement. Note that you can use structures, property name/property value string pairs, and property name/property value cell array pairs in the same call to set(obj,'
PropertyName
',PropertyValue,...)
set
.
sets the properties specified in the cell array of strings set(obj,PN,PV)
PN
to the corresponding values in the cell array PV
. PN
must be a vector. PV
can be m-by-n where m is equal to the specified number of device objects, channels, or lines and n is equal to the length of PN
.
where set(obj,S)
S
is a structure whose field names are device object properties, sets the properties named in each field name with the values contained in the structure.
Remarks
If you use the help
command to display the M-file help for set
, then you must supply the pathname shown below.
Example
Create the analog input object ai
for a sound card and configure it to operate in stereo mode.
To display all of ai
's configurable properties and their valid values:
To set the value for the SampleRate
property to 10000:
The following two commands set the value for the SampleRate
and InputType
properties using one call to set
.
set(ai,'SampleRate',10000,'TriggerType','Manual') set(ai,{'SampleRate','TriggerType'},{10000,'Manual'})
You can also set different channel property values for multiple channels.
Functions
![]() | save | setverify | ![]() |