DataqSdk Control > Methods > DAOutput

Previous | Next

DAOutput

Applies to:

DATAQSDK Active X Control

Description:

This is an immediate function that allows you to send a 2’s complement, left-justified value to the DAC port. This sends one signal to the DAC port. To determine what number to send in terms of volts see Converting Counts to Volts.

Using the Simplified formula we would get something similar to the following:

If the full scale range is +/-10 and the desired voltage reading to send to the DAC port is 5.

Voltage = FullScaleRange*ADReading/32768

5 = 10*ADReading/32768

ADReading = 16384

This method is not available when using DI-145, DI-149, DI-155, DI-194, DI-154, DI-195B, DI-148, DI-158, DI-245, DI-1100, DI-1110, DI-1120, DI-2008, DI-2108, DI-2108-P, DI-4108, DI-4208, DI-4718B, and all DI-71x series devices.

Syntax:

DataqSdk1.DAOutput value,port(where value is a 2’s complement, left-justified integer and port is either 0 for DAC1 or 1 for DAC2)

Example:

Private Sub DataqSdk1_ NewData(ByVal Count As Integer)

DQChart1. Chart (DataqSdk1.GetData)

'this sends a 5 volt signal (if your full scale range is +/-10) to DAC2

DataqSdk1.DAOutput 16384,1

End Sub

 

Private Sub Start_Click()

DataqSdk1. EventPoint = 20

DataqSdk1. Start

End Sub

 

Private Sub Stop_Click()

DataqSdk1. Stop

End Sub

 

Reference Materials | Top