Query INTERRUPTED on E5070B

Hi,I know this error has been mentioned before but this error occurs Intermittently with my VEE code when I am saving SnP files to a folder on the ENA. The SnP file does save ok and the data appears to be complete and correct even when the error appears.

My problem is that the warning does not appear the first time my code (user object) executes in my VEE program but it does cause the error for subsequent SnP file saves. To puzzle me more, if I run the the code (user object) as a stand alone block, the error will not occur even if I put it in a loop.

It must be a different block of code because these blocks don't have any query. Query interupted is when you send a scpi query, then send another command before you read out all the data for the query. Sometimes this occurs when you are using methods that read character by character and you forget to read the last EOL character from the last query. So, where is the query in your code, and how are you reading the response.

Thanks Dr Joel,The next block of VEE code that immediately follows what you have seen, transfers the SnP file from the ENA to a PC over GPIB one byte at a time. Maybe the problem occurs here but only shows up when a command is next sent to the ENA. My main program has a loop for saving an SnP file to the ENA and transferring the file to a PC each time around the loop. Between each loop the User is prompted to move the RF test cables to different ports on the DUT so it is not a timing issue and is probably that I do not have the EOL character. If so how do I implement it for the in the "To File" function block as WRITE BYTE does not have it?

I have attached a picture of the transfer block.

Thanks,Declan

Attachments

Sometimes I find that sending an "Exectute CLS" helps, or try reading a binblock instead of a byte at a time. CLS is supposed to clear the output buffer if there are any left over characters from queries that didn't get completely read. You might look up the ENA example in the vee examples for how I do it.

You need to increment the value 'length" by 1 or add an additional 1 byte read at the end to account for the newline character that terminates the binary block. The header only contains the number of bytes in the data itself, and does not include the termination character. If you don't read the termination character, then you will receive the query interrupted error on the next write statement.

Attached is an example that saves a Touchstone file from the ENA on a PC that I wrote a couple years ago.