Hantek HT6022BL SDK manual HTMarchdll

Page 1
SDK - HTMarch.dll 说明文档
中文版(VB 6.0)
阅读须知:
DLL 在 VC++ 6.0 环境下编译生成。所以数据类型符合 VC++ 6.0 标准.
DLL 中的所有文件都是用命令行上定义的 DLL_API 符号编译的。在使用此 DLL
任何其他项目上都不应定义此符号。这样,源文件中包含此文件的任何其他项目都会将
DLL_API 函数视为是从 DLL 导入的。
#endif
定义标准调用:
#define WIN_API __stdcall
HTMARCH_API
#define HTMARCH_API extern "C" __declspec(dllimport)
函数介绍
1. 函数声明
HTMARCH_API short WIN_API dsoOpenDevice(unsigned short DeviceIndex)
返回值:
返回 0 表示设备没有连接,返回 1 表示设备已连接。
参数:
DeviceIndex
设备索引值,第一台连接的设备索引值是 0,依次递加。 备注: 判断设备索引值为 程序举例:
unsigned short nDev = 0; if(dsoOpenDevice(0) == 1) { ;//设备已连接 } Else { ;//没有发现设备 }
2. 函数声明:
HTMARCH_API unsigned short WIN_API dsoChooseDevice(unsigned short DeviceIndex, short nType);
返回值:失败返回 0,成功返回 1
DeviceIndex 的设备是否连接到 PC
Page 2
参数:
DeviceIndex
表示当前设备的索引值。
nType
0: 表示逻辑分析仪 Hantek6022BL 1: 表示示波器 Hantek6022BE
备注: 选择设备
3. 函数声明:
HTMARCH_API short WIN_API dsoSetTimeDIV(unsigned short DeviceIndex,int nTimeDIV);
返回值:1 表示设置成功;0 表示设置失败 参数:
nDeviceIndex 表示当前设备的索引值。
nTimeDIV
表示当前的采样率档位的索引值, 以下是取值
0: 48MSa/s 1: 16MSa/s 2: 8MSa/s 3: 4MSa/s 4: 1MSa/s 5: 500KSa/s 6: 200KSa/s 7: 100KSa/s
备注: 设置设备的采集率档位
程序举例:
4. 函数声明:
HTMARCH_API short WIN_API dsoReadHardData_LA(
unsigned short DeviceIndex,
short* pData1,
short* pData2, unsigned long nReadLen,
int nTimeDIV,
);
返回值:读取数据,失败返回-1, 其他表示成功。 参数:
unsigned short DeviceIndex 设备的索引值
short* pData1通道0-通道7数据,通道7在最高位,通道0在最低位 short* pData2通道8-通道15的数据,通道15在最高位,通道8在最低位
Page 3
unsigned long nReadLen读取数据的长度
int nTimeDIV采样率档位
备注: 读取数据时调用此函数。
Loading...