Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

in sequence for write/read, value of wait time?

I made a sequence for write then read on a serial port.
Sometimes, the read string is not the entire one.
I put some wait time of 500ms in write sequence and wait time of 500ms in read sequence. Could it be the problem ?Is it possible to change the buffer size ?
0 Kudos
Message 1 of 4
(2,833 Views)
Hi,

The buffer size is limited by the port itself. Consequently there really is no way to increase its size. Are you using VISA or the old serial VI's? One thing you may want to try is making your read time half the time of the write sequence. Also make sure that flow cotrol is working. With flow ctrl, you should never lose any information.

Hope this helps out.

Best Regards,
Aaron K.
Application Engineer
National Instruments
0 Kudos
Message 2 of 4
(2,833 Views)
I use old serial VI because I don't know why but it doesn't work with VISA.
How can I be sure that flow control is working ?
For the moment I just check that the communication is ok by checking that the number of bytes in the buffer is different from zero.

Thanks in advance and best regards.
0 Kudos
Message 3 of 4
(2,833 Views)
Hi,

Flow control is one of the settings in the "flow ctrl etc." cluster of the Serial Port Init VI. These VI's are really only there for legacy apps, and I would suggest you reconsider using VISA. It really is a much more elegant solution.

Hope this helps out!

Best Regards,
Aaron K.
Application Engineer
National Instruments
0 Kudos
Message 4 of 4
(2,833 Views)