beautypg.com

Time base functions, Settimebase – Dataman 520 Series User Manual

Page 16

background image


Development kit for DATAMAN 520 series

Programmer’s Guide


Declaration:


typedef _export _stdcall int (*fInvertSecondaryTriggerSource)(int

InputMask);

TInvertSecondaryTriggerSource = function (InputMask: Integer): Integer;

stdcall;

Public Declare Function InvertSecondaryTriggerSource Lib

"VBDevKit52X.dll" (ByVal InputMask As Long) As Long

Parameters:

InputMask – Combination of

constants

TRIGGER_CHANNEL_A,

TRIGGER_CHANNEL_B, TRIGGER_EXTERNAL (bitmask). If the given bit is
set the appropriate trigger source will be considered valid.

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


Note:

Bitmask is sum of appropriate constants.

3.3. Time base functions

SetTimeBase

Sets desired time base.

Declaration:

typedef _export _stdcall int (*fSetTimeBase) (int InputValue, int &Retval);
TSetTimeBase = function (InputValue: Integer; var Retval: Integer): Integer;

stdcall;

Public Declare Function SetTimeBase Lib "VBDevKit52X.dll" (ByVal

InputValue As Long, ByRef RetVal As Long) As Long

Parameters:
InputValue

– Desired TimeBase value in nanoseconds

Retval – Indicates, whether the measurement will be performed in sampling or

in real mode. Valid values are DEVICE_TIME_MODE_SAMPLING or
DEVICE_TIME_MODE_NORMAL

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

- 16 -