matlab动态采集数据,实时采集和绘制数据

Collect and plot data from an instrument in real time

This MATLAB(R) script generates a real time plot of voltage values collected from an Agilent(TM) 34401A Digital Multimeter over the serial port(RS232). The data is collected and plotted until the predefined stop time is reached. This example also demonstrates automating a query based interaction with an instrument while monitoring the results live.

This script can be modified to be used on any platform by changing the serialPort variable.

Example:-

On Linux: serialPort = '/dev/ttyS0';

On MacOS: serialPort = '/dev/tty.KeySerial1';

On Windows: serialPort = 'COM1';

The script may also be updated to use any instrument/device to collect real time data. You may need to update the SCPI commands based on information in the instrument's programming manual.

To generate a report of this entire script, you may use the PUBLISH command at the MATLAB(R) command line as follows:

publish(real_time_data_plot);

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值