NI LabVIEW,CVI,数据采集等产品讨论区

取消
显示结果 
搜索替代 
您的意思是: 

DLL文件调用问题


我正在做一个项目,用到了欧姆龙的Controller link板卡。需要在labview中调用dll文件实现
通信。其中以一个函数描述如下:
Function:Write data to a data link area.
Call Format:INT clkWriteDatalink(PCLKHANDLE hclk,PEMCLKADDRESS
pEmAddress,LPWORD lpWriteData,DWORD dwsize);
Arguments:
Type Variable name Description

PCLKHANDLE hclk The CLK handle obtained with
ClkOpen()
PEMCLKADDRESS PemAddress Pointer to the starting address
structure for writing data
LPWORD lpWriteData pointer to the buffer to store
the
write data
DWORD dwSize Write data size(unit:words)

其中,PEMCLKADDRESS结构体的说明如下:

Type Variable name Contents

LPCTSTR lpszMemName Area type(specify the text
string
for the event memory area
type
set for the data link area)
DWORD dwWordOffset Number of offset words

我的参数配置如附件所示,但是运行时总是不正确,请帮忙查看。感激不尽!!
0 项奖励
1 条消息(共 3 条)
4,118 次查看

附件看不到。

 

George Zou
0 项奖励
2 条消息(共 3 条)
4,060 次查看

可以参考一下这个链接中第十章的内容。LabVIEW中在调用包含指针的结构体时比较麻烦

 

http://ruanqizhen.spaces.live.com/Blog/cns!1pU-rgQVTuuWM1TX8W8PfmDA!1073.entry

Qiushi Shen
DSM Nanjing
NISH
0 项奖励
3 条消息(共 3 条)
3,940 次查看