完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
大家好,我一直在尝试通过局域网将IQ数据下载到E4438C,但我得到了“-103,无效分隔符”Eror。
我找不到代码中的错误。 任何帮助,将不胜感激。 我附上了我的代码.RegardsCengiz EKENStreamWriter sr = new StreamWriter(Directory.GetCurrentDirectory()+“/ IQData.txt”); const int NUMSAMPLES = 500; 字节&安培;#91;&安培;#93; iqBuffer = new byte[ NUMSAMPLES * 4&#93 ;; 短&安培;#91;&安培;#93; idata = new short[ NUMSAMPLES&#93 ;; 短&安培;#91;&安培;#93; qdata = new short[ NUMSAMPLES&#93 ;; 短的价值; 短q值; int numsamples = NUMSAMPLES; for(int index = 0; index> 8)& 为0xFF); iqBuffer[ index * 4 + 1] =(字节)(ivalue& 0xFF); iqBuffer[ index * 4 + 2] =(字节)((qvalue >> 8)& 0xFF); iqBuffer[ index * 4 + 3] =(字节)(qvalue& 0xFF); } String iqBufferStr = System.Text.Encoding.UTF8.GetString(iqBuffer); writeLine(“:MEM:DATA:UNPR 'WFM1:myDataDosya '#”+ iqBuffer.Length.ToString()。Length + iqBuffer.Length +“”+ iqBufferStr); PS:我得到了这个例子E4400-90627.pdf “Agilent Technologies信号发生器为c ++创建和下载波形文件并转换为c# 以上来自于谷歌翻译 以下为原文 Hi All, I have been trying to download IQ data to E4438C over LAN but I got "-103, Invalid Seperator" Eror. I could not locate the soruce of error in my code. Any help would be appreciated. I attached my code. Regards Cengiz EKEN
PS:I got this example E4400-90627.pdf "Agilent Technologies Signal Generators Creating And Downloading Waveform Files for c++ and converted to c# |
|
相关推荐
2个回答
|
|
大家好,我找到了为什么会出现“-103,无效分隔符”。
仪器命令行应该是berite(“:MMEM:DATA ”WFM1:myDataDosya “,#”+ iqData.Length.ToString()。Length + iqData.Length + g); 我忘记了“,”但现在又出现了另一个问题。 我想我无法发送I / Q数据。 因为,虽然信号发生器上有数据下载UI,但进度条保持在%0,一段时间之后它就会在没有完成下载的情况下消失。我想我必须实现MATLAB的“binblockwrite(...)”或VEE的“写入BINBLOCK” C#中的Int16“命令。 有没有人在那之前做过那个?有什么帮助吗?问候麒麟EKEN 以上来自于谷歌翻译 以下为原文 Hi All, I Have found why "-103,Invalid seperator" occurs. The instrument command line should be write(":MMEM:DATA "WFM1:myDataDosya",#" + iqData.Length.ToString().Length + iqData.Length + g);I forgot the ",".But now another problem. I think I could not send the I/Q data. Because, although there is a data download UI on Signal Generator, Progress Bar remains at %0 and some time later it disappears without completing the download. I think I have to implement MATLAB's "binblockwrite(...)" or VEE's "WRITE BINBLOCK Int16" command in C#. Is anyone out there who did that before? Any Help? Regards Cengiz EKEN |
|
|
|
大家好,我找到了解决方案。
这是如何;而不是发送I / Q数据作为字符串(写(“:MMEM:DATA ”WFM1:myDataDosya “,#”+ iqData.Length.ToString()。长度+ iqData.Length + g);其中 g是使用Encoding.ASCII.GetBytes(...)格式化的IQArray的ASCII表示。我使用socket.send(iqData)作为byte []通过TCIP / IP直接发送它,现在可以了。 最后的代码是:writeLine(“:SOURce:RADio:ARB:STATE OFF”); Thread.Sleep(200); write(“:MMEM:DATA ”WFM1:myDataFile “,#”+ iqData.Length.ToString ().Length + iqData.Length); writeLine(iqData); private void writeLine(string command){Soket.Send(Encoding.ASCII.GetBytes(command + EOLSequence)); } private void writeLine(byte[] data){Soket.Send(data); Soket.Send(Encoding.ASCII.GetBytes(EOLSequence)); 希望有人使用它.RegardsCengiz EKENwww.marka-turk.com 以上来自于谷歌翻译 以下为原文 Hi all, I found a solution. Here is how; Instead of sending I/Q data as string(write(":MMEM:DATA "WFM1:myDataDosya",#" + iqData.Length.ToString().Length + iqData.Length + g); where g is the ASCII representation of IQArray formatted using Encoding.ASCII.GetBytes(...)) I sent it directly over TCIP/IP using socket.send(iqData) as byte[] and it is OK now. The final code is;
Hope Someone use it Regards Cengiz EKEN www.marka-turk.com |
|
|
|
只有小组成员才能发言,加入小组>>
1349 浏览 0 评论
2405 浏览 1 评论
2234 浏览 1 评论
2088 浏览 5 评论
2981 浏览 3 评论
1311浏览 1评论
关于Keysight x1149 Boundary Scan Analyzer
793浏览 0评论
N5230C用“CALC:MARK:BWID?”获取Bwid,Cent,Q,Loss失败,请问大佬们怎么解决呀
1098浏览 0评论
1349浏览 0评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2025-1-31 17:57 , Processed in 1.659542 second(s), Total 79, Slave 63 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号