CntPresetCount


Function

Presets the count value of the specified channel.

 

Format

ret = dncDaq01.CntPresetCount(DeviceNo, Channel, ChannelNum, PresetData)

 

Parameters

DeviceNo [ C#: short ] [ VB.NET: Short ]

Specifies the device number managed by DncDaq.

 

Channel [ C#: short[] ] [ VB.NET: Short() ]

Specifies the channel numbers to be preset in an array.

 

ChannelNum [ C#: short ] [ VB.NET: Short ]

Specifies the number of channels.

 

PresetData [ C#: uint[] ] [ VB.NET: UInteger() ]

Specifies the data to be preset in an array.

 

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

Presets the count value of channels 0 to 2.

C#

int   Ret
short[]  Channel = new short[2];

uint[] PresetData= new uint[2];

 

Channel[0] = 0;

Channel[1] = 1;

 

PresetData[0] = 1000;

PresetData[1] = 2000;



Ret = dncDaq01.CntPresetCount(DeviceNo, Channel, 2, PresetData);

 

VB.NET

Dim Ret As Integer
Dim Channel(1) As Short

Dim CntData(1) As UInteger

 

Channel(0) = 0

Channel(1) = 1

 

PresetData(0) = 1000

PresetData(1) = 2000


Ret = dncDaq01.CntPresetCount(DeviceNo, Channel, 2, PresetData)