LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Framing Error?

Hi,
When running a VI that writes data to an external meter through RS232 and then reads the corresponding data, I receive an error on the meter (E17 Serial Comms error: parity or framing), consequently resulting in another error short after in LabVIEW (Error -1073807253 occurred at VISA read.vi          Possible Reason(s) - VISA: (HEX 0xBFFF006b) A framing error occurred during transfer.)
 
I've addressed my parity issues, but I can't see how a framing error occurred or really understand how this has transpired?
 
Thanks
0 Kudos
Message 1 of 4
(3,801 Views)
Framing errors almost always a baud rate issue or a signal quality issue.
 
If you search on "frame Ben" you will find a number of links were we have discussed this issue in the past.
 
Sorry but I don't have time know to re-write those posts.
 
Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 2 of 4
(3,797 Views)
Hey Ben,
 
I took a look at all the returned topics from the search and only a few really targeted my problem directly.  Out of the few, they dealt with wiring problems, ground problems, not knowing how to add frames?, etc..  So I decided to take a closer look at the Baud Rate which is what you said could be the main problem with my framing issues.  I tested Baud Rates from the max/min range I could (115200-110) and received some very strange readings.  At the max and mins (115200, 1200, 600, 300, 110) I received readings of 0 bytes.  Every other Baud Rate, with the exception of 9600, returned readings from 32 bytes to 82 bytes of repeating strings (E0E0, 1C1C, 923C1292, F77F, F8F8, and so on).  The Baud Rate of 9600 returned 1 byte, the string being #95.  I assume 9600 returned a value like this because the meter's default settings are 9600-N-8-1.
 
Any help will be appreciated,
Thanks
0 Kudos
Message 3 of 4
(3,781 Views)

Verify the device is configured as you said.

Configure your I/O to use those settings.

If you still have framing errors you are probably dealing with the signal integrity issue.

Use a short cable to test.

If all else fails break out a scope and start looking at your data while the framing errors occur. With a reapeating tramit pattern and a good scope you should be able to read the bits right of the scope (rember start and stop and parity bits). Electical interference, grounds, flourescent lights, motors, cable length cable capacitance....

Again, suspect signal quality.

Ben

 

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 4 of 4
(3,774 Views)