资源简介
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 波形滤波器VI进行多通道信号多
- 基于LABVIEW的AM调制解调
- 温度控制PIDLabview
- Labview登录界面设计
- Labview三次样条拟合轨迹规划
- labvIEW PID控制程序
- labvIEW 数据采集与保存 源程序
- 用labview做的钢琴
- 通信系统Labview仿真 ASK FSK PSK DPSK
- labview百度地图调用及实时刷新.vi
- LABVIEW做的蓝牙数据发送程序
- labview版串口调试工具
- labview随机波形VI
- 基于LabView的虚拟信号发生器
- 无需OPC-西门子1200/1500与LABVIEW通讯
- TDMS批量转MAT代码
- 读取文本数据到数组labview
- 用labview设计的随机抽号程序
- labview-fft幅值和相位
- labview做的串口接收并波形显示,并存
- 基于labview的信号处理系统196630
- LABVIEW PID设计
- labview级数求和法计算指定位数精度的
- labview VI之间打开关闭切换
- 基于labview的modbus从站代码
- 基于声卡的LabVIEW虚拟信号发生器设计
- 基于labview的fm 调制
- labview保存图像
- Labview实现语音播报与识别
- Labview实现语音识别
评论
共有 条评论