GenGetOscillation


Function

Get the oscillation information.

Format

Ret = GenGetOscillation ( AppId , OscillationType , OscillationStart , OscillationStop )

Parameters

AppId [ VB.NET: Short ] [ C++: short ] [ C#: short ] [ Python: ctypes.c_short ]
Specify Application ID retrieved by GenOpenApplication.

OscillationType [ VB.NET : Short ] [ C++ : short * ] [ C# : out short ] [ Python: ctypes.POINTER(ctypes.c_ushort) ]

Return the oscillation type.

Value

[Dec]

Macro

Description

0

GEN_PARAM_OSCILLATION_NONE

None

1

GEN_PARAM_OSCILLATION_AUTO_BURST

Auto burst

2

GEN_PARAM_OSCILLATION_TRIGGER_BURST_RISE

Trigger burst(rising edge)

3

GEN_PARAM_OSCILLATION_TRIGGER_BURST_FALL

Trigger burst(falling edge)

OscillationStart  [ VB.NET: Short ] [ C++: short * ] [ C#: out short ] [ Python: ctypes.POINTER(ctypes.c_ushort) ]

Return the number of oscillations used for conversion.

OscillationStop [ VB.NET: Single ] [ C++: float * ] [ C#: out float ] [ Python: ctypes.POINTER(ctypes.c_float) ]

Return the stop wave number or stop time used for conversion.

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_OSCILLATION_TYPE

20006

Oscillation type is outside the settable range.

The others (See also: Error Code List)

Remarks

Get the oscillation information.
This function can be executed even if the device is in operation.

Example

Get the oscillation type, oscillation count, and stop wave number or stop time.

VB.NET

Dim Ret As Integer

Dim OscillationType As Short

Dim OscillationStart  As Short

Dim OscillationStop As Short

Ret = GenGetOscillation(AppId, OscilationType, OscillationStart , OscillationStop)

 

C++

long Ret;

short OscilationType;

short OscillationStart ;

float OscillationStop;

Ret = GenGetOscillation(AppId, &OscilationType, &OscillationStart , &OscillationStop);

 

C#

int Ret;

short OscilationType;

short OscillationStart ;

float OscillationStop;

Ret = gen.GetOscilation(AppId, out OscilationType, out OscillationStart , out OscillationStop);

 

Python

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

OscillationStart = ctypes.c_ushort

OscillationStop = ctypes.c_float

Ret.value = cgen_api.GenGetOscillation(AppId, ctypes.byref(OscillationType), ctypes.byref(OscillationStart), ctypes.byref(OscillationStop))

 

See Also

GenSetOscilation