资源简介
LabVIEW调用第三方采集卡板,必须调用DLL库文件才可以驱动板卡采集数据,该资源内包含其调用的所有例程

代码片段和文件信息
/*
This program is designed to be built into a DLL and called from LabVIEW. Each function
that is marked DLLEXPORT can be called from third party code. These functions are
identical to the generate and sort example.
*/
#include // includes the ansi_c and windows libraries
#include
int __stdcall DllMain (HINSTANCE hinstDLL DWORD fdwReason LPVOID lpvReserved)
{ // main DLL function
return TRUE;
}
/*
The purpose of this function is to generate an array of random numbers of the size
ARRAYSIZE. Each number will be an integer between 0 and 100. The numbers are seeded
by time plus an offset. The array is passed into this function by reference
*/
void DLLEXPORT generateRand(int *iArray int ARRAYSIZE)
{
int i sTime;
time(&sTime); // gets time to seed the random number
for (i=0;i {
srand(sTime*100+i*10); // seeds each random from an offset of the time
iArray[i]=rand()*100/RAND_MAX; // inserts the random number into the array
}
}
/*
The purpose of this function is to sort an array of random numbers. This function
uses the bubblesort algorithm which has the time complexity O(n^2). The array
is passed into this function by reference.
*/
void DLLEXPORT bubbleSort(int *iArray int ARRAYSIZE)
{
int holder x y;
for(x = 0; x < ARRAYSIZE; x++)
{
for(y = 0; y < ARRAYSIZE-1; y++)
{
if(iArray[y] > iArray[y+1])
{ // compares neighboring elements and swaps if necessary
holder = iArray[y+1];
iArray[y+1] = iArray[y];
iArray[y] = holder;
}
}
}
}
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 206848 2008-04-09 15:51 调用C-动态数据库\LabVIEW_code_and_DLL\GenSort.dll
文件 2648 2008-04-09 15:51 调用C-动态数据库\LabVIEW_code_and_DLL\GenSort.lib
文件 18228 2008-04-09 15:57 调用C-动态数据库\LabVIEW_code_and_DLL\GenSortRandC.vi
文件 1279 2008-04-04 10:47 调用C-动态数据库\readme.txt
文件 206848 2008-04-09 15:51 调用C-动态数据库\Source_code_for_dll\CVI Stuff\GenSort.dll
文件 2648 2008-04-09 15:51 调用C-动态数据库\Source_code_for_dll\CVI Stuff\GenSort.lib
文件 1665 2004-01-12 12:07 调用C-动态数据库\Source_code_for_dll\CVI Stuff\GenSortRand.c
文件 2866 2008-04-09 16:15 调用C-动态数据库\Source_code_for_dll\CVI Stuff\GenSortRand.cws
文件 3904 2008-04-04 10:50 调用C-动态数据库\Source_code_for_dll\CVI Stuff\GenSortRand.prj
文件 1699 2004-04-01 20:00 调用C-动态数据库\Source_code_for_dll\Visual C++ Stuff\GenSort.cpp
文件 4309 2004-04-01 17:35 调用C-动态数据库\Source_code_for_dll\Visual C++ Stuff\GenSort.dsp
文件 539 2004-04-01 20:39 调用C-动态数据库\Source_code_for_dll\Visual C++ Stuff\GenSort.dsw
文件 50176 2004-04-02 00:30 调用C-动态数据库\Source_code_for_dll\Visual C++ Stuff\GenSort.ncb
文件 48640 2004-04-02 00:30 调用C-动态数据库\Source_code_for_dll\Visual C++ Stuff\GenSort.opt
文件 1739 2004-04-01 20:06 调用C-动态数据库\Source_code_for_dll\Visual C++ Stuff\GenSort.plg
文件 1619 2004-04-01 17:35 调用C-动态数据库\Source_code_for_dll\Visual C++ Stuff\MSVSReadMe.txt
文件 294 2004-04-01 17:35 调用C-动态数据库\Source_code_for_dll\Visual C++ Stuff\StdAfx.cpp
文件 802 2004-04-01 17:35 调用C-动态数据库\Source_code_for_dll\Visual C++ Stuff\StdAfx.h
文件 1722 2008-04-09 16:12 调用C-动态数据库\Source_code_for_dll\VS2008\GenSort.cpp
文件 884 2008-04-09 16:07 调用C-动态数据库\Source_code_for_dll\VS2008\GenSort.sln
文件 8704 2008-04-09 16:54 调用C-动态数据库\Source_code_for_dll\VS2008\GenSort.suo
文件 6257 2008-04-09 16:06 调用C-动态数据库\Source_code_for_dll\VS2008\GenSort.vcproj
文件 294 2004-04-01 17:35 调用C-动态数据库\Source_code_for_dll\VS2008\StdAfx.cpp
文件 802 2004-04-01 17:35 调用C-动态数据库\Source_code_for_dll\VS2008\StdAfx.h
目录 0 2013-12-21 16:09 调用C-动态数据库\Source_code_for_dll\CVI Stuff
目录 0 2013-12-21 16:09 调用C-动态数据库\Source_code_for_dll\Visual C++ Stuff
目录 0 2013-12-21 16:09 调用C-动态数据库\Source_code_for_dll\VS2008
目录 0 2013-12-21 16:09 调用C-动态数据库\LabVIEW_code_and_DLL
目录 0 2013-12-21 16:09 调用C-动态数据库\Source_code_for_dll
目录 0 2013-12-21 16:09 调用C-动态数据库
............此处省略3个文件信息
相关资源
- labview魔方程序
- 一个labview仿真的函数信号发生器.vi
- labview编程软件滤波器以及编写程序设
- labview语音输入输出
- labview中的DAQ助手采集多个通道电压
- Labview与CH372CH375的通信测试
- LabVIEW钢琴实例
- LabVIEW入门与实战开发100例190153
- LABVIEW做的蓝牙数据发送程序.vi
- 基于labview的变声器
- 基于labview的方差标准差计算(求方差
- smart和labview通讯(smart_connet.vi)
- LabVIEW 数据采集 模拟量+编码器(Daq
- LabVIEW 声音信号的采集与存储.vi
- LabVIEW步进电机控制.vi
- 多通道数据采集.vi(labview)
- labview智能电梯(6层电梯.vi)
- 用labview编写的一个神经网络Vi图
- 基于Labview的电子秤的设计.docx
- labview汽车仪表盘
- labview掉halcon.vi
- labview计算器实例.vi88218
- labview 导DXF
- 基于LabVIEW模拟的温度报警器.vi
- 基于LabVIEW的声卡声音采集与播放
- 基于labVIEW的虚拟数据采集与输出仿真
- 基于labview滤波器的设计
- labview FFT变换(频域分析).vi
- labview设计的五子棋游戏(源码+文档)
- LabVIEW界面设计
评论
共有 条评论