Data Acquisition Toolbox
  Function/Property:
    Search    Help Desk 
setverify    Examples   See Also

Set and return the specified property value.

Syntax

Actual = setverify(obj, 'Property', Value)

Actual = setverify(obj.Channel(index), 'Property', Value)

Description

Actual = setverify(obj, 'Property', Value) sets Property to Value for obj and returns the actual property value to Actual.

Actual = setverify(obj.Channel(index), 'Property', Value) sets Property to Value for the channels specified by index and returns the actual property value to Actual.

setverify is equivalent to the commands

and is particularly useful when setting the SampleRate, InputRange, and OutputRange properties since these properties can only be set to 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 the closest supported value is automatically selected. If you try to set SampleRate to a value outside the range of supported values, then an error is returned and the current SampleRate value is unchanged.

Although using setverify is not required for setting property values, it does provide a convenient way to verify the actual property value set by the data acquisition engine.

Example

Sound Card

Suppose you create the analog input object ai for a sound card and add one channel to it.

To set the input range to -1 to 1 volts

If the input range was set to -2 to 2 volts, then depending on which sound card you are using, an error may be returned since most sound cards only support an input range of -1 to 1 volts.

National Instruments

Suppose you 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.

Suppose you use setverify to set the input range for all channels contained by ai to -8 to 8 volts.

you will see that InputRange was actually set to -10 to 10 volts, which is the closest valid value.

See Also

Functions

get, propinfo, set

Properties

InputRange, OutputRange, SampleRate



[ Previous | Help Desk | Next ]