Clear buffers for communication with VISA resource
Flush VISA Resource Inputs and Outputs
Create a connection to a VISA resource. This example shows a connection to a device
with the alias
COM4 using the VISA-Serial interface.
v = visadev("COM4");
Write some data to the device and view the number of bytes available to be read in the input buffer.
ans = 5
Flush both the input and output buffers.
View the number of bytes available to be read.
ans = 0
The input buffer has no data.
v — VISA resource
VISA resource, specified as a
flush(v) flushes data from the VISA resource
Introduced in R2021a