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: 

Can I get incoming byte count prior to CNiVisaSession::Read()?

I would like to determine how many bytes have arrived via the COMM port prior to specifying the count in the CNiVisaSession::Read(buffer, count, actual_count)?  This way I could avoid timing out due to an overcount.
 
 
-dahill
0 Kudos
Message 1 of 2
(2,748 Views)
you can check the VisaSerialBytesAvailable attribute. It returns an unsigned int 32 value.
 
 
 
Message 2 of 2
(2,743 Views)