完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
全部,我在C#中使用Ivi.Visa.Interop(引用VISA COM 5.2类型库)并在尝试读取BINBLOCK时收到以下错误:*“请求的资源地址是此实现不支持的资源类型
VISA COM I / O“*请参见随附的屏幕截图。 我还附上了整个项目。 我使用的代码与这里给出的示例基本相同(最后一行):使用VB.net进行跟踪捕获我不知道我做错了什么。 我很感激任何帮助,建议,工作代码示例等。谢谢,-Bill IPR_Live.zip26.6 KB 以上来自于谷歌翻译 以下为原文 All, I'm using Ivi.Visa.Interop in C# (referencing VISA COM 5.2 Type Library) and am getting the following error when trying to read a BINBLOCK: *"The requested resource address was of a resource type not supported by this implementation of VISA COM I/O"* Please see attached screenshot. I've also attached the entire project. The code I'm using is essentially the same as the example given here (very last line): Trace Capture using VB.net I don't know what I'm doing wrong. I'd appreciate any help, suggestions, working code samples, etc. Thanks, -Bill 附件
|
|
相关推荐
2个回答
|
|
你好比尔,你的帖子的文字没有提到你正在使用的VNA模型,但只是通过查看屏幕截图中的命令,我可以看出它看起来像是8510,8753,872x或者更老的阻抗分析仪
或者光波组件分析仪,它们都在SCPI标准时代之前使用过类似的命令。 这些分析仪都使用binblock标题,该标题与SCPI标准指定的标题略有不同,后者现在所有符合该标准的仪器都使用该标题。 虽然您看到的错误消息描述的内容听起来与我所说的不同,但您绝对不能将IEEEBinaryType.BinaryType_R8或IEEEBinaryType.BinaryType_R4的ReadIEEEBlock方法与这些特定的VNA一起使用。 因此,如果标题差异可能是您的问题背后的唯一根本原因,那么您看到的消息可能只是错误报告的错误字符串。 我记得在这个论坛上肯定有一些老帖子详细说明了这两种不同的binblock标题格式之间的差异,我相信我可能在几年前就已经发布了其中一种。 不幸的是我今天没有时间尝试搜索直接指向其中一个,但我很确定“binblock”这个词必须出现在它们中:-)。 此外,其他可能使用Visa.Interop组件来实现与这些分析器进行binblock读/写的人也许能够在这里进行编程。 以上来自于谷歌翻译 以下为原文 Hello Bill, The text of your post doesn't mention what model of VNA you're using, but just by looking at the commands in your screenshot I can tell it looks to be an 8510, 8753, 872x or perhaps an older impedance analyzer or lightwave component analyzer that all used a similar set of commands in the pre-SCPI-standard era. Those analyzers all use a binblock header that's a bit different from the one specified by the SCPI standard which is used by all the instruments nowadays that adhere to that standard. Although the error message you're seeing is describing something that sounds different from what I'm saying, you definitely can't use that ReadIEEEBlock method with IEEEBinaryType.BinaryType_R8 or IEEEBinaryType.BinaryType_R4 with those particular VNAs. So the message you're seeing might just be an incorrectly reported error string if perhaps the header difference is the only root cause behind your issue. I recall there are definitely old posts on this forum that detail the differences between those two different binblock header formats, and I believe I may have posted one of those myself a few years ago. Unfortunately I don't have time today to try searching to point you directly to one of those, but I'm pretty sure the word 'binblock' must be present in them :-). Also, other folks who may have used the Visa.Interop component to achieve binblock reads/writes with those analyzers may be able to chime in here. |
|
|
|
uwyywefwd 发表于 2018-10-31 13:10 嗨布拉德,谢谢你的详细回复。 我正在使用8753ES。我已经被VEE宠坏了,它知道如何从任何仪器读取binblock,无论多大。 无论如何,我查看了一些较旧的帖子,发现了一个旧的VB6示例,让我走上正轨。 我现在终于有了工作代码。 最好的问候,-Bill为了以防万一有一天它可能会让别人受益,这就是我在8753ES上阅读的痕迹。 此代码也适用于8719,8720和8722分析仪。 (代码也附加,因为这个论坛会在括号中出现任何内容。)public float [] TraceRead(){//使用Form 5,所以我们不必反转字节。 //以下内容来自08753-90475.pdf,8753ET / ES网络分析器程序员指南:// // FORM 5:// PC-DOS 32位浮点格式,每个字节4个字节,8 // 每个数据点的字节数。 数据前面跟// FORM1中的标题相同。 字节顺序相对于FORM2反转,以符合// PC-DOS格式。 如果您使用的是基于PC的控制器,则FORM5是最有效的格式。 thisInstrument.WriteString(“form5;”,true); //输出分析仪屏幕上显示的数据。 // OUTPFORF是一个快速数据传输命令,因为只传输了第一个OUTPFORM数据对。 thisInstrument.WriteString(“OUTPFORF;”,true); //阅读标题 string header = thisInstrument.IO.ReadString(2); //应该是“#A”标准块标头//读取要遵循的块中的字节数。 byte [] lengthBytes = thisInstrument.IO.Read(2); //长度由这2个字节给出。 int blockLength = BitConverter.ToInt16(lengthBytes,0); //转换为整数(例如0x6,0x48 = 1608字节)。 //读取块字节[] blockBytes = thisInstrument.IO.Read(blockLength); //将块字节转换为浮点数组。 int dataTypeLength = 4; // FORM5每个浮点数返回4个字节。 float [] traceData = new float [blockBytes.Length / dataTypeLength]; for(int i = 0; i {traceData [i / dataTypeLength] = BitConverter.ToSingle(blockBytes,i);} return traceData;}编辑用正确的文件替换附件。编辑:WDrago于2014年9月21日9:04 上午 以上来自于谷歌翻译 以下为原文 Hi Brad, Thank you for the detailed reply. I'm using an 8753ES.I've been spoiled by VEE which knows how to read a binblock from just about any instrument no matter how old. Anyway, I looked at some of your older posts and found an old VB6 example that put me on the right track. I finally have working code now. Best regards, -Bill Just in case it might benefit someone else some day, this is how I'm reading the trace on the 8753ES. This code should also work on the 8719, 8720, and 8722 analyzers as well. (Code is also attached since this forum mangles anything in brackets.) public float[] TraceRead() { // Use Form 5 so we don't have to reverse bytes. // The following is from 08753-90475.pdf, 8753ET/ES Network Analyzer Programmer's Guide: // // FORM 5: // PC-DOS 32-bit floating-point format with 4 bytes-per-number, 8 // bytes-per-data point. The data is preceded by the same header as in // FORM1. The byte order is reversed with respect to FORM2 to comply with // PC-DOS formats. If you are using a PC-based controller, FORM5 is the // most effective format to use. thisInstrument.WriteString("form5;", true); // Output data as it appears on the screen of the analyzer. // OUTPFORF is a fast data transfer command because only // the first number of the OUTPFORM data pair is transferred. thisInstrument.WriteString("OUTPFORF;", true); // Read the header. string header = thisInstrument.IO.ReadString(2); // Should be "#A" the standard block header // Read the number of bytes in the block to follow. byte[] lengthBytes = thisInstrument.IO.Read(2); // The length is given by these 2 bytes. int blockLength = BitConverter.ToInt16(lengthBytes, 0); // Convert to an integer (e.g. 0x6, 0x48 = 1608 bytes). // Read the block byte[] blockBytes = thisInstrument.IO.Read(blockLength); // Convert the block bytes into an array of floats. int dataTypeLength = 4; // FORM5 returns 4 bytes per floating point number. float[] traceData = new float [blockBytes.Length / dataTypeLength]; for (int i = 0; i < blockBytes.Length; i += dataTypeLength) { traceData[i / dataTypeLength] = BitConverter.ToSingle(blockBytes, i); } return traceData; } Edited to replace attachment with correct file. Edited by: WDrago on Sep 21, 2014 9:04 AM 附件
|
|
|
|
只有小组成员才能发言,加入小组>>
1240 浏览 0 评论
2352 浏览 1 评论
2163 浏览 1 评论
2030 浏览 5 评论
2914 浏览 3 评论
983浏览 1评论
关于Keysight x1149 Boundary Scan Analyzer
713浏览 0评论
N5230C用“CALC:MARK:BWID?”获取Bwid,Cent,Q,Loss失败,请问大佬们怎么解决呀
813浏览 0评论
1240浏览 0评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-11-29 15:53 , Processed in 1.447949 second(s), Total 79, Slave 63 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号