MATLAB 帮助中心
Read line of ASCII string data from VISA resource
Since R2021a
data = readline(v)
data = readline(v) reads ASCII data from the VISA resource v until the first occurrence of the terminator and returns data as a string without the terminator. The function suspends MATLAB® execution until it reaches a terminator or a timeout occurs.
data
v
example
collapse all
Create a connection to a VISA resource. This example shows a connection to a device with the alias COM4 using the VISA-Serial interface.
COM4
v = visadev("COM4");
Set the terminator to "CR/LF".
"CR/LF"
configureTerminator(v,"CR/LF")
Read a string of ASCII data from the VISA resource v. The readline function returns data until it reaches a terminator.
readline
data = readline(v);
visadev
VISA resource, specified as a visadev object.
Example: readline(v) reads ASCII data from the VISA resource v.
readline(v)
Introduced in R2021a
visadev | read | configureTerminator | writeline
read
configureTerminator
writeline
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
选择网站
选择网站以获取翻译的可用内容,以及查看当地活动和优惠。根据您的位置,我们建议您选择:。
您也可以从以下列表中选择网站:
如何获得最佳网站性能
选择中国网站(中文或英文)以获得最佳网站性能。其他 MathWorks 国家/地区网站并未针对您所在位置的访问进行优化。
美洲
欧洲
亚太
联系您当地的办事处