Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Visa 2.6.0 vs. Visa 3.6 with respect to certain errors

Hi,
 
Recently, we upgraded our LabVIEW versions from 6.1 to 8.0.1 and along with that we also upgraded our Visa driver from 2.6.0 to 3.6.
 
I am observing couple of new errors:
1) "A framing error occurred during transfer"
    This error is intermittent and was never observed with old visa driver (Visa 2.6.0).  My question is: Is this a new error message that was introduced after Visa  2.6.0?
 
2) "Timeout expired before operation completed"
      This error is always observed and was never observed with old visa driver (Visa 2.6.0).  Same query as in 1 above applies to this error message.
 
I did look up the forum and General Error Handler seems to be one option to get around this errors. 
 
Is there any other way to fix this issue?
 
Suggestions/comments are appreciated.
Thank you.
 
0 Kudos
Message 1 of 4
(3,427 Views)
Hello Troy12,
Are you talking with a Serial Port?  When are you seeing this error?  What function are you trying to execute at the time?  The most likely cause is that installing VISA reset some default values that are now not entirely correct.  Check your port configuration.  Here is a link to another discussion forum talking about framing error.
 
These are not new errors, but the speed of VISA software has been improved through these versions, and it is possible that now the timing is not matching up like it used to.  Check your port configuration.  If you Write to your instrument and Read immediately, try adding a small wait before reading to give your instrument time to fill the buffer.
 
Let us know if this is not what is happening with your instrument.
Regards,
Angela
Applications Engineer
0 Kudos
Message 2 of 4
(3,406 Views)
Hi Angela,  Thanks for the reply.
 
Sorry, I forgot to mention about Serial communication port (UART).  These errors are observed right after built-in "Visa read" function is executed.  The device that we try to talk to periodically outputs a particular message every 100ms at start up.  At this step, when Visa read occurs the error messages that were mentioned earlier are encountered. 
 
Port configuration and setup is the same and these error messages were never observed.  Only thing that has changed now is upgraded drivers and LabVIEW. 
 
I did not understand:
"The most likely cause is that installing VISA reset some default values that are now not entirely correct."
 
Response is appreciated. Thank you.
 
0 Kudos
Message 3 of 4
(3,404 Views)

Hello Troy12,

What I meant by the settings changing was that some defaults may have been reset that you were not specifically setting in your program (like the timeout) and that was causing a timing problem.  Is this system still running on the same OS and PC?

As I mentioned before the performance of VISA has improved over the years and it is possible that because of this you are now trying to read data before the instrument is ready.  Since the instrument takes some time to reply you may get a framing error or a timeout.  This can be avoided by implementing a wait before trying to read.  The other discussion forum I linked before talked about differences in the clocks as well as word length and baud rate affecting the framing errors.  Do any of the suggestions in that forum help?

There has been a change in VISA Clear, so check out this KB to see if this affects what you are doing.
How did the VISA Clear Function Change in VISA 3.0 from version 2.6?

Also, can you explain, are you sending the data at startup or are you sending data every 100ms?

Regards,
Angela
Applications Engineer

 

0 Kudos
Message 4 of 4
(3,376 Views)