Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

VISA TCP connection causes error code -1073807298

Hello,
 
This is my first attempt at using VISA to manage a TCP connection.  For the most part it has been working really well.  I can open the connection (direct connection from PC to PLC with crossover cable) and read and write.  If I leave the connection idle for ~15seconds and then try to do a read or write, I get the error code -1073807298 which seems like a generic VISA I/O error.  If I re-open the connection after receiving this error, I can read and write again.
 
I guess what I'm asking is if this is there is any way to avoid this error and if not, if I'm doing the right thing by capturing the error and re-opening the connection.
 
I'm using LV7.1 with VISA 4.2.  My software is structured to open the connection upon start, (ideally) maintain that connection throughout the program, and then close the connection on exit.
 
Thank you for any information,
-jon
0 Kudos
Message 1 of 2
(3,346 Views)
Howdy bigg_jon,

The error you're getting, -1073807298, can actually mean a few different things.  From your message, I'm assuming you're getting a generic I/O error.  If that's the case, 15 seconds is about the default timeout value for VISA reads.  You might try setting your VI to never time out.  I'm curious though, can you attach a screenshot of your program focusing on the part that's throwing the error?  That way we can see the context of your program and troubleshoot much faster.  Also, if you post back, please include exactly what the error message says.  Thanks!
Sincerely,

Chris G in AE
0 Kudos
Message 2 of 2
(3,335 Views)