完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
美好的一天,我正在使用gpib和linux-gpib库编程HP8510C VNA。
我正在使用ibrsp()函数(实际上在python包中称为rsp())来轮询设备的状态字节,以找出单个扫描或单个点何时完成。 我很难理解手册和其他资源,可以使用一些具体的例子。 我得到状态字节作为我转换为int的十六进制值。 我的理解是字节是int8(0-255)但我返回的十六进制值只能转换为int16。 你可能无法帮助...它只是增加了混乱。 无论如何,我从int16演员那里得到一个数字:1或2,当测量完成时。 有时我得到一个像IF过载的错误,它也包含在状态字节的某个地方......我意识到单个扫描和单点测量将在其中一个字节(主要或次要)上设置不同的状态位 但我不知道如何破译输出。 我已经使用了gpib命令“OUTPSTAT”,它看起来更容易处理,因为它返回类似于:000,000或017,000和016,000。 但是,除非操作完成,否则此命令将失败并显示超时错误。 我可以把命令放进去试试,赶上来克服这个但是那是另一个黑客...我讨厌黑客......这就是为什么我回到了ibrst()串口轮询命令。 如果一个善良的灵魂可以帮助我,我将非常感激...我将在下周进入实验室并发回相关细节。 对不起,我的问题很模糊,我还在基本了解。 干杯 以上来自于谷歌翻译 以下为原文 Good day, I'm programming an HP8510C VNA with gpib and the linux-gpib library. I am using the ibrsp() function ( actually called rsp() in the python package ) to poll the device for the status bytes, to find out when a single sweep or a single point, has finished. I am having difficulty in understanding the manual and other resources and could use some concrete examples. I get the status bytes as a hexidecimal value that I convert to an int. My understanding is that the bytes are int8 ( 0-255) but my returned hex value only casts into int16. You may not be able to help with that...it just adds confusion. Anyhow, I get a number from the int16 cast like: 1 or 2 when a measurement is complete. Sometimes I get an error like an IF overload and that is included somewhere in the status bytes too... I realize that a single sweep and a single point measurement will have a different status bit set on one of the bytes ( primary or secondary) but I don't know how to decipher the output. I've played around with the gpib command "OUTPSTAT" and it looks easier to deal with, since it returns something like: 000,000 or 017,000 and 016,000. However, this command fails with a timeout error unless the operation is complete. I could put the command into a try, catch to overcome this but that's another hack...I hate hacks...That's why I went back to the ibrst() serial poll command. If a kind soul out there can help me I will be very grateful...I'll be in the lab next week and can post back pertinent details. Sorry that my question is vague, I'm still developing a basic understanding. Cheers |
|
相关推荐
2个回答
|
|
7 128扩展字节中的原因。
6 64 RQS(SRQ发布)。 5 32语法错误。 4 16 SING,NUMG,Cal Std测量完成。 3 8单路双端口测量。 在REVERSE DEVICE之后等待GET。 2 4 TRIG模式,等待GET(下一个点或扫描)或SIMS; 还有FASC; 准备好GET菜单硬件触发。 1 2数据输入完成。 0 1注意显示消息。 这有帮助...这个列表在8510关键字PDF上,但是当我第一次看到它时对我来说没有意义。 此列样式很有用。 我想我可能已经“解决”了我的问题,这个问题不知道会发生什么......当我到实验室时,真相就会出现。 我发现OUTPSTAT仅在扫描完成时才起作用,这很奇怪...好吧并不奇怪,但除非你能尝试/捕捉,否则它没有用。 欢呼,wbg编辑:wannabegeek于2013年7月2日上午11:14编辑:wannabegeek于2013年7月2日上午11:17 以上来自于谷歌翻译 以下为原文 7 128 Reason in Extended Byte. 6 64 RQS (SRQ issued). 5 32 Syntax Error. 4 16 SING, NUMG, Cal Std Measurement Complete. 3 8 One-Path 2-Port Measurement. Wait for GET after REVERSE DEVICE. 2 4 TRIG Mode, Waiting for GET (Next Point or Sweep) or SIMS; also FASC; Ready for GET Menu Hardware Trigger. 1 2 Data Entry Complete. 0 1 CAUTION Message Displayed. That helped...this list is on the 8510 keyword PDF but it didn't make sense to me when I first looked at it. This column style is helpful. I think I might have "solved" my issue, which was not knowing what to expect...truth will be when I get to lab. I find it weird that OUTPSTAT only works when the sweep in is finished...well not weird, but it's not helpful unless you can try/catch. cheers, wbg Edited by: wannabegeek on Jul 2, 2013 11:14 AM Edited by: wannabegeek on Jul 2, 2013 11:17 AM |
|
|
|
它的旧时尚,但正常的预期行为:* OPC? (现代scpi)阻塞直到扫描完成。 但是请记住,你正在编写29年前开发的接口编程! (尝试写入29岁的任何其他电子对象)。 除非这是一个业余爱好实验,否则你可能会在8510上借用时间。 以上来自于谷歌翻译 以下为原文 Its old fashied but a normal expected behaviour: *OPC? (modern scpi) blocks until the sweep is complete. But also remember, you are programming against an interface that was develped 29 years ago! (try writing to any other electronic object that's 29 years old). Unless this is a hobby experiment, you are likely running on borrowed time on that 8510. |
|
|
|
只有小组成员才能发言,加入小组>>
1231 浏览 0 评论
2351 浏览 1 评论
2161 浏览 1 评论
2026 浏览 5 评论
2910 浏览 3 评论
976浏览 1评论
关于Keysight x1149 Boundary Scan Analyzer
709浏览 0评论
N5230C用“CALC:MARK:BWID?”获取Bwid,Cent,Q,Loss失败,请问大佬们怎么解决呀
809浏览 0评论
1234浏览 0评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-11-27 19:30 , Processed in 1.449405 second(s), Total 80, Slave 63 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号