WORD: unsigned short
BOOL: bool
ULONG: unsigned long
The following ifdef block is the standard way of creating macros which make exporting from
a DLL simpler. All files within this DLL are compiled with the DLL_API symbol defined on
the command line. This symbol should not be defined on any project that uses this DLL. This
way any other project whose source files include this file see DLL_API functions as being
imported from a DLL, wheras this DLL sees symbols defined with this macro as being
exported.
_HT_RELAY_CONTROL contains the relay control information.
typedef struct _HT_RELAY_CONTROL
{
BOOL bCHEnable[MAX_CH_NUM];
WORD nCHVoltDIV[MAX_CH_NUM];
WORD nCHCoupling[MAX_CH_NUM];
BOOL bCHBWLimit[MAX_CH_NUM];
WORD nTrigSource;
BOOL bTrigFilt;
WORD nALT;
}RELAYCONTROL,*PRELAYCONTROL;
MAX_CH_NUM: Detail in DefMacro.h.
Parameters Remarks:
bCHEnable[MAX_CH_NUM]: Chanel Switch Array(Size to MAX_CH_NUM). Value: 1 ON, 0
OFF.
nCHVoltDIV[MAX_CH_NUM]: Chanel Voltage Array(Size to MAX_CH_NUM).
nCHCoupling[MAX_CH_NUM]: Chanel Couple Array(Size to MAX_CH_NUM). Value: 0 DC, 1
AC, 2 GND
bCHBWLimit[MAX_CH_NUM]:Chanel Band Limit Array(Size to MAX_CH_NUM). Value: 1
ON, 0 OFF.
nTrigSource: Trigger Source. 0 CH1, 1 CH2, 2 CH3, 3 CH4,5 EXT ,6 EXT/10.
bTrigFilt: High Frequency Rejection. Value: 1 ON, 0 OFF.
nALT: Whether is alternate. Value: 1 is alternate ,0 is non-alternate.
Example:
Declare a variable: RELAYCONTROL myRelayControl;
Declare a pointer: PRELAYCONTROL pRelayControl;
Functions
1. DLL_API WORD WINAPI dsoHTSearchDevice(short* pDevInfo)
Return Value:
The number of Having Connected devices..
Parmeter:
pDevInfo
Pointer to devices that have connected to PC.
Remarks:
You should call this function to know how many device that have connected to PC. One PC
support 32 devices to be connected.
Example:
short DevInfo[32];
WORD nConnectedDevNum = 0;
//DevInfo Initial
//…
//Call this function
nConnectedDevNum = dsoHTSearchDevice(DevInfo);
When DevInfo[n] is 0 , there are devices. When DevInfo[n] is -1, there is no device.
2. DLL_API WORD WINAPI dsoHTDeviceConnect(WORD nDeviceIndex)
Return Value:
1 : connect, 0: disconnect.
Parameter:
nDeviceIndex
The device index.
Remarks:
Whether the device is connected.
Example:If there are two devices On PC, and you check whether to connect to the second device, you
Need to do:
WORD nDeviceIndex = 1; //0 : the first device
WORD nRe = 0;
//Call this function
nRe = dsoHTDeviceConnect(nDeviceIndex);
if (nRe = = 1)
;//the device si connected
else
;//the device is disconnected
3. DLL_API WORD WINAPI dsoGetFPGAVersion (WORD DeviceIndex)
Return Value:
FPGA Version
Parameter:
DeviceIndex
Index of the device.
Remarks:get FPGA Version
Example:
WORD DeviceIndex = 0;
//…
WORD nFPGVersion = dsoGetFPGAVersion (DeviceIndex)
4.DLL_API WORD WINAPI dsoHTSetCHPos(
WORD nDeviceIndex,
WORD* pLevel,
WORD nVoltDIV,
WORD nPos,
WORD nCH
WORD nCHMode
)
Return Value:
0:Fail. Non 0: Succeed.
Parameter:
nDeviceIndex
Index of the device.
pLevel
Pointer to calibration level.
nVoltDIV
Index of channel voltage.
nPos
The position of chnanel, range :0~255.
nCH
The targer channel.0 CH1,1 CH2,2 CH3 ,3 CH4.
nCHMode
channel working mode(1,2,4)
Remarts:
Set channel level.
Example:WORD nDeviceIndex = 0;
WORD CHLevel[288]; //the calibration level, See in dsoHTReadCalibrationData.
WORD nVoltDIV = 6; //voltage 1V/div, index is 6.
WORD nPos = 128; //Zero level is 128.
WORD nCH = 0; //CH1.
WORD nCHMod=4;
//Call this function.
if ( 0 = = dsoHTSetCHPos(nDeviceIndex,CHLevel,nVoltDIV,nPos,nCH,nCHMod) )
;//Fail
else ;//Succeed
5.DLL_API WORD WINAPI dsoHTSetVTriggerLevel(
WORD nDeviceIndex,
WORD nPos
WORD nSensitivity)
Return Value:
0:Fail. Non 0: Succeed.
Parameter:
nPos
The position of the trigger level.
nSensitivity
Trigger Sensitivity,if the lines is thick try it bigger
Remarks:
Set the position of the trigger level.
Exmaple:
WORD nDeviceIndex = 0;
WORD nPos = 128;
//call this function
if ( 0 = = dsoHTSetVTriggerLevel( nDeviceIndex, nPos, 4) )
; //Fail
else ; //Succeed
6.DLL_API WORD WINAPI dsoHTSetHTriggerLength(
WORD nDeviceIndex,
PCONTROLDATA pControl,
WORD nCHMod
)
Return Value:
0:Fail. Non 0: Succeed.
Parameter:
pControl
Pointer to Struct PCONTROLDATA, read "HTSoftDll.h" for detail.
nCHMode
Channel working mode(1,2,4). Remarks:
Set trigger length.
7.DLL_API WORD WINAPI dsoHTSetCHAndTrigger(
WORD nDeviceIndex,
RELAYCONTROL RelayControl,
WORD nTimeDIV)
Return Value:
0:Fail. Non 0: Succeed.
Parameter:
RelayControl
See in the structure HT_RELAY_CONTROL.
nTimeDIV
The index of time base 0-35.
Remarks:
Set channel and trigger.
Example:WORD nDeviceIndex = 0;
RELAYCONTROL RelayControl;
WORD nTimeDIV=12;
//RelayControl
//Call this function
if ( 0 = = dsoHTSetCHAndTrigger(nDeviceIndex,RelayControl,nTimeDIV) )
; //Fail
else ; //succeed
0:Fail. Non 0: Succeed.
Parameter:
pAmpLevel
Pointer to amplitude calibration.
nYTFormat
The mode of horizontal format. 0: Normal, 1: Scan, 2:Roll.
pRelayControl
See in the structure HT_RELAY_CONTROL.
pControl
Pointer to Struct PCONTROLDATA, read "HTSoftDll.h" for detail.
Remarks:
Set Sampling Rate.
9.DLL_API WORD dsoHTSetSampleRateVi(WORD nDeviceIndex,
WORD *pAmpLevel,
WORD* pCHEnable,
WORD* pCHVoltDIV,
WORD* pCHCoupling,
WORD* pCHBWLimit,
WORD nTriggerSource,
WORD nTriggerFilt,
WORD nALT,
PCONTROLDATA pControl);
Return Value:
0:Fail. Non 0: Succeed.
Parameter:
pAmpLevel,
Pointer to amplitude calibration.
pCHVoltDIV
See in the structure HT_RELAY_CONTROL.nCHVoltDIV.
pCHEnable
See in the structure HT_RELAY_CONTROL.bCHEnable.
pCHCoupling
See in the structure HT_RELAY_CONTROL.nCHCoupling.
pCHBWLimit
See in the structure HT_RELAY_CONTROL.bCHBWLimit.
nTriggerSource, nTriggerFilt,nALT
pControl
Loading...
+ 11 hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.