Measurement-computing DAQFlex User Guide Uživatelský manuál Strana 28

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 125
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 27
DAQFlex Software User's Guide DAQFlex Software Reference
28
DaqDevice.WriteScanData()
Outputs scan data.
C#:
void WriteScanData(double[,] scanData, int numberOfSamplesPerChannel,
int timeOut);
VB:
Sub WriteScanData(ByVal ScanData(,) As Double, ByVal
NumberOfSamplesPerChannel As Integer, ByVal TimeOut As Integer)
Parameter
scanData
Array of data samples to output.
numberOfSamplesPerChannel
The number of data samples per channel to transfer from the scanData array to the device's output
buffer.
timeOut
The number of milliseconds to wait for available space in the buffer to write to. This only takes
effect when an output scan is running.
Remarks
WriteScanData may be called while a scan is running. However, the maximum number of total
samples must be less than or equal to half the number of samples for which the buffer is allocated.
Set the buffer size with the "AOSCAN:BUFSIZE" message.
DaqDevice.EnableCallback()
Enables a user-defined callback method to be invoked when a certain condition is met.
C#:
void EnableCallback(ErrorCodes errorCode, InputScanCallbackDelegate
callback, CallbackType callbackType, Object callbackData
VB:
Sub EnableCallback(ByVal errorCode as ErrorCodes, ByVal callback as
InputScanCallbackDelegate, ByVal callbackType As CallbackType, ByVal
callbackData As Object)
Parameter
callback
The method to be invoked when the condition specified by callbackType is met. Refer to
InputScanCallback Delegate on page 29 for the format of the method.
callbackType
The condition that invokes the callback method. Callback types are defined by the CallbackType
enumeration. The supported types are:
o CallbackType.OnDataAvailable Invokes the callback method when the number of samples
available for reading data is the number of samples specified by the callbackData parameter.
o CallbackType.OnInputScanComplete Invokes the callback method when an input scan
completes or is stopped.
o CallbackType.OnInputScanError Invokes the callback method when an input scan error
occurs.
callbackData
When callbackType is set to OnDataAvailable, set callbackData to the number of samples per
channel to acquire before invoking the user-defined callback method. When callbackType is set to
OnInputScanComplete or OnInputScanError, set callbackData to null or Nothing.
Zobrazit stránku 27
1 2 ... 23 24 25 26 27 28 29 30 31 32 33 ... 124 125

Komentáře k této Příručce

Žádné komentáře