Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

The vi is identifyng the number of bytes to be read but the VISA Read vi is not able to read the data from the port.

We are trying to communicate with the AT106 balance of Mettler Toledo.The VI is attached.

We are sending in "SI" which is a standard command that is recoginsed by the balance. The balance reads it.The indicator after the property node indicates that there are 8 bytes available on the serial port. However, the VISA read VI fails to read the bytes at the serial port and gives the following error:

Error -1073807253 occurred at VISA Read in visa test.vi
Possible reason(s):
VISA: (Hex 0xBFFF006B) A framing error occurred during transfer.

The Vi is atttached.

Thanks

Vivek
0 Kudos
Message 1 of 12
(4,352 Views)
A framing error indicates a mismatch in the serial port configuration. Double check your stop bits, parity, and data bits. Have you tried running communication in Hyperterminal with the settings your're using?
0 Kudos
Message 2 of 12
(4,351 Views)
Hello,

You should also definitely check the baud rates specified; a framing error often occurs when different baud rates are specified, as the UARTs will be attempting to transmit and receive at different rates, causing the receiving end to either miss bits in a given frame, or sample bits more than once (depending on whether the receiving rate is lower or higher respectively). You should be able to check the baud rate used by your balance in the user manual, and match it in your VI with the baud rate parameter of the VISA Configure Serial Port VI.

Best Regards,

JLS
Best,
JLS
Sixclear
0 Kudos
Message 3 of 12
(4,352 Views)
Hi Dennis,

Thanks for the prompt reply. I have double checked the parameters and they actually are set to the required ones.

The balance characteristics are as follows:

Asynchronous Transmission
1 start bit
7 data bits
1 parity bit (selectable)
1 stop bit

I think start bit is taken care by LabView itself but am not sure about the Asynchronous Transmission ? Do we need to set some property for such mode of transmission?

Thanks

Vivek
0 Kudos
Message 4 of 12
(4,352 Views)
Asynchronous in this case should mean no flow control. Flow control is settable with VISA Configure Serial Port. One thing I question is the parity bit. It's selectable and you use even in your VI. Could the instrument be selected to something else? Also, you didn't answer my question about using Hyperterminal.
0 Kudos
Message 5 of 12
(4,352 Views)
Hi Dennis,

Thanks for the reply!

I have tried using the hyperterminal but it is also not able to communicate with the balance.

The other parity bit selections are odd,space and none.

Thanks for your continued interest.

Vivek
0 Kudos
Message 6 of 12
(4,352 Views)
Hi JLS,

Thanks for the response.

I have checked the baud rate and it is same for the VI and the balance. However, it still continues giving the framing error.

Vivek
0 Kudos
Message 7 of 12
(4,352 Views)
Hello,

Mismatched baud rates is a common, fundamental cause of a framing error; make sure that the baud rates of both sides are equal (you should be able to read the user manual of the balance, and then set it in LabVIEW to match).

Regards,

JLS
Best,
JLS
Sixclear
0 Kudos
Message 8 of 12
(3,987 Views)
Hello,

You can ignore the repeat comment about baud rates 🙂 Anyway, what baud rate are you using?

JLS
Best,
JLS
Sixclear
0 Kudos
Message 9 of 12
(4,352 Views)
Hi,

I am using a baud rate of 2400.

Thanks

Vivek
0 Kudos
Message 10 of 12
(4,351 Views)