完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
嗨,1。我使用命令专家模拟仪器:使用Agilent.CommandExpert.ScpiNet.AgN6700_C_02_18的代码(C#);
AgN6700 N67002 =新AgN6700(“”); 2.需要模拟来检查我发送给这个模拟仪器的命令:N67002.Transport.Query.Invoke(“* myQuery?”,out ReturnValue); N67002.Transport.Command.Invoke( “CommandString中”); 当我将NOT CORRECT命令传递给这个模拟仪器时,如果它是查询或命令无关紧要,我应该得到错误,但如果我通过命令或任何STRING它没有显示任何错误...问题:1。模拟仪器没有 行为就像一个真正的工具,例如 返回一些默认值? 2.为什么模拟仪器接受错误的命令而不抛出异常或警告? 谢谢,尤里 以上来自于谷歌翻译 以下为原文 Hi, 1. I simulated instrument with help of Command Expert: code(C#) using Agilent.CommandExpert.ScpiNet.AgN6700_C_02_18; AgN6700 N67002 = new AgN6700(""); 2. Simulation is needed for checking commands that I send to this simulated instrument: N67002.Transport.Query.Invoke("*myQuery?", out ReturnValue); N67002.Transport.Command.Invoke("commandString"); I supposed to get error when I pass NOT CORRECT command to this simulated instrument does not matter if it is query or command, but it does not show any ERROR if I pass command or any STRING ... Questions: 1. Simulated instrument does not behavior like a real instrument, e.g. returns some default value? 2. Why simulated instrument accepts wrong commands and not throws exception or warning? Thank you, Yuri |
|
相关推荐
1个回答
|
|
嗨Yuri,问题:1。模拟仪器的行为不像真正的仪器,例如
返回一些默认值? - >模拟不像真正的仪器,并且对所有仪器都是通用的。 您可以期望结果为0,空白字符串“”或空数组。 2.为什么模拟仪器接受错误的命令而不抛出异常或警告? - > Command Expert只知道应该处理的数据类型,而不知道哪些值是有效的。 需要真正的仪器连接来提供值/限制检查并提供适当的错误消息。 如果你想要更好的模拟,可能会有一个选项。 在Command Expert中,您可以设置连接并将其指向IO监视器文件,该文件将提供一些实际数据值。 要创建用于模拟的IO Monitor文件,您可以使用如下工作流程:1。在Command Expert中创建序列2.打开IO Monitor并启用日志记录3.在Command Expert中运行序列4.停止IO Monitor 并保存.xml跟踪文件5.返回Command Expert并将连接字符串更改为.xml文件的路径6.再次运行Command Expert序列,它将使用IO Monitor文件中的数据作为模拟值 有关更详细的说明,请在Command Expert帮助文件中搜索“使用IO监视器日志文件进行仿真”一词Alan Copeland Lead Connectivity Support Engineer @ Keysight 以上来自于谷歌翻译 以下为原文 Hi Yuri, Questions: 1. Simulated instrument does not behavior like a real instrument, e.g. returns some default value? --> Simulation does not behave like a real instrument, and is generic for all instruments. You can expect the result to be 0, a blank string "", or an empty array. 2. Why simulated instrument accepts wrong commands and not throws exception or warning? --> Command Expert only knows about the datatypes that should be handled, not what values are valid. A real instrument connection is required to provide the value/limit checking and give appropriate error messages. If you want better simulation, there may be an option though. In Command Expert you can setup a connection and point it to an IO Monitor file, which will provide some realistic data values. To create the IO Monitor file for simulation, you would use a workflow like the following: 1. Create your sequence in Command Expert 2. Turn on IO Monitor and enable logging 3. Run through the sequence in Command Expert 4. Stop the IO Monitor and save the .xml trace file 5. Go back into Command Expert and change the connection string to be the path to the .xml file 6. Run the Command Expert sequence again and it will use the data in the IO Monitor file for simulation values For more thorough instructions, search the Command Expert help file for the phrase "Using an IO Monitor Log File for Simulation" Alan Copeland Lead Connectivity Support Engineer @ Keysight |
|
|
|
只有小组成员才能发言,加入小组>>
1221 浏览 0 评论
2346 浏览 1 评论
2155 浏览 1 评论
2019 浏览 5 评论
2900 浏览 3 评论
960浏览 1评论
关于Keysight x1149 Boundary Scan Analyzer
697浏览 0评论
N5230C用“CALC:MARK:BWID?”获取Bwid,Cent,Q,Loss失败,请问大佬们怎么解决呀
797浏览 0评论
1221浏览 0评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-11-21 19:55 , Processed in 1.203277 second(s), Total 49, Slave 42 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号