If you are using VISA Read, what is the set value for Byte Count? How many bytes of data do you expect from the device after sending the command?
If, for example, you set Byte Count = 100, but the VISA Read is unable to receive 100 bytes of data returning from the device (after command is sent), there will be timeout error.
非常谢谢你的回复,我发现当我写入meas p25v这个命令,读寄存器中好像没有1个字节的返回值。
因为当我首先写入*idn?命令,返回了器件信息“rigol technologies,DP1A111500130,...”无错误。此时我不重启程控电源(读寄存器中值未清除),继续发出meas p25v命令。此时不再出现错误但没有返回电压值,仍然返回了器件信息。这是不是说“meas p25v”根本就没有返回值,所以没有改写读寄存器中内容,而开始出现错误是因为寄存器中根本没有一个字节?
请指教.
Are you able to post your code here?
PS: If you are performing continuous VISA Write and Read, please place the VISA Open and VISA Close outside the Read/Write loop i.e. VISA Open --> (Write/ Read loop) --> VISA Close.
我并未连续执行读写,只是依次输入两次命令分别运行了两次,所以仪器应当可以收到我的命令。
后来发现编程手册上的标准格式是“MEAsure[:VOLTage][:DC]?[{P6V|P25V|N25V}]”,后来我输入"meas:volt:dc? p25v"仪器返回了具体电压值。是我的粗心所致,你的建议给了我很大帮助,不好意思耽搁了你的宝贵时间。谢谢。