Measurement-computing DAQFlex User Guide Manual do Utilizador Página 23

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 125
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 22
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
Vista de página 22
1 2 ... 18 19 20 21 22 23 24 25 26 27 28 ... 124 125

Comentários a estes Manuais

Sem comentários