Set channel information for the specified channel number.
Ret = SetChannelSetting (AoChannel, Amplitude, Offset, AmplitudeType, AmplitudeUnit, Duty, Phase, Arg1)
AoChannel [ VB.NET : Short ] [ C++ : short ] [ C# : short ]
Specify the channel number.
Amplitude [ VB.NET : Single ] [ C++ : float ] [ C# : float ]
Specify the amplitude.
Offset [ VB.NET : Single ] [ C++ : float ] [ C# : float ]
Specify the offset.
AmplitudeType [ VB.NET : Short ] [ C++ : short ] [ C# : short ]
Specify the type.
0 |
Amplitude |
1 |
Vp-p |
AmplitudeUnit [ VB.NET : Short ] [ C++ : short ] [ C# : short ]
Specify the unit.
0 |
If the device is voltage, it will be "V". If the device is current, it will be "mA". |
1 |
LSB |
Duty [ VB.NET : Single ] [ C++ : float ] [ C# : float ]
Specify the duty ratio.
Please specify a value between 0 and 100.
Phase [ VB.NET : Single ] [ C++ : float ] [ C# : float ]
Specify the phase.
Please specify a value between -360 and 360.
Arg1 [ VB.NET : Short ] [ C++ : short ] [ C# : short ]
Specify the address of the reserved area. 0 is fixed (reserved)
Ret [ VB.NET : Integer ] [ C++ : long ] [ C# : int ]
Return Value |
Description |
0 |
Normal completed |
10006 |
Cannot execute because the device is in operation. |
22001 |
Amplitude is outside the settable range. |
22002 |
Offset is outside the settable range. |
22002 |
Channel number is outside the settable range. |
22003 |
Frequency is outside the settable range. |
22004 |
Frequency type is outside the settable range. |
22005 |
Frequency unit is outside the settable range. |
22006 |
Oscillation type is outside the settable range. |
The others (See also: Error Code List)
Amplitude: 10 [V or mA]
Offset: 0 [V or mA]
Duty ratio: 50 [%]
Phase: 0 [degree]
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.
If the device is in operation, this function cannot be performed.
Enter amplitude 10 [V or mA], offset 0 [V or mA], duty ratio 50[%], and phase 0 [degrees] to channel 0.
VB.NET |
Dim Ret As Long Ret = c_fgen.SetChannelSetting(0, 10, 0, 0, 0, 50, 0, 0)
|
C++ |
long Ret; ICWaveformGeneratorPtr c_fgen; Ret = c_fgen->SetChannelSetting(0, 10, 0, 0, 0, 50, 0, 0);
|
C# |
int Ret; Ret = c_fgen.SetChannelSetting(0, 10, 0, 0, 0, 50, 0, 0);
|