DataqSdk Control > Properties > DigitalInput

Previous | Next

DigitalInput

Applies to:

DATAQSDK Active X Control

Description:

This is an immediate function that reads a word from the digital input port which defines the states of the bits (on or off). The value read from the digital input port depends on the device you use (how many bits are being read). A digital input reading of 255 means that bits 0 through 7 are on. See also Digital In and Out Locations.

This property is not available when using a DI-1100, DI-194, DI-195B or DI-154.

This property is not available when scanning.

Syntax:

variable=DataqSdk1.DigitalInput

Variable:

Long

Example:

Private Sub DataqSdk1_ NewData(ByVal Count As Integer)

DQChart1. Chart (DataqSdk1. GetData)

End Sub

 

Private Sub Start_Click()

DataqSdk1. EventPoint = 20

DataqSdk1. Start

'this reads the digital input and displays it at Label1.Caption

Label1.Caption=DataqSdk1.DigitalInput

End Sub

 

Private Sub Stop_Click()

DataqSdk1. Stop

End Sub

To set the direction of bidirectional bits see Setting Bidirectional Digital Bits.

 

Reference Materials | Top