LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Reading from Serial Port disconnects port

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.

0 Kudos
Message 1 of 11
(3,910 Views)

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.

Message 2 of 11
(3,905 Views)

Hello,

 

Here you can find some useful ideas about framing error:

 

http://digital.ni.com/public.nsf/websearch/F3E0621CB71AA16786256F970000FC57?OpenDocument

 

Marcin

              

Think Dataflow - blog.mtapp.tech
Message 3 of 11
(3,890 Views)

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.

0 Kudos
Message 4 of 11
(3,870 Views)

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).

Message 5 of 11
(3,865 Views)

Have you tried VISA Flush I/O as it is shown in the previously attached webpage?

              

Think Dataflow - blog.mtapp.tech
0 Kudos
Message 6 of 11
(3,864 Views)