GenGetDeviceSetting


Function

Get the device settings.

Format

Ret = GenGetDeviceSetting ( AppId , AoChannels, Frequency, FrequencyType, FrequencyUnit )

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

Return the channel number.

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

Return the frequency.

 

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

Return the type.

Value

[Dec]

Macro

Description

0

GEN_PARAM_FREQTYPE_FREQUENCY

Frequency

1

GEN_PARAM_FREQTYPE_PERIOD

Period

 

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

Return the unit.

Value

[Dec]

Macro

Description

0

GEN_PARAM_FREQUNIT_HZ_SEC

Frequency [ Hz ], Period [ sec ]

1

GEN_PARAM_FREQUNIT_KHZ_MSEC

Frequency [ kHz ], Period [ msec ]

Return Value

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

Definition

Return Value

Description

GEN_ERR_SUCCESS

0

Normal completed

The others (See also: Error Code List)

Remarks

Get the set frequency and number of channels.
The unit of the frequency value can be confirmed from the third and fourth parameters.

Example

Get the number of channels, frequency, frequency type, and frequency units.

VB.NET

Dim Ret As Integer

Dim AoChannels As Short

Dim Freuency As Single

Dim FrequencyType As Short

Dim FrequencyUnit As Short

Ret = GenGetDeviceSetting(AppId, AoChannels, Frequency, FrequencyType, FrequencyUnit)

 

C++

long Ret;

short AoChannels;

float Frequency;

short FrequencyType;

short FrequencyUnit;
Ret = GenGetDeviceSetting(AppId, &AoChannels, &Frequency, &FrequencyType, &FrequencyUnit);

 

C#

int Ret;

short AoChannels;

float Freuency;

short Frequency;

short FrequencyUnit;

Ret = gen.GetDeviceSetting(AppId, out AoChannels, out Frequency, out FrequencyType, out FrequencyUnit);

 

Python

Ret = ctypes.c_long()
AoChannels = ctypes.c_ushort(1)

Frequency = ctypes.c_float(1.0)

FrequencyType = ctypes.c_ushort(0)

FrequencyUnit = ctypes.c_ushort(0)

Ret.value = cgen_api.GenGetDeviceSetting(AppId, ctypes.byref(AoChannels), ctypes.byref(Frequency), ctypes.byref(FrequencyType), ctypes.byref(FrequencyUnit))

 

See Also

GenSetDeviceSetting