Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Query Unterminated error

Hi,

I am new and working with LAbwindows CVI driver ag6000_MS (available  from NI site) to drive Agilent Oscilloscope DSO5034A. I find that when I run the .dll of the driver from the NI Teststand the instrument shows an error: Query Unterminated.

When debugging it is found that during the following code of the driver this error occurs:

Part of the code reproduced for the scrutiny:

viCheckErr( viPrintf (io, "*TST?"));
viCheckErr(viScanf (io, "%hd", testResult); => here the instrument reads Query unterminated
and then there is a VISA read timeout.

I donot see any problem with the code.

Can some body help me on solving this?


0 Kudos
Message 1 of 4
(5,898 Views)
Hello Suprasaad,
          Does the Scope give the same error if you use the VISA Interactive Control and send the same command (and read the response)?  After looking at the code, it seems that support for the DSO50xx models was added in May of 2007.  If your scope is older than this, you should upgrade your firmware.  Please try to reduce the TestStand code down to the bare minimum that reproduces the issue and then post that sequence file to this thread.

Thanks,

NathanT
0 Kudos
Message 2 of 4
(5,869 Views)
Hi Nathan,

Thanks for your prompt reply. Actually I was able to solve the problem. I found that all the queries being communicated from the code to the instrument had to be terminated by "\n" which in earlier driver software was not there.

However I thank you for the support and might look forward for any future supports, if need be.

Best regards,


Suprasaad
0 Kudos
Message 3 of 4
(5,854 Views)
I am glad to hear that things are working well now.

-Nathan
0 Kudos
Message 4 of 4
(5,829 Views)