08-18-2016 08:45 AM
Hi All.
I am having an issue with my serial port connection. Whenever i read from the serial port the connection dies. It reads the data successfully but then it fails and I get Error code -1073807253 and I have to relaunch Labview to do again. I have tested it with terminal software and I can send the commands over and over again and the device will continue to spit out the device info upon start up so the hardware is ok. The serial read is somehow faulting after it does the read. Anybody know what may be causing this?
Thanks,
Mark.
08-18-2016 08:50 AM
That's a framing error.
Double check your port settings and make sure your baud rates/ parity/ flow control/ stop bits/ etc. . . all exactly match what you're using in terminal.
08-18-2016 09:00 AM
Hello,
Here you can find some useful ideas about framing error:
http://digital.ni.com/public.nsf/websearch/F3E0621CB71AA16786256F970000FC57?OpenDocument
Marcin
08-18-2016 09:52 AM
All the data is read in the correct format and settings are identical so its reading the frames correctly. Dont know why this would be giving a framing error when all the frames are fine.
08-18-2016 09:56 AM
Try adding a delay after configuration as the whitepaper that mtwar linked shows. There's a chance the port is not fully configured when it starts doing the read.
It may also help to configure the port for reading before the transmission from your device starts. (i.e. set up for read when the transmitting device is off, then turn on your transmitting device).
08-18-2016 09:56 AM
Have you tried VISA Flush I/O as it is shown in the previously attached webpage?
08-18-2016 10:20 AM
I have seen issue with the wiring of the serial port introducing framing errors.
Dumb question time!
Is the ground wired?
Ben
08-18-2016 10:21 AM
Oddly enough when I remove the error cluster from the read VISA read and configure the tunnel to use default if unwired it works perfectly. Now the error is still there but just not getting passed along. This is probably not best practice but it is giving an error when there is actually no problem. Thoughts??
08-18-2016 10:23 AM
A framing error is telling us the hardware could not figure out where the data started or ended. The data recieved in that situation should considered corrupted.
Ben
08-18-2016 10:29 AM
@MarkGreally wrote:Oddly enough when I remove the error cluster from the read VISA read and configure the tunnel to use default if unwired it works perfectly. Now the error is still there but just not getting passed along. This is probably not best practice but it is giving an error when there is actually no problem. Thoughts??
Ben meant the physical wire that is ground in the serial cable. Not the virtual wire that is the error wire.