DiInputBit


Function

 

Performs the specified 1-bit digital input.

 

Format

 

Ret = dncDaq01.DiInputBit(DeviceNo, DiBit, DiData)

 

Parameters

 

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

Specifies the device No. managed by DncDaq.

 

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

Specifies the logical input bit number.
The logical input bit number is a number, which is assigned from the first input bit of a device as 0 to the last one consecutively.

 

DiData [ C#: out byte ] [ VB.NET: Byte ]  

Specifies the address of the variable that stores the input data.

 

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

24000

The value of DiBit is outside the range of the device being used.

 

■DIO Devices

Value

Description

20102

The bit number exceeds the specifiable range.

Other errors (see: Error code details)

 

Remarks

 

Inputs a bit from an input port. The returned bit data is either 0 or 1.

 

Example

 

Inputs data from bit 0.

C#

int  Ret;
byte Data;

ret = dncDaq01.DiInputBit(DeviceNo, 0, out Data);

 

VB.NET

Dim Ret As Integer
Dim Data As Byte

Ret = dncDaq01.DiInputBit(DeviceNo, 0, Data)