LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

framing error on first VISA read

I am getting a "framing error code" with my first VISA read.

 

My data flow is as follows:

 

Formulate string to write

VISA write that string

Wait 100 ms

Querey Instr for bytes at port

VISA read that many bytes

 

On my first read, I get 16 bytes, which is what I expect. However I also recieve a framing error and all following Instr quereys result in 0 bytes at port. I can stop the program and restart without reconfiguring the port. Again the first read is good and all following reads are 0.

 

I had this working with a MOXA usb to serial converter. I have chnaged to a NI USB-485 converter and now I get this error. 

 

What gives?I have confirmed that the instrument and drivers match with respect to port settings.

Message Edited by doug@southerndaqsolutions.com on 02-19-2009 08:33 AM
Doug Ferguson

www.southerndaqsolutions.com
0 Kudos
Message 1 of 5
(2,869 Views)
Framing errors can be caused by a number of things. If you search the forum and KnowledgeBase you'll come across a lot of hits.  You said you were using a MOXA serial box and now are using a USB-485. Is the device you're talking to an RS-485 device?
0 Kudos
Message 2 of 5
(2,861 Views)
I have searched the KB and I can't seem to find anything that specifically addresses getting a good read the first iteration but bad following reads.
Doug Ferguson

www.southerndaqsolutions.com
0 Kudos
Message 3 of 5
(2,858 Views)
I don't know that you're going to find something that is specific to that particular situation. The framing error is detected by the UART in your PC. It indicates that the communication frame is malformed, such as no stop bit, or not enough stop bits, or something else. I had asked whether you're talking to a 485 device. Wsa the MOXA converter a 232 or 485 device?
0 Kudos
Message 4 of 5
(2,832 Views)

485

 

 

Doug Ferguson

www.southerndaqsolutions.com
0 Kudos
Message 5 of 5
(2,825 Views)