This is machine translation

Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

Translate This Page

MathWorks Machine Translation

The automated translation of this page is provided by a general purpose third party translator tool.

MathWorks does not warrant, and disclaims all liability for, the accuracy, suitability, or fitness for purpose of the translation.

Capabilities and Supported Interfaces and Platforms

What Is the MATLAB Serial Port Interface?

The MATLAB® serial port interface provides direct access
to peripheral devices such as modems, printers, and scientific instruments
that you connect to your computer's serial port. This interface is
established through a serial port object. The serial port object supports
functions and properties that allow you to

Configure serial port communications

Use serial port control pins

Write and read data

Use events and callbacks

Record information to disk

Instrument Control Toolbox™ software provides additional serial
port functionality. In addition to command-line access, this toolbox
has a graphical tool called the Test & Measurement Tool, which
allows you to communicate with, configure, and transfer data with
your serial device without writing code. The Test & Measurement
Tool generates MATLAB code for your serial device that you can
later reuse to communicate with your device or to develop UI-based
applications. The toolbox includes additional serial I/O utility
functions that facilitate object creation and configuration, instrument
communication, and so on. With the toolbox you can communicate with
GPIB- or VISA-compatible instruments.

If you want to communicate with PC-compatible data acquisition
hardware such as multifunction I/O boards, you need Data Acquisition Toolbox™ software.

Supported Serial Port Interface Standards

Over the years, several serial port interface standards have
been developed. These standards include RS-232, RS-422, and RS-485
- all of which are supported by the MATLAB serial port object.
Of these, the most widely used interface standard for connecting computers
to peripheral devices is RS-232.

This guide assumes you are using the RS-232 standard, discussed
in Overview of the Serial Port. Refer
to your computer and device documentation to see which interface standard
you can use.

Supported Platforms

The MATLAB serial port interface is supported on:

Linux® 64-bit

Mac OS X 64-bit

Microsoft® Windows® 64-bit

Using the Examples with Your Device

Many of the examples in this section reflect specific peripheral
devices connected to a serial port — in particular a Tektronix® TDS
210 two-channel oscilloscope connected to the COM1 port, on a Windows platform.
Therefore, many of the string commands are specific to this instrument
and platform.

If you are using a different platform, or your peripheral device
is connected to a different serial port, or if it accepts different
commands, modify the examples accordingly.

MATLAB Command

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.

Was this topic helpful?

Select Your Country

Choose your country to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .