LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

buffer in RS-232

VISA set I/O buffer size.vi was used to set the size of buffer.
Can I understand the buffer as a temporary memory to save the data?
 
If any, what's the receive buffer option?
Roughly thinking, I believe the receive buffer have (already) been determined in the instrument not PC.
In continuous reading via RS-232 after triggering receiving, Labview can received only one data in one time interval.
But in reality, LV can detect the buffer state of the instrument then give me the over-run error. How? 
 
0 Kudos
Message 1 of 5
(3,026 Views)

For VISA, the buffer size is the size of the buffer defined in the driver for your serial port.  It has nothing to do with the instrument on the other end.

It would be the number of bytes allowed to accumulate at the serial port of your PC before your program would need to do a VISA read.  If more bytes came in than the buffer size before you do a VISA read on the port, I'm sure an error woul get generated at the time you do a VISA read.

0 Kudos
Message 2 of 5
(3,018 Views)
Thank you for the reply.
If there is a stream (continuous data from the instrument) to PC, what reasons explain for my fault to read data so fast using VISA read.vi?
My insturment make the data in rate of 4 msec, but I can't read the data in less than 10 msec.
(There are lost data (empty string) in the reading in RS-232 when I set to the big buffer (50kb) .)
0 Kudos
Message 3 of 5
(2,994 Views)
I don't understand.
If you can read data every 10 msec, then you can read all the data your instrument has send with one read. You will get the data of two transmitions of the instrument, as in 10msec it will transmit twice.
0 Kudos
Message 4 of 5
(2,984 Views)

Thank you for the reply.
If there is a stream (continuous data from the instrument) to PC, what reasons explain for my fault to read data so fast using VISA read.vi?
My insturment make the data in rate of 4 msec, but I can't read the data in less than 10 msec.
(There are lost data (empty string) in the reading in RS-232 when I set to the big buffer (50kb) .)
What is the baud rate u have set? 9600? try setting a baudrate of 115600. Let us know if that solves your problem
Message 5 of 5
(2,971 Views)