AnsweredAssumed Answered

Query interupted for 34401A in remote mode using RS232 connection

Question asked by mr.vymapson on Dec 3, 2013
Latest reply on Dec 9, 2013 by hognala
Hey all,

I can send SCPI commands to my Agilent 34401a multimeter through Matlab, but cannot receive readings. It seems as though the response from the multimeter is stranded on the output buffer. I know that the multimeter is receiving messages from my PC, since SCPI commands requiring only a "write", such as *RST or SYST:REM, take effect.

If the device has just been reset, and I query a command, lets say *IDN?, a timeout occurs. If I try querying a second time, even after doing a "read", I get the SCPI error -410, which apparently means "query interrupted". I've also read that this means the output buffer was not emptied. I believe this is a handshaking problem.

Here are some things which I have already verified and set:
1. Settings are the same for Agilent 34401a, PC serial port (set through control panel), and Matlab serial port object. Baud Rate = 9600, Stop Bits = 2, Data Bits = 8, Parity = none.
2. FlowControl is set to "none" for both the PC serial port and the Matlab serial port object. I tried setting both of these to "hardware", and could not connect to the multimeter through Matlab. As a sidenote, I realize that Agilent 34401a uses a single start bit, but I have no idea how to set this. 
3. Verified the serial cable is a null modem, and checked via connection test that pins 2-3, 4-6, and 7-8 are crossed over.
4. On Agilent 34401a, set interface mode to RS232 and language to SCPI.
5. Since Agilent 34401a uses DTR/DSR handshaking, I enabled DataTerminalReady and disabled RequestToSend in Matlab serial port object. From my knowledge, RTS/CTS handshaking protocol is not used with Agilent 34401a, so I disabled RequestToSend. Even having it on made no difference though.
6. The terminator is set to "Line Feed" for the Matlab serial port object. I tried putting a \n right after an SCPI command, but nothing different happened.
7. Finally, I verified that I can query strings through the Matlab object, by doing the loopback test. (shorting pins 2 and 3 at the end of the serial cable, when it is unplugged from the multimeter).

I realize this is a lot of information. I want to provide as much relevant information as possible. Any help would be much appreciated.


Regards,

Mr. Vymapson  

Outcomes