Assembly: Quanser.Hardware.Hil (in Quanser.Hardware.Hil.dll)
Syntax
Visual Basic (Declaration) |
---|
Public Sub ReadOtherWriteOther ( _ inputChannels As Integer(), _ outputChannels As Integer(), _ inputValues As Double(), _ outputValues As Double() _ ) |
C# |
---|
public void ReadOtherWriteOther( int[] inputChannels, int[] outputChannels, double[] inputValues, double[] outputValues ) |
Visual C++ |
---|
public: void ReadOtherWriteOther( array<int>^ inputChannels, array<int>^ outputChannels, array<double>^ inputValues, array<double>^ outputValues ) |
JavaScript |
---|
function readOtherWriteOther(inputChannels, outputChannels, inputValues, outputValues); |
Parameters
- inputChannels
- Type: array<
System..::.Int32
>[]()[]
An array containing the numbers of the other input channels to be read. Channel numbers are zero-based. Thus, channel 0 is the first channel, channel 1 the second channel, etc.
Select a board type to the list for board-specific details: .
- outputChannels
- Type: array<
System..::.Int32
>[]()[]
An array containing the numbers of the other output channels to be written. Channel numbers are zero-based. Thus, channel 0 is the first channel, channel 1 the second channel, etc.
Select a board type to the list for board-specific details: .
- inputValues
- Type: array<
System..::.Double
>[]()[]
An array for receiving the values read from the other inputs. Each element in the inputValues array corresponds to the same element in the inputChannels array. Hence, there must be as many elements in the inputValues array as there are channels.
- outputValues
- Type: array<
System..::.Double
>[]()[]
An array containing the values to write to the other outputs. Each element in the outputValues array corresponds to the same element in the outputChannels array. Hence, there must be as many elements in the outputValues array as there are channels.
Remarks
The ReadOtherWriteOther method reads from the specified other input channels and writes to the specified other output channels immediately, in a single method call. The write operation occurs immediately following the read operation. Since the read-write operation occurs at the lowest level the read and write occur virtually concurrently. The method does not return until the data has been read and written.
Examples
C# | Copy Code |
---|---|
int [] inputChannels = { 0, 1, 2, 3 }; int [] outputChannels = { 0, 1 }; double [] inputBuffer = new double [inputChannels.Length]; double [] outputBuffer = { 0.5, 1.5 }; card.ReadOtherWriteOther(inputChannels, outputChannels, inputBuffer, outputBuffer); |
Visual Basic | Copy Code |
---|---|
Dim inputChannels() As Integer = {0, 1, 2, 3} Dim outputChannels() As Integer = {0, 1} Dim inputBuffer(inputChannels.Length - 1) As Double Dim outputBuffer() As Double = {0.5, 1.5} card.ReadOtherWriteOther(inputChannels, outputChannels, inputBuffer, outputBuffer) |
Visual C++ | Copy Code |
---|---|
array<int>^ inputChannels = { 0, 1, 2, 3 }; array<int>^ outputChannels = { 0, 1 }; array<double>^ inputBuffer = gcnew array<double>(inputChannels->Length); array<double>^ outputBuffer = { 0.5, 1.5 }; card->ReadOtherWriteOther(inputChannels, outputChannels, inputBuffer, outputBuffer); |
Exceptions
Exception | Condition |
---|---|
Quanser.Hardware..::.HilException | If the read or write cannot be performed then an exception is thrown. This situtation typically arises if the board does not support this method or other input or other output channels. |