LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Framing Error, help?

Could anyone tell me why I keep getting a Framing Error with the attached program? It is a sub-vi of a larger project. I still get the error if it's laid flat in the main project as opposed to being a sub-vi.
Also, why would I get the error somethimes, and sometimes not? For example, why would I get a framing error when I call this VI with a button, but I don't get the error when I call it "automatically" during a startup routine?
Thanks!
The error window is also attached.
Richard






Download All
0 Kudos
Message 1 of 4
(3,061 Views)
You might try initializing your com port inside your vi before you attempt to write to it or read from it. Also, you can try to increase the delay time between writing and reading to something greater than 20 milliseconds. Also, put a Visa close at the end of your program.
- tbob

Inventor of the WORM Global
Message 2 of 4
(3,061 Views)
Thanks tbob.
I always put the init and close things in the main program loop, but not the sub-vi's, maybe that'll do it.
I assume "framing error" has something to do with different serial data stepping over each other?

**** Is there any more help out there as to exactly WHAT a Framing Error is? How they happen? I've read about chaning stop bits and parity - that doesn't help in my case *****
Richard






0 Kudos
Message 3 of 4
(3,061 Views)
The framing error is detected by the UART (universal asynchronous receiver/transmitter) when the last bit received is not a stop bit. It�s a general term, not reserved by National Instruments.

The reason for receiving this error is most likely due to improper initialization of your serial port.

Best regards,
Philip C.
Applications Engineer
National Instruments
- Philip Courtois, Thinkbot Solutions

Thinkbot Solutions
0 Kudos
Message 4 of 4
(3,061 Views)