Function
Converts the specified channel one time, the conversion data are returned in binary value.
Format
Ret = dncDaq01.AiInputChannel(DeviceNo, Channel, AiData)
Parameters
DeviceNo [ C#: short ] [ VB.NET: Short ]
Specifies the device No. managed by DncDaq.
Channel [ C#: short ] [ VB.NET: Short ]
Specifies the channel to be converted.
AiData [ C#: out int ] [ VB.NET: Integer ]
Specifies the address of the variable that stores the converted data. The converted data are stored in binary value.
Resolution of device is 10 bit |
0 to 1023 |
Resolution of device is 12 bit |
0 to 4095 |
Resolution of device is 16 bit |
0 to 65535 |
Return value
Ret [ C#: int ] [ VB.NET: Integer ]
■Common
Value |
Description |
0 |
Normality completion |
500001 |
The method on an unconfigured device has been called. Check the device settings. |
500002 |
The method was called that the device does not support. |
510001 |
The input parameter is invalid. Check the parameter contents. |
■AIO Devices
Value |
Description |
11420 |
The value of Channel is outside the designated
range of the function |
11421 |
Pointer to AiData is NULL |
20002 |
Cannot run because the device is running |
21420 |
The value of Channel is outside the designated range of the device being used |
21423 |
The channel which isn't being used for the conversion is specified |
Other errors (see: Error code details)
Remarks
This method cannot be used on devices without
the analog input function.
This method cannot be executed if the device is operating in continuous
mode.
Example
Converts Channel 0 one time.
C# |
int Ret;
|
VB.NET |
Dim Ret As Integer
|