Set the oscillation information.
Ret = GenSetOscillation ( AppId , OscillationType , OscillationStart , OscillationStop )
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#: short ] [ Python: ctypes.c_ushort ]
Specify 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#: short ] [ Python: ctypes.c_ushort ]
Specify the number of oscillations used for conversion.
OscillationStop [ VB.NET: Single ] [ C++: float ] [ C#: float ] [ Python: ctypes.c_float ]
Specify the stop wave number or stop time used for conversion.
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_OSCILLATION_TYPE |
20006 |
Oscillation type is outside the settable range. |
GEN_ERR_OSCILLATION_WAVENUM |
20007 |
Number of oscillations is outside the settable range. |
GEN_ERR_OSCILLATION_STOP_WAVENUM |
20008 |
Number of stops or time is outside the settable range. |
GEN_ERR_OSCILLATION_DATANUM |
20009 |
Created data is outside the settable range. Please reduce the number of oscillation waveforms or reduce the stops. |
The others (See also: Error Code List)
OscillationType : 0 (None)
Set the oscillation information.
If the device is in operation, this function cannot be performed.
Set the conversion type auto burst, oscillation count 2, and stop wave number 1.
VB.NET |
Dim Ret As Integer Ret = GenSetOscilation(AppId, 1, 2, 1)
|
C++ |
long Ret; Ret = GenSetOscilation(AppId, 1, 2, 1);
|
C# |
int Ret; Ret = gen.SetOscilation(AppId, 1, 2, 1);
|
Python |
Ret = ctypes.c_long() Ret.value = cgen_api.GenSetOscillation(AppId, 1, 2, 1)
|