I am using the tclvisa package to communicate with a USB GPIB enabled o-scope. Everything works great except now and again I make a mistake/typo to the o-scope and perform a "gets" on the open visa channel. This hangs for the duration of the timeout for the visa channel and then returns nothing. From this point on, I am still able to send commands to the o-scope via the visa channel but I am no longer able to perform any queries. Meaning if I send a command to the scope that is supposed to return some info and perform "gets" on the open visa channel, the gets returns immediately and with no info?
I tried to flush the visa channel but that did nothing. I'm obviously doing something to create the error but I'd like to know how to recover without closing the current channel and opening a new one.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
View and moderate all "General Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Discussion"
I am using the tclvisa package to communicate with a USB GPIB enabled o-scope. Everything works great except now and again I make a mistake/typo to the o-scope and perform a "gets" on the open visa channel. This hangs for the duration of the timeout for the visa channel and then returns nothing. From this point on, I am still able to send commands to the o-scope via the visa channel but I am no longer able to perform any queries. Meaning if I send a command to the scope that is supposed to return some info and perform "gets" on the open visa channel, the gets returns immediately and with no info?
I tried to flush the visa channel but that did nothing. I'm obviously doing something to create the error but I'd like to know how to recover without closing the current channel and opening a new one.
Is this a VISA error or tclvisa error? I.e. what app layer fails: VISA implementation (by TI, Agilent etc) or tclvisa?
It's simple to know. Issue a 'gets' requests that fails. After this call 'visa::last-error' command. What will it return?