WinDaq Control > Methods > GetBinaryData

Previous | Next

GetBinaryData

Applies to:

WINDAQ Active X Control

Description:

Get the latest single reading of the specified channel returned in binary format. To retrieve the latest reading in scaled units (i.e., volts or any other calibrated engineering unit) use GetScaledData.

The channel is the logical channel in the index on the channel list, not the physical channel. For example, if the channel list is 1, 5, 8, 9, 10, and you want the binary value of channel 8, you would set the channel argument of GetBinaryData to 2. If you want the binary value of channel 1, you would set the channel argument of GetBinaryData to 0.

For WinDaq Acquisition Software versions 3.16 and above:

If Channel = -1, it returns the handle of Windaq it connected to.

If Channel = -2, it returns the model number of device it uses.

 

Syntax:

WinDaq1.GetBinaryData(Channel)

Variable:

Integer

Example:

Private Sub Stop_Click()

WinDaq1. Stop

End Sub

 

Private Sub Start_Click()

WinDaq1. EventLevel = 10

WinDaq1. Start

End Sub

 

Private Sub WinDaq1_ NewData(ByVal Count As Integer)

DQChart1. Chart (WinDaq1. GetDataStream(FormatBinary))

'this gets information associated with the first channel

Label1.Caption = "The latest binary data reading is " & WinDaq1.GetBinaryData(0)

Label2.Caption = "The positive full scale limit is " & WinDaq1. GetMaxLimit(0)

Label3.Caption = "The negative full scale limit is " & WinDaq1. GetMinLimit(0)

Label4.Caption = "The channel as labelled on your hardware device is " & WinDaq1. GetPhysicalChannel(0)

Label5.Caption = "The latest reading in scaled engineering units is " & Format(WinDaq1. GetScaledData(0), "0.00") & WinDaq1. GetUnit

End Sub

 

Reference Materials | Top