Function
Reads the count value of the specified channel.
Format
ret = dncDaq01.CntReadCount(DeviceNo, Channel, ChannelNum, CntData)
Parameters
DeviceNo [ C#: short ] [ VB.NET: Short ]
Specifies the device number managed by DncDaq.
Channel [ C#: short[] ] [ VB.NET: Short() ]
Specifies the channel number to read the count value in an array.
ChannelNum [ C#: short ] [ VB.NET: Short ]
Specifies the number of channels.
CntData [ C#: out uint[] ] [ VB.NET: UInteger() ]
Specifies an array to store count values.
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. |
Other errors (See also: Error code details)
Remarks
It cannot be used with devices that do not have a counter input function.
Example
Reads the count value of channels 0 to 2.
C# |
int Ret uint[] CntData = new uint[2]; Channel[0] = 0; Channel[1] = 1;
|
VB.NET |
Dim Ret As Integer Dim CntData(1) As UInteger Channel(0) = 0 Channel(1) = 1 Channel(2) = 2
|