cancelar
Mostrando resultados para 
Pesquisar então 
Você quer dizer: 

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
0 Kudos
Mensagem 1 de 5
3.475Exibições
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
Mensagem 2 de 5
3.467Exibições
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
0 Kudos
Mensagem 3 de 5
3.464Exibições
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
Mensagem 4 de 5
3.438Exibições

485

 

 

Doug Ferguson
0 Kudos
Mensagem 5 de 5
3.431Exibições