Measurement-computing DAQFlex User Guide Manuel d'utilisateur Page 23

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 125
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 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
Vue de la page 22
1 2 ... 18 19 20 21 22 23 24 25 26 27 28 ... 124 125

Commentaires sur ces manuels

Pas de commentaire