Set the waveform type.
Ret = GenSetWaveType ( AppId , AoChannel , WaveType )
AppId [ VB.NET: Short ] [ C++: short ] [ C#: short ] [ Python: ctypes.c_short ]
Specify Application ID retrieved by GenOpenApplication.
AoChannel [ VB.NET: Short ] [ C++: short ] [ C#: short ] [ Python: ctypes.c_ushort ]
Specify the channel number.
WaveType [ VB.NET: Short ] [ C++: short ] [ C#: short ] [ Python: ctypes.c_ushort ]
Specify the waveform type.
Value [Dec] |
Macro |
Description |
0 |
GEN_PARAM_WAVE_SINE |
Sinewave |
1 |
GEN_PARAM_WAVE_CONSTANT |
Constant |
2 |
GEN_PARAM_WAVE_TRIANGLAR |
Triangular |
3 |
RGEN_PARAM_WAVE_RAMP |
Ramp |
4 |
GEN_PARAM_WAVE_SQUARE |
Square |
5 |
GEN_PARAM_WAVE_NOISE |
Noise |
6 |
GEN_PARAM_WAVE_ARBITRARY |
Arbitrary |
Ret [ VB.NET: Integer ] [ C++: long ] [ C#: int ] [ Python: ctypes.c_long ]
Definition |
Return Value |
Description |
GEN_ERR_SUCCESS |
0 |
Normal completed |
GEN_ERR_STARTED |
10006 |
Cannot execute because the device is in operation. |
GEN_ERR_CHANNEL_NO |
22000 |
Channel number is outside the settable range. |
GEN_ERR_WAVE_TYPE |
22007 |
Waveform type is outside the settable range. |
The others (See also: Error Code List)
Wave Type : 0 (Sinewave)
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.
Select the Sinewave for channel 0.
VB.NET |
Dim Ret As Integer Ret = GenSetWaveType(AppId, 0, 0)
|
C++ |
long Ret; Ret = GenSetWaveType(AppId, 0, 0);
|
C# |
int Ret; Ret = gen.SetWaveType(AppId, 0, 0);
|
Python |
Ret = ctypes.c_long() Ret.value = cgen_api.GenSetWaveType(AppId, 0, 0)
|