AnsweredAssumed Answered

DSOX3024A VISA viClear() Function Timeout

Question asked by puky on Nov 18, 2014
Hello,

I am trying to program the InfiniiVision DSOX3024A via the USB interface using the VISA API and C. I followed the instructions in the Programmer's Guide exactly when setting up the oscilloscope and referencing the correct library files etc. I have tried running the example C program provided in Programmer's Guide which provides a number of useful subroutines. The program seems to work just fine apart from the function viClear(), which I believe is supposed to clear the device VISA interface. This function takes extraordinarily long to execute (usually longer than 90 seconds), and it is not even possible to execute it successfully without increasing the time before a timeout error occurs. This is a major problem for me because I have to wait a really long time at the beginning of each program execution. When the function is not called, the rest of the program runs just fine. I have tried running the program on a different computer than the one I am willing to use and the function executes without any problems in well under a second on that one. I have tried reinstalling the IO Libraries Suite and even formatting the hard drive, but that did not fix the problem. One thing I noticed is that after reinstalling IO Libraries Suite, the execution of viClear() takes considerably less time than before (less than 5 seconds) for the first few tries, and with each try the execution time seems to increase, and then eventually exceeds 90 seconds. I have been trying to fix this issue for a while now but have not been able to find a permanent solution.

I do not know exactly how critical the role of this function is in the program execution, but as far as I understand, it is important to start the program execution from a known state and I think viClear() may be important to achieve this; so I do not really want to remove it from my code unless there is a safe way of doing this without viClear().

Attached is the example C code (possibly slightly modified) provided in Programmer's Guide. I am using Visual Studio Express 2013 to compile and run the code. Please keep in mind that I have no previous experience in programming such a device and I am only just trying to get familiar with the VISA API. Any help or suggestion is much appreciated. Thanks a lot in advance.  

Outcomes