quanser.hardware.hil.set_analog_input_ranges quanser.hardware.hil.set_card_specific_options navigation bar

Table of Contents

quanser.hardware.hil.set_analog_output_ranges

Sets the voltage ranges of the specified analog output channels.

Syntax

err = board.set_analog_output_ranges(channels, minimums, maximums)
    

Description

Sets the voltage ranges of the specified analog output channels. The voltages ranges are specified as a vector of minimum and maximum voltages, with the range for a particular element in the channel vector being indicated by the corresponding elements in the minimum and maximum vectors.

Only voltage ranges supported by the board may be specified. Invalid ranges will generate an error.

If no err output is provided then it throws an exception if an error occurs. In generated code it prints the error message. Use hil_get_error_message to get the message associated with an error code.

Parameters

board

The board instance returned by the quanser.hardware.hil.open function.

channels

A vector of channel numbers. Channel numbers are zero-based.

Select a board type from the list for board-specific details: .

minimums

A vector of voltages indicating the minimum voltage for the corresponding channel. There must be one element for each element in the channels vector.

maximums

A vector of voltages indicating the maximum voltage for the corresponding channel. There must be one element for each element in the channels vector.

Outputs

err

A negative error code or zero on success.

Examples

% Set channel 0 to bipolar 10V, channel 3 to unipolar 10V and channel 4 to bipolar 5V
board.set_analog_output_ranges([0 3 4], [-10 0 -5], [10, 10, 5]);
    

See Also

 

navigation bar