急!!!viOpen错误

abc814211181 2011-04-14 08:59:46
我的程序用了err=viOpen(defaultRM,"TCPIP0::10.129.41.111::inst0::INSTR",VI_NULL,VI_NULL,&vi)
err返回一个负数,表明打开错误,为什么会错
我已经用expert connection安捷伦自带的连接软件能够打开,说明IP没有错,怎么用我自己的程序第二句就出错了?
求解,谢谢
...全文
725 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
abc814211181 2011-04-15
  • 打赏
  • 举报
回复
[Quote=引用 1 楼 fall513 的回复:]
TCPIP0::10.129.41.111::inst0::INSTR
改为
TCPIP0::10.129.41.111::INSTR
[/Quote]
回去试了,不是不行
fall513 2011-04-15
  • 打赏
  • 举报
回复
你在viOpen之前用过viOpenDefaultRM没有?
fall513 2011-04-15
  • 打赏
  • 举报
回复 1
没有inst0


VXI0::1::INSTR

A VXI device at logical address 1 in VXI interface VXI0.

GPIB-VXI::9::INSTR


A VXI device at logical address 9 in a GPIB-VXI controlled VXI system.

GPIB::1::0::INSTR


A GPIB device at primary address 1 and secondary address 0 in GPIB interface 0.

ASRL1::INSTR


A serial device located on port 1.

VXI::MEMACC


Board-level register access to the VXI interface.

GPIB-VXI1::MEMACC


Board-level register access to GPIB-VXI interface number 1.

GPIB2::INTFC


Interface or raw resource for GPIB interface 2.

VXI::1::BACKPLANE


Mainframe resource for chassis 1 on the default VXI system, which is interface 0.

TCPIP0::1.2.3.4::999::SOCKET


Raw TCPIP access to port 999 at the specified address.

TCPIP::devicename @company.com::INSTR


TCPIP device using VXI-11 located at the specified address. This uses the default LAN Device Name of inst0.

USB0::2391::291::SN_001001::INSTR


USB device whose manufacturer ID is 2391, model code is 291, serial number is SN_001001. Optional USB interface number is not used.

abc814211181 2011-04-14
  • 打赏
  • 举报
回复
回去试一下,不过语法上好像有inst0.
今天读出了错误代码,invalid resource reference specified.parsing error .
fall513 2011-04-14
  • 打赏
  • 举报
回复
TCPIP0::10.129.41.111::inst0::INSTR
改为
TCPIP0::10.129.41.111::INSTR

1,317

社区成员

发帖
与我相关
我的任务
社区描述
C++ Builder 网络及通讯开发
社区管理员
  • 网络及通讯开发社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧