Main Content

writeline

Write line of ASCII data to VISA resource

    Description

    example

    writeline(v,data)writes the ASCII textdatafollowed by the terminator to the VISA resourcev. The function suspends MATLAB®execution until the data and terminator are written.

    Examples

    collapse all

    Create a connection to a VISA resource. This example shows a connection to a device with the aliasCOM4using the VISA-Serial interface.

    v = visadev("COM4");

    Set the terminator to"CR/LF"and write a string of ASCII data to the VISA resourcev. Thewritelinefunction automatically appends the terminator to the data.

    configureTerminator(v,"CR/LF") writeline(v,"START")

    Input Arguments

    collapse all

    VISA resource, specified as avisadevobject.

    Example:writeline(v,data)writes ASCII data to the VISA resourcev.

    ASCII data to write, specified as a character vector or string scalar of text.

    Example:writeline(v,"helloworld")写的ASCII数据"helloworld".

    Data Types:char|string

    Version History

    Introduced in R2021a