完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
很抱歉,如果这是错误的发布区域,但我没有看到特定的信号发生器远程控制。我正在尝试使用VS2005 C#.NET中的AgilentRFSigGen IVI-COM驱动程序来控制我的N5182A MXG信号发生器。
我没有尝试使其符合IVI并且直接调用了安捷伦设备特定的类。我正在尝试使用“ErrorQuery”方法向所有属性集和方法添加错误检查。 手册指出当“QueryInstrumentStatus”设置为True时可以使用此函数,以便在驱动程序检测到仪器错误时检索错误详细信息。我已将此标志设置为true,但令我困惑的是错误实际上是如何获得的 查询或报告。 即:ErrorQuery方法什么都不返回,并声明您需要传递ErrorCode和Instrument错误消息。 ??? 这种方法到底是做什么的? 我原本以为“ErrorQuery”正在查询错误,因为我习惯于查询返回Void以外的东西。“QueryInstrumentStatus”会导致命令抛出异常或其他东西吗?如果有人可以给我一只手勾勒出哪些命令 我会做完设置一个值或运行一个方法,然后进行错误检查,这对我来说会有很长的路要走。 我试图避免添加第二个类来包装所有驱动程序命令以添加错误检查.Thx。 以上来自于谷歌翻译 以下为原文 Sorry if this is the wrong posting area but I didn't see a specific one for Remote Control of Signal Generators. I'm trying to control my N5182A MXG Signal Generator using the AgilentRFSigGen IVI-COM driver within VS2005 C#.NET. I'm not attempting to make it IVI compliant and have just made a direct call to the Agilent device specific class. I'm trying to add error checking to all the property sets, and methods by using the "ErrorQuery" method. The manual states that this function can be used when the "QueryInstrumentStatus" is set to True, to retrieve error details when the driver detects an instrument error. I have set this flag to true, but what has me baffled is how the error actually gets queried or reported. ie: The ErrorQuery method returns nothing, and states you need to pass in the ErrorCode and Instrument error message. ??? What exactly does this method do then? I would have thought the "ErrorQuery" is querying the error since I'm used to Queries returning something other than Void. Does the "QueryInstrumentStatus" cause the commands to throw an exception or something? If someone could give me a hand outlining which commands I would do to accomplish setting a value or running a method and doing error checking after, it would go a long way for me. I'm trying to avoid adding a second Class to wrap up all the Driver commands to add error checking. Thx. |
|
相关推荐
1个回答
|
|
没关系。
在深入了解安装包示例之后回答了我自己的问题。看起来像我必须编写一个例程来运行每个set或方法来查询错误,传入驱动程序的变量来存储它有的ErrorNum和ErrorMessage值 提供,如果有的话。 该示例只是将整个程序包装在try / catch中,然后在最后检查错误。 我第一次看到它时没有看到这个 - 抱歉。 以上来自于谷歌翻译 以下为原文 Never mind. Answered my own question after looking deeper in the package installed example. Looks like I'd have to write a routine to run after each set or method to query the error, passing in variables for the driver to store the ErrorNum and ErrorMessage values it has to offer if any. The example just wraps the entire program in a try/catch and then checks for errors at the very end. I didn't see this the first time I looked at it -Sorry. |
|
|
|
只有小组成员才能发言,加入小组>>
1296 浏览 0 评论
2378 浏览 1 评论
2199 浏览 1 评论
2068 浏览 5 评论
2955 浏览 3 评论
1136浏览 1评论
关于Keysight x1149 Boundary Scan Analyzer
759浏览 0评论
N5230C用“CALC:MARK:BWID?”获取Bwid,Cent,Q,Loss失败,请问大佬们怎么解决呀
944浏览 0评论
1296浏览 0评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-12-27 18:19 , Processed in 1.703075 second(s), Total 45, Slave 39 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号