| Data Acquisition Toolbox™ | ![]() |
Actual = setverify(obj,'PropertyName',PropertyValue) Actual = setverify(obj.Channel(index),'PropertyName',PropertyValue) Actual = setverify(obj.Line(index),'PropertyName',PropertyValue)
obj | A device object or array of device objects. |
'PropertyName' | A property name. |
PropertyValue | A property value. |
obj.Channel(index) | One or more channels contained by obj. |
obj.Line(index) | One or more lines contained by obj. |
Actual | The actual value for the specified property. |
Actual = setverify(obj,'PropertyName',PropertyValue) sets PropertyName to PropertyValue for obj, and returns the actual property value to Actual.
Actual = setverify(obj.Channel(index),'PropertyName',PropertyValue) sets PropertyName to PropertyValue for the channels specified by index, and returns the actual property value to Actual.
Actual = setverify(obj.Line(index),'PropertyName',PropertyValue) sets PropertyName to PropertyValue for the lines specified by index, and returns the actual property value to Actual.
setverify is equivalent to the commands
set(obj,'PropertyName',PropertyValue) Actual = get(obj,'PropertyName')
Using setverify is not required for setting property values, but it does provide a convenient way to verify the actual property value set by the data acquisition engine.
setverify is particularly useful when setting the SampleRate, InputRange, and OutputRange properties because these properties can only be set to specific values accepted by the hardware. You can use the propinfo function to obtain information about the valid values for these properties.
If a property value is specified but does not match a valid value, then
If the specified value is within the range of supported values,
For the SampleRate and InputRange properties, the value is automatically rounded up to the next highest supported value.
For all other properties, the value is automatically selected to be the nearest supported value.
If the value is not within the range of supported values, an error is returned and the current property value remains unchanged.
Create the analog input object ai for a National Instruments AT-MIO-16DE-10 board, add eight hardware channels to it, and set the sample rate to 10,000 Hz using setverify.
ai = analoginput('nidaq','Dev1');
ch = addchannel(ai,0:7);
ActualRate = setverify(ai,'SampleRate',10000);Suppose you use setverify to set the input range for all channels contained by ai to -8 to 8 volts.
ActualInputRange = setverify(ai.Channel,'InputRange',[-8 8]);
The InputRange value was actually rounded up to -10 to 10 volts.
ActualInputRange{1}
ans =
-10 10InputRange, OutputRange, SampleRate
![]() | set | showdaqevents | ![]() |
| © 1984-2009- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |