WinDaq Control > Methods > DigitalOutput

Previous | Next

DigitalOutput

Applies to:

WINDAQ Active X Control

Description:

Output digital pattern if available. This is an immediate function that writes (outputs) a 16 bit integer to the digital output port. If using parallel port interface (ethernet), the lower 8 bits of the output number will go to the non-MUX connector. If using a USB device, the lower 8 bits goes to the MUX connector. See also Digital In and Out Locations for complete information.

Syntax:

WinDaq1.DigitalOutput(Data) (where Data is a 16-bit integer value to be sent to the digital output port)

Variable:

Integer

Example:

Dim sw As Boolean

 

Private Sub Command2_Click()

Timer1.Enabled = False

Timer2.Enabled = False

End Sub

 

Private Sub Command1_Click()

WinDaq. Start

Timer1.Enabled = True

Timer2.Enabled = True

End Sub

 

Private Sub Timer1_Timer()

'Send out the square wave according to Timer interrupt.

'You can reach around 20Hz update rate here.

If sw = True Then

'sets digital ports to off

    WinDaq.DigitalOutput (0)

Else

'sets digital ports to on

    WinDaq.DigitalOutput (32767)

End If

sw = Not sw

End Sub

 

Private Sub Timer2_Timer()

DQChart1. Chart (WinDaq. GetDataFrame(DQChart1. Xmax, FormatBinary))

End Sub

 

Private Sub WinDaq_ WinDaqExit()

WinDaq. Stop

Timer1.Enabled = False

Timer2.Enabled = False

End Sub

 

Reference Materials | Top