From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Visa Lastbit setting controls which bit?

Using Measurement Studio Visa to control a serial port for a custom packet protocol I would like to use LastBit termination - which bit is set/cleared i.e. what is considered the last bit. Comport=19200,n,8,1
*Is the stop bit used as the last bit??
thanks
0 Kudos
Message 1 of 3
(3,067 Views)
Cherry:

The last-bit and the stop-bit are 2 different things. The last-bit VISA setting lets you basically treat an extra out-of-band data-bit as an EOI character. Some devices may send back the last byte of data with the most significant bit set. So for example, a linefeed without EOI would be 0x0A, as you expect, but a linefeed signifying EOI would be 0x8A.

The stop-bit is a lower level serial thing.

The last-bit setting is not something that a whole lot of devices use, but I do know that they exist.

Also, if you will use this setting, I suggest you use NI-VISA 2.5 because there were some bugs fixed related to the last-bit feature.

Dan Mondrik
Senior Software Engineer, VISA
National Instruments
0 Kudos
Message 2 of 3
(3,067 Views)
I am working with a "binary" protocol which has messages that vary in length - How can I trap end-of-message? Also, why dose VISA endin not support Break as EndOut dose? This could have worked for me.
Thanks again.
0 Kudos
Message 3 of 3
(3,067 Views)