<dfn id="yhprb"><s id="yhprb"></s></dfn><dfn id="yhprb"><delect id="yhprb"></delect></dfn><dfn id="yhprb"></dfn><dfn id="yhprb"><delect id="yhprb"></delect></dfn><dfn id="yhprb"></dfn><dfn id="yhprb"><s id="yhprb"><strike id="yhprb"></strike></s></dfn><small id="yhprb"></small><dfn id="yhprb"></dfn><small id="yhprb"><delect id="yhprb"></delect></small><small id="yhprb"></small><small id="yhprb"></small> <delect id="yhprb"><strike id="yhprb"></strike></delect><dfn id="yhprb"></dfn><dfn id="yhprb"></dfn><s id="yhprb"><noframes id="yhprb"><small id="yhprb"><dfn id="yhprb"></dfn></small><dfn id="yhprb"><delect id="yhprb"></delect></dfn><small id="yhprb"></small><dfn id="yhprb"><delect id="yhprb"></delect></dfn><dfn id="yhprb"><s id="yhprb"></s></dfn> <small id="yhprb"></small><delect id="yhprb"><strike id="yhprb"></strike></delect><dfn id="yhprb"><s id="yhprb"></s></dfn><dfn id="yhprb"></dfn><dfn id="yhprb"><s id="yhprb"></s></dfn><dfn id="yhprb"><s id="yhprb"><strike id="yhprb"></strike></s></dfn><dfn id="yhprb"><s id="yhprb"></s></dfn>

新聞中心

EEPW首頁(yè) > 測試測量 > 設計應用 > Labview調用VC

Labview調用VC

作者: 時(shí)間:2017-01-05 來(lái)源:網(wǎng)絡(luò ) 收藏
對初學(xué)者來(lái)說(shuō)來(lái)個(gè)比較詳細的包含步驟例子是難得的,我來(lái)個(gè)簡(jiǎn)單的小例子,希望對您有用,呵呵?。?!

1。建立動(dòng)態(tài)連接庫的C代碼調用

本文引用地址:http://dyxdggzs.com/article/201701/336599.htm

1.1建立函數原形

1)后面框圖程序中,調用CLF節點(diǎn);

2)配置一個(gè)函數原形,設置調用規程為C,其它不變,確定,退出;

3)右鍵CLF節點(diǎn),create C file,保存名字為 code.cpp,以供VC++編譯使用;

1.2 編輯源代碼文件

1)將所需要的labview頭文件復制到code.cpp所在目錄中,包括:extcode.h platdefines.h fundtype.h;

2) 打開(kāi)code.cpp,添加關(guān)鍵詞extern “c 、_declspec(dllexport)并包裝;然后輸入函數的功能代碼,如果1個(gè)dll里面需要多個(gè)函數,則需要聲明多個(gè)函數的原形。

2。VC++中編譯產(chǎn)生dll

1)建立project ,fileànew-> win32 Dyna,mic Link Library,輸入工程名,選擇an empty dll project;

2)添加code.cpp到source file,添加extcode.h platdefines.h fundtype.h到head files里面;

3)設置dll參數projectàsettingsàc/C++中設置參數:category: code generation ;根據函數要求可以選擇1Byte4 Byte 8Byte,采用默認就可以;multithread;其余默認可以;自己也可以微調;

4)BuildàBuild code.dll;

5)Ok

6)可以在2)后直接編譯生成DLL后在Labview配置CLF

1本次例子



1 找到CLF

2 主要對DLL的調用配置


3 在VC完成DLL



__declspec( dllexport ) int32_t add(int32_t a, int32_t b);這很重要的?。。?!,否則會(huì )出錯的。



關(guān)鍵詞: Labview調用V

評論


技術(shù)專(zhuān)區

關(guān)閉
国产精品自在自线亚洲|国产精品无圣光一区二区|国产日产欧洲无码视频|久久久一本精品99久久K精品66|欧美人与动牲交片免费播放
<dfn id="yhprb"><s id="yhprb"></s></dfn><dfn id="yhprb"><delect id="yhprb"></delect></dfn><dfn id="yhprb"></dfn><dfn id="yhprb"><delect id="yhprb"></delect></dfn><dfn id="yhprb"></dfn><dfn id="yhprb"><s id="yhprb"><strike id="yhprb"></strike></s></dfn><small id="yhprb"></small><dfn id="yhprb"></dfn><small id="yhprb"><delect id="yhprb"></delect></small><small id="yhprb"></small><small id="yhprb"></small> <delect id="yhprb"><strike id="yhprb"></strike></delect><dfn id="yhprb"></dfn><dfn id="yhprb"></dfn><s id="yhprb"><noframes id="yhprb"><small id="yhprb"><dfn id="yhprb"></dfn></small><dfn id="yhprb"><delect id="yhprb"></delect></dfn><small id="yhprb"></small><dfn id="yhprb"><delect id="yhprb"></delect></dfn><dfn id="yhprb"><s id="yhprb"></s></dfn> <small id="yhprb"></small><delect id="yhprb"><strike id="yhprb"></strike></delect><dfn id="yhprb"><s id="yhprb"></s></dfn><dfn id="yhprb"></dfn><dfn id="yhprb"><s id="yhprb"></s></dfn><dfn id="yhprb"><s id="yhprb"><strike id="yhprb"></strike></s></dfn><dfn id="yhprb"><s id="yhprb"></s></dfn>