完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
电子发烧友论坛|
大家好,我是学位学生,我目前正在从事T& M项目,该项目涉及编写VEE程序以自动化测量过程。
我在使用Direct I / O与仪器通信时遇到问题。 我使用的是非安捷伦仪器,我使用的是Rigol DS1102E数字示波器。 问题:我尝试通过Direct I / O使用SCPI命令从仪器读取跟踪数据,只能使用Read Text x作为str来获取完整的返回数据。 当我尝试在Array1D中使用Read Binblock x作为二进制时,我将遇到超时问题或数据数据解码不完整或者每次按下模拟都没有找到数据并且结果不一致,我应该从返回的数据中得到600点。 当我使用Agilent Interactive I / O和I / O监视器来了解返回的数据时,读取过程是正确的,返回的数据是HEX并转换为ASCII。 返回的消息请参见附件IO Montor Result.png。 根据我对IO Monitor结果的理解,我知道返回的数据是在无符号Int8中,因此,我首先使用ToFile对象使用Read Text x作为str保存数据,并使用FromFile Object将Read Binblock x作为Binary读回数据 在Array 1 D中,返回的数据能够完全解码。 问题:为什么Direct BinBlock x作为直接I / O事务中的二进制Array1D无法完全解码返回的数据? 是否需要对缓冲区大小进行任何设置或者我缺少哪一步? 请指教。 谢谢你,Jeremy Tan 以上来自于谷歌翻译 以下为原文 Hi all, I am a degree student and I currently working on a T&M project which involved in writing VEE program to automate a measurement process. I face a problem on using Direct I/O to communicate with the instrument. I am using non Agilent Instrument, I am using Rigol DS1102E Digital Oscilloscope. Problem: I try to Read the trace data from the instrument using the SCPI command via Direct I/O, the was only able to use Read Text x as str to get the full returned data. When I tried to use Read Binblock x as Binary in Array1D, I will have a timeout issue or data data decoded incomplete or no data found every single time I pressed simulate and the result was not consistent , I should get 600points from the returned data. When I use the Agilent Interactive I/O and the I/O monitor to understand the returned data, the reading process was correctly and the returned data is in HEX and converted into ASCII. The returned message see attachement IO Montor Result.png. From my understanding through the IO Monitor result, I know the returned data is in unsigned Int8, therefore, I first save the data by using Read Text x as str using ToFile object and read the data back using FromFile Object with Read Binblock x as Binary in Array 1 D and the returned data was able to completely decode. Question: Why the Read BinBlock x as Binary Array1D in the Direct I/O transaction cannot completely decode the returned data? Is it I need to do any setting on the buffer size or what step I am missing? Please advise. Thanks Regards, Jeremy Tan 附件
|
|
相关推荐
7个回答
|
|
|
你检查过数据字符的结尾了吗?
我事物VEE默认假定LF(换行) 以上来自于谷歌翻译 以下为原文 Have you checked the end of data character? I thing VEE default assumes a LF (line feed) |
|
|
|
|
|
@ ulf.jakobsson嗨,你检查过数据字符的结尾了吗? 你想说什么? 我正在使用Direct I / O事务,我可以知道在哪里检查吗? 来自仪器经理? 我只是一个初学者,也许你可能需要更直接的解释。 谢谢编辑:我已经知道数据末尾的含义了。 我试过两个,通过END或No End也一样。 只是它在每次运行模拟时读取不同的返回数据点,返回的数据不一致。 有时它得到错误状态没有数据返回。 这是缓冲区大小吗?编辑:jeremytcw于2012年11月5日上午4:11 以上来自于谷歌翻译 以下为原文 @ulf.jakobsson Hi, Have you checked the end of data character? what you try to say? I am using Direct I/O transaction, may I know where to check? from the instrument manager? I am just a beginner, perhaps you may need explain more straight forward. Thanks Edit: I know what you means by end of data character already. I have tried both, by END or No End also same. Just it read different returned data point every single time I run simulate, the returned data is not consistence. and sometimes it got error state no data return. Is it anything do with buffer size? Edited by: jeremytcw on Nov 5, 2012 4:11 AM |
|
|
|
|
|
是的,我知道你说了什么,但我也尝试过,我使用的仪器是非安捷伦产品。
返回的数据在uint8中有600pts我只能读取文本字符串格式的完整数据,并使用文件中的Read BinBlock手动将其转换回uint8。 非常有趣的是找出为什么Direct IO不允许我在Binary中读取BinBlock。 看到附件,WAVefromData.txt是使用Direct IO读取的返回数据,并使用ReadTraceData.vee使用Binblock二进制加载数据,这是我想要的600pts的返回值。 有关您的信息,返回值为0-255数据,不是实际格式。 不管怎样,谢谢你的分享。 :-)编辑:jeremytcw于2012年11月5日上午7:27 ReadTraceData.vee3.8 KB 以上来自于谷歌翻译 以下为原文 YES, I know what you said, but I tried it also, and the instrument I use is non Agilent product. The returned data is in uint8 with 600pts I only able to read the full data in text string format and manually convert it back to uint8 using Read BinBlock from file. Very interesting to find out why with the Direct IO not allow me to read BinBlock in Binary. See the attachment, WAVefromData.txt was the returned data read using Direct IO and use the ReadTraceData.vee to load the data using Binblock binary and that is the returned value in 600pts I want. For your information, the returned value is in 0-255 data and is not in real format. Anyway, thanks for your sharing here. :-) Edited by: jeremytcw on Nov 5, 2012 7:27 AM 附件
|
|
|
|
|
60user135 发表于 2019-5-16 21:00 带时间戳的第一行和第二行的开头是否会出现此问题? 如果它是仪器响应的一部分,我想它可以。 以上来自于谷歌翻译 以下为原文 Could the first row with timestamp and the begining of the second row be making this problem? If it's a part of the instrument response I guess it could. |
|
|
|
|
|
哎呀。 第一行和第二行是我在发现期间故意写入的,以便我知道何时收集数据。 我已经尝试了所有可能的方式d,但严重的是我找不到任何最好的答案来解释它。 因为通过IO监视器,缓冲区中的总线消息显示它正在读取一个字符并重复600次,我认为这是仪器响应的特性。 因此,我继续编写我的程序,添加了额外的对象,即ToFIle和FromFile对象。 也许有人可能会给我解释原因。 感谢@ ulf.jakobsson的分享。编辑:jeremytcw于2012年11月6日下午9:02 以上来自于谷歌翻译 以下为原文 Opps. The first row and the second row was I purposely write in during my finding so that I know when the data was collected. I already tried all the possible way d, but seriously I can't found any best answer to explain it. Because through the IO Monitor, the Bus message in buffer shows it is reading a character and repeated for 600times, and I think that is the instrument respond in character. Therefore, I continue to write my program by added in extra object which is ToFIle and FromFile object. Perhaps someone may give me explanation why. Thank you @ulf.jakobsson for your sharing. Edited by: jeremytcw on Nov 6, 2012 9:02 PM |
|
|
|
|
60user135 发表于 2019-5-16 21:29 嗨@ ulf.jakobsson,VEE Direct IO对象的USBTMC驱动程序不兼容是否有可能读取Binblock数据? 谢谢。 以上来自于谷歌翻译 以下为原文 Hi @ulf.jakobsson, Will it be the possibility of the incompatibility of the USBTMC driver for VEE Direct IO object to read the Binblock data? Thanks. |
|
|
|
|
|
我忙于考试。 通过获得RIGOL公司技术支持的帮助,我能够以正确的垂直显示值获得正确的返回跟踪数据。 我觉得我应该在这里分享我的发现。 出于某种原因,RIGOL示波器不直接将实际跟踪数据转换为直接io对象的binblock读取。 Agilent VEE仅允许直接I / O以TEXT格式读取返回的数据。 之后,使用修复转换公式读取binblock_bin,以使用正确的垂直显示值返回原始数据。 abit很奇怪,但它能够在转换后获得实际数据。 该方法修改了LabView的仪器演示程序。 以上来自于谷歌翻译 以下为原文 I was busy with my exam. I able to get the correct returned trace data with the correct vertical display value by getting help from the RIGOL company tech support. I feel that I should share my findings here. For some reason, the RIGOL Oscilloscope doesn't directly convert the actual trace data into binblock read from the direct io object. Agilent VEE only allow the direct I/O to read the returned data in TEXT format. After that read binblock_bin with a fix conversion formula to get back it original data with the correct vertical display value. Is abit weird, but it is able to get back the actual data after conversion. This method was modified the LabView's demo program for the instrument. |
|
|
|
|
只有小组成员才能发言,加入小组>>
1842 浏览 0 评论
2738 浏览 1 评论
2640 浏览 1 评论
2447 浏览 5 评论
3452 浏览 3 评论
1844浏览 0评论
416浏览 0评论
/9
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2025-12-1 18:35 , Processed in 0.998968 second(s), Total 84, Slave 68 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191

淘帖
3427