Sets the ranges of the analog outputs.
Namespace:
Quanser.Hardware
Assembly:
Quanser.Hardware.Hil (in Quanser.Hardware.Hil.dll)
Syntax
Visual Basic (Declaration) |
---|
Public Sub SetAnalogOutputRanges ( _
channels As Integer(), _
minimums As Double(), _
maximums As Double() _
) |
C# |
---|
public void SetAnalogOutputRanges(
int[] channels,
double[] minimums,
double[] maximums
) |
Visual C++ |
---|
public:
void SetAnalogOutputRanges(
array<int>^ channels,
array<double>^ minimums,
array<double>^ maximums
) |
JavaScript |
---|
function setAnalogOutputRanges(channels, minimums, maximums); |
Parameters
- channels
- Type: array<
System..::.Int32
>[]()[]
An array containing the numbers of the analog output channels whose ranges will be configured.
Channel numbers are zero-based. Thus, channel 0 is the first channel, channel 1 the second channel, etc.
Select a board type from the list for board-specific details:
.
- minimums
- Type: array<
System..::.Double
>[]()[]
An array of doubles containing the minimum value of the output
range for the corresponding channel in the channels array. This
array must be the same size as the channels array.
- maximums
- Type: array<
System..::.Double
>[]()[]
An array of doubles containing the maximum value of the output
range for the corresponding channel in the channels array. This
array must be the same size as the channels array.
Remarks
Examples
This sample illustrates how to use the
SetAnalogOutputRanges(array<Int32>[]()[], array<Double>[]()[], array<Double>[]()[]) method.
It sets the range of analog output 0 to ±10V, the range of analog output 3 to 0..5V
and the range of output 5 to ±5V.
C# | Copy Code |
---|
int [] channels = { 0, 3, 5 };
double [] minimums = { -10, 0, -5 };
double [] maximums = { +10, 5, +5 };
board.SetAnalogOutputRanges(channels, minimums, maximums);
|
Visual Basic | Copy Code |
---|
Dim channels() As Integer = {0, 3, 5}
Dim minimums() As Double = {-10, 0, -5}
Dim maximums() As Double = {+10, 5, +5}
board.SetAnalogOutputRanges(channels, minimums, maximums)
|
Visual C++ | Copy Code |
---|
array<int>^ channels = { 0, 3, 5 };
array<double>^ minimums = { -10, 0, -5 };
array<double>^ maximums = { +10, 5, +5 };
board->SetAnalogOutputRanges(channels, minimums, maximums);
|
Exceptions
Exception | Condition |
---|
Quanser.Hardware..::.HilException |
If the output ranges cannot be configured then an exception is thrown. This situtation
typically arises if the card does not support programmable analog output ranges.
|
See Also