Writescandata() parameters, Internal buffer – Measurement Computing DAQFlex User Guide User Manual
Page 23
DAQFlex Software User's Guide
Using DAQFlex Software
23
catch (Exception ex)
{
Console.WriteLine(ex.Message);
}
VB
Try
Dim ScanData As Double(,)
Dim Names As String()
Dim Device As DaqDevice
Dim TimeOut As Integer
Names = DaqDeviceManager.GetDeviceNames(DeviceNameFormat.NameAndSerno)
Device = DaqDeviceManager.CreateDevice(Names(0))
Device.SendMessage("AOSCAN:LOWCHAN=0")
Device.SendMessage("AOSCAN:HIGHCHAN=0")
Device.SendMessage("AOSCAN:RATE=1000")
Device.SendMessage("AOSCAN:SAMPLES=5000")
Device.SendMessage("AOSCAN:BUFSIZE=5000")
int TimeOut = 0
Device.WriteScanData(ScanData, 5000, TimeOut)
Device.SendMessage("AOSCAN:START")
Catch ex As Exception
Console.WriteLine(ex.Message)
End Try
WriteScanData() parameters
The first parameter to the
WriteScanData
method is the array containing the output scan data.
The second parameter is the number of samples to write.
The last parameter is a timeout value in milliseconds.
The WriteScanData method is synchronous, and will return when the number of samples specified have
been written to the device’s output buffer.
Each time the WriteScanData method is called, the data is written to an internal buffer starting at the
point after the last sample was written. When an output scan completes or is stopped, the write index is
reset to the beginning of the buffer.
Internal buffer