I am having some problems using the ag5462x.c with the ag54621a oscilloscope. I have narrowed
the problem down to the function ag5462x_FetchWaveformSafe.
When this function is executed, the oscilloscope display gives the message "Query UNTERMINATED," and after a long delay, the CVI gives me the warning message "NON-FATAL RUNTIME ERROR "ag5462x.c," line 4483, col 9 thread id 0x0000C7C Function viRead: (return value = -1073807339 [0xbfff0015]). Timeout expired before operation completed."
Obviously, there is some miscommunication with the oscilloscope. Looking at the code, the query in question appears to be,
:WAV:DATA?
which according the 54621a's programming manual, should illicit the response,
, ( for example, to transmit 2000 bytes of data the syntax would be #80002000<2000 bytes of data>.
After a step by step execution of the function in question in ag5462x.c, the query is successfully sent via a viWrite command. It the proceeds to viRead two bytes, the "#8", then viRead 8 bytes, "0001000" in my case. Then, upon execution of a viRead for 1000 bytes, the oscilloscope flashes the "Query UNTERMINATED" warning message, and after a considerable delay, this viRead function returns with the the "Timeout expired before operation completed" error. Apparently, the data returned in the 1000 byte array is indeed the data I expect from the oscilloscope despite these problems.
The timeout delay and error messages are unacceptable for the program I need to execute.
I have to consider that the problem is with the oscilloscope, since the ag5462x code appears to use the appropriate protocol. I need this "Query UNTERMINATED" problem to go away, but I am at a dead end.
Please help,
Paul