WinDaq Control > Methods > DAOutput

Previous | Next

DAOutput

Applies to:

WINDAQ Active X Control

Description:

Sends a single signal to the digital-to-analog (DAC) port if available. The DAC ports (if available) are labelled on your hardware device as DAC1 (Port 0) or DAC2 (Port 1). There are two parameters for this function:

The first parameter is the signal you would like to send to the DAC port. This value can be +/-10.

The second parameter is the port you are sending the signal to. This can be either 0 or 1. 0 sends the signal to DAC1 (Port 0) and 1 sends the signal to DAC2 (Port 1).

Syntax:

WinDaq1.DAOutput(Data,Port) (where Data is between 10V and -10V and Port is either 0 for Port 0 (DAC1) or 1 for Port 1 (DAC2))

Variables:

Double

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()

'sends out a square wave according to Timer interrupt

'you can reach around 20Hz update rate here

If sw = True Then

    WinDaq.DAOutput Text1.Text, 1

    WinDaq.DAOutput Text1.Text, 0

Else

    WinDaq.DAOutput Text2.Text, 1

    WinDaq.DAOutput Text2.Text, 0

End If

sw = Not sw

End Sub

 

Private Sub Timer2_Timer()

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

End Sub

 

Reference Materials | Top