GenGetWaveType


Function

Get the waveform type.

Format

Ret = GenGetWaveType ( AppId , AoChanne , WaveType )

Parameters

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#: out short ] [ Python: ctypes.POINTER(ctypes.c_ushort) ]

Return 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

Return Value

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

Definition

Return Value

Description

GEN_ERR_SUCCESS

0

Normal completed

GEN_ERR_CHANNEL_NO

22000

Channel number is outside the settable range.

The others (See also: Error Code List)

Remarks

Get the waveform type.
This function can be executed even if the device is in operation.

Example

Get the waveform type of channel 0.

VB.NET

Dim Ret As Integer

Dim WaveType As Short

Ret = GenGetWaveType(AppId, 0, WaveType)

 

C++

long Ret;

short WaveType;

Ret = GenGetWaveType(AppId, 0, &WaveType);

 

C#

int Ret;

short WaveType = 0;

Ret = gen.GetWaveType(AppId, 0, out WaveType);

 

Python

Ret = ctypes.c_long()
WaveType = ctypes.c_ushort

Ret.value = cgen_api.GenGetWaveType(AppId, 0, ctypes.byref(WaveType))

 

See Also

GenSetWaveType