完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
电子发烧友论坛|
大家好,我正在尝试将我的PC连接到34401A trhough SPCI命令(RS232)。
我发送一些命令没有问题,如SYST:REM,SYST:LOC,* RST等。当我发送这些命令时,万用表的工作结果如此。 我的问题是关于需要答案的命令,例如,如果我发送命令“MEAS:VOLT:DC?10,0.001”,则出现值为-410的错误,每个需要答案的命令都具有相同的结果( “* IDN?”,“CONF?”等)。 用户手册解释了此错误是:查询中断接收到一个命令,该命令将数据发送到输出缓冲区,但输出缓冲区包含来自先前命令的数据(之前的数据未被覆盖)。 电源关闭或执行* RST(复位)命令后,输出缓冲区将被清除。 所以我在命令之前应用了一个复位(即使是一个清晰的(“* CLS”))。 我遵循的步骤是:SYST:REM * RST * CLS MEAS:VOLT:DC? 10,0.001(或任何需要回答的命令)我也尝试过:* RST * CLS SYST:REM * RST * CLS MEAS:VOLT:DC? 10,0.001(或任何需要答案的命令)和许多不同的组合有人知道发生了什么? 你知道我该怎么办? 非常感谢! 以上来自于谷歌翻译 以下为原文 Hello everyone, I am trying to connect my PC to a 34401A trhough SPCI commands (RS232). I have no problems to send some commands as SYST:REM, SYST:LOC, *RST, etc. When I send these commands the multimeter works in consequence. My problem is about commands which required a answer, for example, If I send the command "MEAS:VOLT:DC? 10,0.001" an error appears with a value of -410, every command which required an answer has the same result ( "*IDN?", "CONF?", etc). User manual explains that this error is: Query INTERRUPTED A command was received which sends data to the output buffer, but the output buffer contained data from a previous command (the previous data is not overwritten). The output buffer is cleared when power has been off, or after a *RST (reset) command has been executed. So I apply it a reset (Even a clear too ("*CLS") ) before the command. The steps I follow are: SYST:REM *RST *CLS MEAS:VOLT:DC? 10,0.001 (Or any command wich requiered an answer) I've tried also: *RST *CLS SYST:REM *RST *CLS MEAS:VOLT:DC? 10,0.001 (Or any command wich requiered an answer) And a lot of different combinations Someone know what's happening?? Do you have any idea what should I do? Thank you so much! |
|
相关推荐
2个回答
|
|
|
您好,我没有使用该仪器的RS232经验,我正常使用GPIB。
可能是握手问题,即RS232需要完整的接口,握手线(想想,这在手册中)。 此外,一些确认命令作为RST或DCV设置至少需要20ms的设置时间,因此需要延迟。 显然,您必须清除或读取输出缓冲区(握手后发出仪器响应信号)。 RST必须重置仪器,而不是输出缓冲器。 在循环中重复使用RST命令也不好。 在你的命令序列中,我没有看到任何查询命令,我的意思是,你收到答案字符串,然后清空输出缓冲区。 您正在使用配置命令和查询。 要检查错误,请更好地分离配置和触发命令:'CONF:VOLT:DC 10,0.001'; '读?' '读?' ......弗兰克 以上来自于谷歌翻译 以下为原文 Hello, I got no experience with RS232 on that instrument, I use GPIB normally. Could be a problem with handshaking, i.e. the RS232 requires full interface, with handshake lines (think, that's in the manual). Also, some confirguration commands as RST or the DCV setting require 20ms at least of set up time, so a delay is required. Obviously, you have to clear or read the output buffer (after handshake signals a response from the instrument). RST will reset the instrument, but not the output buffer, necessarily. It's also not good, to have repeated RST command in a loop. And in your command sequence, i don't see any query command, I mean, where you receive the answer string and in turn empty the output buffer. You are using a configuration command and query in one. To check the error, better separate configuration and trigger commands: 'CONF:VOLT:DC 10,0.001'; 'READ?' 'READ?' ... Frank |
|
|
|
|
|
分辨率改为0.0001即可
|
|
|
1 条评论
|
|
只有小组成员才能发言,加入小组>>
1844 浏览 0 评论
2739 浏览 1 评论
2640 浏览 1 评论
2449 浏览 5 评论
3458 浏览 3 评论
1844浏览 0评论
416浏览 0评论
/9
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2025-12-2 00:49 , Processed in 0.827601 second(s), Total 87, Slave 66 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191

淘帖
1807