Get the channel settings except for sweep and waveform settings.
Ret = GenGetChannelSetting ( AppId , AoChannel , Amplitude , Offset , AmplitudeType , AmplitudeUnit , Duty , Phase )
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.
Amplitude [ VB.NET: Single ] [ C++: float * ] [ C#: out float ] [ Python: ctypes.POINTER(ctypes.c_float) ]
Return the amplitude.
Offset [ VB.NET: Single ] [ C++: float * ] [ C#: out float ] [ Python: ctypes.POINTER(ctypes.c_float) ]
Return the offset.
AmplitudeType [ VB.NET: Short ] [ C++: short * ] [ C#: out short ] [ Python: ctypes.POINTER(ctypes.c_ushort) ]
Return the type.
Value [Dec] |
Macro |
Description |
0 |
GEN_PARAM_AMPTYPE_AMPLITUDE |
Amplitude |
1 |
GEN_PARAM_AMPTYPE_VPP |
Vp-p |
AmplitudeUni [ VB.NET: Short ] [ C++: short * ] [ C#: out short ] [ Python: ctypes.POINTER(ctypes.c_ushort) ]
Return the unit.
Value [Dec] |
Macro |
Description |
0 |
GEN_PARAM_AMPUNIT_V_MA |
If the device is voltage, it will be "V". If the device is current, it will be "mA". |
1 |
GEN_PARAM_AMPUNIT_BINARY |
LSB |
Duty [ VB.NET: Single ] [ C++: float * ] [ C#: out float ] [ Python: ctypes.POINTER(ctypes.c_float) ]
Return the duty ratio.
Phase [ VB.NET: Single ] [ C++: float * ] [ C#: out float ] [ Python: ctypes.POINTER(ctypes.c_float) ]
Return the phase.
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)
Set the amplitude, duty ratio, offset, and
phase.
Some parameters may not be used depending on the selected waveform type.
If there are multiple errors in the settings, the error with the earliest
parameter number will be displayed preferentially as the return value.
This function can be executed even if the device is in operation.
Get the amplitude, offset, amplitude type, amplitude unit, duty ratio, and phase of channel 0.
VB.NET |
Dim Ret As Integer Dim Amplitude As Single Dim Offset As Single Dim AmplitudeType As Short Dim AmplitudeUnit As Short Dim Duty As Single Dim Phase As Single Ret = GenGetChannelSetting(AppId, 0, Amplitude, Offset, AmplitudeType, AmplitudeUnit, Duty, Phase)
|
C++ |
long Ret; float Amplitude; float Offset; short AmplitudeType; short AmplitudeUnit; float Duty; float Phase; Ret = GenGetChannelSetting(AppId, 0, &Amplitude, &Offset, &AmplitudeType, &AmplitudeUnit, &Duty, &Phase);
|
C# |
int Ret; float Amplitude; float Offset; short AmplitudeType; short AmplitudeUnit; float Duty; float Phase; Ret = gen.GetChannelSetting(AppId, 0, out Amplitude, out Offset, out AmplitudeType, out AmplitudeUnit, out Duty, out Phase);
|
Python |
Ret = ctypes.c_long() AmplitudeUnit = ctypes.c_ushort Duty = ctypes.c_float Ret.value = cgen_api.GenGetChannelSetting(AppId, 0, ctypes.byref(Amplitude), ctypes.byref(Offset), ctypes.byref(AmplitudeType), ctypes.byref(AmplitudeUnit), ctypes.byref(Duty), ctypes.byref(Phase))
|