Data acquisition function, Data, Ter the – Dataman 520 Series User Manual
Page 19
Development kit for DATAMAN 520 series
Programmer’s Guide
Parameters:
VerticalShiftValue – Desired value of vertical shift on channel specified by
ChannelSelector. Valid range is <0, 4095>
ChannelSelector – Valid values are
CHANNEL_A or CHANNEL_B
Retval – The position of zero (GND) is returned via this variable.
Return Value:
ERROR_OK – Function call successfuly completed
ERROR_DEVELOPMENT_KIT_NOT_ENABLED – DK can not be used with
connected device (DK was not purchased)
ERROR_USB_COMMUNICATION_FAILED
– USB communication failed
3.5. Data acquisition function
Data
The data acquisition process is controlled by this function.
Declaration:
_export _stdcall int (*fData) (void *DataBuffer, int BufferLength, int
&SamplesCount, bool &DataStatus, int &TriggerStatus);
TData = function (DataBuffer: Pointer; BufferLength: Integer; var
SamplesCount; var DataStatus: Boolean; var TriggerStatus: Integer): Integer;
stdcall;
Public Declare Function Data Lib "VBDevKit52X.dll" (Data As Integer,
ByVal BufferLength As Long, ByRef SamplesCount As Long, ByRef DataStatus
As Boolean, ByRef TriggerStatus As Long) As Long
Parameters:
TriggerStatus - This variable contains information on current data acquisition
status and the sampling mode status. Decode it as follows:
Byte
Meaning
0
Data acquisition / trigger status
1
Sampling mode status for channel A
2
Sampling mode status for channel B
TRIGGER_SAMPLING_STATUS_LESS_THAN_HALF - less than 50% of
data were measured
TRIGGER_SAMPLING_STATUS_MORE_THAN_HALF - more than 50%
but less then 100% of data were measured
TRIGGER_SAMPLING_STATUS_MORE_THAN_ENOUGH - all data were
measured
Data acquisition / trigger status
TRIGGER_STATUS_READY - measurement is completed
- 19 -