AnsweredAssumed Answered

Error -410 - The query is interrupted

Question asked by jlu on Sep 16, 2008
Latest reply on Sep 18, 2008 by odanzy
Due to "Have to run connection expert to make a successful call to viOpen", I'd like to communicate with the instrument without help of VISA.
We don't want to force our users to run Connection Expert first to get the app works.

I write a small and simple app which implements the serial communication with the ActiveX control MSComm. The new app can communicate with the instrument. However

whenever I send two queries in the row, the instruments reports -410 error. What i did is as follows
1. Send a query to the instrument (I am sure I append a new line to each command)
2. Read the response back (I am sure I receive the whole response - I get the terminator <LF><CR>)
3. Send another query to the instrument. The instrument reports -401 error
4. Read the response. Apparently, the response is not complete - no <LF><CR> received. And I think this response is the one for the first query.

However, if I insert a *CLS command between two queries, no error occurs.

I check my code against every possible reason which may cause the error of -410
(1) terminator - I'm sure each command is appended with a new line
(2) the instrument does not finish the response - the response to the first query is complete - <LF><CR> received
(3) the time between two queries are too short - it doesn't apply in my case: type in the command, press send the button - this should be long enough

I also did experiments on HyperTerminal. HyperTerminal works OK.

Could you please shed some light on this issue? I have been struggling with this headache for a coupld days.

Thanks a lot!  

Outcomes