完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
电子发烧友论坛|
我试图使用LAN连接,以ASCII或二进制格式从网络分析仪(E5071C)获取数据,在VB 2010中使用相同的程序。当尝试以ASCII格式获取数据时,仅获取X轴(频率)。
读取Y轴显示错误“意外的I / O终止或无法覆盖列表项#1到浮点格式”。 当它是二进制格式时,显示错误“VI_Error_timeout”。 我正在复制代码和这封邮件。 请建议我纠正错误。 Imports Ivi.Visa.Interop Dim readdata()As Double Dim poin As Integer Dim freqdata()As Double Dim iomgr As Ivi.Visa.Interop.ResourceManager Dim age506x As Ivi.Visa.Interop.IFormattedIO488 iomgr = New ResourceManager age506x = New FormattedIO488 age506x.IO = iomgr.Open(“TCPIP :: 169.254.213.57”)age506x.IO.Timeout = 1000 age506x.WriteString(“:FORM:DATA ASC”,True)age506x.WriteString(“:SENS1:SWE:POIN? “,True)poin = age506x.ReadNumber ReDim freqdata(poin - 1)age506x.WriteString(”:SENS1:FREQ:DATA?“,True)freqdata = age506x.ReadList(IEEEASCIIType.ASCIIType_R8,”,“)ReDim readdata(poin * 610 - 1)age506x.WriteString(“:CALC1:DATA:FDAT”,True)readdata = age506x.ReadList(IEEEASCIIType.ASCIIType_R8,“,”)age506x.IO.Close() 以上来自于谷歌翻译 以下为原文 i am trying to take the data from Network Analyzer (E5071C) in ASCII or Binary format using LAN Connection, Programme for the same in VB 2010. When trying to take the data in ASCII format, getting only the X Axis (Frequency). Reading of Y Axis shows an error "Unexpected I/O termination or couldn't cover list item #1 to floating point format". Same way when it is in binary format, an error "VI_Error_timeout occured" is shown. I am copying the code along with this mail. Kindly advice me to correct the errors. Imports Ivi.Visa.Interop Dim readdata() As Double Dim poin As Integer Dim freqdata() As Double Dim iomgr As Ivi.Visa.Interop.ResourceManager Dim age506x As Ivi.Visa.Interop.IFormattedIO488 iomgr = New ResourceManager age506x = New FormattedIO488 age506x.IO = iomgr.Open("TCPIP::169.254.213.57") age506x.IO.Timeout = 1000 age506x.WriteString(":FORM:DATA ASC", True) age506x.WriteString(":SENS1:SWE:POIN?", True) poin = age506x.ReadNumber ReDim freqdata(poin - 1) age506x.WriteString(":SENS1:FREQ:DATA?", True) freqdata = age506x.ReadList(IEEEASCIIType.ASCIIType_R8, ",") ReDim readdata(poin * 610 - 1) age506x.WriteString(":CALC1:DATA:FDAT", True) readdata = age506x.ReadList(IEEEASCIIType.ASCIIType_R8, ",") age506x.IO.Close() |
|
相关推荐
1个回答
|
|
|
|
|
|
|
|
只有小组成员才能发言,加入小组>>
1844 浏览 0 评论
2739 浏览 1 评论
2640 浏览 1 评论
2449 浏览 5 评论
3458 浏览 3 评论
1845浏览 0评论
417浏览 0评论
/9
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2025-12-2 07:28 , Processed in 0.546470 second(s), Total 42, Slave 35 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191

淘帖
1589