LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

VISA flush I/O buffer error 1073807194

I've connected the computer to a router which is then connected to a device via RJ45 cables. This way, the device can be controlled via LabVIEW using the IP address. The first time I try communicating with the device using the proper IP address, everything works fine. Once the program has run for a while (run continuously) I run into this VISA Flush I/O Buffer error -1073807194. No matter what I do after that, the device does not communicate back. If I close LabVIEW completely (i.e. close out all windows and the startup window that pops up at the end) and rerun the program, the connection is re-established only to fail again after a certain amount of time.

 

I tried to see if the removing the VISA Flush I/O Buffer section would solve anything, but the same thing happens except now the VISA Write fails and gives the same error. Again, the the problem is resolve if LabVIEW is completely exited and restarted.

 

Could anyone explain WHY this occurs, specifically why it occurs after a certain period of time LabVIEW has been running? And if possible, a nudge in the direction of a solution?

 

Thanks.

0 Kudos
Message 1 of 13
(5,166 Views)

Connection was lost.

 

Can you share your code?  Maybe there is something weird in there.

 


@stwlee wrote:

Once the program has run for a while (run continuously)...


If you are actually using the Run Continuously button to run your code instead of having an actual loop in your code, you need to fix that.  That could be causing all kinds of interesting things when it comes to instrument IO.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 13
(5,136 Views)

The code is relatively simple (attached). It's rather simple, so I don't know where the problem is unless there's some kind of communication issue.

 

It's not running in a loop. This particular code (subVI) is placed within an event diagram that activates via latched boolean. The code itself does not run continuously, but rather LabVIEW itself so I don't have to keep clicking run.

 

 

EDIT:

 

Just to clarify, I'm not sure if connection was actually lost or anything; that's just my assumption because the device stops responding and I get this error.

 

Also, the connected device remains visible on the attached devices list when accessing the router settings, so it's not a loss of connection at that point.

0 Kudos
Message 3 of 13
(5,130 Views)

Your error code means that there was a lost connection.

 

As I said before, DO NOT USE THE RUN CONTINUOUS BUTTON.  Make a loop for your code and stop it properly (not with the abort button).

 

How are you initializing your VISA Resource?  Are you closing it?


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 4 of 13
(5,120 Views)

I've put the entire program in a loop and am no longer running continuously.

 

The VISA is initisalized using IP address and port number for the device. Strangely enough, other similar devices connect and communicate just fine; it's just this one particular type of device that seems to be having the issue. 

 

Also, I've noticed that the wait time until the communication fails isn't limited to while the program is running. If the program has stopped but LabVIEW itself is still running and the program is restarted, the same error occurs.

 

Now I'm really stumped...could this all just be some kind of problem on the device's end that I can't figure out?

0 Kudos
Message 5 of 13
(5,069 Views)

Hello, 

 

Would it be possible for you to attach the VI?

 

Thanks,

Jonathan R.

Applications Engineer

National Instruments

Jonathan R.
Applications Engineer
National Instruments
0 Kudos
Message 6 of 13
(5,040 Views)
Why are you using a router instead of a direct connection? What else is connected to the router? At the very least, I would debug the code with a direct connection first.
0 Kudos
Message 7 of 13
(5,027 Views)

...I feel really stupid and shameful now. Turns out in my rush to get this program up and running, I've omitted a few simple things that kept causing the communication to fail.

 

Thanks for your help and patience, and I apologize for any inconvenience ^^;;

0 Kudos
Message 8 of 13
(4,865 Views)
Why don't you explain what you did so others can avoid the same mistakes?
0 Kudos
Message 9 of 13
(4,857 Views)

Well...reading over crossrulz post again I realized that in my tests I've completely forgot to initialize my VISA properly and close it properly, then there were certain settings on the actual device itself that kept getting things mixed up.

0 Kudos
Message 10 of 13
(4,822 Views)