SetWaveType


Function

Set the waveform type.

Format

Ret = SetWaveType (AoChannel, WaveType, Arg1)

Parameters

AoChannel [ VB.NET : Short ] [ C++ : short ] [ C# : short ]

Specify the channel number.

 

WaveType [ VB.NET : Short ] [ C++ : short ] [ C# : short ]

Specify the waveform type.

0

Sinewave

1

Constant

2

Triangular

3

Ramp

4

Square

5

Noise

6

Arbitrary

Arg1 [ VB.NET : Short ] [ C++ : short ] [ C# : short ]

Fixed to 0. (Reserved)

Return Value

Ret [ VB.NET : Integer ] [ C++ : long ] [ C# : int ]

Return Value

Description

0

Normal completed

10006

Cannot execute because the device is in operation.

22000

Channel number is outside the settable range.

22007

Waveform type is outside the settable range.

The others (See also: Error Code List)

Initial Value

Wave Type : 0 (Sinewave)

Remarks

If the waveform type is other than arbitrary, please set the amplitude etc. using SetChannelSettng.

Depending on the selected waveform type, some parameters of the SetChannelSetting settings may not be used.

If the waveform type is arbitrary, specify the data to be output using SetArbitaryDataFile.

If the device is in operation, this function cannot be performed.

Example

Select the Sinewave for channel 0.

VB.NET

Dim Ret As Long

Ret = c_fgen.SetWaveType(0, 0, 0)

 

C++

long Ret;

ICWaveformGeneratorPtr c_fgen;

Ret = c_fgen->SetWaveType(0, 0, 0);

 

C#

int Ret;

Ret = c_fgen.SetWaveType(0, 0, 0);

 

See Also

GetWaveType