Serial Interface (RS-232 and RS-485) and MATLAB
Many devices and instruments connect to a computer through a serial interface. You can communicate with any device or instrument that has a serial interface directly from MATLAB and Simulink with Instrument Control Toolbox.
The toolbox provides the tools that let you communicate with, configure, and transfer data to or from your serial device without writing code. You can generate MATLAB code for your serial device that you can reuse later to communicate with your device or develop graphical applications. You can also communicate with your serial device using MATLAB scripts or create your own software drivers and encapsulate low-level serial commands into higher level commands that are easier to access.
Resources
- MATLAB Serial Code (Example)
- Simulink Serial Model (Example)
- Collect and Plot Data from an Instrument Using a Serial Port (Example)
- Test & Measurement Tool (documentation)
- Configuring and Controlling External Hardware in MATLAB (MATLAB Digest article)