07-25-2012 02:50 PM
Hi,
I'm working on a project in labVIEW to read data from my Arduino, I have to manipulate the data extracted from USB to make statistics on a solar cell.
But I'm stucked with this error and I have no idea how to solve this one.
Maybe is something really silly, I've never used this program before, so I would appreciate some help.
When I set the VISA Resource name (in case a COM port for the USB) and run it, it stops at the VISA Read Function and says:
"Error -1073807339 occurred at VISA Read in Cell
Possible reason(s):
VISA: (Hex 0xBFFF00A6) The connection for the given session has been lost."
I'm addin the file. Thanks 🙂
07-25-2012 03:00 PM
Your error message is mixed up. -1073807339 is the error for a Timeout. It correlates to hex BFFF0015.
Hex BFFF00A6 correlates to error -1073807194, the connection for a given session has been lost.
So which error do you actually have?
Since you are talking about a com port, the timeout error is more than likely the error you have. Search the forums and you'll find thousands of messages talking about that error message.
07-25-2012 03:24 PM
You're right, I have mixed up things.
The rigth one is Hex BFFF00A6 correlates to error -1073807194, the connection for a given session has been lost.
and it says
Error -1073807252 occurred at VISA Read in PainelTESTE.vi
Possible reason(s):
VISA: (Hex 0xBFFF006C) An overrun error occurred during transfer. A character was not read from the hardware before the next character arrived.
07-25-2012 03:25 PM
Actually I'm lost. But my problem now is the one above.
07-25-2012 04:09 PM - edited 07-25-2012 04:10 PM
Okay. So now you say you have a third error????
A buffer overrun means it is sending data faster than you are reading it. You are reading 100 bytes every one second. (Possibly less if you have the termination character enabled and that comes in during the attempt to read 100 bytes.)
How fast is your device sending data? What does it look like when you use hyperterminal? Is stuff flying up the screen?
You aren't sending any commands, so does that mean the device just continuously sends data without needing to request it?
If the device is sending data at its own rate without your PC requesting it, then I suggest you use the "Bytes at Port" method with the termination character disabled to read all the data present in the buffer at once shot.
Before doing that, I would suggest putting a Bytes at Port property node and wiring an indicator to that to see if the data in the buffer is continually growing right up to the point you get the buffer overrun error.
Also, wire up your error wires on the VISA functions. Put a probe or indicator on them to watch for errors. That way your code can keep running rather than freezing on an error.
07-26-2012 12:37 PM
Well, as I said, I'm really new on this stuff.
So now I have installed hyperterminal and I'm going to see what happens.
My Arduino board communicates at 9600baund and is sending data at every time it makes a measure,
that time is controlled by the program I made on the chip and don't need a request from labVIEW.
I have done what you said about the error indicator.
But I have no idea what you mean by saying I should use a Bytes a port Property.. 😕
07-26-2012 03:59 PM
Look at the serial ports example in the Example Finder. It uses the Bytes at Port property node.
I usually say the Bytes at Port method is the wrong way to deal with serial port communication. But in a situation like this where there is a lot of data coming in at a rate that you can't control, it's best to see how much data has arrived and read all of it.