是德科技
直播中

郑成枝

7年用户 1316经验值
私信 关注
[问答]

怎么使用GPIB使用C编程N8734A

嗨,查看电源文档中提供的示例。
通过在C#中添加两个库AgilentRMLib和VisComLib来完成编程。
当我尝试通过选择添加参考 - > Agilent VISA COM Resourse Manager 1.0添加AgilentRMLib时,参考中会显示错误。
我尝试直接从Program Files添加agtRM.dll。
仍然存在错误。
以前有人遇到过这个问题吗?
有什么解决方案吗?
谢谢,Muralidharan

以上来自于谷歌翻译


     以下为原文

  Hi,

On looking at the examples provided in the documentation of the Power supply. The Programming has been done by adding two libraries AgilentRMLib and VisComLib in the C#. When  
i try to add the AgilentRMLib by Selecting the Add Reference->Agilent VISA COM Resourse Manager 1.0, an error is shown at the reference.  

I tried adding the agtRM.dll directly from the Program Files. Still the error persists. Has anyone faced this problem before? Any Solutions for this?

Thanks,
Muralidharan  

回帖(1)

杜文渊

2019-3-21 09:52:26
不幸的是,这个例子过时了......你应该改为:1)在Add References中,选择COM选项卡,然后选择VISA COM 3.0 Type Library 2)在C#中,我建议你添加一个*
Ivi.Visa.Interop; *这是VISA COM的命名空间。
然后,使用VISA COM创建一个新的Ivi.Visa.Interop.ResourceManager和一个新的Ivi.Visa.Interop.FormattedIO488要打开一个连接,请使用* ResourceManager rm = new ResourceManager(); * * FormattedIO488 fmio = new FormattedIO488()
; * * fmio.IO =(IMessage)rm.Open(然后,当您完成发送I / O时,不要忘记使用* fmio.IO.Close()关闭会话; *编辑:hognala
在2012年9月13日下午3:43

以上来自于谷歌翻译


     以下为原文

  The example is out of date, unfortunately...

You should do the following instead:

1) In Add References, choose the COM tab, then choose the VISA COM 3.0 Type Library
2) In C# I would recommend that you add a 

*using Ivi.Visa.Interop;*

That is the namespace for VISA COM.

Then, to use VISA COM create a new Ivi.Visa.Interop.ResourceManager and a new Ivi.Visa.Interop.FormattedIO488

To open a connection, use 

*ResourceManager rm = new ResourceManager();*
*FormattedIO488 fmio = new FormattedIO488();*

*fmio.IO = (IMessage)rm.Open( Then, when you're all done sending I/O, don't forget to close the session using

*fmio.IO.Close();*

Edited by: hognala on Sep 13, 2012 3:43 PM
举报

更多回帖

发帖
×
20
完善资料,
赚取积分